Star64_linux/arch/x86/kvm/svm
Tom Lendacky ad5b353240 KVM: SVM: Do not terminate SEV-ES guests on GHCB validation failure
Currently, an SEV-ES guest is terminated if the validation of the VMGEXIT
exit code or exit parameters fails.

The VMGEXIT instruction can be issued from userspace, even though
userspace (likely) can't update the GHCB. To prevent userspace from being
able to kill the guest, return an error through the GHCB when validation
fails rather than terminating the guest. For cases where the GHCB can't be
updated (e.g. the GHCB can't be mapped, etc.), just return back to the
guest.

The new error codes are documented in the lasest update to the GHCB
specification.

Fixes: 291bd20d5d ("KVM: SVM: Add initial support for a VMGEXIT VMEXIT")
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Message-Id: <b57280b5562893e2616257ac9c2d4525a9aeeb42.1638471124.git.thomas.lendacky@amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-12-05 03:02:04 -05:00
..
avic.c KVM: ensure APICv is considered inactive if there is no APIC 2021-12-02 04:12:11 -05:00
nested.c nSVM: Check for reserved encodings of TLB_CONTROL in nested VMCB 2021-10-01 03:44:57 -04:00
pmu.c KVM: x86/pmu: Fix reserved bits for AMD PerfEvtSeln register 2021-12-02 04:11:50 -05:00
sev.c KVM: SVM: Do not terminate SEV-ES guests on GHCB validation failure 2021-12-05 03:02:04 -05:00
svm.c KVM: x86: check PIR even for vCPUs with disabled APICv 2021-11-30 03:52:39 -05:00
svm.h KVM: SEV: Prohibit migration of a VM that has mirrors 2021-11-30 03:54:14 -05:00
svm_onhyperv.c KVM: SVM: hyper-v: Direct Virtual Flush support 2021-06-17 13:09:38 -04:00
svm_onhyperv.h KVM: SVM: delay svm_vcpu_init_msrpm after svm->vmcb is initialized 2021-07-27 16:59:00 -04:00
svm_ops.h x86/kvm: Always inline vmload() / vmsave() 2021-09-15 15:51:45 +02:00
vmenter.S KVM/SVM: Move vmenter.S exception fixups out of line 2021-03-15 04:43:56 -04:00