qemu-patch-raspberry4/hw/ppc
David Gibson 768a20f3a4 spapr: Include "pre-plugged" DIMMS in ram size calculation at reset
At guest reset time, we allocate a hash page table (HPT) for the guest
based on the guest's RAM size.  If dynamic HPT resizing is not available we
use the maximum RAM size, if it is we use the current RAM size.

But the "current RAM size" calculation is incorrect - we just use the
"base" ram_size from the machine structure.  This doesn't include any
pluggable DIMMs that are already plugged at reset time.

This means that if you try to start a 'pseries' machine with a DIMM
specified on the command line that's much larger than the "base" RAM size,
then the guest will get a woefully inadequate HPT.  This can lead to a
guest freeze during boot as it runs out of HPT space during initial MMU
setup.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Greg Kurz <groug@kaod.org>
Tested-by: Greg Kurz <groug@kaod.org>
2017-12-04 11:31:22 +11:00
..
e500-ccsr.h ppc: do not use ../ in include files 2013-03-01 13:57:33 +01:00
e500.c e500: ppce500_init_mpic() return device instead of IRQ array 2017-11-08 13:21:37 +11:00
e500.h target-ppc: Eliminate redundant and incorrect function booke206_page_size_to_tlb 2016-07-01 09:57:01 +10:00
e500plat.c ppc: mpc8544ds/e500plat: use generic cpu_model parsing 2017-10-17 10:34:00 +11:00
fdt.c Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
mac.h macio: use object link between MACIO_IDE and MAC_DBDMA object 2017-09-27 13:05:41 +10:00
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
Makefile.objs ppc4xx_i2c: Move to hw/i2c 2017-09-08 09:30:55 +10:00
mpc8544_guts.c shutdown: Add source information to SHUTDOWN and RESET 2017-05-23 13:28:17 +02:00
mpc8544ds.c ppc: mpc8544ds/e500plat: use generic cpu_model parsing 2017-10-17 10:34:00 +11:00
pnv.c ppc: pnv: consolidate type definitions and batch register them 2017-10-17 10:34:01 +11:00
pnv_bmc.c ppc/pnv: generate an OEM SEL event on shutdown 2017-04-26 12:41:56 +10:00
pnv_core.c ppc: pnv: drop PnvChipClass::cpu_model field 2017-10-17 10:34:01 +11:00
pnv_lpc.c ppc/pnv: enable only one LPC bus 2017-04-26 12:41:55 +10:00
pnv_occ.c ppc/pnv: Add OCC model stub with interrupt support 2017-04-26 12:00:42 +10:00
pnv_psi.c xics: introduce macros for ICP/ICS link properties 2017-06-09 12:12:34 +10:00
pnv_xscom.c kvm: move cpu synchronization code 2017-01-19 22:07:46 +01:00
ppc.c ppc: spapr: replace ppc_cpu_parse_features() with cpu_parse_cpu_model() 2017-10-17 10:34:00 +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.h ppc4xx: Export ECB and PLB emulation 2017-09-08 09:30:55 +10:00
ppc405_boards.c hw: Use new memory_region_init_{ram, rom, rom_device}() functions 2017-07-14 17:59:42 +01:00
ppc405_uc.c ppc: replace cpu_model with cpu_type on ref405ep,taihu boards 2017-10-17 10:34:00 +11:00
ppc440_bamboo.c ppc: bamboo: use generic cpu_model parsing 2017-10-17 10:34:00 +11:00
ppc_booke.c ppc_booke: drop useless assignment 2017-05-07 09:57:51 +03:00
ppce500_spin.c hw/ppc: QOM'ify ppce500_spin.c 2017-01-31 10:10:13 +11:00
prep.c ppc: 40p/prep: replace cpu_model with cpu_type 2017-10-17 10:34:00 +11:00
prep_systemio.c prep: add PReP System I/O 2017-01-31 10:10:13 +11:00
rs6000_mc.c prep: add IBM RS/6000 7020 (40p) memory controller 2017-01-31 10:10:13 +11:00
spapr.c spapr: Include "pre-plugged" DIMMS in ram size calculation at reset 2017-12-04 11:31:22 +11:00
spapr_cpu_core.c spapr_cpu_core: rewrite machine type sanity check 2017-10-17 10:34:01 +11:00
spapr_drc.c spapr: reset DRCs after devices 2017-11-20 10:10:56 +11: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 target/ppc: correct htab shift for hash on radix 2017-11-14 10:28:32 +11:00
spapr_iommu.c migration: pre_save return int 2017-09-27 11:35:59 +01:00
spapr_ovec.c spapr: replace debug printf with trace points 2017-02-22 11:28:28 +11:00
spapr_pci.c spapr_pci: fail gracefully with non-pseries machine types 2017-10-17 10:34:01 +11:00
spapr_pci_vfio.c Use #include "..." for our own headers, <...> for others 2016-07-12 16:19:16 +02:00
spapr_rng.c spapr_rng: Convert to DEFINE_PROP_LINK 2017-07-14 12:04:43 +02:00
spapr_rtas.c ppc: spapr: Make VCPU ID handling private to SPAPR 2017-09-08 09:30:55 +10:00
spapr_rtas_ddw.c spapr_pci/spapr_pci_vfio: Support Dynamic DMA Windows (DDW) 2016-07-05 14:31:08 +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 vmstate: error hint for failed equal checks 2017-06-28 11:18:44 +02:00
trace-events trace-events: fix code style: print 0x before hex numbers 2017-08-01 12:13:07 +01:00
virtex_ml507.c ppc: virtex-ml507: replace cpu_model with cpu_type 2017-10-17 10:34:00 +11:00