diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2020-05-20 15:19:48 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2020-06-12 10:17:06 -0400 |
commit | 5794d34a13d11e12d9bc53ea4ade997c2ff81c4c (patch) | |
tree | 59bd5c256f4ab7da9ec933226e390972da31265a /hw/i386/acpi-common.c | |
parent | eb66ffabc00a7b062b2c73b9178eb2679328813b (diff) | |
download | qemu-5794d34a13d11e12d9bc53ea4ade997c2ff81c4c.zip qemu-5794d34a13d11e12d9bc53ea4ade997c2ff81c4c.tar.gz qemu-5794d34a13d11e12d9bc53ea4ade997c2ff81c4c.tar.bz2 |
acpi: madt: skip pci override on pci-less systems.
Needed for microvm.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200520132003.9492-8-kraxel@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/i386/acpi-common.c')
-rw-r--r-- | hw/i386/acpi-common.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/hw/i386/acpi-common.c b/hw/i386/acpi-common.c index 5caca16..ab9b005 100644 --- a/hw/i386/acpi-common.c +++ b/hw/i386/acpi-common.c @@ -72,7 +72,8 @@ void pc_madt_cpu_entry(AcpiDeviceIf *adev, int uid, } void acpi_build_madt(GArray *table_data, BIOSLinker *linker, - X86MachineState *x86ms, AcpiDeviceIf *adev) + X86MachineState *x86ms, AcpiDeviceIf *adev, + bool has_pci) { MachineClass *mc = MACHINE_GET_CLASS(x86ms); const CPUArchIdList *apic_ids = mc->possible_cpu_arch_ids(MACHINE(x86ms)); @@ -111,18 +112,21 @@ void acpi_build_madt(GArray *table_data, BIOSLinker *linker, intsrcovr->gsi = cpu_to_le32(2); intsrcovr->flags = cpu_to_le16(0); /* conforms to bus specifications */ } - for (i = 1; i < 16; i++) { + + 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))) { - /* No need for a INT source override structure. */ - continue; + if (!(ACPI_BUILD_PCI_IRQS & (1 << i))) { + /* No need for a INT source override structure. */ + continue; + } + intsrcovr = acpi_data_push(table_data, sizeof *intsrcovr); + intsrcovr->type = ACPI_APIC_XRUPT_OVERRIDE; + intsrcovr->length = sizeof(*intsrcovr); + intsrcovr->source = i; + intsrcovr->gsi = cpu_to_le32(i); + intsrcovr->flags = cpu_to_le16(0xd); /* active high, level triggered */ } - intsrcovr = acpi_data_push(table_data, sizeof *intsrcovr); - intsrcovr->type = ACPI_APIC_XRUPT_OVERRIDE; - intsrcovr->length = sizeof(*intsrcovr); - intsrcovr->source = i; - intsrcovr->gsi = cpu_to_le32(i); - intsrcovr->flags = cpu_to_le16(0xd); /* active high, level triggered */ } if (x2apic_mode) { |