All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: "Daniel P. Smith" <dpsmith@apertussolutions.com>,
	Stefano Stabellini <stefano.stabellini@amd.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v3] xen/x86/pvh: handle ACPI RSDT table in PVH Dom0 build
Date: Thu, 25 Apr 2024 09:10:29 +0200	[thread overview]
Message-ID: <ZioB5c6fVcateTbj@macbook> (raw)
In-Reply-To: <9861a2f8-4a16-40f1-ab10-583101f922f1@suse.com>

On Thu, Apr 25, 2024 at 08:12:09AM +0200, Jan Beulich wrote:
> On 24.04.2024 21:18, Daniel P. Smith wrote:
> > @@ -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';
> 
> This is in no way "blindly". The size of the table elements being different
> between RSDT and XSDT makes it mandatory to have the correct signature. Else
> the consumer of the struct is going to be misled.

The "blindly" IMO refers to the fact that the table might already have
the right signature, but this is not checked, IOW we could do:

if ( xsdt->header.signature[0] == 'R' )
    xsdt->header.signature[0] = 'X';

Regards, Roger.


  reply	other threads:[~2024-04-25  7:10 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é [this message]
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é
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=ZioB5c6fVcateTbj@macbook \
    --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.