From 92a5199b29f6519aa5f774f4b96dc41954f641d1 Mon Sep 17 00:00:00 2001 From: Tom Lendacky Date: Tue, 26 Jan 2021 11:36:47 -0600 Subject: sev/i386: Don't allow a system reset under an SEV-ES guest 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 Cc: Aurelien Jarno Cc: Jiaxun Yang Cc: Aleksandar Rikalo Cc: David Gibson Cc: David Hildenbrand Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Tom Lendacky Reviewed-by: Venu Busireddy Message-Id: <1ac39c441b9a3e970e9556e1cc29d0a0814de6fd.1611682609.git.thomas.lendacky@amd.com> Signed-off-by: Paolo Bonzini --- include/sysemu/cpus.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/sysemu/cpus.h') diff --git a/include/sysemu/cpus.h b/include/sysemu/cpus.h index 2cd74392e0..868f1192de 100644 --- a/include/sysemu/cpus.h +++ b/include/sysemu/cpus.h @@ -41,6 +41,8 @@ extern int icount_align_option; /* Unblock cpu */ void qemu_cpu_kick_self(void); +bool cpus_are_resettable(void); + void cpu_synchronize_all_states(void); void cpu_synchronize_all_post_reset(void); void cpu_synchronize_all_post_init(void); -- cgit v1.2.3