[PATCH] KVM: arm64: nv: Forward hvc traps if originated from nested VM
Marc Zyngier
maz at kernel.org
Thu Apr 10 00:19:16 PDT 2025
On Thu, 10 Apr 2025 08:07:43 +0100,
Ganapatrao Kulkarni <gankulkarni at os.amperecomputing.com> wrote:
>
> It was discovered while trying selftest(smccc_filter) that the
> hvc trap is getting forwarded to guest hypervisor even if it is
> originated from itself.
>
> HVC traps from guest hypervisor should be handled by the host
> hypervisor and traps originating from nested VM should be
> forwarded. Adding check to forward only if the hvc is trapped
> from the nested VM.
I disagree. HVC from EL2 must be routed to the same EL2. HVC from EL1
must be routed to the EL2 controlling EL1.
In no circumstances should HVC from a NV guest be directly handled by
the host hypervisor. That's what SMC is for.
Please read the pseudocode for HVC.
M.
--
Without deviation from the norm, progress is not possible.
More information about the linux-arm-kernel
mailing list