KVM: x86: drop superfluous mmu_check_root() from fast_pgd_switch()
authorVitaly Kuznetsov <vkuznets@redhat.com>
Fri, 10 Jul 2020 14:11:57 +0000 (16:11 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 10 Jul 2020 17:03:12 +0000 (13:03 -0400)
commitfe9304d31831c9ee3943f9a6f72b7cea16d4bc11
tree4a60436a122b9a5b50e7f7510a148518fdb4b563
parentd82aaef9c88aa27bce63751d6d6329920b1fe8da
KVM: x86: drop superfluous mmu_check_root() from fast_pgd_switch()

The mmu_check_root() check in fast_pgd_switch() seems to be
superfluous: when GPA is outside of the visible range
cached_root_available() will fail for non-direct roots
(as we can't have a matching one on the list) and we don't
seem to care for direct ones.

Also, raising #TF immediately when a non-existent GFN is written to CR3
doesn't seem to mach architectural behavior. Drop the check.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20200710141157.1640173-10-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c