pci: acpi: Windows 'PCI Label Id' bug workaround
authorIgor Mammedov <imammedo@redhat.com>
Wed, 15 Jan 2025 12:53:41 +0000 (13:53 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 15 Jan 2025 18:07:23 +0000 (13:07 -0500)
commit0b053391985abcc40b16ac8fc4a7f6588d1d95c1
tree910cc8ac50a28605d8c3a33ee3462b02f4ac90ee
parent1ad32644fe4c9fb25086be15a66dde1d55d3410f
pci: acpi: Windows 'PCI Label Id' bug workaround

Current versions of Windows call _DSM(func=7) regardless
of whether it is supported or not. It leads to NICs having bogus
'PCI Label Id = 0', where none should be set at all.

Also presence of 'PCI Label Id' triggers another Windows bug
on localized versions that leads to hangs. The later bug is fixed
in latest updates for 'Windows Server' but not in consumer
versions of Windows (and there is no plans to fix it
as far as I'm aware).

Given it's easy, implement Microsoft suggested workaround
(return invalid Package) so that affected Windows versions
could boot on QEMU.
This would effectvely remove bogus 'PCI Label Id's on NICs,
but MS teem confirmed that flipping 'PCI Label Id' should not
change 'Network Connection' ennumeration, so it should be safe
for QEMU to change _DSM without any compat code.

Smoke tested with WinXP and WS2022
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/774
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20250115125342.3883374-3-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/i386/acpi-build.c