@samitouri / QOSamiQemu / commits / d616781f2d

hw/char/serial-isa.c: declare IRQ as shared in ACPI IRQ descriptor

From Windows 8.1 onwards ISA serial IRQs cannot be shared when ACPI Revision 3.0 is used in the FACP table. The reason for this is that if a 2-byte IRQ Descriptor is used then the interrupt is considered to be high true, edge sensitive, non-shareable. Since legacy serial ports COM1/3 and COM2/4 share an IRQ then if more than 2 serial ports are added, Windows indicates a conflict in Device Manager and these combinations cannot be used together. Change the 2-byte IRQ Descriptor in the _CRS resource to a 3-byte IRQ Descriptor indicating that the ISA serial IRQ is low true, level sensitive and shareable. This enables all 4 legacy serial ports to be used in Windows without conflict. Note that it was agreed during the list discussion that this change does not require a compatibility property since it is not part of the default machine configuration and was already broken. Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com> Reviewed-by: Ani Sinha <anisinha@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Message-Id: <20260515150634.2637533-4-mark.caveayland@nutanix.com>

Mark Cave-Ayland committed May 15, 2026 at 16:05 UTC d616781f2d63fa602b12020cedbb274d15797e41
1 file changed +2 -1
hw/char/serial-isa.c
+2 -1
@@ -92,7 +92,8 @@ static void serial_isa_build_aml(AcpiDevAmlIf *adev, Aml *scope)
92
93 crs = aml_resource_template();
94 aml_append(crs, aml_io(AML_DECODE16, isa->iobase, isa->iobase, 0x00, 0x08));
95 - aml_append(crs, aml_irq_no_flags(isa->isairq));
95 + aml_append(crs, aml_irq(isa->isairq, AML_LEVEL, AML_ACTIVE_LOW,
96 + AML_SHARED));
97
98 dev = aml_device("COM%d", isa->index + 1);
99 aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0501")));