[PATCH v3 02/17] arm64: Prevent the use of is_kernel_in_hyp_mode() in hypervisor code

Catalin Marinas catalin.marinas at arm.com
Mon Jun 12 09:59:38 PDT 2023


On Fri, Jun 09, 2023 at 05:21:45PM +0100, Marc Zyngier wrote:
> Using is_kernel_in_hyp_mode() in hypervisor code is a pretty bad
> mistake. This helper only checks for CurrentEL being EL2, which
> is always true.
> 
> Make the compilation fail if using the helper in hypervisor context
> Whilst we're at it, flag the helper as __always_inline, which it
> really should be.
> 
> Signed-off-by: Marc Zyngier <maz at kernel.org>

Acked-by: Catalin Marinas <catalin.marinas at arm.com>



More information about the linux-arm-kernel mailing list