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

Re: [PATCH v10] Preserve the EFI System Resource Table for dom0


  • To: Demi Marie Obenour <demi@xxxxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 12 Jul 2022 08:27:20 +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=YTM6Yuci/8dO9XMPQ/YUVd5RdN14qjz3f39xN0tMDxM=; b=A2rf6rp2Oc2BkmrlDmy1YHb8mznM/jKLkzD+lAjm6cw+nkGkhIt+2eSO+QZxQuMrpKnOsDfKzn63yfdzVh0fH0niWdYFK884QnS+LrJflbMxtIyDE6aRv3MGXSdfanrQvrrdWYqc6Jvhe5yy3h8ik1gM4ruU6aV3AYDaFyZEXdoDE9TqpdiV7u/rsO5oKbu7Mw+nSk872o0Y8OuPVX3oKqV5LVaZWjrnxGkDIF8G6OuvmnqZ/zIof/FIEaF3IUVxQe1e+/mDeccmTN/XTRRxI4BUlI1h5z4YdDJVJsBesfnKrdyxtlQlktZsanLG4BuAt8LPkjho6yC/SifotPRnVw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YC1D6UDHyGPHANCMl8UiXTwjHP+OvdlaKXhq52fJVWACfzGzUEEnZfLakBaoXMoA5JZs/+HFDBQjsZTAC0pNOqT0VV98ueKADfD9l1vvVd2We0IXbVWyy4A+b6xHg3rVabL8NKeapQIuqWpTchUrOHo7YWo5sdb43KuSxqO6I389qyqjImEWOO2w5SUUPQb1y4VNYaqpGqY7TRzte1QpmXX/BpVAQ5GbcgX7XB5cU4SoWCXI8d0GZXdf73V561TwNmSEQACCBuOgkz5RIAIsCHeIjkkAtExuteQdv+B4X/kigN7J69fAWvsKb3RNwHEWLe/4fBhlp9VHmICmlEDYMg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Luca Fancellu <luca.fancellu@xxxxxxx>, Xen developer discussion <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 12 Jul 2022 06:27:34 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 12.07.2022 01:14, Demi Marie Obenour wrote:
> The EFI System Resource Table (ESRT) is necessary for fwupd to identify
> firmware updates to install.  According to the UEFI specification §23.4,
> the ESRT shall be stored in memory of type EfiBootServicesData.  However,
> memory of type EfiBootServicesData is considered general-purpose memory
> by Xen, so the ESRT needs to be moved somewhere where Xen will not
> overwrite it.  Copy the ESRT to memory of type EfiRuntimeServicesData,
> which Xen will not reuse.  dom0 can use the ESRT if (and only if) it is
> in memory of type EfiRuntimeServicesData.
> 
> Earlier versions of this patch reserved the memory in which the ESRT was
> located.  This created awkward alignment problems, and required either
> splitting the E820 table or wasting memory.  It also would have required
> a new platform op for dom0 to use to indicate if the ESRT is reserved.
> By copying the ESRT into EfiRuntimeServicesData memory, the E820 table
> does not need to be modified, and dom0 can just check the type of the
> memory region containing the ESRT.  The copy is only done if the ESRT is
> not already in EfiRuntimeServicesData memory, avoiding memory leaks on
> repeated kexec.
> 
> See https://lore.kernel.org/xen-devel/20200818184018.GN1679@mail-itl/T/
> for details.
> 
> Signed-off-by: Demi Marie Obenour <demi@xxxxxxxxxxxxxxxxxxxxxx>
> Tested-by: Luca Fancellu <luca.fancellu@xxxxxxx>

Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>




 


Rackspace

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