• B
    kvm: x86/mmu: Add functions to handle changed TDP SPTEs · 2f2fad08
    Ben Gardon 提交于
    The existing bookkeeping done by KVM when a PTE is changed is spread
    around several functions. This makes it difficult to remember all the
    stats, bitmaps, and other subsystems that need to be updated whenever a
    PTE is modified. When a non-leaf PTE is marked non-present or becomes a
    leaf PTE, page table memory must also be freed. To simplify the MMU and
    facilitate the use of atomic operations on SPTEs in future patches, create
    functions to handle some of the bookkeeping required as a result of
    a change.
    
    Tested by running kvm-unit-tests and KVM selftests on an Intel Haswell
    machine. This series introduced no new failures.
    
    This series can be viewed in Gerrit at:
    	https://linux-review.googlesource.com/c/virt/kvm/kvm/+/2538Signed-off-by: NBen Gardon <bgardon@google.com>
    Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
    2f2fad08
mmu.c 156.0 KB