From: Mark Cave-Ayland Date: Fri, 15 May 2026 15:05:46 +0000 (+0100) Subject: hw/char/serial-isa.c: declare IRQ as shared in ACPI IRQ descriptor X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d616781f2d63fa602b12020cedbb274d15797e41;p=thirdparty%2Fqemu.git 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 Reviewed-by: Ani Sinha Reviewed-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Message-Id: <20260515150634.2637533-4-mark.caveayland@nutanix.com> --- diff --git a/hw/char/serial-isa.c b/hw/char/serial-isa.c index a4be0492c5..eaa4e843c0 100644 --- a/hw/char/serial-isa.c +++ b/hw/char/serial-isa.c @@ -92,7 +92,8 @@ static void serial_isa_build_aml(AcpiDevAmlIf *adev, Aml *scope) crs = aml_resource_template(); aml_append(crs, aml_io(AML_DECODE16, isa->iobase, isa->iobase, 0x00, 0x08)); - aml_append(crs, aml_irq_no_flags(isa->isairq)); + aml_append(crs, aml_irq(isa->isairq, AML_LEVEL, AML_ACTIVE_LOW, + AML_SHARED)); dev = aml_device("COM%d", isa->index + 1); aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0501")));