OSDN Git Service

KVM: VMX: Skip #PF(RSVD) intercepts when emulating smaller maxphyaddr
authorJim Mattson <jmattson@google.com>
Fri, 18 Jun 2021 23:59:41 +0000 (16:59 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 21 Jun 2021 16:58:55 +0000 (12:58 -0400)
commit5140bc7d6bc8abad58b4f2a2c011607bfd922992
tree3736e5a6f9faa465b6f8055591c9a4069a1bca30
parent0485cf8dbe964b6cc485178da6ee8ae7b2d0d15c
KVM: VMX: Skip #PF(RSVD) intercepts when emulating smaller maxphyaddr

As part of smaller maxphyaddr emulation, kvm needs to intercept
present page faults to see if it needs to add the RSVD flag (bit 3) to
the error code. However, there is no need to intercept page faults
that already have the RSVD flag set. When setting up the page fault
intercept, add the RSVD flag into the #PF error code mask field (but
not the #PF error code match field) to skip the intercept when the
RSVD flag is already set.

Signed-off-by: Jim Mattson <jmattson@google.com>
Message-Id: <20210618235941.1041604-1-jmattson@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/vmx.c