Message ID | 20221027190913.65413-1-ayankuma@amd.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [XEN,v1] xen/arm: vGICv3: Restore the interrupt state correctly | expand |
On Thu, 27 Oct 2022 20:09:13 +0100 Ayan Kumar Halder <ayankuma@amd.com> wrote: Hi, > As "spin_lock_irqsave(&v->arch.vgic.lock, flags)" saves the current interrupt > state in "flags", "spin_unlock_irqrestore(&v->arch.vgic.lock, flags)" should be > used to restore the saved interrupt state. > > Fixes: fe7fa1332dabd9ce4 ("ARM: vGICv3: handle virtual LPI pending and property tables") > Signed-off-by: Ayan Kumar Halder <ayankuma@amd.com> Thanks for fixing this! Reviewed-by: Andre Przywara <andre.przywara@arm.com> Cheers, Andre > --- > xen/arch/arm/vgic-v3.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/xen/arch/arm/vgic-v3.c b/xen/arch/arm/vgic-v3.c > index d0e265634e..015446be17 100644 > --- a/xen/arch/arm/vgic-v3.c > +++ b/xen/arch/arm/vgic-v3.c > @@ -582,7 +582,7 @@ static int __vgic_v3_rdistr_rd_mmio_write(struct vcpu *v, mmio_info_t *info, > write_atomic(&v->arch.vgic.rdist_pendbase, reg); > } > > - spin_unlock_irqrestore(&v->arch.vgic.lock, false); > + spin_unlock_irqrestore(&v->arch.vgic.lock, flags); > > return 1; > }
Hi Ayan, > On 27 Oct 2022, at 20:09, Ayan Kumar Halder <ayankuma@amd.com> wrote: > > As "spin_lock_irqsave(&v->arch.vgic.lock, flags)" saves the current interrupt > state in "flags", "spin_unlock_irqrestore(&v->arch.vgic.lock, flags)" should be > used to restore the saved interrupt state. > > Fixes: fe7fa1332dabd9ce4 ("ARM: vGICv3: handle virtual LPI pending and property tables") > Signed-off-by: Ayan Kumar Halder <ayankuma@amd.com> Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com> This is definitely a bug fix candidate for 4.17 !! Cheers Bertrand > --- > xen/arch/arm/vgic-v3.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/xen/arch/arm/vgic-v3.c b/xen/arch/arm/vgic-v3.c > index d0e265634e..015446be17 100644 > --- a/xen/arch/arm/vgic-v3.c > +++ b/xen/arch/arm/vgic-v3.c > @@ -582,7 +582,7 @@ static int __vgic_v3_rdistr_rd_mmio_write(struct vcpu *v, mmio_info_t *info, > write_atomic(&v->arch.vgic.rdist_pendbase, reg); > } > > - spin_unlock_irqrestore(&v->arch.vgic.lock, false); > + spin_unlock_irqrestore(&v->arch.vgic.lock, flags); > > return 1; > } > -- > 2.17.1 >
Hi, On 27/10/2022 21:53, Andre Przywara wrote: > On Thu, 27 Oct 2022 20:09:13 +0100 > Ayan Kumar Halder <ayankuma@amd.com> wrote: > > Hi, > >> As "spin_lock_irqsave(&v->arch.vgic.lock, flags)" saves the current interrupt >> state in "flags", "spin_unlock_irqrestore(&v->arch.vgic.lock, flags)" should be >> used to restore the saved interrupt state. >> >> Fixes: fe7fa1332dabd9ce4 ("ARM: vGICv3: handle virtual LPI pending and property tables") >> Signed-off-by: Ayan Kumar Halder <ayankuma@amd.com> > > Thanks for fixing this! > > Reviewed-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Julien Grall <jgrall@amazon.com> Henry, this is fixing a bug in the ITS. The feature is at the moment experiement and the code is not used by other subystem, so technically not necessary for 4.17. But if you still accept any bug fix (I know we are close to the release), then I would like to request to include. It should be risk free. Cheers, Cheers,
Hi Julien, > -----Original Message----- > From: Julien Grall <julien@xen.org> > Sent: Friday, October 28, 2022 4:56 PM > To: Andre Przywara <Andre.Przywara@arm.com>; Ayan Kumar Halder > <ayankuma@amd.com> > Cc: xen-devel@lists.xenproject.org; sstabellini@kernel.org; > stefanos@xilinx.com; Volodymyr_Babchuk@epam.com; Bertrand Marquis > <Bertrand.Marquis@arm.com>; Henry Wang <Henry.Wang@arm.com> > Subject: [for-4.17] Re: [XEN v1] xen/arm: vGICv3: Restore the interrupt state > correctly > > Hi, > > On 27/10/2022 21:53, Andre Przywara wrote: > > On Thu, 27 Oct 2022 20:09:13 +0100 > > Ayan Kumar Halder <ayankuma@amd.com> wrote: > > > > Hi, > > > >> As "spin_lock_irqsave(&v->arch.vgic.lock, flags)" saves the current > interrupt > >> state in "flags", "spin_unlock_irqrestore(&v->arch.vgic.lock, flags)" should > be > >> used to restore the saved interrupt state. > >> > >> Fixes: fe7fa1332dabd9ce4 ("ARM: vGICv3: handle virtual LPI pending and > property tables") > >> Signed-off-by: Ayan Kumar Halder <ayankuma@amd.com> > > > > Thanks for fixing this! > > > > Reviewed-by: Andre Przywara <andre.przywara@arm.com> > > Acked-by: Julien Grall <jgrall@amazon.com> > > Henry, this is fixing a bug in the ITS. The feature is at the moment > experiement and the code is not used by other subystem, so technically > not necessary for 4.17. But if you still accept any bug fix (I know we > are close to the release), then I would like to request to include. It > should be risk free. Yeah, of course. Release-acked-by: Henry Wang <Henry.Wang@arm.com> Kind regards, Henry > > Cheers, > > Cheers, > > -- > Julien Grall
diff --git a/xen/arch/arm/vgic-v3.c b/xen/arch/arm/vgic-v3.c index d0e265634e..015446be17 100644 --- a/xen/arch/arm/vgic-v3.c +++ b/xen/arch/arm/vgic-v3.c @@ -582,7 +582,7 @@ static int __vgic_v3_rdistr_rd_mmio_write(struct vcpu *v, mmio_info_t *info, write_atomic(&v->arch.vgic.rdist_pendbase, reg); } - spin_unlock_irqrestore(&v->arch.vgic.lock, false); + spin_unlock_irqrestore(&v->arch.vgic.lock, flags); return 1; }
As "spin_lock_irqsave(&v->arch.vgic.lock, flags)" saves the current interrupt state in "flags", "spin_unlock_irqrestore(&v->arch.vgic.lock, flags)" should be used to restore the saved interrupt state. Fixes: fe7fa1332dabd9ce4 ("ARM: vGICv3: handle virtual LPI pending and property tables") Signed-off-by: Ayan Kumar Halder <ayankuma@amd.com> --- xen/arch/arm/vgic-v3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)