xemu/hw/ppc
Daniel Henrique Barboza 9478956794 hw/ppc/spapr_hcall: set htab_shift after kvmppc_resize_hpt_commit
Newer kernels have a htab resize capability when adding or remove
memory. At these situations, the guest kernel might reallocate its
htab to a more suitable size based on the resulting memory.

However, we're not setting the new value back into the machine state
when a KVM guest resizes its htab. At first this doesn't seem harmful,
but when migrating or saving the guest state (via virsh managedsave,
for instance) this mismatch between the htab size of QEMU and the
kernel makes the guest hangs when trying to load its state.

Inside h_resize_hpt_commit, the hypercall that commits the hash page
resize changes, let's set spapr->htab_shift to the new value if we're
sure that kvmppc_resize_hpt_commit were successful.

While we're here, add a "not RADIX" sanity check as it is already done
in the related hypercall h_resize_hpt_prepare.

Fixes: https://github.com/open-power-host-os/qemu/issues/28
Reported-by: Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>
Signed-off-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-02-16 12:14:26 +11:00
..
e500-ccsr.h ppc: do not use ../ in include files 2013-03-01 13:57:33 +01:00
e500.c Move include qemu/option.h from qemu-common.h to actual users 2018-02-09 13:52:16 +01: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: e500: Allow only supported dynamic sysbus devices 2018-01-19 11:18:51 -02:00
fdt.c Include qapi/error.h exactly where needed 2018-02-09 13:50:17 +01:00
mac_newworld.c hw/ppc: Replace fprintf(stderr, "*\n" with error_report() 2018-02-06 18:29:26 +01:00
mac_oldworld.c hw/ppc: Replace fprintf(stderr, "*\n" with error_report() 2018-02-06 18:29:26 +01:00
mac.h ppc: move CUDAState and other CUDA-related definitions into separate cuda.h file 2018-02-16 12:14:26 +11:00
Makefile.objs hw/ppc/Makefile: Add a way to disable the PPC4xx boards 2018-01-20 17:09:39 +11: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_bmc.c Include qapi/error.h exactly where needed 2018-02-09 13:50:17 +01:00
pnv_core.c ppc/pnv: fix XSCOM core addressing on POWER9 2018-01-17 09:35:24 +11:00
pnv_lpc.c target/ppc: more use of the PPC_*() macros 2018-01-10 12:53:00 +11:00
pnv_occ.c ppc/pnv: Add OCC model stub with interrupt support 2017-04-26 12:00:42 +10:00
pnv_psi.c ppc/pnv: change powernv_ prefix to pnv_ for overall naming consistency 2018-01-10 12:53:00 +11:00
pnv_xscom.c Include qapi/error.h exactly where needed 2018-02-09 13:50:17 +01:00
pnv.c ppc/pnv: change initrd address 2018-01-17 09:35:24 +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: Rename root bus initialization functions for clarity 2017-12-05 19:13:45 +02:00
ppc405_boards.c hw/ppc: Replace fprintf(stderr, "*\n" with error_report() 2018-02-06 18:29:26 +01:00
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 hw/ppc: Replace fprintf(stderr, "*\n" with error_report() 2018-02-06 18:29:26 +01:00
ppc_booke.c ppc_booke: drop useless assignment 2017-05-07 09:57:51 +03:00
ppc.c Include qapi/error.h exactly where needed 2018-02-09 13:50:17 +01:00
ppce500_spin.c hw/ppc: QOM'ify ppce500_spin.c 2017-01-31 10:10:13 +11:00
prep_systemio.c prep: add PReP System I/O 2017-01-31 10:10:13 +11:00
prep.c hw/ppc: Replace fprintf(stderr, "*\n" with error_report() 2018-02-06 18:29:26 +01:00
rs6000_mc.c prep: add IBM RS/6000 7020 (40p) memory controller 2017-01-31 10:10:13 +11:00
spapr_caps.c target/ppc/spapr_caps: Add new tristate cap safe_indirect_branch 2018-01-29 14:24:55 +11:00
spapr_cpu_core.c spapr: fix device tree properties when using compatibility mode 2018-01-20 17:15:05 +11:00
spapr_drc.c qdict qlist: Make most helper macros functions 2018-02-09 13:52:15 +01:00
spapr_events.c spapr_events: drop bogus cell from "interrupt-ranges" property 2017-12-15 09:49:24 +11:00
spapr_hcall.c hw/ppc/spapr_hcall: set htab_shift after kvmppc_resize_hpt_commit 2018-02-16 12:14:26 +11:00
spapr_iommu.c spapr/iommu: Enable in-kernel TCE acceleration via VFIO KVM device 2018-02-06 11:08:24 -07:00
spapr_ovec.c spapr: replace debug printf with trace points 2017-02-22 11:28:28 +11:00
spapr_pci_vfio.c Include qapi/error.h exactly where needed 2018-02-09 13:50:17 +01:00
spapr_pci.c spapr_pci: fix MSI/MSIX selection 2018-01-29 14:24:41 +11:00
spapr_rng.c spapr_rng: Convert to DEFINE_PROP_LINK 2017-07-14 12:04:43 +02:00
spapr_rtas_ddw.c spapr_pci/spapr_pci_vfio: Support Dynamic DMA Windows (DDW) 2016-07-05 14:31:08 +10:00
spapr_rtas.c spapr: fix device tree properties when using compatibility mode 2018-01-20 17:15:05 +11:00
spapr_rtc.c Include qapi/error.h exactly where needed 2018-02-09 13:50:17 +01:00
spapr_vio.c spapr: fix LSI interrupt specifiers in the device tree 2017-12-15 09:49:24 +11:00
spapr.c spapr: set vsmt to MAX(8, smp_threads) 2018-02-10 20:22:02 +11:00
trace-events spapr: move the IRQ allocation routines under the machine 2017-12-15 09:49:24 +11:00
virtex_ml507.c Move include qemu/option.h from qemu-common.h to actual users 2018-02-09 13:52:16 +01:00