summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2009-12-07 11:11:03 +0200
committerAvi Kivity <avi@redhat.com>2009-12-07 11:11:03 +0200
commitc859bf47e565062b7801a18966913142cf59eda8 (patch)
tree45b0d133200af9e62d052d7145a604e7d3d23cc0 /kvm-all.c
parentMerge commit '40ff6d7e8dceca227e7f8a3e8e0d58b2c66d19b4' into upstream-merge (diff)
parentkvm: x86: Add support for VCPU event states (diff)
downloadqemu-kvm-c859bf47e565062b7801a18966913142cf59eda8.tar.gz
qemu-kvm-c859bf47e565062b7801a18966913142cf59eda8.tar.bz2
qemu-kvm-c859bf47e565062b7801a18966913142cf59eda8.zip
Merge commit 'a0fb002c6462d21ceb9eac8c5772e469ec189374' into upstream-merge
* commit 'a0fb002c6462d21ceb9eac8c5772e469ec189374': kvm: x86: Add support for VCPU event states kvm: x86: Fix merge artifact of f8d926e9 about mp_state targe-ppc: Sync CPU state for KVM target-ppc: Get MMU state on register sync qemu: cleanup unused macros in cirrus qemu: make cirrus init value pci spec compliant Conflicts: kvm-all.c target-i386/kvm.c Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'kvm-all.c')
-rw-r--r--kvm-all.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/kvm-all.c b/kvm-all.c
index 91db3bc16..0423fff74 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -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
@@ -483,6 +484,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;
@@ -875,6 +881,11 @@ int kvm_has_sync_mmu(void)
#endif
}
+int kvm_has_vcpu_events(void)
+{
+ return kvm_state->vcpu_events;
+}
+
#ifdef KVM_UPSTREAM
void kvm_setup_guest_memory(void *start, size_t size)
{