kvm: Rework VCPU synchronization
authorJan Kiszka <jan.kiszka@web.de>
Sat, 27 Jun 2009 07:24:58 +0000 (09:24 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 29 Jun 2009 19:18:07 +0000 (14:18 -0500)
commit7e7ebc7909e78fc724b686e71fad243ef13acd3f
treefe229d578c3380d6b9e874337f06413a9a1160af
parentb8093c6f08371cbe58c86157cd837448a9c78027
kvm: Rework VCPU synchronization

During startup and after reset we have to synchronize user space to the
in-kernel KVM state. Namely, we need to transfer the VCPU registers when
they change due to VCPU as well as APIC reset.

This patch refactors the required hooks so that kvm_init_vcpu registers
its own per-VCPU reset handler and adds a cpu_synchronize_state to the
APIC reset. That way we no longer depend on the new reset order (and can
drop this disliked interface again) and we can even drop a KVM hook in
main().

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/apic.c
kvm-all.c
kvm.h
vl.c