From: Oliver Upton <oliver.upton@linux.dev>
To: Marc Zyngier <maz@kernel.org>
Cc: Raghavendra Rao Ananta <rananta@google.com>,
Mingwei Zhang <mizhang@google.com>,
linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH v3 3/4] KVM: arm64: Introduce attribute to control GICD_TYPER2.nASSGIcap
Date: Mon, 23 Jun 2025 01:40:46 -0700 [thread overview]
Message-ID: <aFkTDmj9u1ERnvHO@linux.dev> (raw)
In-Reply-To: <87frftfpg7.wl-maz@kernel.org>
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@google.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
next prev parent reply other threads:[~2025-06-23 8:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-13 15:52 [PATCH v3 0/4] KVM: arm64: Add attribute to control GICD_TYPER2.nASSGIcap Raghavendra Rao Ananta
2025-06-13 15:52 ` [PATCH v3 1/4] KVM: arm64: Disambiguate support for vSGIs v. vLPIs Raghavendra Rao Ananta
2025-06-13 15:52 ` [PATCH v3 2/4] KVM: arm64: vgic-v3: Consolidate MAINT_IRQ handling Raghavendra Rao Ananta
2025-06-13 15:52 ` [PATCH v3 3/4] KVM: arm64: Introduce attribute to control GICD_TYPER2.nASSGIcap Raghavendra Rao Ananta
2025-06-21 8:50 ` Marc Zyngier
2025-06-23 8:40 ` Oliver Upton [this message]
2025-06-23 9:05 ` Marc Zyngier
[not found] ` <aFkdofSolis53JgO@linux.dev>
2025-06-23 14:37 ` Marc Zyngier
2025-06-13 15:52 ` [PATCH v3 4/4] KVM: arm64: selftests: Add test for nASSGIcap attribute Raghavendra Rao Ananta
2025-06-13 20:53 ` [PATCH v3 0/4] KVM: arm64: Add attribute to control GICD_TYPER2.nASSGIcap Oliver Upton
2025-06-13 21:25 ` Raghavendra Rao Ananta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aFkTDmj9u1ERnvHO@linux.dev \
--to=oliver.upton@linux.dev \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=mizhang@google.com \
--cc=rananta@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).