diff options
author | Tom Lendacky <thomas.lendacky@amd.com> | 2024-03-08 07:31:11 -0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-04-17 18:30:03 +0000 |
commit | 069f9911a35c6191ea0cace0b5b5c8061e9b7720 (patch) | |
tree | 41ee1b09281339f4e37243174c8ffc7a98ee49f7 /BaseTools/Source/Python/FirmwareStorageFormat/FvHeader.py | |
parent | 2b330b57dbe8014c5fa9f10d4cf4ae5923e3b143 (diff) | |
download | edk2-069f9911a35c6191ea0cace0b5b5c8061e9b7720.tar.gz edk2-069f9911a35c6191ea0cace0b5b5c8061e9b7720.tar.bz2 edk2-069f9911a35c6191ea0cace0b5b5c8061e9b7720.zip |
OvmfPkg/BaseMemEncryptSevLib: Maximize Page State Change efficiency
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4654
When building the Page State Change entries for a range of memory, it can
happen that multiple calls to BuildPageStateBuffer() need to be made. If
the size of the input work area passed to BuildPageStateBuffer() exceeds
the number of entries that can be passed to the hypervisor using the GHCB
shared buffer, the Page State Change VMGEXIT support will issue multiple
VMGEXITs to process all entries in the buffer.
However, it could be that the final VMGEXIT for each round of Page State
Changes is only for a small number of entries and subsequent VMGEXITs may
still be issued to handle the full range of memory requested. To maximize
the number of entries processed during the Page State Change VMGEXIT,
limit BuildPageStateBuffer() to not build entries that exceed the maximum
number of entries that can be handled in a single Page State Change
VMGEXIT.
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Erdem Aktas <erdemaktas@google.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Michael Roth <michael.roth@amd.com>
Cc: Min Xu <min.m.xu@intel.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Diffstat (limited to 'BaseTools/Source/Python/FirmwareStorageFormat/FvHeader.py')
0 files changed, 0 insertions, 0 deletions