qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: Ricardo Ribalda <ribalda@chromium.org>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	Ani Sinha <anisinha@redhat.com>,
	Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Richard Henderson <richard.henderson@linaro.org>,
	Eduardo Habkost <eduardo@habkost.net>,
	qemu-devel@nongnu.org,
	Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Subject: Re: [PATCH 2/3] hw/i386/acpi-build: return a non-var package from _PRT()
Date: Tue, 24 Sep 2024 15:06:11 +0200	[thread overview]
Message-ID: <20240924150611.42f04215@imammedo.users.ipa.redhat.com> (raw)
In-Reply-To: <20240922143216.662873-3-ribalda@chromium.org>

On Sun, 22 Sep 2024 14:31:10 +0000
Ricardo Ribalda <ribalda@chromium.org> wrote:

> 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.

XP doesn't support VarPackage, if you attach with wingdb to guest,
you'll likely will see ACPI related error 
 
> https://lore.kernel.org/qemu-devel/c82d9331-a8ce-4bb0-b51f-2ee789e27c86@ilande.co.uk/T/#m541190c942676bccf7a7f7fbcb450d94a4e2da53
> 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>
> ---
>  hw/i386/acpi-build.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
> index 4967aa7459..e7db51afba 100644
> --- a/hw/i386/acpi-build.c
> +++ b/hw/i386/acpi-build.c
> @@ -741,7 +741,7 @@ static Aml *build_prt(bool is_pci0_prt)
>      int pin;
>  
>      method = aml_method("_PRT", 0, AML_NOTSERIALIZED);
> -    rt_pkg = aml_varpackage(nroutes);

I'd add an assert here, to make sure that nroutes < 256

> +    rt_pkg = aml_package(nroutes);

Given that nroutes is 128, older Package should be able to
handle it.

>  
>      for (pin = 0; pin < nroutes; pin++) {
>          Aml *pkg = aml_package(4);

With assert added,
Reviewed-by: Igor Mammedov <imammedo@redhat.com>



  reply	other threads:[~2024-09-24 13:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-22 14:31 [PATCH 0/3] Fix WinXP ISO boot using the dc390/am53C974 SCSI device Ricardo Ribalda
2024-09-22 14:31 ` [PATCH 1/3] tests/acpi: pc: allow DSDT acpi table changes Ricardo Ribalda
2024-09-22 14:31 ` [PATCH 2/3] hw/i386/acpi-build: return a non-var package from _PRT() Ricardo Ribalda
2024-09-24 13:06   ` Igor Mammedov [this message]
2024-09-22 14:31 ` [PATCH 3/3] tests/acpi: pc: update golden masters for DSDT Ricardo Ribalda
2024-09-22 19:30 ` [PATCH 0/3] Fix WinXP ISO boot using the dc390/am53C974 SCSI device Mark Cave-Ayland
2024-09-24 22:51 ` Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240924150611.42f04215@imammedo.users.ipa.redhat.com \
    --to=imammedo@redhat.com \
    --cc=anisinha@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=ribalda@chromium.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).