• Sean Christopherson's avatar
    KVM: x86/mmu: Move "huge page disallowed" calculation into mapping helpers · 6c2fd34f
    Sean Christopherson authored
    Calculate huge_page_disallowed in __direct_map() and FNAME(fetch) in
    preparation for reworking the calculation so that it preserves the
    requested map level and eventually to avoid flagging a shadow page as
    being disallowed for being used as a large/huge page when it couldn't
    have been huge in the first place, e.g. because the backing page in the
    host is not large.
    
    Pass the error code into the helpers and use it to recalcuate exec and
    write_fault instead adding yet more booleans to the parameters.
    
    Opportunistically use huge_page_disallowed instead of lpage_disallowed
    to match the nomenclature used within the mapping helpers (though even
    they have existing inconsistencies).
    
    No functional change intended.
    Signed-off-by: default avatarSean Christopherson <sean.j.christopherson@intel.com>
    Message-Id: <20200923183735.584-4-sean.j.christopherson@intel.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    6c2fd34f
mmu.c 171 KB