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

Re: [PATCH 1/2] xen/x86/pvh: use preset XSDT header for XSDT generation


  • To: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 15 May 2023 16:14:30 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=FHnVB35JtcM912OMMxay/u6Y/5S8hm7gNAIw+GrofE8=; b=NIYVyfo0bh1tVNHsDvUXQ/HDuJyIVpQUfy5bYeHjB4j6xSHh3tc5zRcYITiBWVCZ2LEWV4sk8snQVs3M3Daf85Zl6oJ2D/ZOhRo3fgJa+Eki3/zazCY+dfUVgsiWc0kv6z8NMDJdRZkVqZPEAta2wNpS1TRMTphjWi0n3mAMzJafVJ+6hCDiv1D9se7f9GwtueMk5EF/wuOnyQOboVtlNmSHFi6cjdBb9buvyiiJ3cVT7HYQBmcaiXC5KWtKvNugpgeWyr5QMsOnaNv22AA5gkFxunYKqxgg9o5C64S3WSdz5fG2rB6+/Y1IAJD1NC9LyQ3N1ccZUASOL6MHGppbyQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hkAHW3h0Vc9mNWWt1U5GjGBOEpSchaO75BBi6lNW8SAuvBUTgEZBydL9RK/iTt0G/B38+S8l8rJRvFxyHlY7vtqwdlgGSqYxyu5FPT8d2YcCT1rJG0SjcdJayvqTrTcHxnDEhdOCCqqCP2vV24Jm3vNPoghbmlPPzrm6KawpwgmYHZLVx2nOn+sg7SzduqvaNUgfSMuotEwpDsNnUXoeC21WKCiklZot5HiBFlbh/0P/xg355jpt8BeZ0HHI72Fsse5RL2dXCmsJvo70P8VG51fMoclazff4BcFU6wzIQ/YArZ7jR12Id+3U/VZxxkQm+bGQyB4ep2tuDNFqLZ4w2A==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: andrew.cooper3@xxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, Xenia.Ragiadakou@xxxxxxx, Stefano Stabellini <stefano.stabellini@xxxxxxx>
  • Delivery-date: Mon, 15 May 2023 14:14:50 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 15.05.2023 10:48, Roger Pau Monné wrote:
> On Fri, May 12, 2023 at 06:17:19PM -0700, Stefano Stabellini wrote:
>> From: Stefano Stabellini <stefano.stabellini@xxxxxxx>
>>
>> Xen always generates a XSDT table even if the firmware provided a RSDT
>> table. Instead of copying the XSDT header from the firmware table (that
>> might be missing), generate the XSDT header from a preset.
>>
>> Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxx>
>> ---
>>  xen/arch/x86/hvm/dom0_build.c | 32 +++++++++-----------------------
>>  1 file changed, 9 insertions(+), 23 deletions(-)
>>
>> diff --git a/xen/arch/x86/hvm/dom0_build.c b/xen/arch/x86/hvm/dom0_build.c
>> index 307edc6a8c..5fde769863 100644
>> --- a/xen/arch/x86/hvm/dom0_build.c
>> +++ b/xen/arch/x86/hvm/dom0_build.c
>> @@ -963,13 +963,18 @@ static int __init pvh_setup_acpi_xsdt(struct domain 
>> *d, paddr_t madt_addr,
>>                                        paddr_t *addr)
>>  {
>>      struct acpi_table_xsdt *xsdt;
>> -    struct acpi_table_header *table;
>> -    struct acpi_table_rsdp *rsdp;
>>      const struct acpi_table_desc *tables = acpi_gbl_root_table_list.tables;
>>      unsigned long size = sizeof(*xsdt);
>>      unsigned int i, j, num_tables = 0;
>> -    paddr_t xsdt_paddr;
>>      int rc;
>> +    struct acpi_table_header header = {
>> +        .signature    = "XSDT",
>> +        .length       = sizeof(struct acpi_table_header),
>> +        .revision     = 0x1,
>> +        .oem_id       = "Xen",
>> +        .oem_table_id = "HVM",
> 
> I think this is wrong, as according to the spec the OEM Table ID must
> match the OEM Table ID in the FADT.
> 
> We likely want to copy the OEM ID and OEM Table ID from the RSDP, and
> possibly also the other OEM related fields.
> 
> Alternatively we might want to copy and use the RSDT on systems that
> lack an XSDT, or even just copy the header from the RSDT into Xen's
> crafted XSDT, since the format of the RSDP and the XSDT headers are
> exactly the same (the difference is in the size of the description
> headers that come after).

I guess I'd prefer that last variant. ACPI specifically says "Platforms
provide the RSDT to enable compatibility with ACPI 1.0 operating
systems." IOW any halfway modern system (including qemu, that is) ought
to supply an XSDT anyway.

Jan



 


Rackspace

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