linux/drivers/xen
Juergen Gross 1d988ed465 x86/xen: dont add memory above max allowed allocation
Don't allow memory to be added above the allowed maximum allocation
limit set by Xen.

Trying to do so would result in cases like the following:

[  584.559652] ------------[ cut here ]------------
[  584.564897] WARNING: CPU: 2 PID: 1 at ../arch/x86/xen/multicalls.c:129 xen_alloc_pte+0x1c7/0x390()
[  584.575151] Modules linked in:
[  584.578643] Supported: Yes
[  584.581750] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.4.120-92.70-default #1
[  584.590000] Hardware name: Cisco Systems Inc UCSC-C460-M4/UCSC-C460-M4, BIOS C460M4.4.0.1b.0.0629181419 06/29/2018
[  584.601862]  0000000000000000 ffffffff813175a0 0000000000000000 ffffffff8184777c
[  584.610200]  ffffffff8107f4e1 ffff880487eb7000 ffff8801862b79c0 ffff88048608d290
[  584.618537]  0000000000487eb7 ffffea0000000201 ffffffff81009de7 ffffffff81068561
[  584.626876] Call Trace:
[  584.629699]  [<ffffffff81019ad9>] dump_trace+0x59/0x340
[  584.635645]  [<ffffffff81019eaa>] show_stack_log_lvl+0xea/0x170
[  584.642391]  [<ffffffff8101ac51>] show_stack+0x21/0x40
[  584.648238]  [<ffffffff813175a0>] dump_stack+0x5c/0x7c
[  584.654085]  [<ffffffff8107f4e1>] warn_slowpath_common+0x81/0xb0
[  584.660932]  [<ffffffff81009de7>] xen_alloc_pte+0x1c7/0x390
[  584.667289]  [<ffffffff810647f0>] pmd_populate_kernel.constprop.6+0x40/0x80
[  584.675241]  [<ffffffff815ecfe8>] phys_pmd_init+0x210/0x255
[  584.681587]  [<ffffffff815ed207>] phys_pud_init+0x1da/0x247
[  584.687931]  [<ffffffff815edb3b>] kernel_physical_mapping_init+0xf5/0x1d4
[  584.695682]  [<ffffffff815e9bdd>] init_memory_mapping+0x18d/0x380
[  584.702631]  [<ffffffff81064699>] arch_add_memory+0x59/0xf0

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
2019-02-18 06:52:51 +01:00
..
events xen: Fix x86 sched_clock() interface for xen 2019-01-16 13:06:05 -05:00
xen-pciback xen/pciback: Don't disable PCI_COMMAND on PCI device reset. 2019-02-18 06:49:46 +01:00
xenbus xen: drop writing error messages to xenstore 2018-10-26 09:17:16 +02:00
xenfs License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
acpi.c
arm-device.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
balloon.c mm/memory_hotplug: drop "online" parameter from add_memory_resource() 2018-12-28 12:11:48 -08:00
biomerge.c block: remove ARCH_BIOVEC_PHYS_MERGEABLE 2018-09-26 08:45:11 -06:00
cpu_hotplug.c xen: avoid crash in disable_hotplug_cpu 2018-09-14 08:51:10 -04:00
dbgp.c
efi.c
evtchn.c treewide: kvmalloc() -> kvmalloc_array() 2018-06-12 16:19:22 -07:00
fallback.c
features.c
gntalloc.c mm: treewide: remove GFP_TEMPORARY allocation flag 2017-09-13 18:53:16 -07:00
gntdev-common.h xen/gntdev: Add initial support for dma-buf UAPI 2018-07-26 23:05:14 -04:00
gntdev-dmabuf.c xen/gntdev: Check and release imported dma-bufs on close 2019-02-18 06:50:10 +01:00
gntdev-dmabuf.h xen/gntdev: Do not destroy context while dma-bufs are in use 2019-02-18 06:50:03 +01:00
gntdev.c xen/gntdev: Do not destroy context while dma-bufs are in use 2019-02-18 06:50:03 +01:00
grant-table.c xen: fixes for 4.20-rc2 2018-11-10 08:58:48 -06:00
Kconfig xen: Introduce shared buffer helpers for page directory... 2018-12-18 12:15:55 -05:00
Makefile xen: Introduce shared buffer helpers for page directory... 2018-12-18 12:15:55 -05:00
manage.c xen/manage: don't complain about an empty value in control/sysrq node 2018-09-14 08:51:10 -04:00
mcelog.c xen/mcelog: eliminate redundant setting of interface version 2018-08-20 14:46:18 -04:00
mem-reservation.c xen/balloon: add runtime control for scrubbing ballooned out pages 2018-09-14 08:51:10 -04:00
pci.c
pcpu.c
platform-pci.c xen-platform: constify pci_device_id. 2017-08-31 09:45:55 -04:00
preempt.c
privcmd-buf.c xen: remove size limit of privcmd-buf mapping interface 2018-11-09 16:38:34 +01:00
privcmd.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
privcmd.h xen: add new hypercall buffer mapping device 2018-06-22 08:26:42 +02:00
pvcalls-back.c xen/pvcalls: remove set but not used variable 'intf' 2019-01-04 10:55:27 -05:00
pvcalls-front.c pvcalls-front: fix potential null dereference 2019-01-15 16:13:47 -05:00
pvcalls-front.h xen: fix poll misannotation 2018-02-01 10:07:32 -05:00
swiotlb-xen.c arm64/xen: fix xen-swiotlb cache flushing 2019-01-23 22:14:56 +01:00
sys-hypervisor.c
time.c x86/paravirt: Use a single ops structure 2018-09-03 16:50:35 +02:00
tmem.c mm, swap, frontswap: fix THP swap if frontswap enabled 2018-02-21 15:35:43 -08:00
xen-acpi-cpuhotplug.c
xen-acpi-memhotplug.c
xen-acpi-pad.c xen: don't include <xen/xen.h> from <asm/io.h> and <asm/dma-mapping.h> 2018-09-26 08:45:18 -06:00
xen-acpi-processor.c xen/ACPI: don't upload Px/Cx data for disabled processors 2018-08-20 14:46:18 -04:00
xen-balloon.c x86/xen: dont add memory above max allowed allocation 2019-02-18 06:52:51 +01:00
xen-front-pgdir-shbuf.c xen: Introduce shared buffer helpers for page directory... 2018-12-18 12:15:55 -05:00
xen-scsiback.c xen-scsiback: mark expected switch fall-through 2019-02-18 06:48:42 +01:00
xen-selfballoon.c mm: convert totalram_pages and totalhigh_pages variables to atomic 2018-12-28 12:11:47 -08:00
xen-stub.c
xlate_mmu.c xen: xlate_mmu: add missing header to fix 'W=1' warning 2018-11-29 17:53:27 +01:00