From 87ba83bb01d2e2a6c24c23dbfb10381731b5d265 Mon Sep 17 00:00:00 2001 From: Max Makarov Date: Fri, 10 Apr 2026 17:17:01 +0000 Subject: [PATCH] vmm: pci_segment: use segment id as ACPI _UID The ACPI specification requires _UID to be unique across devices sharing the same _HID (ACPI 6.5 section 6.1.12). Currently every PciSegment emits _UID=0 for its PNP0A08 host bridge, which violates the spec when num_pci_segments > 1. Windows guests detect this during ACPI namespace enumeration and abort boot with BSOD 0xA5 ACPI_BIOS_ERROR, pointing at the _UID object of the second PNP0A08 node. Linux guests are lenient and silently accept the collision, so the issue has gone unnoticed. Use self.id as _UID, matching what _SEG does on the line above. For single-segment VMs (id == 0) this is a no-op at runtime. Signed-off-by: Max Makarov --- vmm/src/pci_segment.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vmm/src/pci_segment.rs b/vmm/src/pci_segment.rs index b334ddb5d..81f11063e 100644 --- a/vmm/src/pci_segment.rs +++ b/vmm/src/pci_segment.rs @@ -360,7 +360,7 @@ impl Aml for PciSegment { pci_dsdt_inner_data.push(&adr); let seg = aml::Name::new("_SEG".into(), &self.id); pci_dsdt_inner_data.push(&seg); - let uid = aml::Name::new("_UID".into(), &aml::ZERO); + let uid = aml::Name::new("_UID".into(), &self.id); pci_dsdt_inner_data.push(&uid); let cca = aml::Name::new("_CCA".into(), &aml::ONE); pci_dsdt_inner_data.push(&cca);