xen/arm: vGICv3: Restore the interrupt state correctly
PATCH 1/1 xen/arm: vGICv3: Restore the interrupt state correctly
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.
--- xen/arch/arm/vgic-v3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/arm/vgic-v3.c +1 -1
@@ -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 ; }
Signature · 1 line
2.17.1
On Thu, 27 Oct 2022 20:09:13 +0100
Ayan Kumar Halder <[email protected]> wrote:
Hi,
Quoted 6 lines
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 <[email protected]>
Thanks for fixing this!
Cheers,
Andre
Quoted 17 lines
--- xen/arch/arm/vgic-v3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)xen/arch/arm/vgic-v3.c +1
-1@@ -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,
Quoted 8 lines · Ayan Kumar Halder
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 <[email protected]>
This is definitely a bug fix candidate for 4.17 !!
Cheers
Bertrand
Quoted 20 lines
---
xen/arch/arm/vgic-v3.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)xen/arch/arm/vgic-v3.c +1
-1@@ -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 ; }Signature · 1 line
2.17.1
Julien Grall
Acked-byHi,
Quoted 9 lines · Andre Przywara
On Thu, 27 Oct 2022 20:09:13 +0100
Ayan Kumar Halder <[email protected]> wrote:Hi,
Quoted 4 lines
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.
Quoted 6 lines
Quoted 2 lines
Fixes fe7fa1332dabd9ce4 ("ARM: vGICv3: handle virtual LPI pending and property tables")Signed-off-by Ayan Kumar Halder <[email protected]>Thanks for fixing this!
Reviewed-by Andre Przywara <[email protected]>
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,
Signature · 1 line
Julien Grall
Hi Julien,
Quoted 33 lines
-----Original Message-----
From: Julien Grall <[email protected]>
Sent: Friday, October 28, 2022 4:56 PM
To: Andre Przywara <[email protected]>; Ayan Kumar Halder <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; Bertrand Marquis <[email protected]>; Henry Wang <[email protected]>
Subject: [for-4.17] Re: [XEN v1] xen/arm: vGICv3: Restore the interrupt state correctlyHi,
Quoted 6 lines · Andre Przywara
On Thu, 27 Oct 2022 20:09:13 +0100
Ayan Kumar Halder <[email protected]> wrote:Hi,
Quoted 1 line
As "
spin_lock_irqsave(&v->arch.vgic.lock, flags)" saves the currentinterrupt
Quoted 1 line
Quoted 1 line
state in "flags", "
spin_unlock_irqrestore(&v->arch.vgic.lock, flags)" shouldbe
Quoted 3 lines
Quoted 3 lines
used to restore the saved interrupt state.
Fixes fe7fa1332dabd9ce4 ("ARM: vGICv3: handle virtual LPI pending andproperty tables")
Quoted 5 lines
Quoted 1 line
Signed-off-by Ayan Kumar Halder <[email protected]>Thanks for fixing this!
Reviewed-by Andre Przywara <[email protected]>
Quoted 7 lines
Acked-by Julien Grall <[email protected]>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.
Kind regards,
Henry
Quoted 7 lines
Cheers,
Cheers,
--
Julien Grall