[PATCH] hw/i386/pc_piix.c: Add IRQs 14,15 as MADT overrides

Damien Zammit posted 1 patch 4 months, 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20250622123401.211412-1-damien@zamaudio.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Eduardo Habkost <eduardo@habkost.net>, "Michael S. Tsirkin" <mst@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
hw/i386/pc_piix.c | 5 +++++
1 file changed, 5 insertions(+)
[PATCH] hw/i386/pc_piix.c: Add IRQs 14,15 as MADT overrides
Posted by Damien Zammit 4 months, 3 weeks ago
When PIIX3 IDE is used, these two interrupts are
active-low level-triggered but are not set as MADT overrides.
Since the default for legacy interrupts is on rising edge,
these two extra MADT isa irq overrides are needed.

Signed-off-by: Damien Zammit <damien@zamaudio.com>
---
 hw/i386/pc_piix.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index ea7572e783..7320563890 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -181,6 +181,11 @@ static void pc_init1(MachineState *machine, const char *pci_type)
         }
     }
 
+    /* Add IRQ 14,15 to MADT overrides for PIIX3 IDE */
+    if (pcmc->pci_enabled) {
+        x86ms->pci_irq_mask |= (1<<14) | (1<<15);
+    }
+
     pc_machine_init_sgx_epc(pcms);
     x86_cpus_init(x86ms, pcmc->default_cpu_version);
 
-- 
2.30.2