• D
    pseries: Move hash page table allocation to reset time · c5f54f3e
    David Gibson 提交于
    At the moment the size of the hash page table (HPT) is fixed based on the
    maximum memory allowed to the guest.  As such, we allocate the table during
    machine construction, and just clear it at reset.
    
    However, we're planning to implement a PAPR extension allowing the hash
    page table to be resized at runtime.  This will mean that on reset we want
    to revert it to the default size.  It also means that when migrating, we
    need to make sure the destination allocates an HPT of size matching the
    host, since the guest could have changed it before the migration.
    
    This patch replaces the spapr_alloc_htab() and spapr_reset_htab() functions
    with a new spapr_reallocate_hpt() function.  This is called at reset and
    inbound migration only, not during machine init any more.
    Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
    Reviewed-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
    c5f54f3e
spapr.c 77.0 KB