]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
KVM: x86: Fix device passthrough when SME is active
authorTom Lendacky <thomas.lendacky@amd.com>
Thu, 8 Mar 2018 23:17:31 +0000 (17:17 -0600)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Wed, 21 Mar 2018 16:40:04 +0000 (13:40 -0300)
commit816d09da3cc22663c6674440b89624110debf99e
treed71818195e82f515f25dfe68847e2fb5af4303b3
parent454df53453d7f8070fa6ec916d14b7962e8da418
KVM: x86: Fix device passthrough when SME is active

BugLink: http://bugs.launchpad.net/bugs/1757465
commit daaf216c06fba4ee4dc3f62715667da929d68774 upstream.

When using device passthrough with SME active, the MMIO range that is
mapped for the device should not be mapped encrypted.  Add a check in
set_spte() to insure that a page is not mapped encrypted if that page
is a device MMIO page as indicated by kvm_is_mmio_pfn().

Cc: <stable@vger.kernel.org> # 4.14.x-
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
arch/x86/kvm/mmu.c