diff options
author | Jan Kiszka <jan.kiszka@web.de> | 2009-11-25 00:33:03 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-12-03 15:25:57 -0600 |
commit | 2e40570728182bbcb3cb0e97b41280fd3bfd1d87 (patch) | |
tree | 03746f1dd29d82b6bf599a0afde1645454ed8593 /kvm-all.c | |
parent | b4f7767d1e239918086542d48acd294e6e5bf369 (diff) | |
download | qemu-2e40570728182bbcb3cb0e97b41280fd3bfd1d87.tar.gz qemu-2e40570728182bbcb3cb0e97b41280fd3bfd1d87.tar.bz2 qemu-2e40570728182bbcb3cb0e97b41280fd3bfd1d87.zip |
kvm: x86: Add support for VCPU event states
This patch extends the qemu-kvm state sync logic with support for
KVM_GET/SET_VCPU_EVENTS, giving access to yet missing exception,
interrupt and NMI states.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'kvm-all.c')
-rw-r--r-- | kvm-all.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -61,6 +61,7 @@ struct KVMState int coalesced_mmio; int broken_set_mem_region; int migration_log; + int vcpu_events; #ifdef KVM_CAP_SET_GUEST_DEBUG struct kvm_sw_breakpoint_head kvm_sw_breakpoints; #endif @@ -479,6 +480,11 @@ int kvm_init(int smp_cpus) } #endif + s->vcpu_events = 0; +#ifdef KVM_CAP_VCPU_EVENTS + s->vcpu_events = kvm_check_extension(s, KVM_CAP_VCPU_EVENTS); +#endif + ret = kvm_arch_init(s, smp_cpus); if (ret < 0) goto err; @@ -868,6 +874,11 @@ int kvm_has_sync_mmu(void) #endif } +int kvm_has_vcpu_events(void) +{ + return kvm_state->vcpu_events; +} + void kvm_setup_guest_memory(void *start, size_t size) { if (!kvm_has_sync_mmu()) { |