qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v6 3/6] sev/i386: Allow AP booting under SEV-ES


From: Tom Lendacky
Subject: Re: [PATCH v6 3/6] sev/i386: Allow AP booting under SEV-ES
Date: Mon, 1 Feb 2021 12:48:28 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 1/29/21 11:44 AM, Venu Busireddy wrote:
On 2021-01-26 11:36:46 -0600, Tom Lendacky wrote:
From: Tom Lendacky <thomas.lendacky@amd.com>

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 <pbonzini@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Cc: Richard Henderson <richard.henderson@linaro.org>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
---
...
+
+    /*
+     * 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

[Prev in Thread] Current Thread [Next in Thread]