Skip to content

RFC spapr: Abort when HTAB size requirement can't be met

Bharata B Rao qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v0 RFC Latest2 patches 6 repliesIn review

Patches in v0 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2spapr: Allocate HTAB from machine inithw/ppc/spapr.c+12 -13 replies
2/2spapr: Abort when HTAB of requested size isn't allocatedhw/ppc/spapr.c+4 -03 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchDavid Gibson
1/2
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v0 thread

Cover letter [Qemu-devel] [RFC PATCH v0 0/2] spapr: Abort when HTAB size requirement can't be met

HTAB size is a factor of maximum memory size that is specified by maxmem= command line option. In cases where there is shortage of host memory, host will not be able to allocate contiguous memory for guest HTAB and will instead allocate a smaller HTAB. This usually is not a problem but when user starts hotplugging memory to the guest, we can run out of HTAB entries and hence memory hotplug fails. This failure should have been handled gracefully by the guest kernel, but currently it leads to guest kernel OOPS. This will eventually get fixed when the handling of memory hotplug is completely moved to kernel for PowerKVM.

Prevent such kernel failure by refusing to boot the guest when requested HTAB size can't be allocated. However HTAB allocation happens in the reset path from where it is too late to abort. Hence this patchset moves the HTAB allocation to machine init and aborts if HTAB size requirement isn't met.

Two previous related attempts to address this problem:

1. http://lists.nongnu.org/archive/html/qemu-devel/2015-07/msg03325.html
Aborts the guest from the reset path - not desirable.
2. https://lists.gnu.org/archive/html/qemu-devel/2015-08/msg02602.html
Silently disables memory hotplug - not desirable.

This patchset applies against David Gibson's spapr-next.

Bharata B Rao (2):
spapr: Allocate HTAB from machine init
spapr: Abort when HTAB of requested size isn't allocated

 hw/ppc/spapr.c | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
Signature · 1 line
2.1.0