]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: SEV: Flush cache on non-coherent systems before RECEIVE_UPDATE_DATA
authorMasahiro Kozuka <masa.koz@kozuka.jp>
Tue, 14 Sep 2021 21:09:51 +0000 (14:09 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 21 Oct 2021 17:01:25 +0000 (13:01 -0400)
commit6b954532a3d1143cefdd436be29351df15c4c9f4
treeee3ab9a43c294ec0a53cd00fcb51df0092b312ee
parentbd6094752cba74caa6e69e170cd43f7cc99b7516
KVM: SEV: Flush cache on non-coherent systems before RECEIVE_UPDATE_DATA

Flush the destination page before invoking RECEIVE_UPDATE_DATA, as the
PSP encrypts the data with the guest's key when writing to guest memory.
If the target memory was not previously encrypted, the cache may contain
dirty, unecrypted data that will persist on non-coherent systems.

Fixes: 999add2ac669 ("KVM: SVM: Add KVM_SEV_RECEIVE_UPDATE_DATA command")
Cc: stable@vger.kernel.org
Cc: Peter Gonda <pgonda@google.com>
Cc: Marc Orr <marcorr@google.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Brijesh Singh <brijesh.singh@amd.com>
Signed-off-by: Masahiro Kozuka <masa.koz@kozuka.jp>
[sean: converted bug report to changelog]
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20210914210951.2994260-3-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/sev.c