Home
last modified time | relevance | path

Searched full:kho (Results 1 – 25 of 26) sorted by relevance

12

/linux/Documentation/admin-guide/mm/
H A Dkho.rst7 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 Dindex.rst46 kho
/linux/Documentation/core-api/kho/
H A Dfdt.rst4 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 Dconcepts.rst8 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 Dkho.yaml4 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 Dsub-fdt.yaml4 title: KHO users' FDT address
11 Physical address of an FDT blob registered by a KHO user.
/linux/tools/testing/selftests/kho/
H A Dvmtest.sh11 tmp_dir=$(mktemp -d /tmp/kho-test.XXXXXXXX)
56 local kho_config="$tmp_dir/kho.config"
59 # enable initrd, KHO and KHO test in kernel configuration
105 cmdline="$cmdline kho=on panic=-1"
114 grep "KHO restore succeeded" "$serial" &> /dev/null || fail "KHO failed"
128 local build_dir="$kernel_dir/.kho"
180 ktap_test_pass "KHO succeeded"
H A Dinit.c19 #define KHO_FINILIZE "/debugfs/kho/out/finalize"
/linux/kernel/
H A Dkexec_handover.c9 #define pr_fmt(fmt) "KHO: " fmt
25 * KHO is tightly coupled with mm init and needs access to some of mm
31 #define KHO_FDT_COMPATIBLE "kho-v1"
47 early_param("kho", kho_parse_enable);
50 * Keep track of memory that is to be preserved across KHO.
233 * but the KHO successor kernel only needs to process them once in order.
376 * With KHO enabled, memory can become fragmented because KHO regions may
378 * safe zones that we will never see KHO allocations from. This is where we
499 * With KHO we can preserve arbitrary pages in the system. To ensure we still
503 * problem for us during KHO because we can just move them somewhere else.
[all …]
H A Dkexec_file.c282 /* If KHO is active, add its images to the list */ in kimage_file_prepare_segments()
723 * If KHO is active, only use KHO scratch memory. All other memory in kexec_locate_mem_hole()
/linux/drivers/of/
H A Dkexec.c276 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 Dfdt.c892 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 Dkexec-bzimage64.c247 struct kho_data *kho = (void *)sd + sizeof(*sd); in setup_kho() local
255 /* Only add if we have all KHO images in place */ in setup_kho()
256 if (!image->kho.fdt || !image->kho.scratch) in setup_kho()
260 kho->fdt_addr = image->kho.fdt; in setup_kho()
261 kho->fdt_size = PAGE_SIZE; in setup_kho()
262 kho->scratch_addr = image->kho.scratch->mem; in setup_kho()
263 kho->scratch_size = image->kho.scratch->bufsz; in setup_kho()
H A Dsetup.c454 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 De820.c1307 * KHO kernels are special and use only scratch memory for memblock in e820__memblock_setup()
/linux/lib/
H A Dtest_kho.c3 * Test module for KHO
25 #define KHO_TEST_MAGIC 0x4b484f21 /* KHO! */
27 #define KHO_TEST_COMPAT "kho-test-v1"
266 pr_info("KHO restore succeeded\n"); in kho_test_restore()
304 MODULE_DESCRIPTION("KHO test module");
H A DKconfig.debug3222 This option enables test for Kexec HandOver (KHO).
3229 For detailed documentation about KHO, see Documentation/core-api/kho.
3233 tools/testing/selftests/kho/vmtest.sh -h
/linux/Documentation/core-api/kho/bindings/memblock/
H A Dmemblock.yaml11 reserve_mem command line option across kexec through KHO.
12 The post-KHO kernel can then consume these reservations and they are
H A Dreserve-mem.yaml11 reserve_mem command line option across kexec through KHO.
/linux/arch/x86/boot/compressed/
H A Dkaslr.c764 * 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 Dkexec_handover.h13 /* KHO Notifier index */
H A Dkexec.h420 } kho; member
/linux/mm/
H A Dmemblock.c181 /* skip non-scratch memory for kho early boot allocations */ in choose_memblock_flags()
2576 pr_err("failed to prepare memblock FDT for KHO: %d\n", err); in prepare_kho_fdt()
2617 pr_warn("failed to retrieve FDT '%s' from KHO: %d\n", in reserve_mem_kho_retrieve_fdt()
2666 pr_warn("KHO reserve-mem '%s' has wrong alignment (0x%lx, 0x%lx)\n", in reserve_mem_kho_revive()
2672 pr_warn("KHO reserve-mem '%s' has wrong size (0x%lx != 0x%lx)\n", in reserve_mem_kho_revive()
2678 pr_info("Revived memory reservation '%s' from KHO\n", name); in reserve_mem_kho_revive()
2745 /* Pick previous allocations up from KHO if available */ in reserve_mem()
H A Dmm_init.c2769 * KHO memory setup must happen while memblock is still active, but in mm_core_init()
/linux/Documentation/admin-guide/
H A Dkernel-parameters.txt2818 kho= [KEXEC,EARLY]
2826 Defines the size of the KHO scratch region. The KHO

12