linux/arch/x86/kvm/mmu
Lai Jiangshan 65855ed8b0 KVM: X86: Synchronize the shadow pagetable before link it
If gpte is changed from non-present to present, the guest doesn't need
to flush tlb per SDM.  So the host must synchronze sp before
link it.  Otherwise the guest might use a wrong mapping.

For example: the guest first changes a level-1 pagetable, and then
links its parent to a new place where the original gpte is non-present.
Finally the guest can access the remapped area without flushing
the tlb.  The guest's behavior should be allowed per SDM, but the host
kvm mmu makes it wrong.

Fixes: 4731d4c7a0 ("KVM: MMU: out of sync shadow core")
Signed-off-by: Lai Jiangshan <laijs@linux.alibaba.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20210918005636.3675-3-jiangshanlai@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-09-23 11:01:00 -04:00
..
mmu_audit.c KVM: x86/mmu: Rename __gfn_to_rmap to gfn_to_rmap 2021-08-06 07:52:58 -04:00
mmu_internal.h KVM: x86/mmu: Move lpage_disallowed_link further "down" in kvm_mmu_page 2021-09-06 06:20:05 -04:00
mmu.c KVM: X86: Synchronize the shadow pagetable before link it 2021-09-23 11:01:00 -04:00
mmutrace.h KVM: x86/mmu: Fix use of enums in trace_fast_page_fault 2021-08-02 11:01:47 -04:00
page_track.c KVM: x86: Handle SRCU initialization failure during page track init 2021-09-22 10:33:09 -04:00
paging_tmpl.h KVM: X86: Synchronize the shadow pagetable before link it 2021-09-23 11:01:00 -04:00
paging.h KVM: x86/mmu: Do not apply HPA (memory encryption) mask to GPAs 2021-07-14 12:17:56 -04:00
spte.c KVM: x86/mmu: WARN on any reserved SPTE value when making a valid SPTE 2021-06-24 18:00:46 -04:00
spte.h KVM: x86/mmu: Do not apply HPA (memory encryption) mask to GPAs 2021-07-14 12:17:56 -04:00
tdp_iter.c KVM: x86/mmu: Store the address space ID in the TDP iterator 2021-03-16 14:16:34 -04:00
tdp_iter.h KVM: x86/mmu: Store the address space ID in the TDP iterator 2021-03-16 14:16:34 -04:00
tdp_mmu.c KVM: x86/mmu: Drop 'shared' param from tdp_mmu_link_page() 2021-08-20 16:06:35 -04:00
tdp_mmu.h Revert "KVM: x86/mmu: Allow zap gfn range to operate under the mmu read lock" 2021-08-20 16:06:15 -04:00