All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Upton <oliver.upton@linux.dev>
To: Ben Horgan <ben.horgan@arm.com>
Cc: kvmarm@lists.linux.dev, Marc Zyngier <maz@kernel.org>,
	Joey Gouly <joey.gouly@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Zenghui Yu <yuzenghui@huawei.com>,
	Raghavendra Rao Ananta <rananta@google.com>,
	Zhou Wang <wangzhou1@hisilicon.com>
Subject: Re: [PATCH v4 1/6] KVM: arm64: Disambiguate support for vSGIs v. vLPIs
Date: Thu, 10 Jul 2025 09:22:47 -0700	[thread overview]
Message-ID: <aG_o11qaUwJYfvfE@linux.dev> (raw)
In-Reply-To: <e421874a-322b-4da1-9fe9-f3a94e9036f5@arm.com>

On Thu, Jul 10, 2025 at 09:59:14AM +0100, Ben Horgan wrote:
> Hi Oliver,
> 
> On 7/9/25 22:14, Oliver Upton wrote:
> > vgic_supports_direct_msis() is a bit of a misnomer, as it returns true
> > if either vSGIs or vLPIs are supported. Pick it apart into a few
> > predicates and replace some open-coded checks for vSGIs.
> > 
> > Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
> > ---
> >   arch/arm64/kvm/vgic/vgic-init.c    |  4 ++--
> >   arch/arm64/kvm/vgic/vgic-mmio-v3.c | 16 ++++++++++------
> >   arch/arm64/kvm/vgic/vgic-v4.c      |  4 ++--
> >   arch/arm64/kvm/vgic/vgic.c         |  4 ++--
> >   arch/arm64/kvm/vgic/vgic.h         |  7 +++++++
> >   5 files changed, 23 insertions(+), 12 deletions(-)
> > 
> [snip]
> >   		/* Dist stays enabled? nASSGIreq is RO */
> > @@ -133,7 +137,7 @@ static void vgic_mmio_write_v3_misc(struct kvm_vcpu *vcpu,
> >   		if (is_hwsgi != dist->nassgireq)
> >   			vgic_v4_configure_vsgis(vcpu->kvm);
> > -		if (kvm_vgic_global_state.has_gicv4_1 &&
> > +		if (vgic_supports_direct_sgis(vcpu->kvm) &&
> >   		    was_enabled != dist->enabled)
> >   			kvm_make_all_cpus_request(vcpu->kvm, KVM_REQ_RELOAD_GICv4);
> >   		else if (!was_enabled && dist->enabled)
> > @@ -178,7 +182,7 @@ static int vgic_mmio_uaccess_write_v3_misc(struct kvm_vcpu *vcpu,
> >   		}
> >   	case GICD_CTLR:
> >   		/* Not a GICv4.1? No HW SGIs */
> > -		if (!kvm_vgic_global_state.has_gicv4_1)
> > +		if (vgic_supports_direct_sgis(vcpu->kvm))
> Missing negation.

Oops, very well spotted. Thanks Ben!

Thanks,
Oliver

  reply	other threads:[~2025-07-10 16:22 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-09 21:14 [PATCH v4 0/6] KVM: arm64: Allow userspace to write GICD_TYPER2.nASSGIcap Oliver Upton
2025-07-09 21:14 ` [PATCH v4 1/6] KVM: arm64: Disambiguate support for vSGIs v. vLPIs Oliver Upton
2025-07-10  8:59   ` Ben Horgan
2025-07-10 16:22     ` Oliver Upton [this message]
2025-07-14 10:20   ` Eric Auger
2025-07-22 21:36     ` Oliver Upton
2025-07-09 21:14 ` [PATCH v4 2/6] KVM: arm64: vgic-v3: Consolidate MAINT_IRQ handling Oliver Upton
2025-07-14 12:52   ` Eric Auger
2025-07-14 12:59     ` Eric Auger
2025-07-22 21:42     ` Oliver Upton
2025-07-09 21:14 ` [PATCH v4 3/6] KVM: arm64: vgic-v3: Allow access to GICD_IIDR prior to initialization Oliver Upton
2025-07-14 14:41   ` Eric Auger
2025-07-22 21:47     ` Oliver Upton
2025-08-21 10:55   ` Zhou Wang
2025-08-21 18:43     ` Oliver Upton
2025-08-22  1:54       ` Zhou Wang
2025-07-09 21:14 ` [PATCH v4 4/6] KVM: arm64: vgic-v3: Allow userspace to write GICD_TYPER2.nASSGIcap Oliver Upton
2025-07-14 14:58   ` Eric Auger
2025-07-09 21:14 ` [PATCH v4 5/6] KVM: arm64: selftests: Add test for nASSGIcap attribute Oliver Upton
2025-07-14 15:03   ` Eric Auger
2025-07-09 21:14 ` [PATCH v4 6/6] Documentation: KVM: arm64: Describe VGICv3 registers writable pre-init Oliver Upton
2025-07-14 15:06   ` Eric Auger
2025-07-22 21:50     ` Oliver Upton

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=aG_o11qaUwJYfvfE@linux.dev \
    --to=oliver.upton@linux.dev \
    --cc=ben.horgan@arm.com \
    --cc=joey.gouly@arm.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=maz@kernel.org \
    --cc=rananta@google.com \
    --cc=suzuki.poulose@arm.com \
    --cc=wangzhou1@hisilicon.com \
    --cc=yuzenghui@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.