]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: SEV: Pin guest memory for write for RECEIVE_UPDATE_DATA
authorSean Christopherson <seanjc@google.com>
Tue, 14 Sep 2021 21:09:50 +0000 (14:09 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 22 Sep 2021 14:33:11 +0000 (10:33 -0400)
commite8c99051cfc588f366dcc5d684e793786de96c91
tree792de9e65c26956fc4708e493f1a2d56e29960cb
parent5acfff2a4d52397e986a2a4f6d8ca86e8b89fc10
KVM: SEV: Pin guest memory for write for RECEIVE_UPDATE_DATA

Require the target guest page to be writable when pinning memory for
RECEIVE_UPDATE_DATA.  Per the SEV API, the PSP writes to guest memory:

  The result is then encrypted with GCTX.VEK and written to the memory
  pointed to by GUEST_PADDR field.

Fixes: 34422910ba18 ("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: Sean Christopherson <seanjc@google.com>
Message-Id: <20210914210951.2994260-2-seanjc@google.com>
Reviewed-by: Brijesh Singh <brijesh.singh@amd.com>
Reviewed-by: Peter Gonda <pgonda@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/sev.c