qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 2/5] kvm: Add arch reset handler


From: Jan Kiszka
Subject: [Qemu-devel] [PATCH 2/5] kvm: Add arch reset handler
Date: Fri, 06 Nov 2009 19:39:24 +0100
User-agent: StGIT/0.14.3

Will be required by succeeding changes.

Signed-off-by: Jan Kiszka <address@hidden>
---

 kvm-all.c         |    2 ++
 kvm.h             |    2 ++
 target-i386/kvm.c |    4 ++++
 target-ppc/kvm.c  |    4 ++++
 4 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/kvm-all.c b/kvm-all.c
index 48ae26c..31bc2f8 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -150,6 +150,7 @@ static void kvm_reset_vcpu(void *opaque)
 {
     CPUState *env = opaque;
 
+    kvm_arch_reset_vcpu(env);
     if (kvm_arch_put_registers(env)) {
         fprintf(stderr, "Fatal: kvm vcpu reset failed\n");
         abort();
@@ -201,6 +202,7 @@ int kvm_init_vcpu(CPUState *env)
     ret = kvm_arch_init_vcpu(env);
     if (ret == 0) {
         qemu_register_reset(kvm_reset_vcpu, env);
+        kvm_arch_reset_vcpu(env);
         ret = kvm_arch_put_registers(env);
     }
 err:
diff --git a/kvm.h b/kvm.h
index e7d5beb..6a82f6a 100644
--- a/kvm.h
+++ b/kvm.h
@@ -93,6 +93,8 @@ int kvm_arch_init(KVMState *s, int smp_cpus);
 
 int kvm_arch_init_vcpu(CPUState *env);
 
+void kvm_arch_reset_vcpu(CPUState *env);
+
 struct kvm_guest_debug;
 struct kvm_debug_exit_arch;
 
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index aa90eff..ca99cc7 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -221,6 +221,10 @@ int kvm_arch_init_vcpu(CPUState *env)
     return kvm_vcpu_ioctl(env, KVM_SET_CPUID2, &cpuid_data);
 }
 
+void kvm_arch_reset_vcpu(CPUState *env)
+{
+}
+
 static int kvm_has_msr_star(CPUState *env)
 {
     static int has_msr_star;
diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c
index b53d6e9..4e1c65f 100644
--- a/target-ppc/kvm.c
+++ b/target-ppc/kvm.c
@@ -53,6 +53,10 @@ int kvm_arch_init_vcpu(CPUState *cenv)
     return ret;
 }
 
+void kvm_arch_reset_vcpu(CPUState *env)
+{
+}
+
 int kvm_arch_put_registers(CPUState *env)
 {
     struct kvm_regs regs;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]