linux-yocto/drivers/xen
Roger Pau Monne 3d6e3849b6 xen/x86: fix initial memory balloon target
[ Upstream commit 74287971db ]

When adding extra memory regions as ballooned pages also adjust the balloon
target, otherwise when the balloon driver is started it will populate
memory to match the target value and consume all the extra memory regions
added.

This made the usage of the Xen `dom0_mem=,max:` command line parameter for
dom0 not work as expected, as the target won't be adjusted and when the
balloon is started it will populate memory straight to the 'max:' value.
It would equally affect domUs that have memory != maxmem.

Kernels built with CONFIG_XEN_UNPOPULATED_ALLOC are not affected, because
the extra memory regions are consumed by the unpopulated allocation driver,
and then balloon_add_regions() becomes a no-op.

Reported-by: John <jw@nuclearfallout.net>
Fixes: 87af633689 ('x86/xen: fix balloon target initialization for PVH dom0')
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Tested-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Message-ID: <20250514080427.28129-1-roger.pau@citrix.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-06-19 15:28:09 +02:00
..
events
xen-pciback
xenbus xenbus: Allow PVH dom0 a non-local xenstore 2025-06-04 14:42:17 +02:00
xenfs
acpi.c
arm-device.c
balloon.c xen/x86: fix initial memory balloon target 2025-06-19 15:28:09 +02:00
biomerge.c
cpu_hotplug.c
dbgp.c
efi.c
evtchn.c
features.c
gntalloc.c
gntdev-common.h
gntdev-dmabuf.c
gntdev-dmabuf.h
gntdev.c
grant-dma-iommu.c
grant-dma-ops.c
grant-table.c
Kconfig xen: Change xen-acpi-processor dom0 dependency 2025-05-02 07:50:58 +02:00
Makefile
manage.c
mcelog.c
mem-reservation.c
pci.c
pcpu.c
platform-pci.c xen: Add support for XenServer 6.1 platform device 2025-06-04 14:41:59 +02:00
privcmd-buf.c
privcmd.c
privcmd.h
pvcalls-back.c
pvcalls-front.c
pvcalls-front.h
swiotlb-xen.c xen: swiotlb: Use swiotlb bouncing if kmalloc allocation demands it 2025-05-18 08:24:08 +02:00
sys-hypervisor.c
time.c
unpopulated-alloc.c
xen-acpi-pad.c
xen-acpi-processor.c
xen-balloon.c
xen-front-pgdir-shbuf.c
xen-scsiback.c
xlate_mmu.c