mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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>
This commit is contained in:
parent
609f2fabab
commit
6f725c139a
2 changed files with 16 additions and 0 deletions
13
kvm-all.c
13
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue