aboutsummaryrefslogtreecommitdiff
path: root/kvm-all.c
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-12-15 22:20:42 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-12-15 22:20:42 +0000
commitf5d6f51ba66aad038f1bc4436582761015838438 (patch)
treef00e2762654db54d120ae7cf0cffc043ec33cdbe /kvm-all.c
parent8d6c92b6b18a95e079d340db117c77f0e01b71f1 (diff)
downloadqemu-f5d6f51ba66aad038f1bc4436582761015838438.zip
qemu-f5d6f51ba66aad038f1bc4436582761015838438.tar.gz
qemu-f5d6f51ba66aad038f1bc4436582761015838438.tar.bz2
kvm: sync vcpu state during initialization (Hollis Blanchard)
Currently on x86, qemu initializes CPUState but KVM ignores it and does its own vcpu initialization. However, PowerPC KVM needs to be able to set the initial register state to support the -kernel and -append options. Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6060 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'kvm-all.c')
-rw-r--r--kvm-all.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/kvm-all.c b/kvm-all.c
index dad80df..11034df 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -141,6 +141,21 @@ err:
return ret;
}
+int kvm_sync_vcpus(void)
+{
+ CPUState *env;
+
+ for (env = first_cpu; env != NULL; env = env->next_cpu) {
+ int ret;
+
+ ret = kvm_arch_put_registers(env);
+ if (ret)
+ return ret;
+ }
+
+ return 0;
+}
+
/*
* dirty pages logging control
*/