[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aFkTDmj9u1ERnvHO@linux.dev>
Date: Mon, 23 Jun 2025 01:40:46 -0700
From: Oliver Upton <oliver.upton@...ux.dev>
To: Marc Zyngier <maz@...nel.org>
Cc: Raghavendra Rao Ananta <rananta@...gle.com>,
Mingwei Zhang <mizhang@...gle.com>,
linux-arm-kernel@...ts.infradead.org, kvmarm@...ts.linux.dev,
linux-kernel@...r.kernel.org, kvm@...r.kernel.org
Subject: Re: [PATCH v3 3/4] KVM: arm64: Introduce attribute to control
GICD_TYPER2.nASSGIcap
On Sat, Jun 21, 2025 at 09:50:48AM +0100, Marc Zyngier wrote:
> On Fri, 13 Jun 2025 16:52:37 +0100, Raghavendra Rao Ananta <rananta@...gle.com> wrote:
> > @@ -683,8 +714,14 @@ static int vgic_v3_has_attr(struct kvm_device *dev,
> > return 0;
> > case KVM_DEV_ARM_VGIC_SAVE_PENDING_TABLES:
> > return 0;
> > + default:
> > + return -ENXIO;
> > }
> > + case KVM_DEV_ARM_VGIC_GRP_FEATURES:
> > + return attr->attr != KVM_DEV_ARM_VGIC_FEATURE_nASSGIcap ?
> > + -ENXIO : 0;
>
> Do we really want to advertise KVM_DEV_ARM_VGIC_FEATURE_nASSGIcap even
> when we don't have GICv4.1? This seems rather odd. My take on this API
> is that this should report whether the feature is configurable, making
> it backward compatible with older versions of KVM.
So this was because of me, as I wanted nASSGIcap to behave exactly like
the ID registers. I do think exposing the capability unconditionally is
useful, as otherwise there's no way to definitively say whether or not
the underlying platform supports GICv4.1.
KVM_HAS_DEVICE_ATTR can't be used alone for probing since old kernels
use GICv4.1 but don't expose the attribute.
Does that make sense?
Thanks,
Oliver
Powered by blists - more mailing lists