mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
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>
This commit is contained in:
parent
e9283f8b88
commit
8d2ba1fb9c
4 changed files with 16 additions and 35 deletions
1
kvm.h
1
kvm.h
|
@ -32,7 +32,6 @@ struct kvm_run;
|
|||
int kvm_init(int smp_cpus);
|
||||
|
||||
int kvm_init_vcpu(CPUState *env);
|
||||
int kvm_sync_vcpus(void);
|
||||
|
||||
int kvm_cpu_exec(CPUState *env);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue