summary refs log tree commit diff stats
path: root/hw/pc.c
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2011-10-15 14:08:26 +0200
committerJan Kiszka <jan.kiszka@siemens.com>2012-01-19 12:14:42 +0100
commit9b5b76d44930dc9266bb6d30862704cb3c86d2ca (patch)
treecf2c3fef0b9925485ce7e58579ec19367e74a8c4 /hw/pc.c
parent84b058d7df1e75543ef7422d97b039cd413f68f1 (diff)
downloadfocaccia-qemu-9b5b76d44930dc9266bb6d30862704cb3c86d2ca.tar.gz
focaccia-qemu-9b5b76d44930dc9266bb6d30862704cb3c86d2ca.zip
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 <jan.kiszka@siemens.com>
Diffstat (limited to 'hw/pc.c')
-rw-r--r--hw/pc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/pc.c b/hw/pc.c
index 04304e0ca3..38d787a74a 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -39,6 +39,7 @@
 #include "msi.h"
 #include "sysbus.h"
 #include "sysemu.h"
+#include "kvm.h"
 #include "blockdev.h"
 #include "ui/qemu-spice.h"
 #include "memory.h"
@@ -609,7 +610,7 @@ static void *bochs_bios_init(void)
     fw_cfg_add_i64(fw_cfg, FW_CFG_RAM_SIZE, (uint64_t)ram_size);
     fw_cfg_add_bytes(fw_cfg, FW_CFG_ACPI_TABLES, (uint8_t *)acpi_tables,
                      acpi_tables_len);
-    fw_cfg_add_bytes(fw_cfg, FW_CFG_IRQ0_OVERRIDE, &irq0override, 1);
+    fw_cfg_add_i32(fw_cfg, FW_CFG_IRQ0_OVERRIDE, kvm_allows_irq0_override());
 
     smbios_table = smbios_get_table(&smbios_len);
     if (smbios_table)