On 1/29/21 11:44 AM, Venu Busireddy wrote:
On 2021-01-26 11:36:46 -0600, Tom Lendacky wrote:
From: Tom Lendacky <[email protected]>

When SEV-ES is enabled, it is not possible modify the guests register
state after it has been initially created, encrypted and measured.

Normally, an INIT-SIPI-SIPI request is used to boot the AP. However, the
hypervisor cannot emulate this because it cannot update the AP register
state. For the very first boot by an AP, the reset vector CS segment
value and the EIP value must be programmed before the register has been
encrypted and measured. Search the guest firmware for the guest for a
specific GUID that tells Qemu the value of the reset vector to use.

Cc: Paolo Bonzini <[email protected]>
Cc: "Michael S. Tsirkin" <[email protected]>
Cc: Marcel Apfelbaum <[email protected]>
Cc: Richard Henderson <[email protected]>
Cc: Eduardo Habkost <[email protected]>
Cc: Marcelo Tosatti <[email protected]>
Signed-off-by: Tom Lendacky <[email protected]>
---
...
+
+    /*
+     * SEV info block not found in the Firmware GUID Table (or there isn't
+     * a Firmware GUID Table), fall back to the original implementation.
+     */
+    data = flash_ptr + flash_size - 0x20;

Even if the SEV_INFO_BLOCK_GUID is always located at 32 bytes from the end
of the flash, isn't it better to define a constant with a value of 0x20?

A follow-on patch that updates both this and the table parser code from James would probably be best.

Thanks,
Tom


+

Reply via email to