]> git.baikalelectronics.ru Git - kernel.git/commit
kvm: x86: Skip TLB flush on fast CR3 switch when indicated by guest
authorJunaid Shahid <junaids@google.com>
Wed, 27 Jun 2018 21:59:15 +0000 (14:59 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 6 Aug 2018 15:58:58 +0000 (17:58 +0200)
commited09853f8a05b154b3c86c614aa36d87295eb722
treeaae386f7ee3a83188f0d7e5b971763970019d490
parent1c8060ae676addba0110de4d04a688af33ba60be
kvm: x86: Skip TLB flush on fast CR3 switch when indicated by guest

When PCIDs are enabled, the MSb of the source operand for a MOV-to-CR3
instruction indicates that the TLB doesn't need to be flushed.

This change enables this optimization for MOV-to-CR3s in the guest
that have been intercepted by KVM for shadow paging and are handled
within the fast CR3 switch path.

Signed-off-by: Junaid Shahid <junaids@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/mmu.c
arch/x86/kvm/vmx.c
arch/x86/kvm/x86.c