summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kvm-all.c13
-rw-r--r--kvm.h3
2 files changed, 16 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;
diff --git a/kvm.h b/kvm.h
index 96b4d72609..0d4dd53ef7 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;