From patchwork Tue Apr 19 15:32:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Demi Marie Obenour X-Patchwork-Id: 12818720 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2BD6EC433FE for ; Tue, 19 Apr 2022 15:33:23 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.308255.523914 (Exim 4.92) (envelope-from ) id 1ngpqY-0000DM-Bq; Tue, 19 Apr 2022 15:32:54 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 308255.523914; Tue, 19 Apr 2022 15:32:54 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ngpqY-0000DF-92; Tue, 19 Apr 2022 15:32:54 +0000 Received: by outflank-mailman (input) for mailman id 308255; Tue, 19 Apr 2022 15:32:53 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ngpqW-0000D6-LE for xen-devel@lists.xenproject.org; Tue, 19 Apr 2022 15:32:52 +0000 Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id f809e7c7-bff5-11ec-8fbf-03012f2f19d4; Tue, 19 Apr 2022 17:32:50 +0200 (CEST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id C79395C00F7; Tue, 19 Apr 2022 11:32:48 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 19 Apr 2022 11:32:48 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 19 Apr 2022 11:32:47 -0400 (EDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: f809e7c7-bff5-11ec-8fbf-03012f2f19d4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1650382368; x=1650468768; bh=of63eWPuDEYsw D9VFk/UpPjX4fxK7mSjw3zQWtJ8FuE=; b=Dd4VW1xnuqewU17gKmsMq/Ja106ec 2Iyqb2PHieTicO1fT5qCXG76dQi/i21T7BqBaYjVu0ZrsnX12T8lxOISax321xaA Y1horh3HBwY7aGdRMzBxmFni13qHctznzClsjZrBABnthmayOz7DEfM8gNO+Uc1a n+j1VAthw5bdS8hsZoYKNqmzmEKoUoSezSf2z0uBJtPTfvQcxSUtHSIC/gqpxZQK 6Wumq9LtUzCiy2GG+3VDDprG6tjT3+jWB2RMXZY3LhI52ALno9KeYCT6zQurxJ6S mBPy4CTgF4Yg/T80q2RaK7B4yVPVXeQ4kdnGDTKtYu1Mx/Peghfw/AMKQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrvddtfedgkeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfggtggusehgtderredttddvnecuhfhrohhmpeffvghmihcuofgr rhhivgcuqfgsvghnohhurhcuoeguvghmihesihhnvhhishhisghlvghthhhinhhgshhlrg gsrdgtohhmqeenucggtffrrghtthgvrhhnpedujefgjeeggeelhfevkeeltdekvdeuhfet iefffefhkeehhfevhefhkefgudegkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrh grmhepmhgrihhlfhhrohhmpeguvghmihesihhnvhhishhisghlvghthhhinhhgshhlrggs rdgtohhm X-ME-Proxy: Date: Tue, 19 Apr 2022 11:32:23 -0400 From: Demi Marie Obenour To: xen-devel@lists.xenproject.org Cc: Stefano Stabellini , Julien Grall , Bertrand Marquis , Volodymyr Babchuk , Jan Beulich , Andrew Cooper , Roger Pau =?iso-8859-1?q?Monn=E9?= , Wei Liu , George Dunlap Subject: [PATCH v3 0/4] EFI System Resource Table support Message-ID: MIME-Version: 1.0 Content-Disposition: inline This adds support for the EFI System Resource Table. This involves reserving the table in Xen and adding a new hypercall so that dom0 can access it. Changes since v2: - Use the esrt_desc global variable instead of passing it as a function parameter - Add an overflow check for the ESRT size - Create a new memory region for the ESRT to avoid wasting memory - Add hypercall to retrieve the ESRT - Add file local variables used during development - Remove extra consts - Follow the EFI naming convention in struct definitions - Move struct definitions to header file - Fix inverted logic in overflow check - Remove BUILD_BUG_ON()s - Avoid overriding attribute of memory descriptor containing ESRT Changes since v1: - Remove the esrt_status enum - Use EFI types - Fix style nits - Remove an unused overflow check Demi Marie Obenour (4): Grab the EFI System Resource Table and check it Add a dedicated memory region for the ESRT Add a new hypercall to get the ESRT Add emacs file-local variables xen/arch/arm/efi/efi-boot.h | 1 + xen/arch/x86/efi/efi-boot.h | 67 +++++++++++++++++++++++++-------- xen/arch/x86/include/asm/e820.h | 2 +- xen/common/efi/boot.c | 65 ++++++++++++++++++++++++++++++-- xen/common/efi/efi.h | 20 ++++++++++ xen/common/efi/runtime.c | 27 ++++++++++++- xen/include/efi/efiapi.h | 3 ++ xen/include/public/platform.h | 7 ++++ 8 files changed, 172 insertions(+), 20 deletions(-)