From 9b5b76d44930dc9266bb6d30862704cb3c86d2ca Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Sat, 15 Oct 2011 14:08:26 +0200 Subject: kvm: x86: Establish IRQ0 override control KVM is forced to disable the IRQ0 override when we run with in-kernel irqchip but without IRQ routing support of the kernel. Set the fwcfg value correspondingly. This aligns us with qemu-kvm. Signed-off-by: Jan Kiszka --- kvm-all.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'kvm-all.c') diff --git a/kvm-all.c b/kvm-all.c index fa9d92d..88f1156 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -1307,6 +1307,11 @@ int kvm_has_gsi_routing(void) return kvm_check_extension(kvm_state, KVM_CAP_IRQ_ROUTING); } +int kvm_allows_irq0_override(void) +{ + return !kvm_enabled() || !kvm_irqchip_in_kernel() || kvm_has_gsi_routing(); +} + void kvm_setup_guest_memory(void *start, size_t size) { if (!kvm_has_sync_mmu()) { -- cgit v1.1