[PATCH 3/3] KVM: arm64: Drop open-coded GIC idreg sanitisation
Fuad Tabba
fuad.tabba at linux.dev
Tue Nov 24 04:02:56 PST 2026
Hi Marc,
On Tue, 24 Nov 2026 10:50:11 +0000, Marc Zyngier <maz at kernel.org> wrote:
[...]
> However, I want to know whether this change is an acceptable behaviour
> or not *from an ABI perspective*. We have several options:
>
> (1) delay all idreg enforcement to the same (late) point
>
> (2) keep things as currently done, meaning that the GIC fields are
> special and sanitised at a different time
>
> (3) say that idregs can change at any point if you change the
> configuration of the system, such as creating a GIC
>
> I'd be tempted to go with either (1) or (3). (2) feels like a total
> bodge.
(3) works. The GIC fields can already change when userspace creates
the vGIC. The final ID_AA64MMFR3_EL1 only depends on the order if
userspace sets S1PIE or S1POE without the features they imply, creates
the vGIC, then sets those features.
(1) changes one thing afaict. A VMM that saves the ID registers
between creating the vGIC and the first run, and writes them back once
the VM has run, would get -EBUSY where the vGIC's GIC fields differ
from their reset value. QEMU and crosvm copy the registers as a block,
but I don't know if either ever does that.
Reviewed-by: Fuad Tabba <fuad.tabba at linux.dev>
Cheers,
/fuad
More information about the linux-arm-kernel
mailing list