]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: take as_id into account when checking PGD
authorVitaly Kuznetsov <vkuznets@redhat.com>
Wed, 8 Jul 2020 14:00:23 +0000 (16:00 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 9 Jul 2020 11:08:37 +0000 (07:08 -0400)
commit4df9b34a26460092d5bb76cdf3400612d2e18e79
treed4eae76f4d0582ab885c3d4c24685a0a59f60938
parented85dca4b68f7ece8f9dadfe8b23bf077f5b9508
KVM: x86: take as_id into account when checking PGD

OVMF booted guest running on shadow pages crashes on TRIPLE FAULT after
enabling paging from SMM. The crash is triggered from mmu_check_root() and
is caused by kvm_is_visible_gfn() searching through memslots with as_id = 0
while vCPU may be in a different context (address space).

Introduce kvm_vcpu_is_visible_gfn() and use it from mmu_check_root().

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20200708140023.1476020-1-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c
include/linux/kvm_host.h
virt/kvm/kvm_main.c