[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH for-4.22] xen/arm: derive GIC CPU interface ID fields from the vGIC
On 7/10/26 11:31 AM, Mykola Kvach wrote:
Xen exposes ID_AA64PFR0_EL1.GIC and ID_PFR1.GIC from
domain_cpuinfo, which is initialized from the sanitized host CPU feature
state. This does not necessarily match the virtual interrupt controller
configured for a domain.
On a GICv3 or newer host, a vGICv2 domain can observe a nonzero GIC
field even though Xen disables EL1 access to the GIC CPU system register
interface for that domain. On a GICv4.1 host, a vGICv3 domain can
observe encoding 0b0011, which advertises GICv4.1 CPU interface support
that Xen's vGICv3 model does not expose.
Derive both fields from d->arch.vgic.version in every trap path. Expose
0b0000 for vGICv2 and 0b0001 for vGICv3. This covers
ID_AA64PFR0_EL1 and the ID_PFR1_EL1 alias in AArch64 state, as well as
ID_PFR1 accessed through CP15 in AArch32 state.
This is consistent with KVM, which derives both ID fields from the
configured virtual GIC model.
Fixes: 07b9acea116e ("xen/arm: Add handler for ID registers on arm64")
Fixes: 8f81064a07c6 ("xen/arm: Add handler for cp15 ID registers")
Signed-off-by: Mykola Kvach <mykola_kvach@xxxxxxxx>
---
Considering that patches mentioned in Fixes are from 2020 it doesn't
like that the bug is too critical unless maintainers tell that we have
to take it I think it would be better to postpone the patch until 4.22
release.
Thanks.
~ Oleksii
|