• David Gibson's avatar
    powerpc/pseries: Add support for hash table resizing · dbcf929c
    David Gibson authored
    This adds support for using two hypercalls to change the size of the
    main hash page table while running as a PAPR guest. For now these
    hypercalls are only in experimental qemu versions.
    
    The interface is two part: first H_RESIZE_HPT_PREPARE is used to
    allocate and prepare the new hash table. This may be slow, but can be
    done asynchronously. Then, H_RESIZE_HPT_COMMIT is used to switch to the
    new hash table. This requires that no CPUs be concurrently updating the
    HPT, and so must be run under stop_machine().
    
    This also adds a debugfs file which can be used to manually control
    HPT resizing or testing purposes.
    Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
    Reviewed-by: default avatarPaul Mackerras <paulus@samba.org>
    [mpe: Rename the debugfs file to "hpt_order"]
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    dbcf929c
mmu-hash.h 22.6 KB