| /linux/Documentation/admin-guide/mm/ |
| H A D | kho.rst | 7 Kexec HandOver (KHO) is a mechanism that allows Linux to preserve memory 10 This document expects that you are familiar with the base KHO 11 :ref:`concepts <kho-concepts>`. If you have not read 17 KHO is available when the kernel is compiled with ``CONFIG_KEXEC_HANDOVER`` 18 set to y. Every KHO producer may have its own config option that you 22 To use KHO, please boot the kernel with the ``kho=on`` command line 28 Perform a KHO kexec 31 First, before you perform a KHO kexec, you need to move the system into 32 the :ref:`KHO finalization phase <kho-finalization-phase>` :: 34 $ echo 1 > /sys/kernel/debug/kho/out/finalize [all …]
|
| H A D | index.rst | 46 kho
|
| /linux/Documentation/core-api/kho/ |
| H A D | fdt.rst | 4 KHO FDT 7 KHO uses the flattened device tree (FDT) container format and libfdt 9 kernels. The properties in KHO FDT are stored in native format. 11 all preserved memory regions, as well as physical addresses of KHO users' 12 own FDTs. Interpreting those sub FDTs is the responsibility of KHO users. 14 KHO nodes and properties 20 KHO saves a special property named ``preserved-memory-map`` under the root node. 21 This node contains the physical address of an in-memory structure for KHO to 28 that created the KHO FDT and the kernel that attempts to load it. 29 If the kernel that loads the KHO FDT is not compatible with it, the entire [all …]
|
| H A D | concepts.rst | 8 Kexec HandOver (KHO) is a mechanism that allows Linux to preserve memory 13 KHO FDT 16 Every KHO kexec carries a KHO specific flattened device tree (FDT) blob 19 across kexec. After KHO, subsystems can retrieve and restore preserved 20 memory regions from KHO FDT. 22 KHO only uses the FDT container format and libfdt library, but does not 27 KHO is still under development. The FDT schema is unstable and would change 39 first boot KHO allocates several physically contiguous memory regions. Since 52 After KHO kexec, we ignore the ``kho_scratch`` kernel command line option and 54 us to recursively execute any amount of KHO kexecs. Because we used this region [all …]
|
| /linux/Documentation/core-api/kho/bindings/ |
| H A D | kho.yaml | 4 title: Kexec HandOver (KHO) root tree 11 System memory preserved by KHO across kexec. 16 - kho-v1 26 description: physical address of a KHO user's own FDT. 36 kho { 37 compatible = "kho-v1";
|
| H A D | sub-fdt.yaml | 4 title: KHO users' FDT address 11 Physical address of an FDT blob registered by a KHO user.
|
| /linux/tools/testing/selftests/kho/ |
| H A D | vmtest.sh | 11 tmp_dir=$(mktemp -d /tmp/kho-test.XXXXXXXX) 55 local kho_config="$tmp_dir/kho.config" 58 # enable initrd, KHO and KHO test in kernel configuration 107 cmdline="$cmdline kho=on panic=-1" 116 grep "KHO restore succeeded" "$serial" &> /dev/null || fail "KHO failed" 130 local build_dir="$kernel_dir/.kho" 182 ktap_test_pass "KHO succeeded"
|
| H A D | init.c | 14 #define KHO_FINALIZE "/debugfs/kho/out/finalize"
|
| /linux/kernel/ |
| H A D | kexec_handover.c | 9 #define pr_fmt(fmt) "KHO: " fmt 26 * KHO is tightly coupled with mm init and needs access to some of mm 32 #define KHO_FDT_COMPATIBLE "kho-v1" 39 * KHO uses page->private, which is an unsigned long, to store page metadata. 64 early_param("kho", kho_parse_enable); 67 * Keep track of memory that is to be preserved across KHO. 116 struct mutex lock; /* protects KHO FDT finalization */ 315 * but the KHO successor kernel only needs to process them once in order. 461 * With KHO enabled, memory can become fragmented because KHO regions may 463 * safe zones that we will never see KHO allocations from. This is where we [all …]
|
| H A D | kexec_file.c | 283 /* If KHO is active, add its images to the list */ in kimage_file_prepare_segments() 724 * If KHO is active, only use KHO scratch memory. All other memory in kexec_locate_mem_hole()
|
| /linux/drivers/of/ |
| H A D | kexec.c | 276 ret = fdt_delprop(fdt, chosen_node, "linux,kho-fdt"); in kho_add_chosen() 279 ret = fdt_delprop(fdt, chosen_node, "linux,kho-scratch"); in kho_add_chosen() 283 if (!image->kho.fdt || !image->kho.scratch) in kho_add_chosen() 286 fdt_mem = image->kho.fdt; in kho_add_chosen() 288 scratch_mem = image->kho.scratch->mem; in kho_add_chosen() 289 scratch_len = image->kho.scratch->bufsz; in kho_add_chosen() 291 pr_debug("Adding kho metadata to DT"); in kho_add_chosen() 293 ret = fdt_appendprop_addrrange(fdt, 0, chosen_node, "linux,kho-fdt", in kho_add_chosen() 297 ret = fdt_appendprop_addrrange(fdt, 0, chosen_node, "linux,kho-scratch", in kho_add_chosen() 454 /* Add kho metadata if this is a KHO image */ in of_kexec_alloc_and_setup_fdt()
|
| H A D | fdt.c | 892 p = of_get_flat_dt_prop(node, "linux,kho-fdt", &l); in early_init_dt_check_kho() 899 p = of_get_flat_dt_prop(node, "linux,kho-scratch", &l); in early_init_dt_check_kho()
|
| /linux/arch/x86/kernel/ |
| H A D | kexec-bzimage64.c | 271 struct kho_data *kho = (void *)sd + sizeof(*sd); in setup_kho() local 279 /* Only add if we have all KHO images in place */ in setup_kho() 280 if (!image->kho.fdt || !image->kho.scratch) in setup_kho() 284 kho->fdt_addr = image->kho.fdt; in setup_kho() 285 kho->fdt_size = PAGE_SIZE; in setup_kho() 286 kho->scratch_addr = image->kho.scratch->mem; in setup_kho() 287 kho->scratch_size = image->kho.scratch->bufsz; in setup_kho()
|
| H A D | setup.c | 454 struct kho_data *kho; in add_kho() local 459 pr_warn("Passed KHO data, but CONFIG_KEXEC_HANDOVER not set. Ignoring.\n"); in add_kho() 463 kho = early_memremap(addr, size); in add_kho() 464 if (!kho) { in add_kho() 465 pr_warn("setup: failed to memremap kho data (0x%llx, 0x%llx)\n", in add_kho() 470 kho_populate(kho->fdt_addr, kho->fdt_size, kho->scratch_addr, kho->scratch_size); in add_kho() 472 early_memunmap(kho, size); in add_kho()
|
| H A D | e820.c | 1307 * KHO kernels are special and use only scratch memory for memblock in e820__memblock_setup()
|
| /linux/lib/ |
| H A D | test_kho.c | 3 * Test module for KHO 25 #define KHO_TEST_MAGIC 0x4b484f21 /* KHO! */ 27 #define KHO_TEST_COMPAT "kho-test-v1" 295 pr_info("KHO restore succeeded\n"); in kho_test_restore() 335 MODULE_DESCRIPTION("KHO test module");
|
| H A D | Kconfig.debug | 3243 This option enables test for Kexec HandOver (KHO). 3250 For detailed documentation about KHO, see Documentation/core-api/kho. 3254 tools/testing/selftests/kho/vmtest.sh -h
|
| /linux/Documentation/core-api/kho/bindings/memblock/ |
| H A D | memblock.yaml | 11 reserve_mem command line option across kexec through KHO. 12 The post-KHO kernel can then consume these reservations and they are
|
| H A D | reserve-mem.yaml | 11 reserve_mem command line option across kexec through KHO.
|
| /linux/drivers/firmware/efi/ |
| H A D | efi-init.c | 168 * Discard memblocks discovered so far except for KHO scratch in reserve_regions() 171 * KHO is enabled, scratch regions, which are good known memory in reserve_regions() 179 /* Remove all non-KHO regions */ in reserve_regions() 188 * KHO is disabled. Discard memblocks discovered so far: in reserve_regions()
|
| /linux/arch/x86/boot/compressed/ |
| H A D | kaslr.c | 764 * If KHO is active, only process its scratch areas to ensure we are not 771 struct kho_data *kho; in process_kho_entries() local 780 kho = (struct kho_data *)(unsigned long)ptr->data; in process_kho_entries() 781 kho_scratch = (void *)(unsigned long)kho->scratch_addr; in process_kho_entries() 782 nr_areas = kho->scratch_size / sizeof(*kho_scratch); in process_kho_entries() 822 * During kexec handover only process KHO scratch areas that are known in find_random_phys_addr()
|
| /linux/include/linux/ |
| H A D | kexec_handover.h | 13 /* KHO Notifier index */
|
| H A D | kexec.h | 423 } kho; member
|
| /linux/mm/ |
| H A D | memblock.c | 181 /* skip non-scratch memory for kho early boot allocations */ in choose_memblock_flags() 2514 pr_err("failed to prepare memblock FDT for KHO: %d\n", err); in prepare_kho_fdt() 2555 pr_warn("failed to retrieve FDT '%s' from KHO: %d\n", in reserve_mem_kho_retrieve_fdt() 2604 pr_warn("KHO reserve-mem '%s' has wrong alignment (0x%lx, 0x%lx)\n", in reserve_mem_kho_revive() 2610 pr_warn("KHO reserve-mem '%s' has wrong size (0x%lx != 0x%lx)\n", in reserve_mem_kho_revive() 2616 pr_info("Revived memory reservation '%s' from KHO\n", name); in reserve_mem_kho_revive() 2683 /* Pick previous allocations up from KHO if available */ in reserve_mem()
|
| H A D | mm_init.c | 2701 * KHO memory setup must happen while memblock is still active, but in mem_init_print_info()
|