public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kvm: Fix kvm startup script
@ 2008-08-13  7:43 Yang, Sheng
  2008-08-13  8:08 ` Avi Kivity
  0 siblings, 1 reply; 2+ messages in thread
From: Yang, Sheng @ 2008-08-13  7:43 UTC (permalink / raw)
  To: Avi Kivity; +Cc: kvm, kvm-ia64

[-- Attachment #1: Type: text/plain, Size: 1540 bytes --]

From 4993375c0d67fd5eb47891dee48300880aceff1e Mon Sep 17 00:00:00 2001
From: Sheng Yang <sheng.yang@intel.com>
Date: Wed, 13 Aug 2008 15:39:29 +0800
Subject: [PATCH] kvm: Fix kvm startup script


Signed-off-by: Sheng Yang <sheng.yang@intel.com>
---
 kvm |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/kvm b/kvm
index 2a7dc85..cb9ecf8 100755
--- a/kvm
+++ b/kvm
@@ -18,6 +18,14 @@ config = ShellConfigParser()
 config.read('config.mak')

 external_module = config.get('shell', 'want_module')
+
+arch = config.get('shell', 'arch')
+p = re.compile("^i\d86$")
+if len(p.findall(arch)):
+    arch = 'x86_64'
+if arch != 'x86_64' and arch != 'ia64':
+    raise Exception('unsupported architecture %s' % arch)
+
 privileged = os.getuid() == 0

 optparser = optparse.OptionParser()
@@ -153,8 +161,12 @@ def remove_module(module):
                 raise Exception('failed to remove %s module' % 
(module,))

 def insert_module(module):
+    if arch == 'x86_64':
+	archdir = 'x86'
+    elif arch == 'ia64':
+	archdir = 'ia64'
     if os.spawnl(os.P_WAIT, '/sbin/insmod', 'insmod',
-                 'kernel/%s.ko' % (module,)) != 0:
+                 'kernel/' + archdir + '/%s.ko' % (module,)) != 0:
         raise Exception('failed to load kvm module')

 def probe_module(module):
@@ -197,8 +209,6 @@ bootdisk = 'c'
 if options.install:
     bootdisk = 'd'

-arch = 'x86_64'
-
 if arch == 'x86_64':
     cmd = 'qemu-system-' + arch
 else:
--
1.5.6


[-- Attachment #2: 0001-kvm-Fix-kvm-startup-script.patch --]
[-- Type: text/x-diff, Size: 1544 bytes --]

From 4993375c0d67fd5eb47891dee48300880aceff1e Mon Sep 17 00:00:00 2001
From: Sheng Yang <sheng.yang@intel.com>
Date: Wed, 13 Aug 2008 15:39:29 +0800
Subject: [PATCH] kvm: Fix kvm startup script


Signed-off-by: Sheng Yang <sheng.yang@intel.com>
---
 kvm |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/kvm b/kvm
index 2a7dc85..cb9ecf8 100755
--- a/kvm
+++ b/kvm
@@ -18,6 +18,14 @@ config = ShellConfigParser()
 config.read('config.mak')
 
 external_module = config.get('shell', 'want_module')
+
+arch = config.get('shell', 'arch')
+p = re.compile("^i\d86$")
+if len(p.findall(arch)):
+    arch = 'x86_64'
+if arch != 'x86_64' and arch != 'ia64':
+    raise Exception('unsupported architecture %s' % arch)
+
 privileged = os.getuid() == 0
 
 optparser = optparse.OptionParser()
@@ -153,8 +161,12 @@ def remove_module(module):
                 raise Exception('failed to remove %s module' % (module,))
 
 def insert_module(module):
+    if arch == 'x86_64':
+	archdir = 'x86'
+    elif arch == 'ia64':
+	archdir = 'ia64'
     if os.spawnl(os.P_WAIT, '/sbin/insmod', 'insmod',
-                 'kernel/%s.ko' % (module,)) != 0:
+                 'kernel/' + archdir + '/%s.ko' % (module,)) != 0:
         raise Exception('failed to load kvm module')
 
 def probe_module(module):
@@ -197,8 +209,6 @@ bootdisk = 'c'
 if options.install:
     bootdisk = 'd'
 
-arch = 'x86_64'
-
 if arch == 'x86_64':
     cmd = 'qemu-system-' + arch
 else:
-- 
1.5.6


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] kvm: Fix kvm startup script
  2008-08-13  7:43 [PATCH] kvm: Fix kvm startup script Yang, Sheng
@ 2008-08-13  8:08 ` Avi Kivity
  0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2008-08-13  8:08 UTC (permalink / raw)
  To: Yang, Sheng; +Cc: kvm, kvm-ia64

Yang, Sheng wrote:
> From 4993375c0d67fd5eb47891dee48300880aceff1e Mon Sep 17 00:00:00 2001
> From: Sheng Yang <sheng.yang@intel.com>
> Date: Wed, 13 Aug 2008 15:39:29 +0800
> Subject: [PATCH] kvm: Fix kvm startup script
>
>   

Applied, thanks.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-08-13  8:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-13  7:43 [PATCH] kvm: Fix kvm startup script Yang, Sheng
2008-08-13  8:08 ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox