[PATCH v5 1/2] kexec: Consolidate machine_kexec_mask_interrupts() implementation
Jiri Slaby
jirislaby at kernel.org
Wed Dec 4 03:02:56 PST 2024
On 30. 11. 24, 21:11, Eliav Farber wrote:
> Consolidate the machine_kexec_mask_interrupts implementation into a common
> function located in a new file: kernel/irq/kexec.c. This removes duplicate
> implementations from architecture-specific files in arch/arm, arch/arm64,
> arch/powerpc, and arch/riscv, reducing code duplication and improving
> maintainability.
>
> The new implementation retains architecture-specific behavior for
> CONFIG_GENERIC_IRQ_KEXEC_CLEAR_VM_FORWARD, which was previously implemented
> for ARM64. When enabled (currently for ARM64), it clears the active state
> of interrupts forwarded to virtual machines (VMs) before handling other
> interrupt masking operations.
...
> --- a/kernel/irq/Kconfig
> +++ b/kernel/irq/Kconfig
> @@ -154,3 +154,12 @@ config DEPRECATED_IRQ_CPU_ONOFFLINE
> bool
> depends on CAVIUM_OCTEON_SOC
> default CAVIUM_OCTEON_SOC
> +
> +config GENERIC_IRQ_KEXEC_CLEAR_VM_FORWARD
> + bool "Clear forwarded VM interrupts during kexec"
> + default n
> + help
> + When enabled, this option allows the kernel to clear the active state
> + of interrupts that are forwarded to virtual machines (VMs) during a
> + machine kexec. For interrupts that are not forwarded, if supported,
> + the kernel will attempt to trigger an End of Interrupt (EOI).
This caught my attention. It looks like you want to allow people
toggling it? I believe only arch code should turn it on as you do by
"select", not users.
thanks,
--
js
suse labs
More information about the linux-riscv
mailing list