qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] provide tests for pit in kernel and irqchip in kernel
@ 2009-07-21 15:26 Glauber Costa
  0 siblings, 0 replies; only message in thread
From: Glauber Costa @ 2009-07-21 15:26 UTC (permalink / raw)
  To: qemu-devel; +Cc: aliguori

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>
---
 kvm-all.c |   13 +++++++++++++
 kvm.h     |    3 +++
 2 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/kvm-all.c b/kvm-all.c
index 2f74dcb..ed86315 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;
@@ -153,6 +155,17 @@ static void kvm_reset_vcpu(void *opaque)
     }
 }
 
+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;
diff --git a/kvm.h b/kvm.h
index 96b4d72..0d4dd53 100644
--- a/kvm.h
+++ b/kvm.h
@@ -60,6 +60,9 @@ int kvm_remove_breakpoint(CPUState *current_env, target_ulong addr,
 void kvm_remove_all_breakpoints(CPUState *current_env);
 int kvm_update_guest_debug(CPUState *env, unsigned long reinject_trap);
 
+int kvm_pit_in_kernel(void);
+int kvm_irqchip_in_kernel(void);
+
 /* internal API */
 
 struct KVMState;
-- 
1.6.2.2

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-07-21 15:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-21 15:26 [Qemu-devel] [PATCH] provide tests for pit in kernel and irqchip in kernel Glauber Costa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).