[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3] xen/x86/pvh: handle ACPI RSDT table in PVH Dom0 build



On Thu, Apr 25, 2024 at 09:26:59AM +0200, Jan Beulich wrote:
> On 25.04.2024 09:10, Roger Pau Monné wrote:
> > 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';
> 
> Right, and indeed I was seeing this as a possible further interpretation.
> Yet given multiple ways of reading this, I'm of the opinion that it wants
> adjusting. ", ... unconditionally ensure it has ... " may already do.
> Simply dropping "blindly" would too be okay with me.

FWIW, I'm fine with any of the proposed adjustments.

Thanks, Roger.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.