summaryrefslogtreecommitdiff
path: root/arch/x86/math-emu
diff options
context:
space:
mode:
authorJunaid Shahid <junaids@google.com>2018-06-27 14:59:06 -0700
committerPaolo Bonzini <pbonzini@redhat.com>2018-08-06 17:58:51 +0200
commit7c390d350f8b677df3236afef4ced80dba6c3201 (patch)
tree8853310526d28d88ed66aace7e035f3a09791bc0 /arch/x86/math-emu
parent578e1c4db22135d91bad6c79585c4d19252b8d81 (diff)
kvm: x86: Add fast CR3 switch code path
When using shadow paging, a CR3 switch in the guest results in a VM Exit. In the common case, that VM exit doesn't require much processing by KVM. However, it does acquire the MMU lock, which can start showing signs of contention under some workloads even on a 2 VCPU VM when the guest is using KPTI. Therefore, we add a fast path that avoids acquiring the MMU lock in the most common cases e.g. when switching back and forth between the kernel and user mode CR3s used by KPTI with no guest page table changes in between. For now, this fast path is implemented only for 64-bit guests and hosts to avoid the handling of PDPTEs, but it can be extended later to 32-bit guests and/or hosts as well. Signed-off-by: Junaid Shahid <junaids@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/math-emu')
0 files changed, 0 insertions, 0 deletions