Skip to contentSkip to conversation

kvm-userspace: fix kvm initialization

PATCH Applied Ehrhardt Christian 3 participants 4 messages Nov 10, 2008 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kvm-userspace: fix kvm initialization

A recent patch in qemu and its merge removed the availability of kvm_init_new_ap in target-$arch. The helper files now should call kvm_init_vcpu() directly.
This patch changes that for powerpc.

This should be true for target-ia64/op_helper.c too.

---

[diffstat]

 helper.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

[diff]

qemu/target-ppc/helper.c +1 -3
@@ -2959,10 +2959,8 @@
     env->cpu_model_str = cpu_model;
     cpu_ppc_register_internal(env, def);
     cpu_ppc_reset(env);
-#ifdef USE_KVM
     if (kvm_enabled())
-	kvm_init_new_ap(env->cpu_index, env);
-#endif
+	kvm_init_vcpu(env);
     return env;
 }
 
Applied
#1 lore raw
Quoted 7 lines · Ehrhardt Christian

A recent patch in qemu and its merge removed the availability of kvm_init_new_ap in target-$arch. The helper files now should call kvm_init_vcpu() directly.
This patch changes that for powerpc.

This should be true for target-ia64/op_helper.c too.

Applied, thanks.

Signature · 1 line
error compiling committee.c: too many arguments to function
#2 lore raw

Okay, attached the corresponding fix for ia64 arch. Xiantao

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Avi Kivity
Sent: Monday, November 10, 2008 10:02 PM
To: Ehrhardt Christian
Cc: [email protected]; [email protected]
Subject: Re: [PATCH] kvm-userspace: fix kvm initialization

Quoted 7 lines · Ehrhardt Christian

A recent patch in qemu and its merge removed the availability of kvm_init_new_ap in target-$arch. The helper files now should call kvm_init_vcpu() directly.
This patch changes that for powerpc.

This should be true for target-ia64/op_helper.c too.

Applied, thanks.

Signature · 6 lines
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

From 7d88d2d056020a528442da0b1adf82d4f89cdce6 Mon Sep 17 00:00:00 2001
From: Xiantao Zhang <[email protected]>
Date: Mon, 10 Nov 2008 22:17:23 +0800
Subject: [PATCH] KVM: Userspace: Use new interface kvm_init_vcpu for vcpu's initilization.

Also define kvm_arch_do_ioperm for ia64 arch.

---
 qemu/qemu-kvm-ia64.c         |    6 ++++++
 qemu/target-ia64/op_helper.c |    2 +-
 2 files changed, 7 insertions(+), 1 deletions(-)
qemu/qemu-kvm-ia64.c +6 -0
index 4b24564..7095d9a 100644
@@ -106,3 +106,9 @@ void kvm_arch_cpu_reset(CPUState *env)
 	env->exception_index = EXCP_HLT;
     }
 }
+
+void kvm_arch_do_ioperm(void *_data)
+{
+    struct ioperm_data *data = _data;
+    ioperm(data->start_port, data->num, data->turn_on);
+}
qemu/target-ia64/op_helper.c +1 -1
index b5897f7..78b32f9 100644
@@ -37,7 +37,7 @@ CPUState *cpu_ia64_init(const char *cpu_model)
     cpu_reset(env);
     if (kvm_enabled()) {
         kvm_qemu_init_env(env);
-        kvm_init_new_ap(env->cpu_index, env);
+        kvm_init_vcpu(env);
     }
     return env;
 }
Signature · 1 line
1.6.0
#3 lore raw
Quoted 2 lines · Xiantao

Okay, attached the corresponding fix for ia64 arch.

Applied that too, thanks.

Signature · 1 line
error compiling committee.c: too many arguments to function