Re: [PATCH v2 3/6] KVM: arm64: Allow userspace to inject external instruction aborts
From: Oliver Upton
Date: Fri Jul 11 2025 - 15:42:46 EST
On Wed, Jun 04, 2025 at 05:08:58AM +0000, Jiaqi Yan wrote:
> From: Raghavendra Rao Ananta <rananta@xxxxxxxxxx>
>
> When KVM returns to userspace for KVM_EXIT_ARM_SEA, the userspace is
> encouraged to inject the abort into the guest via KVM_SET_VCPU_EVENTS.
>
> KVM_SET_VCPU_EVENTS currently only allows injecting external data aborts.
> However, the synchronous external abort that caused KVM_EXIT_ARM_SEA
> is possible to be an instruction abort. Userspace is already able to
> tell if an abort is due to data or instruction via kvm_run.arm_sea.esr,
> by checking its Exception Class value.
>
> Extend the KVM_SET_VCPU_EVENTS ioctl to allow injecting instruction
> abort into the guest.
>
> Signed-off-by: Raghavendra Rao Ananta <rananta@xxxxxxxxxx>
> Signed-off-by: Jiaqi Yan <jiaqiyan@xxxxxxxxxx>
Hmm. Since we expose an ESR value to userspace I get the feeling that we
should allow the user to supply an ISS for the external abort, similar
to what we already do for SErrors.
Thanks,
Oliver