linux-stable/drivers/xen
Juergen Gross 90817d7838 xen/balloon: add late_initcall_sync() for initial ballooning done
commit 40fdea0284 upstream.

When running as PVH or HVM guest with actual memory < max memory the
hypervisor is using "populate on demand" in order to allow the guest
to balloon down from its maximum memory size. For this to work
correctly the guest must not touch more memory pages than its target
memory size as otherwise the PoD cache will be exhausted and the guest
is crashed as a result of that.

In extreme cases ballooning down might not be finished today before
the init process is started, which can consume lots of memory.

In order to avoid random boot crashes in such cases, add a late init
call to wait for ballooning down having finished for PVH/HVM guests.

Warn on console if initial ballooning fails, panic() after stalling
for more than 3 minutes per default. Add a module parameter for
changing this timeout.

[boris: replaced pr_info() with pr_notice()]

Cc: <stable@vger.kernel.org>
Reported-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Link: https://lore.kernel.org/r/20211102091944.17487-1-jgross@suse.com
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-18 19:16:04 +01:00
..
events xen/events: Fix race in set_evtchn_to_irq 2021-08-12 10:49:54 -05:00
xen-pciback xen-pciback: reconfigure also from backend watch handler 2021-05-21 09:55:16 +02:00
xenbus xen: branch for v5.15-rc1 2021-09-02 13:20:11 -07:00
xenfs
acpi.c
arm-device.c
balloon.c xen/balloon: add late_initcall_sync() for initial ballooning done 2021-11-18 19:16:04 +01:00
biomerge.c
cpu_hotplug.c
dbgp.c
efi.c
evtchn.c
features.c xen: check required Xen features 2021-08-30 11:57:45 +02:00
gntalloc.c
gntdev-common.h
gntdev-dmabuf.c
gntdev-dmabuf.h
gntdev.c Xen/gntdev: don't ignore kernel unmapping error 2021-09-20 16:57:08 +02:00
grant-table.c
Kconfig xen/x86: allow PVH Dom0 without XEN_PV=y 2021-10-05 08:35:56 +02:00
Makefile xen: Remove support for PV ACPI cpu/memory hotplug 2021-04-23 09:31:50 +02:00
manage.c
mcelog.c
mem-reservation.c
pci.c
pcpu.c xen: Use DEVICE_ATTR_*() macro 2021-07-05 09:23:31 +02:00
platform-pci.c
privcmd-buf.c
privcmd.c xen/privcmd: drop "pages" parameter from xen_remap_pfn() 2021-10-05 08:20:27 +02:00
privcmd.h
pvcalls-back.c
pvcalls-front.c
pvcalls-front.h
swiotlb-xen.c xen: branch for v5.15-rc3 2021-09-25 15:37:31 -07:00
sys-hypervisor.c
time.c
unpopulated-alloc.c xen/unpopulated-alloc: fix error return code in fill_list() 2021-05-10 09:42:25 +02:00
xen-acpi-pad.c
xen-acpi-processor.c
xen-balloon.c xen: Use DEVICE_ATTR_*() macro 2021-07-05 09:23:31 +02:00
xen-front-pgdir-shbuf.c
xen-scsiback.c isystem: trim/fixup stdarg.h and other headers 2021-08-19 09:02:55 +09:00
xlate_mmu.c