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

Re: [PATCH v2 4/7] OvmfPkg/IndustryStandard: Introduce PageTable.h


  • To: Anthony PERARD <anthony.perard@xxxxxxxxxx>, devel@xxxxxxxxxxxxxx
  • From: Tom Lendacky <thomas.lendacky@xxxxxxx>
  • Date: Fri, 26 Mar 2021 09:16:04 -0500
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.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-SenderADCheck; bh=rX89sLHWd/73HhmUvv2w153fQonSprl22X6LtZB8ubA=; b=fop+SaP3cURItncBk7fRc5ivSR6SKg9QV7QKWX8fH/D1VbwDYmpxeHtGtK+i5G7C/3vav1NayjfupWGakFFi7dPzsLFIJ0hV6pc39lsx7Qx3WrDYNhfDtMyq3jton2Am9QS0W6gcmmQzirvYr3Fmb/QsJWO1ndlAkGPVSD7eR1b5gMRK83iqaDM06h5+87G363b5b1KcCQtKDkFvCnBBoVsnt6wWymtTV9yg+7gnPYxlJ0BP5xI3ukeJs3SI2qDXQBe51ZJbzdYHg71eHbuBI+RLElqyp4VQ1bwc5K23OjI4NXLv+j5VjXui/liS29y18cgFoPKApKdkwpxwARzqtw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZC9otA5g2mDB20qGi7QNQ8MxvsQq/m/gf+a1qnyhnxjxHdd4Yh/uBChVjoJrlFjfvmnYLpb/RPCaPYDLZ70YbawU4mOKuLbXSWbwdr7rH8yYsHx2zB86JpFwHf1KQ0azf5XCq2meK/4nKcaAl40S/Cu2NgCBm6aM+iyNMshmsf3Fd6RFlJMmM9Tb1gr0tJsAtaXBEfd+yUNwLSKoOj88EmbS+74x2jC5yN+2rxPXTSmdZPv3d/xbgbUuGPcDaBfAqFe2W+4vE5YMt4KYcv5W20PqX+Yx9avUGP2+QXcVOh1V8ghXRnAPZTDowUhRFpmeLYG9rHGoXetl6mdC2KiLsQ==
  • Authentication-results: amd.com; dkim=none (message not signed) header.d=none;amd.com; dmarc=none action=none header.from=amd.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Jordan Justen <jordan.l.justen@xxxxxxxxx>, Ard Biesheuvel <ard.biesheuvel@xxxxxxxxxx>, Laszlo Ersek <lersek@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Brijesh Singh <brijesh.singh@xxxxxxx>
  • Delivery-date: Fri, 26 Mar 2021 14:16:18 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 3/25/21 10:47 AM, Anthony PERARD wrote:
> We are going to use the page table structure in yet another place,
> collect the types and macro that can be used from another module
> rather that making yet another copy.
> 
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2490
> Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>

This begs the question of whether there should be only one version of this
header file, now. There are still copies in other places, but maybe that
can be a future cleanup? I'll leave that decision to Laszlo.

With one minor comment below, otherwise:

Acked-by: Tom Lendacky <thomas.lendacky@xxxxxxx>

> ---
> CC: Tom Lendacky <thomas.lendacky@xxxxxxx>
> CC: Brijesh Singh <brijesh.singh@xxxxxxx>
> ---
> 
> Notes:
>     v2:
>     - new patch
> 
>  .../IndustryStandard/PageTable.h}             | 117 +-------------
>  .../BaseMemEncryptSevLib/X64/VirtualMemory.h  | 143 +-----------------
>  2 files changed, 5 insertions(+), 255 deletions(-)
>  copy OvmfPkg/{Library/BaseMemEncryptSevLib/X64/VirtualMemory.h => 
> Include/IndustryStandard/PageTable.h} (60%)
> 

...

> diff --git a/OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.h 
> b/OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.h
> index 996f94f07ebb..b621d811ca6f 100644
> --- a/OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.h
> +++ b/OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.h
> @@ -20,151 +20,10 @@
>  #include <Library/DebugLib.h>
>  #include <Library/MemoryAllocationLib.h>
>  #include <Uefi.h>
> +#include <IndustryStandard/PageTable.h>

Typically, these are preferred to be in sorted order.

Thanks,
Tom

>  
>  #define SYS_CODE64_SEL 0x38
>  



 


Rackspace

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