# Re: \[PATCH AUTOSEL 5.12 039/116\] KVM: arm64: Use BUG and BUG\_ON in nVHE hyp

- From: Marc Zyngier \<maz@kernel.org\>
- Date: 2021-05-05 17:21:43 
- List: stable
- Page: https://ratatoskr.run/stable/2021/05/6359073
- Thread: https://ratatoskr.run/stable/2021/05/6358617/t/2.md

```text
On Wed, 05 May 2021 17:30:07 +0100,
Sasha Levin [ref] wrote:
> 
> From: Andrew Scull <redacted>
> 
> [ Upstream commit f79e616f27ab6cd74deb0995a8eead3d1c9d65af ]
> 
> hyp_panic() reports the address of the panic by using ELR_EL2, but this
> isn't a useful address when hyp_panic() is called directly. Replace such
> direct calls with BUG() and BUG_ON() which use BRK to trigger an
> exception that then goes to hyp_panic() with the correct address. Also
> remove the hyp_panic() declaration from the header file to avoid
> accidental misuse.
> 
> Signed-off-by: Andrew Scull <redacted>
> Acked-by: Will Deacon <will@kernel.org>
> Signed-off-by: Marc Zyngier <maz@kernel.org>
> Link: https://lore.kernel.org/r/20210318143311.839894-5-ascull@google.com
> Signed-off-by: Sasha Levin <sashal@kernel.org>

Same this for this patch.

	M.

-- 
Without deviation from the norm, progress is not possible.
```
