KVM: SVM: Prevent debugging under SEV-ES
authorTom Lendacky <thomas.lendacky@amd.com>
Thu, 10 Dec 2020 17:09:43 +0000 (11:09 -0600)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 15 Dec 2020 10:20:46 +0000 (05:20 -0500)
commit8d4846b9b15045598d760470789716fb08b9b317
tree13e227a9cbb6cd9b3f677462cef8c24ee7f61567
parentf1c6366e304328de301be362eca905a3503ff33b
KVM: SVM: Prevent debugging under SEV-ES

Since the guest register state of an SEV-ES guest is encrypted, debugging
is not supported. Update the code to prevent guest debugging when the
guest has protected state.

Additionally, an SEV-ES guest must only and always intercept DR7 reads and
writes. Update set_dr_intercepts() and clr_dr_intercepts() to account for
this.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Message-Id: <8db966fa2f9803d6454ce773863025d0e2e7f3cc.1607620209.git.thomas.lendacky@amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/svm.c
arch/x86/kvm/svm/svm.h
arch/x86/kvm/x86.c