]> git.proxmox.com Git - mirror_qemu.git/commit
x86: acpi: workaround Windows not handling name references in Package properly
authorIgor Mammedov <imammedo@redhat.com>
Thu, 20 Jul 2023 13:38:54 +0000 (15:38 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 3 Aug 2023 20:06:49 +0000 (16:06 -0400)
commit44d975ef340e2f21f236f9520c53e1b30d2213a4
treed37bb0e982f7088d890c284900f4068645915d8f
parent45d9d318c8d435cbe2d465f61e6975885d2242ca
x86: acpi: workaround Windows not handling name references in Package properly

it seems that Windows is unable to handle variable references
making it choke up when accessing ASUN during _DSM call
when device is hotplugged (it lists package elements as DataAlias
but despite that later on it misbehaves) with following error
shown up in AMLI debugger (WS2012r2):
    Store(ShiftLeft(One,Arg1="ASUN",) AMLI_ERROR(c0140008): Unexpected argument type
    ValidateArgTypes: expected Arg1 to be type Integer (Type=String)
Similar outcome with WS2022.

Issue is not fatal but as result acpi-index/"PCI Label ID" property
is either not shown in device details page or shows incorrect value.

Fix it by doing assignment of BSEL/ASUN values to package
elements manually after package declaration.

Fix was tested with: WS2012r2, WS2022, RHEL9

Fixes: 467d099a2985 (x86: acpi: _DSM: use Package to pass parameters)
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20230720133858.1974024-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