KVM: SVM: VMRUN should use associated ASID when SEV is enabled
authorBrijesh Singh <brijesh.singh@amd.com>
Mon, 4 Dec 2017 16:57:34 +0000 (10:57 -0600)
committerBrijesh Singh <brijesh.singh@amd.com>
Mon, 4 Dec 2017 19:32:30 +0000 (13:32 -0600)
commit70cd94e60c733e3afc18b0e6aab789c13b5571da
treec5ebb08e84a3a5a23edf175a9f29c85525ed6695
parent1654efcbc431a369397a20bf85e45870d15c8689
KVM: SVM: VMRUN should use associated ASID when SEV is enabled

SEV hardware uses ASIDs to associate a memory encryption key with a
guest VM. During guest creation, a SEV VM uses the SEV_CMD_ACTIVATE
command to bind a particular ASID to the guest. Lets make sure that the
VMCB is programmed with the bound ASID before a VMRUN.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Radim Krčmář" <rkrcmar@redhat.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Borislav Petkov <bp@suse.de>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: x86@kernel.org
Cc: kvm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Reviewed-by: Borislav Petkov <bp@suse.de>
arch/x86/kvm/svm.c