• Xiao Guangrong's avatar
    KVM: MMU: fix MTRR update · efdfe536
    Xiao Guangrong authored
    Currently, whenever guest MTRR registers are changed
    kvm_mmu_reset_context is called to switch to the new root shadow page
    table, however, it's useless since:
    1) the cache type is not cached into shadow page's attribute so that
       the original root shadow page will be reused
    
    2) the cache type is set on the last spte, that means we should sync
       the last sptes when MTRR is changed
    
    This patch fixs this issue by drop all the spte in the gfn range which
    is being updated by MTRR
    Signed-off-by: default avatarXiao Guangrong <guangrong.xiao@linux.intel.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    efdfe536
x86.c 204 KB