diff options
author | David Gibson | 2018-04-18 06:21:45 +0200 |
---|---|---|
committer | David Gibson | 2018-06-22 06:19:07 +0200 |
commit | 123eec655287e43e0e86154e8093a394aefa3958 (patch) | |
tree | 357c075e950822ba5744bf746d52337ac7079172 /include/hw/ppc/spapr.h | |
parent | spapr: Maximum (HPT) pagesize property (diff) | |
download | qemu-123eec655287e43e0e86154e8093a394aefa3958.tar.gz qemu-123eec655287e43e0e86154e8093a394aefa3958.tar.xz qemu-123eec655287e43e0e86154e8093a394aefa3958.zip |
spapr: Use maximum page size capability to simplify memory backend checking
The way we used to handle KVM allowable guest pagesizes for PAPR guests
required some convoluted checking of memory attached to the guest.
The allowable pagesizes advertised to the guest cpus depended on the memory
which was attached at boot, but then we needed to ensure that any memory
later hotplugged didn't change which pagesizes were allowed.
Now that we have an explicit machine option to control the allowable
maximum pagesize we can simplify this. We just check all memory backends
against that declared pagesize. We check base and cold-plugged memory at
reset time, and hotplugged memory at pre_plug() time.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Greg Kurz <groug@kaod.org>
Diffstat (limited to 'include/hw/ppc/spapr.h')
-rw-r--r-- | include/hw/ppc/spapr.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h index 4bc9dbff96..7e028164ba 100644 --- a/include/hw/ppc/spapr.h +++ b/include/hw/ppc/spapr.h @@ -806,4 +806,7 @@ void spapr_caps_cpu_apply(sPAPRMachineState *spapr, PowerPCCPU *cpu); void spapr_caps_add_properties(sPAPRMachineClass *smc, Error **errp); int spapr_caps_post_migration(sPAPRMachineState *spapr); +void spapr_check_pagesize(sPAPRMachineState *spapr, hwaddr pagesize, + Error **errp); + #endif /* HW_SPAPR_H */ |