linux-stable/arch/s390/boot
David Hildenbrand 63938e1708 s390/physmem_info: Query diag500(STORAGE LIMIT) to support QEMU/KVM memory devices
To support memory devices under QEMU/KVM, such as virtio-mem,
we have to prepare our kernel virtual address space accordingly and
have to know the highest possible physical memory address we might see
later: the storage limit. The good old SCLP interface is not suitable for
this use case.

In particular, memory owned by memory devices has no relationship to
storage increments, it is always detected using the device driver, and
unaware OSes (no driver) must never try making use of that memory.
Consequently this memory is located outside of the "maximum storage
increment"-indicated memory range.

Let's use our new diag500 STORAGE_LIMIT subcode to query this storage
limit that can exceed the "maximum storage increment", and use the
existing interfaces (i.e., SCLP) to obtain information about the initial
memory that is not owned+managed by memory devices.

If a hypervisor does not support such memory devices, the address exposed
through diag500 STORAGE_LIMIT will correspond to the maximum storage
increment exposed through SCLP.

To teach kdump on s390 to include memory owned by memory devices, there
will be ways to query the relevant memory ranges from the device via a
driver running in special kdump mode (like virtio-mem already implements
to filter /proc/vmcore access so we don't end up reading from unplugged
device blocks).

Update setup_ident_map_size(), to clarify that there can be more than
just online and standby memory.

Tested-by: Mario Casquero <mcasquer@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Tested-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Link: https://lore.kernel.org/r/20241025141453.1210600-4-david@redhat.com
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
2024-11-07 10:26:24 +01:00
..
.gitignore s390: compile relocatable kernel without -fPIE 2024-02-20 14:37:33 +01:00
als.c s390/boot: Use boot_printk() instead of sclp_early_printk() 2024-09-07 17:12:43 +02:00
alternative.c s390/alternatives: Allow early alternative patching in decompressor 2024-07-23 16:02:31 +02:00
boot.h s390/boot: Rename decompressor_printk() to boot_printk() 2024-09-07 17:12:42 +02:00
clz_ctz.c s390/boot: get rid of startup archive 2022-05-06 20:45:14 +02:00
cmdline.c s390: move ipl block and cmd line handling to early boot phase 2018-10-09 11:21:14 +02:00
ctype.c s390: move ipl block and cmd line handling to early boot phase 2018-10-09 11:21:14 +02:00
decompressor.c s390/boot: Rework deployment of the kernel image 2024-04-17 13:38:02 +02:00
decompressor.h s390/boot: Rework deployment of the kernel image 2024-04-17 13:38:02 +02:00
ebcdic.c s390/decompressor: avoid reusing uncompressed image objects 2018-06-25 10:14:39 +02:00
head_kdump.S s390: consistently use .balign instead of .align 2023-06-28 13:57:09 +02:00
head.S s390/entry: Unify save_area_sync and save_area_async 2024-08-29 22:56:34 +02:00
install.sh kbuild: Abort make on install failures 2024-07-20 13:34:54 +09:00
ipl_data.c s390/boot: convert parmarea to C 2022-05-06 20:45:15 +02:00
ipl_parm.c s390/boot: Use boot_printk() instead of sclp_early_printk() 2024-09-07 17:12:43 +02:00
ipl_report.c s390/boot: Replace S390_lowcore by get_lowcore() 2024-06-18 17:01:33 +02:00
ipl_vmparm.c s390: move ipl block and cmd line handling to early boot phase 2018-10-09 11:21:14 +02:00
kaslr.c s390/boot: Use boot_printk() instead of sclp_early_printk() 2024-09-07 17:12:43 +02:00
kmsan.c s390/boot: add the KMSAN runtime stub 2024-07-03 19:30:24 -07:00
machine_kexec_reloc.c s390/kernel: build a relocatable kernel 2019-04-29 10:47:10 +02:00
Makefile s390/boot: Move boot_printk() code to own file 2024-09-07 17:12:43 +02:00
mem.S s390/decompressor: reuse lib/mem.S for mem functions 2018-06-25 10:14:39 +02:00
pgm_check_info.c s390/boot: Move boot_printk() code to own file 2024-09-07 17:12:43 +02:00
physmem_info.c s390/physmem_info: Query diag500(STORAGE LIMIT) to support QEMU/KVM memory devices 2024-11-07 10:26:24 +01:00
printk.c s390/boot: Move boot_printk() code to own file 2024-09-07 17:12:43 +02:00
sclp_early_core.c s390/boot: move sclp early buffer from fixed address in asm to C 2021-07-27 09:39:15 +02:00
startup.c s390/physmem_info: Query diag500(STORAGE LIMIT) to support QEMU/KVM memory devices 2024-11-07 10:26:24 +01:00
string.c s390/string: add KMSAN support 2024-07-03 19:30:25 -07:00
uv.c s390/uv: Retrieve UV secrets sysfs support 2024-10-29 11:17:17 +01:00
uv.h s390: Remove protvirt and kvm config guards for uv code 2024-07-23 16:02:33 +02:00
version.c kbuild: build init/built-in.a just once 2022-09-29 04:40:15 +09:00
vmem.c s390/boot: Fix KASLR base offset off by __START_KERNEL bytes 2024-08-22 19:24:13 +02:00
vmlinux.lds.S s390/boot: Fix KASLR base offset off by __START_KERNEL bytes 2024-08-22 19:24:13 +02:00