An SEV-ES guest does not allow register state to be altered once it has been measured. When an SEV-ES guest issues a reboot command, Qemu will reset the vCPU state and resume the guest. This will cause failures under SEV-ES. Prevent that from occuring by introducing an arch-specific callback that returns a boolean indicating whether vCPUs are resettable. Cc: Peter Maydell <peter.maydell@linaro.org> Cc: Aurelien Jarno <aurelien@aurel32.net> Cc: Jiaxun Yang <jiaxun.yang@flygoat.com> Cc: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com> Cc: David Gibson <david@gibson.dropbear.id.au> Cc: David Hildenbrand <david@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Reviewed-by: Venu Busireddy <venu.busireddy@oracle.com> Message-Id: <1ac39c441b9a3e970e9556e1cc29d0a0814de6fd.1611682609.git.thomas.lendacky@amd.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
31 lines
724 B
C
31 lines
724 B
C
/*
|
|
* QEMU Hardware accelerators support
|
|
*
|
|
* Copyright 2016 Google, Inc.
|
|
*
|
|
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
|
* See the COPYING file in the top-level directory.
|
|
*
|
|
*/
|
|
|
|
#ifndef QEMU_HW_ACCEL_H
|
|
#define QEMU_HW_ACCEL_H
|
|
|
|
#include "hw/core/cpu.h"
|
|
#include "sysemu/hax.h"
|
|
#include "sysemu/kvm.h"
|
|
#include "sysemu/hvf.h"
|
|
#include "sysemu/whpx.h"
|
|
|
|
void cpu_synchronize_state(CPUState *cpu);
|
|
void cpu_synchronize_post_reset(CPUState *cpu);
|
|
void cpu_synchronize_post_init(CPUState *cpu);
|
|
void cpu_synchronize_pre_loadvm(CPUState *cpu);
|
|
|
|
static inline bool cpu_check_are_resettable(void)
|
|
{
|
|
return kvm_enabled() ? kvm_cpu_check_are_resettable() : true;
|
|
}
|
|
|
|
#endif /* QEMU_HW_ACCEL_H */
|