From: "Roger Pau Monné" <roger.pau@citrix.com>
To: "Daniel P. Smith" <dpsmith@apertussolutions.com>
Cc: xen-devel@lists.xenproject.org,
Stefano Stabellini <stefano.stabellini@amd.com>,
Jan Beulich <jbeulich@suse.com>,
Andrew Cooper <andrew.cooper3@citrix.com>
Subject: Re: [PATCH v3] xen/x86/pvh: handle ACPI RSDT table in PVH Dom0 build
Date: Tue, 10 Sep 2024 15:33:02 +0200 [thread overview]
Message-ID: <ZuBKjkUeR3sAs7j6@macbook.local> (raw)
In-Reply-To: <20240424191826.23656-1-dpsmith@apertussolutions.com>
Ping?
I think this is a useful change, could we please have a new version
with the proposed adjustments?
Thanks, Roger.
On Wed, Apr 24, 2024 at 03:18:26PM -0400, Daniel P. Smith wrote:
> From: Stefano Stabellini <stefano.stabellini@amd.com>
>
> Xen always generates as XSDT table even if the firmware provided an RSDT table.
> Copy the RSDT header from the firmware table, adjusting the signature, for the
> XSDT table when not provided by the firmware.
>
> Fixes: 1d74282c455f ('x86: setup PVHv2 Dom0 ACPI tables')
> Suggested-by: Roger Pau Monné <roger.pau@citrix.com>
> Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
> Signed-off-by: Daniel P. Smith <dpsmith@apertussolutions.com>
> ---
>
> This patch is used for development and testing of hyperlaunch using the QEMU
> emulator. After dicussiong with Stefano, he was okay with me addressing Jan's
> comment regarding the table signature and reposting for acceptance.
>
> Changes in v3:
> - ensure the constructed XSDT table always has the correct signature
>
> ---
> xen/arch/x86/hvm/dom0_build.c | 14 +++++++++++++-
> 1 file changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/xen/arch/x86/hvm/dom0_build.c b/xen/arch/x86/hvm/dom0_build.c
> index ac71d43a6b3f..781aac00fe72 100644
> --- a/xen/arch/x86/hvm/dom0_build.c
> +++ b/xen/arch/x86/hvm/dom0_build.c
> @@ -1077,7 +1077,16 @@ static int __init pvh_setup_acpi_xsdt(struct domain *d, paddr_t madt_addr,
> rc = -EINVAL;
> goto out;
> }
> - xsdt_paddr = rsdp->xsdt_physical_address;
> + /*
> + * Note the header is the same for both RSDT and XSDT, so it's fine to
> + * copy the native RSDT header to the Xen crafted XSDT if no native
> + * XSDT is available.
> + */
> + if ( rsdp->revision > 1 && rsdp->xsdt_physical_address )
> + xsdt_paddr = rsdp->xsdt_physical_address;
> + else
> + xsdt_paddr = rsdp->rsdt_physical_address;
> +
> acpi_os_unmap_memory(rsdp, sizeof(*rsdp));
> table = acpi_os_map_memory(xsdt_paddr, sizeof(*table));
> if ( !table )
> @@ -1089,6 +1098,9 @@ static int __init pvh_setup_acpi_xsdt(struct domain *d, paddr_t madt_addr,
> xsdt->header = *table;
> acpi_os_unmap_memory(table, sizeof(*table));
>
> + /* In case the header is an RSDT copy, blindly ensure it has an XSDT sig */
> + xsdt->header.signature[0] = 'X';
> +
> /* Add the custom MADT. */
> xsdt->table_offset_entry[0] = madt_addr;
>
> --
> 2.30.2
>
next prev parent reply other threads:[~2024-09-10 13:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-24 19:18 [PATCH v3] xen/x86/pvh: handle ACPI RSDT table in PVH Dom0 build Daniel P. Smith
2024-04-25 6:12 ` Jan Beulich
2024-04-25 7:10 ` Roger Pau Monné
2024-04-25 7:26 ` Jan Beulich
2024-04-25 7:35 ` Roger Pau Monné
2024-04-25 7:07 ` Roger Pau Monné
2024-09-10 13:33 ` Roger Pau Monné [this message]
2024-09-12 1:22 ` Stefano Stabellini
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=ZuBKjkUeR3sAs7j6@macbook.local \
--to=roger.pau@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=dpsmith@apertussolutions.com \
--cc=jbeulich@suse.com \
--cc=stefano.stabellini@amd.com \
--cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.