• Yu Zhang's avatar
    KVM: MMU: record maximum physical address width in kvm_mmu_extended_role · de3ccd26
    Yu Zhang authored
    Previously, commit 7dcd5755 ("x86/kvm/mmu: check if tdp/shadow
    MMU reconfiguration is needed") offered some optimization to avoid
    the unnecessary reconfiguration. Yet one scenario is broken - when
    cpuid changes VM's maximum physical address width, reconfiguration
    is needed to reset the reserved bits.  Also, the TDP may need to
    reset its shadow_root_level when this value is changed.
    
    To fix this, a new field, maxphyaddr, is introduced in the extended
    role structure to keep track of the configured guest physical address
    width.
    Signed-off-by: default avatarYu Zhang <yu.c.zhang@linux.intel.com>
    Cc: stable@vger.kernel.org
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    de3ccd26
mmu.c 158 KB