Re: kexec/kdump of a kvm guest?

2008-07-24 Thread Alexander Graf
On Jul 24, 2008, at 2:13 AM, Mike Snitzer wrote: On Sat, Jul 5, 2008 at 7:20 AM, Avi Kivity [EMAIL PROTECTED] wrote: Mike Snitzer wrote: My host is x86_64 RHEL5U1 running 2.6.25.4 with kvm-70 (kvm-intel). When I configure kdump in the guest (running 2.6.22.19) and force a crash (with

Re: [PATCH] swiotlb: Allow swiotlb to live at pre-defined address

2020-03-30 Thread Alexander Graf
On 30.03.20 15:40, Konrad Rzeszutek Wilk wrote: On Mon, Mar 30, 2020 at 02:06:01PM +0800, Kairui Song wrote: On Sat, Mar 28, 2020 at 7:57 PM Dave Young wrote: On 03/26/20 at 05:29pm, Alexander Graf wrote: The swiotlb is a very convenient fallback mechanism for bounce buffering

Re: [RFC PATCH] Introduce persistent memory pool

2023-08-30 Thread Alexander Graf
Hi Stanislav, On 30.08.23 00:07, Stanislav Kinsburskii wrote: On Mon, Aug 28, 2023 at 10:50:19PM +0200, Alexander Graf wrote: +kexec, iommu, kvm On 23.08.23 04:45, Stanislav Kinsburskii wrote: +akpm, +linux-mm On Fri, Aug 25, 2023 at 01:32:40PM +, Gowans, James wrote: On Fri, 2023-08

Re: [RFC PATCH] Introduce persistent memory pool

2023-08-28 Thread Alexander Graf
+kexec, iommu, kvm On 23.08.23 04:45, Stanislav Kinsburskii wrote: +akpm, +linux-mm On Fri, Aug 25, 2023 at 01:32:40PM +, Gowans, James wrote: On Fri, 2023-08-25 at 10:05 +0200, Greg Kroah-Hartman wrote: Thanks for adding me to this thread Greg! On Tue, Aug 22, 2023 at 11:34:34AM

Re: [PATCH v3 00/17] kexec: Allow preservation of ftrace buffers

2024-02-06 Thread Alexander Graf
Hey Oleksij! On 06.02.24 09:17, Oleksij Rempel wrote: Hi Alexander, Nice work! On Wed, Jan 17, 2024 at 02:46:47PM +, Alexander Graf wrote: Kexec today considers itself purely a boot loader: When we enter the new kernel, any state the previous kernel left behind is irrelevant and the new

Re: [PATCH 03/15] kexec: Add Kexec HandOver (KHO) generation helpers

2023-12-13 Thread Alexander Graf
On 13.12.23 19:36, Stanislav Kinsburskii wrote: On Wed, Dec 13, 2023 at 12:04:40AM +, Alexander Graf wrote: +int register_kho_notifier(struct notifier_block *nb) +{ + return blocking_notifier_chain_register(_head, nb); +} +EXPORT_SYMBOL_GPL(register_kho_notifier); + +int

Re: [PATCH 06/15] arm64: Add KHO support

2023-12-18 Thread Alexander Graf
Hey Rob! On 14.12.23 23:36, Rob Herring wrote: On Wed, Dec 13, 2023 at 12:04:43AM +, Alexander Graf wrote: We now have all bits in place to support KHO kexecs. This patch adds awareness of KHO in the kexec file as well as boot path for arm64 and adds the respective kconfig option

[PATCH v2 09/17] x86: Add KHO support

2023-12-22 Thread Alexander Graf
that its KASLR location finder only considers memory regions that are not already occupied by KHO memory. Signed-off-by: Alexander Graf --- v1 -> v2: - Change kconfig option to ARCH_SUPPORTS_KEXEC_KHO - s/kho_reserve_mem/kho_reserve_previous_mem/g - s/kho_reserve/kho_reserve_scratch/g --- a

[PATCH v2 05/17] kexec: Add KHO support to kexec file loads

2023-12-22 Thread Alexander Graf
ile loader about it, so it only allocates for that area. In addition, enlighten it with support to ask the KHO subsystem for its respective payloads to copy into target memory. Also teach the KHO subsystem how to fill the images for file loads. Signed-off-by: Alexander Graf --- include/linux/kexe

[PATCH v2 07/17] kexec: Add documentation for KHO

2023-12-22 Thread Alexander Graf
With KHO in place, let's add documentation that describes what it is and how to use it. Signed-off-by: Alexander Graf --- Documentation/kho/concepts.rst | 88 Documentation/kho/index.rst | 19 +++ Documentation/kho/usage.rst | 57

[PATCH v2 08/17] arm64: Add KHO support

2023-12-22 Thread Alexander Graf
We now have all bits in place to support KHO kexecs. This patch adds awareness of KHO in the kexec file as well as boot path for arm64 and adds the respective kconfig option to the architecture so that it can use KHO successfully. Signed-off-by: Alexander Graf --- v1 -> v2: - test

[PATCH v2 06/17] kexec: Add config option for KHO

2023-12-22 Thread Alexander Graf
We have all generic code in place now to support Kexec with KHO. This patch adds a config option that depends on architecture support to enable KHO support. Signed-off-by: Alexander Graf --- kernel/Kconfig.kexec | 13 + 1 file changed, 13 insertions(+) diff --git a/kernel

[PATCH v2 03/17] kexec: Add Kexec HandOver (KHO) generation helpers

2023-12-22 Thread Alexander Graf
as the place to load future kexec images into which then won't collide with any handover data. Signed-off-by: Alexander Graf --- v1 -> v2: - s/kho_reserve/kho_reserve_scratch/g - Move kho enums out of ifdef --- Documentation/ABI/testing/sysfs-kernel-kho| 53 +++ .../admin-gu

[PATCH v2 04/17] kexec: Add KHO parsing support

2023-12-22 Thread Alexander Graf
they can recover their own state. Signed-off-by: Alexander Graf --- v1 -> v2: - s/kho_reserve_mem/kho_reserve_previous_mem/g - make kho_get_fdt() const - Add stubs for return_mem and claim_mem --- Documentation/ABI/testing/sysfs-firmware-kho | 9 + MAINTAIN

[PATCH v2 02/17] memblock: Declare scratch memory as CMA

2023-12-22 Thread Alexander Graf
don't lose the scratch region's memory anymore for allocations after boot. Signed-off-by: Alexander Graf --- v1 -> v2: - test bot warning fix --- mm/memblock.c | 30 ++ 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/mm/memblock.c b/mm/membloc

[PATCH v2 01/17] mm,memblock: Add support for scratch memory

2023-12-22 Thread Alexander Graf
y(): After that call, no allocations may happen from scratch memblock regions. We will lift that restriction in the next patch. Signed-off-by: Alexander Graf --- include/linux/memblock.h | 19 + mm/Kconfig | 4 +++ mm/memblock.c

[PATCH v2 00/17] kexec: Allow preservation of ftrace buffers

2023-12-22 Thread Alexander Graf
[4] https://lore.kernel.org/kexec/1682554137-13938-1-git-send-email-anthony.yzn...@oracle.com/ Alexander Graf (17): mm,memblock: Add support for scratch memory memblock: Declare scratch memory as CMA kexec: Add Kexec HandOver (KHO) generation helpers kexec: Add KHO parsing support kexe

[PATCH v2 07/17] kexec: Add documentation for KHO

2023-12-22 Thread Alexander Graf
With KHO in place, let's add documentation that describes what it is and how to use it. Signed-off-by: Alexander Graf --- Documentation/kho/concepts.rst | 88 Documentation/kho/index.rst | 19 +++ Documentation/kho/usage.rst | 57

[PATCH v2 08/17] arm64: Add KHO support

2023-12-22 Thread Alexander Graf
We now have all bits in place to support KHO kexecs. This patch adds awareness of KHO in the kexec file as well as boot path for arm64 and adds the respective kconfig option to the architecture so that it can use KHO successfully. Signed-off-by: Alexander Graf --- v1 -> v2: - test

[PATCH v2 06/17] kexec: Add config option for KHO

2023-12-22 Thread Alexander Graf
We have all generic code in place now to support Kexec with KHO. This patch adds a config option that depends on architecture support to enable KHO support. Signed-off-by: Alexander Graf --- kernel/Kconfig.kexec | 13 + 1 file changed, 13 insertions(+) diff --git a/kernel

[PATCH v2 10/17] tracing: Initialize fields before registering

2023-12-22 Thread Alexander Graf
. This patch leaves the old late initialization logic in place. The field init code already validates whether there are any fields present, which means it's legal to call it multiple times. This way we're sure we don't miss any call sites. Signed-off-by: Alexander Graf --- include/linux/trace_events.h

[PATCH v2 09/17] x86: Add KHO support

2023-12-22 Thread Alexander Graf
that its KASLR location finder only considers memory regions that are not already occupied by KHO memory. Signed-off-by: Alexander Graf --- v1 -> v2: - Change kconfig option to ARCH_SUPPORTS_KEXEC_KHO - s/kho_reserve_mem/kho_reserve_previous_mem/g - s/kho_reserve/kho_reserve_scratch/g --- a

[PATCH v2 11/17] tracing: Introduce kho serialization

2023-12-22 Thread Alexander Graf
-by: Alexander Graf --- v1 -> v2: - Remove ifdefs --- kernel/trace/trace.c | 47 1 file changed, 47 insertions(+) diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 199df497db07..6ec31879b4eb 100644 --- a/kernel/trace/trace.c +++ b/kernel/tr

[PATCH v2 13/17] tracing: Recover trace buffers from kexec handover

2023-12-22 Thread Alexander Graf
in place before kexec becomes readable after kexec again as soon as it gets initialized with the same name. Signed-off-by: Alexander Graf --- v1 -> v2: - Move from names to fdt offsets. That way, trace.c can find the trace array offset and then the ring buffer code only needs to read

[PATCH v2 12/17] tracing: Add kho serialization of trace buffers

2023-12-22 Thread Alexander Graf
, we store all locations of trace buffers as well as their linked list metadata. We can then later reuse the linked list to reconstruct the head pointer. This patch implements the write-out logic for trace buffers. Signed-off-by: Alexander Graf --- v1 -> v2: - Leave the node generation c

[PATCH v2 14/17] tracing: Add kho serialization of trace events

2023-12-22 Thread Alexander Graf
. It's simpler and thus less intrusive. However, it means we can not fully parse affected events when the kernel removes or modifies trace events across a kho kexec. Signed-off-by: Alexander Graf --- v1 -> v2: - Leave anything that requires a name in trace.c to keep buffers unnamed entit

[PATCH v2 15/17] tracing: Recover trace events from kexec handover

2023-12-22 Thread Alexander Graf
for events looks at the same identifiers. Signed-off-by: Alexander Graf --- v1 -> v2: - make kho_get_fdt() const - Get events as array from a property, use fingerprint instead of names to identify events - Remove ifdefs --- kernel/trace/trace_output.c |

[PATCH v2 17/17] devicetree: Add bindings for ftrace KHO

2023-12-22 Thread Alexander Graf
passed. Signed-off-by: Alexander Graf --- .../bindings/kho/ftrace/ftrace-array.yaml | 46 +++ .../bindings/kho/ftrace/ftrace-cpu.yaml | 56 +++ .../bindings/kho/ftrace/ftrace.yaml | 48 3 files changed, 150 insertions(+) create mode

[PATCH v2 16/17] tracing: Add config option for kexec handover

2023-12-22 Thread Alexander Graf
Now that all bits are in place to allow ftrace to pass its trace data into the next kernel on kexec, let's give users a kconfig option to enable the functionality. Signed-off-by: Alexander Graf --- v1 -> v2: - Select crc32 --- kernel/trace/Kconfig | 14 ++ 1 file changed,

[PATCH v2 10/17] tracing: Initialize fields before registering

2023-12-22 Thread Alexander Graf
. This patch leaves the old late initialization logic in place. The field init code already validates whether there are any fields present, which means it's legal to call it multiple times. This way we're sure we don't miss any call sites. Signed-off-by: Alexander Graf --- include/linux/trace_events.h

[PATCH v2 11/17] tracing: Introduce kho serialization

2023-12-22 Thread Alexander Graf
-by: Alexander Graf --- v1 -> v2: - Remove ifdefs --- kernel/trace/trace.c | 47 1 file changed, 47 insertions(+) diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 199df497db07..6ec31879b4eb 100644 --- a/kernel/trace/trace.c +++ b/kernel/tr

Re: [PATCH v2 17/17] devicetree: Add bindings for ftrace KHO

2023-12-23 Thread Alexander Graf
Hi Krzysztof! Thanks a lot for the fast review! On 23.12.23 15:30, Krzysztof Kozlowski wrote: On 22/12/2023 20:51, Alexander Graf wrote: With ftrace in KHO, we are creating an ABI between old kernel and new kernel about the state that they transfer. To ensure that we document that state

Re: [PATCH 00/15] kexec: Allow preservation of ftrace buffers

2023-12-14 Thread Alexander Graf
Hey Eric, On 14.12.23 15:58, Eric W. Biederman wrote: Alexander Graf writes: Kexec today considers itself purely a boot loader: When we enter the new kernel, any state the previous kernel left behind is irrelevant and the new kernel reinitializes the system. However, there are use cases

[PATCH 03/15] kexec: Add Kexec HandOver (KHO) generation helpers

2023-12-12 Thread Alexander Graf
as the place to load future kexec images into which then won't collide with any handover data. Signed-off-by: Alexander Graf --- Documentation/ABI/testing/sysfs-kernel-kho| 53 +++ .../admin-guide/kernel-parameters.txt | 10 + MAINTAINERS | 1

[PATCH 04/15] kexec: Add KHO parsing support

2023-12-12 Thread Alexander Graf
they can recover their own state. Signed-off-by: Alexander Graf --- Documentation/ABI/testing/sysfs-firmware-kho | 9 + MAINTAINERS | 1 + include/linux/kexec.h| 23 ++ kernel/Makefile | 1 + kernel

[PATCH 05/15] kexec: Add KHO support to kexec file loads

2023-12-12 Thread Alexander Graf
ile loader about it, so it only allocates for that area. In addition, enlighten it with support to ask the KHO subsystem for its respective payloads to copy into target memory. Also teach the KHO subsystem how to fill the images for file loads. Signed-off-by: Alexander Graf --- include/linux/kexe

[PATCH 01/15] mm,memblock: Add support for scratch memory

2023-12-12 Thread Alexander Graf
y(): After that call, no allocations may happen from scratch memblock regions. We will lift that restriction in the next patch. Signed-off-by: Alexander Graf --- include/linux/memblock.h | 19 + mm/Kconfig | 4 +++ mm/memblock.c

[PATCH 00/15] kexec: Allow preservation of ftrace buffers

2023-12-12 Thread Alexander Graf
71090599226.stgit@skinsburskii./ [2] https://lore.kernel.org/all/20231016233215.13090-1-madve...@linux.microsoft.com/ [3] https://lpc.events/event/17/contributions/1485/attachments/1296/2650/jgowans-preserving-across-kexec.pdf [4] https://lore.kernel.org/kexec/1682554137-13938-1-git-send-email-anthony.yzn

[PATCH 02/15] memblock: Declare scratch memory as CMA

2023-12-12 Thread Alexander Graf
don't lose the scratch region's memory anymore for allocations after boot. Signed-off-by: Alexander Graf --- mm/memblock.c | 30 ++ 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/mm/memblock.c b/mm/memblock.c index e89e6c8f9d75..44741424dab7 100644

[PATCH 14/15] tracing: Recover trace events from kexec handover

2023-12-12 Thread Alexander Graf
for events looks at the same identifiers. Signed-off-by: Alexander Graf --- kernel/trace/trace_output.c | 65 - 1 file changed, 64 insertions(+), 1 deletion(-) diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c index 113de40c616f

[PATCH 12/15] tracing: Recover trace buffers from kexec handover

2023-12-12 Thread Alexander Graf
in place before kexec becomes readable after kexec again as soon as it gets initialized with the same name. Signed-off-by: Alexander Graf --- kernel/trace/ring_buffer.c | 173 - 1 file changed, 171 insertions(+), 2 deletions(-) diff --git a/kernel/trace

[PATCH 13/15] tracing: Add kho serialization of trace events

2023-12-12 Thread Alexander Graf
. It's simpler and thus less intrusive. However, it means we can not fully parse affected events when the kernel removes or modifies trace events across a kho kexec. Signed-off-by: Alexander Graf --- kernel/trace/trace.c| 1 + kernel/trace/trace_output.c | 28

[PATCH 15/15] tracing: Add config option for kexec handover

2023-12-12 Thread Alexander Graf
Now that all bits are in place to allow ftrace to pass its trace data into the next kernel on kexec, let's give users a kconfig option to enable the functionality. Signed-off-by: Alexander Graf --- kernel/trace/Kconfig | 13 + 1 file changed, 13 insertions(+) diff --git a/kernel

[PATCH 08/15] tracing: Introduce names for ring buffers

2023-12-12 Thread Alexander Graf
to recover buffer contents for specific ring buffers. Signed-off-by: Alexander Graf --- include/linux/ring_buffer.h | 7 --- kernel/trace/ring_buffer.c | 5 - kernel/trace/trace.c| 7 --- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/include/linux/ring_buffer.h b

[PATCH 07/15] x86: Add KHO support

2023-12-12 Thread Alexander Graf
that its KASLR location finder only considers memory regions that are not already occupied by KHO memory. Signed-off-by: Alexander Graf --- arch/x86/Kconfig | 12 ++ arch/x86/boot/compressed/kaslr.c | 55 +++ arch/x86/include/uapi/asm/bootparam.h

[PATCH 09/15] tracing: Introduce names for events

2023-12-12 Thread Alexander Graf
a unique name. That way we can clearly identify the event before and after kexec and restore its ID post-kexec. Signed-off-by: Alexander Graf --- include/linux/trace_events.h | 1 + include/trace/trace_events.h | 2 ++ kernel/trace/blktrace.c | 1 + kernel/trace

[PATCH 10/15] tracing: Introduce kho serialization

2023-12-12 Thread Alexander Graf
-by: Alexander Graf --- kernel/trace/trace.c | 52 1 file changed, 52 insertions(+) diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 7700ca1be2a5..3e7f61cf773e 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -32,6 +32,7 @@ #include

[PATCH 06/15] arm64: Add KHO support

2023-12-12 Thread Alexander Graf
We now have all bits in place to support KHO kexecs. This patch adds awareness of KHO in the kexec file as well as boot path for arm64 and adds the respective kconfig option to the architecture so that it can use KHO successfully. Signed-off-by: Alexander Graf --- arch/arm64/Kconfig| 12

[PATCH 11/15] tracing: Add kho serialization of trace buffers

2023-12-12 Thread Alexander Graf
, we store all locations of trace buffers as well as their linked list metadata. We can then later reuse the linked list to reconstruct the head pointer. This patch implements the write-out logic for trace buffers. Signed-off-by: Alexander Graf --- include/linux/ring_buffer.h | 2 + kernel/trace

Re: [PATCH 08/15] tracing: Introduce names for ring buffers

2023-12-12 Thread Alexander Graf
Hi Steve, On 13.12.23 01:15, Steven Rostedt wrote: On Wed, 13 Dec 2023 00:04:45 + Alexander Graf wrote: With KHO (Kexec HandOver), we want to preserve trace buffers across kexec. To carry over their state between kernels, the kernel needs a common handle for them that exists on both

Re: [PATCH v2 04/17] kexec: Add KHO parsing support

2024-01-15 Thread Alexander Graf
On 01.01.24 04:33, Stanislav Kinsburskii wrote: On Fri, Dec 22, 2023 at 07:35:54PM +, Alexander Graf wrote: +/** + * kho_reserve_previous_mem - Adds all memory reservations into memblocks + * and moves us out of the scratch only phase. Must be called after page tables + * are initialized

[PATCH v3 00/17] kexec: Allow preservation of ftrace buffers

2024-01-17 Thread Alexander Graf
;/"trace-flags"/ - Fix wording - Add Documentation to MAINTAINERS file - Remove kho reference on read error - Move handover_dt unmap up - s/reserve_scratch_mem/mark_phys_as_cma/ - Remove ifdeffery - Remove superfluous comment Alexander Graf (17): mm,memblock: Add supp

[PATCH v3 04/17] kexec: Add KHO parsing support

2024-01-17 Thread Alexander Graf
they can recover their own state. Signed-off-by: Alexander Graf --- v1 -> v2: - s/kho_reserve_mem/kho_reserve_previous_mem/g - make kho_get_fdt() const - Add stubs for return_mem and claim_mem v2 -> v3: - Remove kho reference on read error - Move handover_dt un

[PATCH v3 03/17] kexec: Add Kexec HandOver (KHO) generation helpers

2024-01-17 Thread Alexander Graf
as the place to load future kexec images into which then won't collide with any handover data. Signed-off-by: Alexander Graf --- v1 -> v2: - s/kho_reserve/kho_reserve_scratch/g - Move kho enums out of ifdef --- Documentation/ABI/testing/sysfs-kernel-kho| 53 +++ .../admin-gu

[PATCH v3 05/17] kexec: Add KHO support to kexec file loads

2024-01-17 Thread Alexander Graf
ile loader about it, so it only allocates for that area. In addition, enlighten it with support to ask the KHO subsystem for its respective payloads to copy into target memory. Also teach the KHO subsystem how to fill the images for file loads. Signed-off-by: Alexander Graf --- include/linux/kexe

[PATCH v3 02/17] memblock: Declare scratch memory as CMA

2024-01-17 Thread Alexander Graf
don't lose the scratch region's memory anymore for allocations after boot. Signed-off-by: Alexander Graf --- v1 -> v2: - test bot warning fix v2 -> v3: - s/reserve_scratch_mem/mark_phys_as_cma/ - Declare scratch memory as CMA: Remove ifdeffery - Declare scratch memory as CMA:

[PATCH v3 01/17] mm,memblock: Add support for scratch memory

2024-01-17 Thread Alexander Graf
y(): After that call, no allocations may happen from scratch memblock regions. We will lift that restriction in the next patch. Signed-off-by: Alexander Graf --- include/linux/memblock.h | 19 + mm/Kconfig | 4 +++ mm/memblock.c

Re: [PATCH v2 07/17] kexec: Add documentation for KHO

2024-01-17 Thread Alexander Graf
On 17.01.24 17:54, Rob Herring wrote: On Wed, Jan 17, 2024 at 8:02 AM Alexander Graf wrote: On 03.01.24 19:48, Rob Herring wrote: On Fri, Dec 22, 2023 at 12:52 PM Alexander Graf wrote: With KHO in place, let's add documentation that describes what it is and how to use it. Signed-off

[PATCH v3 15/17] tracing: Recover trace events from kexec handover

2024-01-17 Thread Alexander Graf
for events looks at the same identifiers. Signed-off-by: Alexander Graf --- v1 -> v2: - make kho_get_fdt() const - Get events as array from a property, use fingerprint instead of names to identify events - Remove ifdefs --- kernel/trace/trace_output.c |

[PATCH v3 16/17] tracing: Add config option for kexec handover

2024-01-17 Thread Alexander Graf
Now that all bits are in place to allow ftrace to pass its trace data into the next kernel on kexec, let's give users a kconfig option to enable the functionality. Signed-off-by: Alexander Graf --- v1 -> v2: - Select crc32 --- kernel/trace/Kconfig | 14 ++ 1 file changed,

[PATCH v3 11/17] tracing: Introduce kho serialization

2024-01-17 Thread Alexander Graf
-by: Alexander Graf --- v1 -> v2: - Remove ifdefs --- kernel/trace/trace.c | 47 1 file changed, 47 insertions(+) diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index a0defe156b57..9a0d96975c9c 100644 --- a/kernel/trace/trace.c +++ b/kernel/tr

[PATCH v3 13/17] tracing: Recover trace buffers from kexec handover

2024-01-17 Thread Alexander Graf
in place before kexec becomes readable after kexec again as soon as it gets initialized with the same name. Signed-off-by: Alexander Graf --- v1 -> v2: - Move from names to fdt offsets. That way, trace.c can find the trace array offset and then the ring buffer code only needs to read

[PATCH v3 14/17] tracing: Add kho serialization of trace events

2024-01-17 Thread Alexander Graf
. It's simpler and thus less intrusive. However, it means we can not fully parse affected events when the kernel removes or modifies trace events across a kho kexec. Signed-off-by: Alexander Graf --- v1 -> v2: - Leave anything that requires a name in trace.c to keep buffers unnamed entit

[PATCH v3 12/17] tracing: Add kho serialization of trace buffers

2024-01-17 Thread Alexander Graf
, we store all locations of trace buffers as well as their linked list metadata. We can then later reuse the linked list to reconstruct the head pointer. This patch implements the write-out logic for trace buffers. Signed-off-by: Alexander Graf --- v1 -> v2: - Leave the node generation c

[PATCH v3 17/17] Documentation: KHO: Add ftrace bindings

2024-01-17 Thread Alexander Graf
a new kho bindings directory. This allows us to force contributors to document the data that moves across KHO kexecs and catch breaking change during review. Signed-off-by: Alexander Graf --- v2 -> v3: - Fix make dt_binding_check - Add descriptions for each object - s/trace_flags/trace

[PATCH v3 10/17] tracing: Initialize fields before registering

2024-01-17 Thread Alexander Graf
. This patch leaves the old late initialization logic in place. The field init code already validates whether there are any fields present, which means it's legal to call it multiple times. This way we're sure we don't miss any call sites. Signed-off-by: Alexander Graf --- include/linux/trace_events.h

[PATCH v3 09/17] x86: Add KHO support

2024-01-17 Thread Alexander Graf
that its KASLR location finder only considers memory regions that are not already occupied by KHO memory. Signed-off-by: Alexander Graf --- v1 -> v2: - Change kconfig option to ARCH_SUPPORTS_KEXEC_KHO - s/kho_reserve_mem/kho_reserve_previous_mem/g - s/kho_reserve/kho_reserve_scratch/g --- a

[PATCH v3 07/17] kexec: Add documentation for KHO

2024-01-17 Thread Alexander Graf
With KHO in place, let's add documentation that describes what it is and how to use it. Signed-off-by: Alexander Graf --- v2 -> v3: - Fix wording - Add Documentation to MAINTAINERS file --- Documentation/kho/concepts.rst | 88 Documentation/

[PATCH v3 08/17] arm64: Add KHO support

2024-01-17 Thread Alexander Graf
We now have all bits in place to support KHO kexecs. This patch adds awareness of KHO in the kexec file as well as boot path for arm64 and adds the respective kconfig option to the architecture so that it can use KHO successfully. Signed-off-by: Alexander Graf --- v1 -> v2: - test

[PATCH v3 06/17] kexec: Add config option for KHO

2024-01-17 Thread Alexander Graf
We have all generic code in place now to support Kexec with KHO. This patch adds a config option that depends on architecture support to enable KHO support. Signed-off-by: Alexander Graf --- kernel/Kconfig.kexec | 13 + 1 file changed, 13 insertions(+) diff --git a/kernel

Re: [PATCH v2 17/17] devicetree: Add bindings for ftrace KHO

2024-01-17 Thread Alexander Graf
Hey Rob, Thanks a lot for taking the time to review! On 02.01.24 16:20, Rob Herring wrote: On Fri, Dec 22, 2023 at 07:51:44PM +, Alexander Graf wrote: With ftrace in KHO, we are creating an ABI between old kernel and new kernel about the state that they transfer. To ensure that we

Re: [PATCH v2 07/17] kexec: Add documentation for KHO

2024-01-17 Thread Alexander Graf
On 03.01.24 19:48, Rob Herring wrote: On Fri, Dec 22, 2023 at 12:52 PM Alexander Graf wrote: With KHO in place, let's add documentation that describes what it is and how to use it. Signed-off-by: Alexander Graf --- Documentation/kho/concepts.rst | 88

Re: [PATCH v3 00/17] kexec: Allow preservation of ftrace buffers

2024-02-02 Thread Alexander Graf
Hi Philipp, On 29.01.24 17:34, Philipp Rudo wrote: Hi Alex, adding linux-integrity as there are some synergies with IMA_KEXEC (in case we get KHO to work). Fist of all I believe that having a generic framework to pass information from one kernel to the other across kexec would be a good

Re: [PATCH v4 0/4] x86/snp: Add kexec support

2024-05-02 Thread Alexander Graf
Hey Ashish, On 09.04.24 22:42, Ashish Kalra wrote: From: Ashish Kalra The patchset adds bits and pieces to get kexec (and crashkernel) work on SNP guest. With this patch set (and similar for the TDX one), you enable the typical kdump case, which is great! However, if a user is running

Re: [PATCH v4 0/4] x86/snp: Add kexec support

2024-05-03 Thread Alexander Graf
On 02.05.24 14:18, Vitaly Kuznetsov wrote: Alexander Graf writes: Hey Ashish, On 09.04.24 22:42, Ashish Kalra wrote: From: Ashish Kalra The patchset adds bits and pieces to get kexec (and crashkernel) work on SNP guest. With this patch set (and similar for the TDX one), you enable