[PATCH 0/2] KVM: SEV: RECEIVE_UPDATE_DATA bug fixes
From: Sean Christopherson
Date: Tue Sep 14 2021 - 17:09:57 EST
Patch 1 pins the target of RECEIVE_UPDATE_DATA for write instead of read.
The SEV API clearly states that the PSP writes guest memory, which makes
sense given that the guest is receiving data.
Patch 2 adds a CLFLUSH of the guest memory as there is no requirement
that the page already be in an encrypted state before RECEIVE_UPDATE_DATA,
i.e. the cache may have dirty, unencrypted data.
On my end, these patches are compile-tested only as I don't have a
userspace VMM that supports SEV live migration, nor are there tests for
any of this stuff.
Masahiro Kozuka (1):
KVM: SEV: Flush cache on non-coherent systems before
RECEIVE_UPDATE_DATA
Sean Christopherson (1):
KVM: SEV: Pin guest memory for write for RECEIVE_UPDATE_DATA
arch/x86/kvm/svm/sev.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
--
2.33.0.309.g3052b89438-goog