Re: [PATCH 1/2] KVM: SEV: Pin guest memory for write for RECEIVE_UPDATE_DATA

From: Brijesh Singh
Date: Tue Sep 14 2021 - 18:15:12 EST




On 9/14/21 4:09 PM, Sean Christopherson wrote:
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: 15fb7de1a7f5 ("KVM: SVM: Add KVM_SEV_RECEIVE_UPDATE_DATA command")
Cc: stable@xxxxxxxxxxxxxxx
Cc: Peter Gonda <pgonda@xxxxxxxxxx>
Cc: Marc Orr <marcorr@xxxxxxxxxx>
Cc: Tom Lendacky <thomas.lendacky@xxxxxxx>
Cc: Brijesh Singh <brijesh.singh@xxxxxxx>
Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>

Reviewed-by: Brijesh Singh <brijesh.singh@xxxxxxx>

thanks