[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <11c7b042-885f-ad48-7c5f-ad3dbd8f0340@gmail.com>
Date: Thu, 12 Aug 2021 21:47:18 +0200
From: Rafał Miłecki <zajec5@...il.com>
To: Marc Zyngier <maz@...nel.org>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Cc: Will Deacon <will@...nel.org>,
Catalin Marinas <catalin.marinas@....com>,
Mark Rutland <mark.rutland@....com>,
Ard Biesheuvel <ardb@...nel.org>,
Florian Fainelli <f.fainelli@...il.com>,
bcm-kernel-feedback-list@...adcom.com, kernel-team@...roid.com
Subject: Re: [PATCH 3/5] arm64: Detect disabled HVC early
On 12.08.2021 21:02, Marc Zyngier wrote:
> Having HVC disabled from EL3 while the kernel is entered at EL2
> is a complete nightmare.
>
> We end-up taking an UNDEF at the worse possible moment (checking
> for VHE) and even if we didn't, having KVM enabled would signify
> the premature end of the kernel.
>
> Instead, try and detect this stupid case by issuing a HVC
> for HVC_RESET_VECTORS, which does nothing when the stubs
> are live. If we get HVC_STUB_ERR back, that's because the
> UNDEF handler has kicked in.
>
> In this situation, close your eyes, block your nose, and gracefully
> pretend we have booted at EL1.
>
> Reported-by: Rafał Miłecki <zajec5@...il.com>
> Signed-off-by: Marc Zyngier <maz@...nel.org>
This does the trick.
Tested-by: Rafał Miłecki <rafal@...ecki.pl>
Powered by blists - more mailing lists