All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/4] isa-serial: acpi: declare shared IRQs for COM1/3 and COM2/4
@ 2026-05-08 10:17 Mark Cave-Ayland
  2026-05-08 10:17 ` [PATCH v3 1/4] hw/acpi/aml-build.c: add aml_irq() representing the 3-byte IRQ descriptor Mark Cave-Ayland
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Mark Cave-Ayland @ 2026-05-08 10:17 UTC (permalink / raw)
  To: mst, imammedo, anisinha, pbonzini, marcandre.lureau, qemu-devel

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.

Add a new 3-byte IRQ Descriptor to the _CRS resource indicating that the
ISA serial IRQ is high 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:

  ./build/qemu-system-x86_64 \
    -accel kvm \
    -M q35,hpet=off \
    -m 4G \
    -cpu host \
    -drive file=win81.iso,format=raw,if=ide,bus=2,unit=0,media=cdrom \
    -drive file=win81.qcow2,format=qcow2,if=ide,bus=0,unit=0 \
    -device VGA \
    -serial tcp::4001,server=on,wait=off \
    -serial tcp::4002,server=on,wait=off \
    -serial tcp::4003,server=on,wait=off \
    -serial tcp::4004,server=on,wait=off

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>

v3
- Rebase onto master
- Define IRQ as Active-High-Edge-Triggered (as seen by the PIC) to ensure compliance
  with the ACPI specification section 6.4.2.1.

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



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2026-05-15 14:05 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-08 10:17 [PATCH v3 0/4] isa-serial: acpi: declare shared IRQs for COM1/3 and COM2/4 Mark Cave-Ayland
2026-05-08 10:17 ` [PATCH v3 1/4] hw/acpi/aml-build.c: add aml_irq() representing the 3-byte IRQ descriptor Mark Cave-Ayland
2026-05-11  6:59   ` Ani Sinha
2026-05-14 13:33   ` Igor Mammedov
2026-05-15 14:04     ` Mark Cave-Ayland
2026-05-08 10:17 ` [PATCH v3 2/4] tests/acpi: allow DSDT acpi table changes Mark Cave-Ayland
2026-05-11  7:10   ` Ani Sinha
2026-05-14 13:34   ` Igor Mammedov
2026-05-08 10:17 ` [PATCH v3 3/4] hw/char/serial-isa.c: declare IRQ as shared in ACPI IRQ descriptor Mark Cave-Ayland
2026-05-11  7:13   ` Ani Sinha
2026-05-14 13:37   ` Igor Mammedov
2026-05-08 10:17 ` [PATCH v3 4/4] tests: data: update x86 ACPI tables Mark Cave-Ayland
2026-05-11  7:09   ` Ani Sinha
2026-05-14 13:37   ` Igor Mammedov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.