summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeth Kon <eak@us.ibm.com>2009-07-07 11:50:35 -0400
committerAvi Kivity <avi@redhat.com>2009-07-12 16:37:40 +0300
commit8c9041a1de187f7967cfe2a64e64a9bca6a02536 (patch)
treecff9962a2cb4ae2b5a7675e6b11aa3b7cc16797b /qemu-kvm-x86.c
parentbios: allow qemu to configure irq0->inti2 override (diff)
downloadqemu-kvm-8c9041a1de187f7967cfe2a64e64a9bca6a02536.tar.gz
qemu-kvm-8c9041a1de187f7967cfe2a64e64a9bca6a02536.tar.bz2
qemu-kvm-8c9041a1de187f7967cfe2a64e64a9bca6a02536.zip
Select irq0->irq2 override based on kernel gsi routing availability
If the kernel does not support gsi routing, we cannot do the irq0->irq2 override, so disable it in that case. Signed-off-by: Beth Kon <eak@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'qemu-kvm-x86.c')
-rw-r--r--qemu-kvm-x86.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c
index 8ba3b6e32..67aca3288 100644
--- a/qemu-kvm-x86.c
+++ b/qemu-kvm-x86.c
@@ -1564,7 +1564,11 @@ int kvm_arch_init_irq_routing(void)
return r;
}
for (i = 0; i < 24; ++i) {
- r = kvm_add_irq_route(kvm_context, i, KVM_IRQCHIP_IOAPIC, i);
+ if (i == 0) {
+ r = kvm_add_irq_route(kvm_context, i, KVM_IRQCHIP_IOAPIC, 2);
+ } else if (i != 2) {
+ r = kvm_add_irq_route(kvm_context, i, KVM_IRQCHIP_IOAPIC, i);
+ }
if (r < 0)
return r;
}