Re: [PATCH v3 28/32] KVM: arm64: GICv4.1: Add direct injection capability to SGI registers
From: Marc Zyngier
Date: Sat Dec 28 2019 - 06:13:10 EST
On Sat, 28 Dec 2019 17:19:36 +0800
Zenghui Yu <yuzenghui@xxxxxxxxxx> wrote:
> Hi Marc,
>
> On 2019/12/24 19:10, Marc Zyngier wrote:
> > Most of the GICv3 emulation code that deals with SGIs now has to be
> > aware of the v4.1 capabilities in order to benefit from it.
> >
> > Add such support, keyed on the interrupt having the hw flag set and
> > being a SGI.
> >
> > Signed-off-by: Marc Zyngier <maz@xxxxxxxxxx>
> > ---
>
> > diff --git a/virt/kvm/arm/vgic/vgic-mmio.c b/virt/kvm/arm/vgic/vgic-mmio.c
> > index 0d090482720d..6ebf747a7806 100644
> > --- a/virt/kvm/arm/vgic/vgic-mmio.c
> > +++ b/virt/kvm/arm/vgic/vgic-mmio.c
> > @@ -290,6 +345,20 @@ void vgic_mmio_write_cpending(struct kvm_vcpu *vcpu,
> > > raw_spin_lock_irqsave(&irq->irq_lock, flags);
> > > + if (irq->hw && vgic_irq_is_sgi(irq->intid)) {
> > + /* HW SGI? Ask the GIC to inject it */
>
> Shouldn't this be "Ask the GIC to clear its pending state"?
yeah, a silly copy-paste mistake, thanks for spotting this!
> Otherwise looks good!
Thanks for taking the time to review this work!
M.
--
Jazz is not dead. It just smells funny...