aboutsummaryrefslogtreecommitdiff
path: root/kvm-all.c
diff options
context:
space:
mode:
authorGlauber Costa <glommer@redhat.com>2009-07-21 12:26:58 -0300
committerAnthony Liguori <aliguori@us.ibm.com>2009-07-22 10:58:49 -0500
commit6f725c139ae975646c44ace77bf796318a5783da (patch)
tree8cf60b827ab2d649b4dd7954bce465e51874793e /kvm-all.c
parent609f2fabab3ca9cedd69c499dc94bb2019d4f665 (diff)
provide tests for pit in kernel and irqchip in kernel
KVM can have an in-kernel pit or irqchip. While we don't implement it yet, having a way for test for it (that always returns zero) will allow us to reuse code in qemu-kvm that tests for it. Signed-off-by: Glauber Costa <glommer@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'kvm-all.c')
-rw-r--r--kvm-all.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/kvm-all.c b/kvm-all.c
index 7b34c8d6cd..824bb4ccb5 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -63,6 +63,8 @@ struct KVMState
#ifdef KVM_CAP_SET_GUEST_DEBUG
struct kvm_sw_breakpoint_head kvm_sw_breakpoints;
#endif
+ int irqchip_in_kernel;
+ int pit_in_kernel;
};
static KVMState *kvm_state;
@@ -162,6 +164,17 @@ static void on_vcpu(CPUState *env, void (*func)(void *data), void *data)
abort();
}
+int kvm_irqchip_in_kernel(void)
+{
+ return kvm_state->irqchip_in_kernel;
+}
+
+int kvm_pit_in_kernel(void)
+{
+ return kvm_state->pit_in_kernel;
+}
+
+
int kvm_init_vcpu(CPUState *env)
{
KVMState *s = kvm_state;