aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2020-10-16 13:38:31 +0200
committerGerd Hoffmann <kraxel@redhat.com>2020-10-21 11:36:05 +0200
commit1b2802c49f60f9de2c24afb5883dafa60d3f3345 (patch)
treeedd90999d9b3dba5cf5ae4e86e6061bf69ed2593 /hw
parente6b5a0718afb2a88b2d4b88ddc250125e994f423 (diff)
downloadqemu-1b2802c49f60f9de2c24afb5883dafa60d3f3345.zip
qemu-1b2802c49f60f9de2c24afb5883dafa60d3f3345.tar.gz
qemu-1b2802c49f60f9de2c24afb5883dafa60d3f3345.tar.bz2
x86: make pci irqs runtime configurable
Add a variable to x86 machine state instead of hard-coding the PCI interrupts. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20201016113835.17465-4-kraxel@redhat.com
Diffstat (limited to 'hw')
-rw-r--r--hw/i386/acpi-common.c3
-rw-r--r--hw/i386/x86.c1
2 files changed, 2 insertions, 2 deletions
diff --git a/hw/i386/acpi-common.c b/hw/i386/acpi-common.c
index ab9b005..1584abb 100644
--- a/hw/i386/acpi-common.c
+++ b/hw/i386/acpi-common.c
@@ -115,8 +115,7 @@ void acpi_build_madt(GArray *table_data, BIOSLinker *linker,
if (has_pci) {
for (i = 1; i < 16; i++) {
-#define ACPI_BUILD_PCI_IRQS ((1<<5) | (1<<9) | (1<<10) | (1<<11))
- if (!(ACPI_BUILD_PCI_IRQS & (1 << i))) {
+ if (!(x86ms->pci_irq_mask & (1 << i))) {
/* No need for a INT source override structure. */
continue;
}
diff --git a/hw/i386/x86.c b/hw/i386/x86.c
index 3137a20..5944fc4 100644
--- a/hw/i386/x86.c
+++ b/hw/i386/x86.c
@@ -1178,6 +1178,7 @@ static void x86_machine_initfn(Object *obj)
x86ms->smm = ON_OFF_AUTO_AUTO;
x86ms->acpi = ON_OFF_AUTO_AUTO;
x86ms->smp_dies = 1;
+ x86ms->pci_irq_mask = ACPI_BUILD_PCI_IRQS;
}
static void x86_machine_class_init(ObjectClass *oc, void *data)