• David Vrabel's avatar
    xen: remove scratch frames for ballooned pages and m2p override · 0bb599fd
    David Vrabel authored
    The scratch frame mappings for ballooned pages and the m2p override
    are broken.  Remove them in preparation for replacing them with
    simpler mechanisms that works.
    
    The scratch pages did not ensure that the page was not in use.  In
    particular, the foreign page could still be in use by hardware.  If
    the guest reused the frame the hardware could read or write that
    frame.
    
    The m2p override did not handle the same frame being granted by two
    different grant references.  Trying an M2P override lookup in this
    case is impossible.
    
    With the m2p override removed, the grant map/unmap for the kernel
    mappings (for x86 PV) can be easily batched in
    set_foreign_p2m_mapping() and clear_foreign_p2m_mapping().
    Signed-off-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
    Reviewed-by: default avatarStefano Stabellini <stefano.stabellini@eu.citrix.com>
    0bb599fd
p2m.c 20.2 KB