From: "Michael S. Tsirkin" <mst@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: ghammer@redhat.com, imammedo@redhat.com, lersek@redhat.com,
qemu-devel@nongnu.org, shannon.zhao@linaro.org
Subject: Re: [Qemu-devel] [PATCH v2 0/4] acpi: xsdt support
Date: Tue, 9 Jun 2015 08:35:38 +0200 [thread overview]
Message-ID: <20150609083521-mutt-send-email-mst@redhat.com> (raw)
In-Reply-To: <964733846.17699064.1433829751766.JavaMail.zimbra@zmail13.collab.prod.int.phx2.redhat.com>
On Tue, Jun 09, 2015 at 02:02:31AM -0400, Paolo Bonzini wrote:
> I would just patch OVMF to ignore the RSDT if there is an XSDT.
>
> Alternatively, can you check for ACPI 2.0 support via _OSI, and load the ACPI 2.0 bits via LoadTable? Hopefully XP does not BSOD if the invalid (for ACPI 1.0) opcodes are in a Then block or in a separate method... Then you can use just an RSDT.
>
> Paolo
It does BSOD.
Skipping RSDT sounds good.
>
> -----Original Message-----
> From: Michael S. Tsirkin [mst@redhat.com]
> Received: martedì, 09 giu 2015, 7:31
> To: Laszlo Ersek [lersek@redhat.com]
> CC: qemu-devel@nongnu.org, ghammer@redhat.com, pbonzini@redhat.com, shannon.zhao@linaro.org, imammedo@redhat.com
> Subject: Re: [PATCH v2 0/4] acpi: xsdt support
>
> On Tue, Jun 09, 2015 at 02:08:03AM +0200, Laszlo Ersek wrote:
> > On 06/08/15 20:14, Michael S. Tsirkin wrote:
> > > XSDT support allows using ACPI 2 features while
> > > avoiding breaking legacy windows XP guests:
> > > ACPI 2 tables are linked from XSDT only,
> > > ACPI 1 tables from both RSDT and XSDT, this way
> > > XP does not see ACPI 2 tables.
> > >
> > > As a first step, this patchset generates v2 RSDP
> > > and fills in XSDT matching RSDT exactly.
> > >
> > > ARM can switch to XSDT as well, I'm not bothering
> > > until there's an easy way to test that.
> > >
> > > Note: unit test files need to be updated with this,
> > > I'm not bothering with posting them.
> > >
> > > Changes from v1:
> > > xsdt address is 64 bit
> > > arm patch is now tested
> > >
> > > Michael S. Tsirkin (4):
> > > acpi: add API for 64 bit offsets
> > > i386/acpi: collect 64 bit offsets for xsdt
> > > i386/acpi: add XSDT
> > > acpi: unify rsdp generation
> > >
> > > include/hw/acpi/acpi-defs.h | 15 +++++--
> > > include/hw/acpi/aml-build.h | 7 +++-
> > > hw/acpi/aml-build.c | 99 +++++++++++++++++++++++++++++++++++++--------
> > > hw/arm/virt-acpi-build.c | 39 +++---------------
> > > hw/i386/acpi-build.c | 64 +++++++++++------------------
> > > 5 files changed, 129 insertions(+), 95 deletions(-)
> > >
> >
> > I tested this series with ArmVirtQemu (aka AAVMF) and OVMF too. (They
> > use common code in edk2.)
> >
> > The ARM build works indeed, but that's only because in patch #4 we have
> >
> > build_rsdp(tables->rsdp, tables->linker, rsdt, 0);
> >
> > ie. there's only an RSDT.
> >
> > Due to patch #3 however, the OVMF client breaks:
> >
> > build_rsdp(tables->rsdp, tables->linker, rsdt, xsdt);
> >
> > The problem is that the "directed acyclic graph" of ADD_POINTER edges is
> > no longer a tree. At least some tables can be reached on multiple paths.
> > (Eg. the FADT can be reached via RSDP->RSDT-> FADT, and also
> > RSDP->XSDT->FADT.)
> >
> > This is a problem because EFI_ACPI_TABLE_PROTOCOL has "builtin
> > knowledge" about what tables may not be installed only once vs. several
> > times. Unfortunately, in this case both decisions have bad consequences:
> >
> > - When FADT is passed to EFI_ACPI_TABLE_PROTOCOL.InstallAcpiTable() for
> > the second time, the function returns EFI_ACCESS_DENIED, and the
> > linker/loader client bails out.
> >
> > - When (eg.) the same SSDT is passed to
> > EFI_ACPI_TABLE_PROTOCOL.InstallAcpiTable() for the second time, the
> > function will happily install (a copy of) it again, and then we'll end
> > up with two copies of the same SSDT.
> >
> > EFI_ACPI_TABLE_PROTOCOL manages both the RSDT and the XSDT internally.
> > As far as I can see, it puts each table in both. The RSDT and the XSDT
> > are not distinguished even on the UEFI spec level; it lumps them
> > together under "RSDT/XSDT" every time.
> >
> > This is probably very frustrating; sorry about that.
> >
> > Laszlo
>
> Thanks for the info! This is worth fixing. Can you fix this without
> protocol changes, or should we change the protocol to pass a hint that a
> pointer is to another instance of a previously used table?
>
> --
> MST
next prev parent reply other threads:[~2015-06-09 6:35 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-08 18:14 [Qemu-devel] [PATCH v2 0/4] acpi: xsdt support Michael S. Tsirkin
2015-06-08 18:14 ` [Qemu-devel] [PATCH v2 1/4] acpi: add API for 64 bit offsets Michael S. Tsirkin
2015-06-08 18:14 ` [Qemu-devel] [PATCH v2 2/4] i386/acpi: collect 64 bit offsets for xsdt Michael S. Tsirkin
2015-06-08 18:14 ` [Qemu-devel] [PATCH v2 3/4] i386/acpi: add XSDT Michael S. Tsirkin
2015-06-08 18:14 ` [Qemu-devel] [PATCH v2 4/4] acpi: unify rsdp generation Michael S. Tsirkin
2015-06-09 0:08 ` [Qemu-devel] [PATCH v2 0/4] acpi: xsdt support Laszlo Ersek
2015-06-09 5:31 ` Michael S. Tsirkin
2015-06-09 6:02 ` Paolo Bonzini
2015-06-09 6:35 ` Michael S. Tsirkin [this message]
2015-06-09 6:38 ` Michael S. Tsirkin
2015-06-09 7:41 ` Laszlo Ersek
2015-06-09 8:34 ` Michael S. Tsirkin
2015-06-09 14:01 ` Laszlo Ersek
2015-06-09 9:39 ` Igor Mammedov
2015-06-09 9:10 ` Michael S. Tsirkin
2015-06-09 9:49 ` Michael S. Tsirkin
2015-06-09 14:02 ` Laszlo Ersek
2015-06-09 14:05 ` Michael S. Tsirkin
2015-08-27 14:27 ` Laszlo Ersek
2015-08-27 17:58 ` Michael S. Tsirkin
2015-08-28 6:23 ` Laszlo Ersek
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=20150609083521-mutt-send-email-mst@redhat.com \
--to=mst@redhat.com \
--cc=ghammer@redhat.com \
--cc=imammedo@redhat.com \
--cc=lersek@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=shannon.zhao@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).