[PATCH v3 62/70] i386/tdx: Don't allow system reset for TDX VMs

Xiaoyao Li posted 70 patches 1 year ago
Only 68 patches received!
There is a newer version of this series
[PATCH v3 62/70] i386/tdx: Don't allow system reset for TDX VMs
Posted by Xiaoyao Li 1 year ago
TDX CPU state is protected and thus vcpu state cann't be reset by VMM.

Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
---
 target/i386/kvm/kvm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c
index f1c4dd759b3e..a74a0d8e0891 100644
--- a/target/i386/kvm/kvm.c
+++ b/target/i386/kvm/kvm.c
@@ -5675,7 +5675,7 @@ bool kvm_has_waitpkg(void)
 
 bool kvm_arch_cpu_check_are_resettable(void)
 {
-    return !sev_es_enabled();
+    return !sev_es_enabled() && !is_tdx_vm();
 }
 
 #define ARCH_REQ_XCOMP_GUEST_PERM       0x1025
-- 
2.34.1