Reporting Issues
Bug 3183 - Runtime service flash updates not succeeding for an SEV-ES guest
Summary: Runtime service flash updates not succeeding for an SEV-ES guest
Status: RESOLVED FIXED
Alias: None
Product: EDK2
Classification: Unclassified
Component: Code (show other bugs)
Version: Current
Hardware: All All
: Lowest normal
Assignee: thomas.lendacky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-22 12:30 UTC by thomas.lendacky
Modified: 2021-01-25 19:30 UTC (History)
2 users (show)

See Also:
EDK II Code First industry standard specifications: ---
Branch URL:
Release(s) the issue is observed: edk2-stable202008, edk2-stable202011
The OS the target platform is running: ---
Package: OvmfPkg
Release(s) the issues must be fixed: EDK II Master
Tianocore documents:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description thomas.lendacky 2021-01-22 12:30:30 UTC
The OvmfPkg SEV-ES flash support uses a VMGEXIT call to perform an MMIO write to update the flash device. This support assumes an identity mapped address for the flash address (VA == PA). However, when done as part of the EFI runtime services after the SetVitualAddressMap() API has been called, the VA == PA assumption is no longer correct and the MMIO write fails.
Comment 1 thomas.lendacky 2021-01-22 12:33:53 UTC
The Qemu flash services needs to track the original base address, as this represents the physical address of the flash device. QemuFlashPtrWrite() can then use this address to always calculate the physical address even after SetVitualAddressMap() has been called.