[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: Stefano Stabellini <sstabellini@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Tue, 16 May 2023 08:13:19 +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=wCiXzKIv7wGzCx0igUFvb4QA102zBnffJyHsyygvpXk=; b=XfALmFiuqUgzH8d4p+Vdph+iXCr3upqBUxRNxMndg65b7ziyW/QE5DcriumwWxtY1R8mLEW5noCT4+KKmkHQ8XEvGOIK17lN+gqAEN9kObTpnXfWknjikIMqqMnMgljAPDItUtg3sj/Ayqd+9B7Y8CsqsUL++KJw8Te1Os/TVyQRUa6jkupxUnRLlaW4HQIuHFta3ofCYfTGFXmPiKzZEjGir3q42GnqtAale0N3lV8oZqfLXNofHrUDT/OLyBCulk2htyAWc7/raaopk20rdOolfvv+cfEIhwQa8vjdnSVQxcr2Vfg6+SaYHH+r5zC+2ATpZh3OF+9Abo5nSxP9vg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g+jz019SKMC3nDMK6yMsy/FwP2FKSdaWDoTQ8pcR/uAZBoBoL8yhrZjCajomBtMQo8fcOJvAzAsHadIFzMkhzblc2KtBAcALmQOV3nkOvOJUkLgJJLL1ihHZKwxdvb20tCCM39gWKvos+9KWTa3QTSwp+wS1WyllcJEYzfEjQPLuUqv0YUxDIrdMI6BQxpYRfV/pRV49NUe7XRnBKLn8jYJEqywDRMTynrD3t7yHTnCijFYNvwKIRAJwOvmyA6uTwpFy1gPwxCdPU1OgHLAa4KPqJkNwPTeF3iRFPSwx2W/BXqiwgMkDf6qk9CldKdqkJpKqgzuFoHGYKOO1eIqF8Q==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, andrew.cooper3@xxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, Xenia.Ragiadakou@xxxxxxx, Stefano Stabellini <stefano.stabellini@xxxxxxx>
- Delivery-date: Tue, 16 May 2023 06:13:41 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 16.05.2023 02:16, Stefano Stabellini wrote:
> On Mon, 15 May 2023, Jan Beulich wrote:
>> On 15.05.2023 10:48, Roger Pau Monné wrote:
>>> 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.
>
> I tried this approach (together with the second patch for necessity) and
> it worked.
Which I find slightly surprising - a fully conforming consumer of the
tables may expect an XSDT when xsdt_physical_address is set, and
reject RSDT. We may still want to limit ourselves to this less involved
approach, but then with a code comment clearly stating the limitation.
Jan
> --- a/xen/arch/x86/hvm/dom0_build.c
> +++ b/xen/arch/x86/hvm/dom0_build.c
> @@ -967,6 +967,10 @@ static int __init pvh_setup_acpi_xsdt(struct domain *d,
> paddr_t madt_addr,
> goto out;
> }
> xsdt_paddr = rsdp->xsdt_physical_address;
> + if ( !xsdt_paddr )
> + {
> + xsdt_paddr = rsdp->rsdt_physical_address;
> + }
> acpi_os_unmap_memory(rsdp, sizeof(*rsdp));
> table = acpi_os_map_memory(xsdt_paddr, sizeof(*table));
> if ( !table )
|