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