]> Git Repo - linux.git/commit
KVM: SEV: Acquire vcpu mutex when updating VMSA
authorPeter Gonda <[email protected]>
Wed, 15 Sep 2021 17:17:55 +0000 (10:17 -0700)
committerPaolo Bonzini <[email protected]>
Wed, 22 Sep 2021 14:33:10 +0000 (10:33 -0400)
commitbb18a677746543e7f5eeb478129c92cedb0f9658
tree4e71adbc97b8240147fabc6f143bfe68a1dad52d
parentae232ea460888dc5a8b37e840c553b02521fbf18
KVM: SEV: Acquire vcpu mutex when updating VMSA

The update-VMSA ioctl touches data stored in struct kvm_vcpu, and
therefore should not be performed concurrently with any VCPU ioctl
that might cause KVM or the processor to use the same data.

Adds vcpu mutex guard to the VMSA updating code. Refactors out
__sev_launch_update_vmsa() function to deal with per vCPU parts
of sev_launch_update_vmsa().

Fixes: ad73109ae7ec ("KVM: SVM: Provide support to launch and run an SEV-ES guest")
Signed-off-by: Peter Gonda <[email protected]>
Cc: Marc Orr <[email protected]>
Cc: Paolo Bonzini <[email protected]>
Cc: Sean Christopherson <[email protected]>
Cc: Brijesh Singh <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Message-Id: <20210915171755.3773766[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
arch/x86/kvm/svm/sev.c
This page took 0.055497 seconds and 4 git commands to generate.