[edk2-devel] [PATCH v10 17/32] OvmfPkg/MemEncryptSevLib: add support to validate > 4GB memory in PEI phase

Gerd Hoffmann kraxel at redhat.com
Wed Oct 20 04:54:25 UTC 2021


On Tue, Oct 19, 2021 at 02:39:19PM -0500, Brijesh Singh wrote:
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3275
> 
> The initial page built during the SEC phase is used by the
> MemEncryptSevSnpValidateSystemRam() for the system RAM validation. The
> page validation process requires using the PVALIDATE instruction;  the
> instruction accepts a virtual address of the memory region that needs
> to be validated. If hardware encounters a page table walk failure (due
> to page-not-present) then it raises #GP.
> 
> The initial page table built in SEC phase address up to 4GB. Add an
> internal function to extend the page table to cover > 4GB. The function
> builds 1GB entries in the page table for access > 4GB. This will provide
> the support to call PVALIDATE instruction for the virtual address >
> 4GB in PEI phase.

> +/**
> +  Create 1GB identity mapping for the specified virtual address range.
> +
> +  The function is preliminary used by the SEV-SNP page state change
> +  APIs to build the page table required before issuing the PVALIDATE
> +  instruction. The function must be removed after the EDK2 core is
> +  enhanced to do the lazy validation.

Thanks for adding this.

Acked-by: Gerd Hoffmann <kraxel at redhat.com>

take care,
  Gerd



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#82408): https://edk2.groups.io/g/devel/message/82408
Mute This Topic: https://groups.io/mt/86448825/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list