KVM: x86: Sync SPTEs when injecting page/EPT fault into L1
authorJunaid Shahid <junaids@google.com>
Fri, 20 Mar 2020 21:28:03 +0000 (14:28 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 20 Apr 2020 21:26:05 +0000 (17:26 -0400)
commitee1fa209f5e5ca5c1e76c7aa1c2aab292f371f4a
treebdb209e4a4ace15db13dff3d2be9cd5a682dba2e
parent0cd665bd20f9088d363158b4ac75592af18ecf4f
KVM: x86: Sync SPTEs when injecting page/EPT fault into L1

When injecting a page fault or EPT violation/misconfiguration, KVM is
not syncing any shadow PTEs associated with the faulting address,
including those in previous MMUs that are associated with L1's current
EPTP (in a nested EPT scenario), nor is it flushing any hardware TLB
entries.  All this is done by kvm_mmu_invalidate_gva.

Page faults that are either !PRESENT or RSVD are exempt from the flushing,
as the CPU is not allowed to cache such translations.

Signed-off-by: Junaid Shahid <junaids@google.com>
Co-developed-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Message-Id: <20200320212833.3507-8-sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/nested.c
arch/x86/kvm/vmx/vmx.c
arch/x86/kvm/x86.c