• Ben Gardon's avatar
    KVM: x86/mmu: Skip rmap operations if rmaps not allocated · e2209710
    Ben Gardon authored
    If only the TDP MMU is being used to manage the memory mappings for a VM,
    then many rmap operations can be skipped as they are guaranteed to be
    no-ops. This saves some time which would be spent on the rmap operation.
    It also avoids acquiring the MMU lock in write mode for many operations.
    
    This makes it safe to run the VM without rmaps allocated, when only
    using the TDP MMU and sets the stage for waiting to allocate the rmaps
    until they're needed.
    Signed-off-by: default avatarBen Gardon <bgardon@google.com>
    Message-Id: <20210518173414.450044-7-bgardon@google.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    e2209710
mmu.c 160 KB