• Sean Christopherson's avatar
    KVM: x86/mmu: Remove the defunct update_pte() paging hook · c5e2184d
    Sean Christopherson authored
    Remove the update_pte() shadow paging logic, which was obsoleted by
    commit 4731d4c7 ("KVM: MMU: out of sync shadow core"), but never
    removed.  As pointed out by Yu, KVM never write protects leaf page
    tables for the purposes of shadow paging, and instead marks their
    associated shadow page as unsync so that the guest can write PTEs at
    will.
    
    The update_pte() path, which predates the unsync logic, optimizes COW
    scenarios by refreshing leaf SPTEs when they are written, as opposed to
    zapping the SPTE, restarting the guest, and installing the new SPTE on
    the subsequent fault.  Since KVM no longer write-protects leaf page
    tables, update_pte() is unreachable and can be dropped.
    Reported-by: default avatarYu Zhang <yu.c.zhang@intel.com>
    Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
    Message-Id: <20210115004051.4099250-1-seanjc@google.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    c5e2184d
kvm_host.h 52.4 KB