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.
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
---
accel/kvm/kvm-all.c | 60 ++++++++++++++++++++++++++++++++++++++++++
accel/stubs/kvm-stub.c | 5 ++++
hw/i386/pc_sysfw.c | 10 ++++++-
include/sysemu/kvm.h | 16 +++++++++++
include/sysemu/sev.h | 2 ++
target/i386/kvm.c | 2 ++
target/i386/sev.c | 47 +++++++++++++++++++++++++++++++++
7 files changed, 141 insertions(+), 1 deletion(-)