Subject: Re: [PATCH v6 13/39] KVM: arm64: gic-v5: Add emulation for ICC_IAFFIDR_EL1 accesses

From: Jonathan Cameron <[email-masked]>
Date: Thu, 19 Mar 2026 10:34:57 +0000

On Tue, 17 Mar 2026 11:43:18 +0000
Sascha Bischoff <[email-masked]> wrote:

> GICv5 doesn't provide an ICV_IAFFIDR_EL1 or ICH_IAFFIDR_EL2 for
> providing the IAFFID to the guest. A guest access to the
> ICC_IAFFIDR_EL1 must therefore be trapped and emulated to avoid the
> guest accessing the host's ICC_IAFFIDR_EL1.
> 
> The virtual IAFFID is provided to the guest when it reads
> ICC_IAFFIDR_EL1 (which always traps back to the hypervisor). Writes are
> rightly ignored. KVM treats the GICv5 VPEID, the virtual IAFFID, and
> the vcpu_id as the same, and so the vcpu_id is returned.
> 
> The trapping for the ICC_IAFFIDR_EL1 is always enabled when in a guest
> context.
> 
> Co-authored-by: Timothy Hayes <[email-masked]>
> Signed-off-by: Timothy Hayes <[email-masked]>
> Signed-off-by: Sascha Bischoff <[email-masked]>
Reviewed-by: Jonathan Cameron <[email-masked]>