qemu-e2k/hw/ppc
David Gibson db50f280cf spapr: Correct RAM size calculation for HPT resizing
In order to prevent the guest from forcing the allocation of large amounts
of qemu memory (or host kernel memory, in the case of KVM HV), we limit
the size of Hashed Page Table (HPT) it is allowed to allocated, based on
its RAM size.

However, the current calculation is not correct: it only adds up the size
of plugged memory, ignoring the base memory size.  This patch corrects it.

While we're there, use get_plugged_memory_size() instead of directly
calling pc_existing_dimms_capacity().  The only difference is that it
will abort on failure, which is right: a failure here indicates something
wrong within qemu.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
2017-10-17 10:34:01 +11:00
..
e500-ccsr.h
e500.c ppc: mpc8544ds/e500plat: use generic cpu_model parsing 2017-10-17 10:34:00 +11:00
e500.h
e500plat.c ppc: mpc8544ds/e500plat: use generic cpu_model parsing 2017-10-17 10:34:00 +11:00
fdt.c
mac_newworld.c ppc: mac_newworld: use generic cpu_model parsing 2017-10-17 10:34:00 +11:00
mac_oldworld.c ppc: mac_oldworld: use generic cpu_model parsing 2017-10-17 10:34:00 +11:00
mac.h macio: use object link between MACIO_IDE and MAC_DBDMA object 2017-09-27 13:05:41 +10:00
Makefile.objs ppc4xx_i2c: Move to hw/i2c 2017-09-08 09:30:55 +10:00
mpc8544_guts.c
mpc8544ds.c ppc: mpc8544ds/e500plat: use generic cpu_model parsing 2017-10-17 10:34:00 +11:00
pnv_bmc.c
pnv_core.c ppc: pnv: drop PnvChipClass::cpu_model field 2017-10-17 10:34:01 +11:00
pnv_lpc.c
pnv_occ.c
pnv_psi.c
pnv_xscom.c
pnv.c ppc: pnv: consolidate type definitions and batch register them 2017-10-17 10:34:01 +11:00
ppc4xx_devs.c ppc: replace cpu_model with cpu_type on ref405ep,taihu boards 2017-10-17 10:34:00 +11:00
ppc4xx_pci.c pci: Add INTERFACE_CONVENTIONAL_PCI_DEVICE to Conventional PCI devices 2017-10-15 05:54:43 +03:00
ppc405_boards.c
ppc405_uc.c ppc: replace cpu_model with cpu_type on ref405ep,taihu boards 2017-10-17 10:34:00 +11:00
ppc405.h ppc4xx: Export ECB and PLB emulation 2017-09-08 09:30:55 +10:00
ppc440_bamboo.c ppc: bamboo: use generic cpu_model parsing 2017-10-17 10:34:00 +11:00
ppc_booke.c
ppc.c ppc: spapr: replace ppc_cpu_parse_features() with cpu_parse_cpu_model() 2017-10-17 10:34:00 +11:00
ppce500_spin.c
prep_systemio.c
prep.c ppc: 40p/prep: replace cpu_model with cpu_type 2017-10-17 10:34:00 +11:00
rs6000_mc.c
spapr_cpu_core.c ppc: spapr: use generic cpu_model parsing 2017-10-17 10:34:01 +11:00
spapr_drc.c spapr_drc: pass object ownership to parent/owner 2017-09-08 09:30:54 +10:00
spapr_events.c spapr_events: use QTAILQ_FOREACH_SAFE() in spapr_clear_pending_events() 2017-09-15 10:29:48 +10:00
spapr_hcall.c spapr: Correct RAM size calculation for HPT resizing 2017-10-17 10:34:01 +11:00
spapr_iommu.c migration: pre_save return int 2017-09-27 11:35:59 +01:00
spapr_ovec.c
spapr_pci_vfio.c
spapr_pci.c Migration pull 2017-09-27 2017-09-27 22:44:51 +01:00
spapr_rng.c
spapr_rtas_ddw.c
spapr_rtas.c ppc: spapr: Make VCPU ID handling private to SPAPR 2017-09-08 09:30:55 +10:00
spapr_rtc.c hw/ppc/spapr_rtc: Mark the RTC device with user_creatable = false 2017-08-22 21:26:46 +10:00
spapr_vio.c
spapr.c ppc: spapr: use generic cpu_model parsing 2017-10-17 10:34:01 +11:00
trace-events
virtex_ml507.c ppc: virtex-ml507: replace cpu_model with cpu_type 2017-10-17 10:34:00 +11:00