From Windows 8.1 onwards ISA serial IRQs cannot be shared when ACPI Revision
5.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.
Add a new 3-byte IRQ Descriptor to the _CRS resource indicating that the
ISA serial IRQ is low true, edge sensitive and shareable. This enables all 4
legacy serial ports to be used in Windows without conflict.
Tested on Windows 8.1 and Windows 11 with 4 instances of -serial on the command
line and copying data simultaneously across serial ports COM1/3 and COM2/4.
Note that with this series applied, if extra ISA serial ports are added to an
existing VM then it is necessary to go to Device Manager, select "Add legacy
hardware" from the "Action" menu, and then reboot the VM for the serial ports
to be detected correctly without Device Manager indicating a conflict.
Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
v2
- Remove _PRS changes (including AML build changes that are no longer required)
and compatibility property as suggested by Igor
Mark Cave-Ayland (4):
hw/acpi/aml-build.c: add aml_irq() representing the 3-byte IRQ
descriptor
tests/acpi: allow DSDT acpi table changes
hw/char/serial-isa.c: declare IRQ as shared in ACPI IRQ descriptor
tests: data: update x86 ACPI tables
include/hw/acpi/aml-build.h | 2 ++
hw/acpi/aml-build-stub.c | 6 +++++
hw/acpi/aml-build.c | 25 ++++++++++++++++++
hw/char/serial-isa.c | 3 ++-
tests/data/acpi/x86/microvm/DSDT | Bin 365 -> 366 bytes
tests/data/acpi/x86/microvm/DSDT.ioapic2 | Bin 365 -> 366 bytes
tests/data/acpi/x86/microvm/DSDT.pcie | Bin 2985 -> 2986 bytes
tests/data/acpi/x86/microvm/DSDT.rtc | Bin 404 -> 405 bytes
tests/data/acpi/x86/microvm/DSDT.usb | Bin 414 -> 415 bytes
tests/data/acpi/x86/pc/DSDT | Bin 8598 -> 8599 bytes
tests/data/acpi/x86/pc/DSDT.acpierst | Bin 8509 -> 8510 bytes
tests/data/acpi/x86/pc/DSDT.acpihmat | Bin 9923 -> 9924 bytes
tests/data/acpi/x86/pc/DSDT.bridge | Bin 15469 -> 15470 bytes
tests/data/acpi/x86/pc/DSDT.cphp | Bin 9062 -> 9063 bytes
tests/data/acpi/x86/pc/DSDT.dimmpxm | Bin 10252 -> 10253 bytes
tests/data/acpi/x86/pc/DSDT.hpbridge | Bin 8549 -> 8550 bytes
tests/data/acpi/x86/pc/DSDT.hpbrroot | Bin 5087 -> 5088 bytes
tests/data/acpi/x86/pc/DSDT.ipmikcs | Bin 8670 -> 8671 bytes
tests/data/acpi/x86/pc/DSDT.memhp | Bin 9957 -> 9958 bytes
tests/data/acpi/x86/pc/DSDT.nohpet | Bin 8456 -> 8457 bytes
tests/data/acpi/x86/pc/DSDT.numamem | Bin 8604 -> 8605 bytes
tests/data/acpi/x86/pc/DSDT.roothp | Bin 12391 -> 12392 bytes
tests/data/acpi/x86/q35/DSDT | Bin 8427 -> 8428 bytes
tests/data/acpi/x86/q35/DSDT.acpierst | Bin 8444 -> 8445 bytes
tests/data/acpi/x86/q35/DSDT.acpihmat | Bin 9752 -> 9753 bytes
.../data/acpi/x86/q35/DSDT.acpihmat-generic-x | Bin 12637 -> 12638 bytes
.../acpi/x86/q35/DSDT.acpihmat-noinitiator | Bin 8706 -> 8707 bytes
tests/data/acpi/x86/q35/DSDT.applesmc | Bin 8473 -> 8474 bytes
tests/data/acpi/x86/q35/DSDT.bridge | Bin 12040 -> 12041 bytes
tests/data/acpi/x86/q35/DSDT.core-count | Bin 12985 -> 12986 bytes
tests/data/acpi/x86/q35/DSDT.core-count2 | Bin 33842 -> 33843 bytes
tests/data/acpi/x86/q35/DSDT.cphp | Bin 8891 -> 8892 bytes
tests/data/acpi/x86/q35/DSDT.cxl | Bin 13218 -> 13219 bytes
tests/data/acpi/x86/q35/DSDT.dimmpxm | Bin 10081 -> 10082 bytes
tests/data/acpi/x86/q35/DSDT.ipmibt | Bin 8502 -> 8503 bytes
tests/data/acpi/x86/q35/DSDT.ipmismbus | Bin 8515 -> 8516 bytes
tests/data/acpi/x86/q35/DSDT.ivrs | Bin 8444 -> 8445 bytes
tests/data/acpi/x86/q35/DSDT.memhp | Bin 9786 -> 9787 bytes
tests/data/acpi/x86/q35/DSDT.mmio64 | Bin 9557 -> 9558 bytes
tests/data/acpi/x86/q35/DSDT.multi-bridge | Bin 13280 -> 13281 bytes
tests/data/acpi/x86/q35/DSDT.noacpihp | Bin 8289 -> 8290 bytes
tests/data/acpi/x86/q35/DSDT.nohpet | Bin 8285 -> 8286 bytes
tests/data/acpi/x86/q35/DSDT.numamem | Bin 8433 -> 8434 bytes
tests/data/acpi/x86/q35/DSDT.pvpanic-isa | Bin 8528 -> 8529 bytes
tests/data/acpi/x86/q35/DSDT.thread-count | Bin 12985 -> 12986 bytes
tests/data/acpi/x86/q35/DSDT.thread-count2 | Bin 33842 -> 33843 bytes
tests/data/acpi/x86/q35/DSDT.tis.tpm12 | Bin 9033 -> 9034 bytes
tests/data/acpi/x86/q35/DSDT.tis.tpm2 | Bin 9059 -> 9060 bytes
tests/data/acpi/x86/q35/DSDT.type4-count | Bin 18661 -> 18662 bytes
tests/data/acpi/x86/q35/DSDT.viot | Bin 14684 -> 14685 bytes
tests/data/acpi/x86/q35/DSDT.xapic | Bin 35790 -> 35791 bytes
51 files changed, 35 insertions(+), 1 deletion(-)
--
2.43.0