kvm: x86: Add multi-entry LRU cache for previous CR3s
authorJunaid Shahid <junaids@google.com>
Wed, 27 Jun 2018 21:59:20 +0000 (14:59 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 6 Aug 2018 15:59:02 +0000 (17:59 +0200)
commitb94742c958f0b97d304d4aecb4603a20ee9a2df3
tree98dd56c5f03449587af3c9f34d75e560a78662e1
parentfaff87588d8bfd9e56e9203412f0bb80455da7b9
kvm: x86: Add multi-entry LRU cache for previous CR3s

Adds support for storing multiple previous CR3/root_hpa pairs maintained
as an LRU cache, so that the lockless CR3 switch path can be used when
switching back to any of them.

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