Skip to content
  • Stefano Stabellini's avatar
    xen: mask_rw_pte: do not apply the early_ioremap checks on x86_32 · ee176455
    Stefano Stabellini authored
    
    
    The two "is_early_ioremap_ptep" checks in mask_rw_pte are only used on
    x86_64, in fact early_ioremap is not used at all to setup the initial
    pagetable on x86_32.
    Moreover on x86_32 the two checks are wrong because the range
    pgt_buf_start..pgt_buf_end initially should be mapped RW because
    the pages in the range are not pagetable pages yet and haven't been
    cleared yet. Afterwards considering the pgt_buf_start..pgt_buf_end is
    part of the initial mapping, xen_alloc_pte is capable of turning
    the ptes RO when they become pagetable pages.
    
    Fix the issue and improve the readability of the code providing two
    different implementation of mask_rw_pte for x86_32 and x86_64.
    
    Signed-off-by: default avatarStefano Stabellini <stefano.stabellini@eu.citrix.com>
    Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
    ee176455