aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Ribalda <ribalda@chromium.org>2024-09-24 13:24:11 +0000
committerMichael S. Tsirkin <mst@redhat.com>2024-11-04 16:03:24 -0500
commit7916bb54319a56be5c5eca0c890a4d2aa22b9bef (patch)
tree0843f3386c4f3d048ce0657c2080f9d95632b4a1
parentd944497b5519cdefe2d38cf68317b93e14dd388a (diff)
downloadqemu-7916bb54319a56be5c5eca0c890a4d2aa22b9bef.zip
qemu-7916bb54319a56be5c5eca0c890a4d2aa22b9bef.tar.gz
qemu-7916bb54319a56be5c5eca0c890a4d2aa22b9bef.tar.bz2
hw/i386/acpi-build: return a non-var package from _PRT()
Windows XP seems to have issues when _PRT() returns a variable package. We know in advance the size, so we can return a fixed package instead. https://lore.kernel.org/qemu-devel/c82d9331-a8ce-4bb0-b51f-2ee789e27c86@ilande.co.uk/T/#m541190c942676bccf7a7f7fbcb450d94a4e2da53 Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reported-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Fixes: 99cb2c6c7b ("hw/i386/acpi-build: Return a pre-computed _PRT table") Closes: https://lore.kernel.org/all/eb11c984-ebe4-4a09-9d71-1e9db7fe7e6f@ilande.co.uk/ Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Message-Id: <20240924132417.739809-3-ribalda@chromium.org> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-rw-r--r--hw/i386/acpi-build.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index d01e704..508a609 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -740,7 +740,8 @@ static Aml *build_prt(bool is_pci0_prt)
int pin;
method = aml_method("_PRT", 0, AML_NOTSERIALIZED);
- rt_pkg = aml_varpackage(nroutes);
+ assert(nroutes < 256);
+ rt_pkg = aml_package(nroutes);
for (pin = 0; pin < nroutes; pin++) {
Aml *pkg = aml_package(4);