xen/arm: gic-v3: Fix wake-up loop in gicv3_enable_redist
cover xen/arm: gic-v3: Fix wake-up loop in gicv3_enable_redist
From: "Edgar E. Iglesias" <[email protected]>
Hi,
I ran into this issue with a poll loop in gicv3_enable_redist while exploring QEMU fault-injection techniques in the context of safety certification.
Cheers,
Edgar
Edgar E. Iglesias (1):
xen/arm: gic-v3: Fix wake-up loop in gicv3_enable_redist
xen/arch/arm/gic-v3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
2.43.0
PATCH 1/1 xen/arm: gic-v3: Fix wake-up loop in gicv3_enable_redist
From: "Edgar E. Iglesias" <[email protected]>
timeout starts as false and is only set on the timeout break, so the loop always exits after one iteration and a stuck redistributor is silently treated as woken. Use while ( 1 ) to match the sibling gicv3_do_wait_for_rwp().
--- xen/arch/arm/gic-v3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/arm/gic-v3.c +1 -1
@@ -828,7 +828,7 @@ static int gicv3_enable_redist(void) }cpu_relax ();udelay (1 ); - }while ( timeout ); + }while (1 );if ( timeout ) {
Signature · 1 line
2.43.0
Quoted 9 lines · Edgar E. Iglesias
From: "Edgar E. Iglesias" <[email protected]>
timeout starts as false and is only set on the timeout break, so the loop always exits after one iteration and a stuck redistributor is silently treated as woken. Use while ( 1 ) to match the sibling
gicv3_do_wait_for_rwp().Fixes bc183a0235 ("xen/arm: Add support for GIC v3")Signed-off-by Edgar E. Iglesias <[email protected]>
Quoted 20 lines
--- xen/arch/arm/gic-v3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)xen/arch/arm/gic-v3.c +1
-1@@ -828,7 +828,7 @@ static int gicv3_enable_redist(void) }cpu_relax ();udelay (1 ); - }while ( timeout ); + }while (1 );if ( timeout ) {Signature · 1 line
2.43.0
Hi all,
I think this issue is already covered by Luca's patch, currently under review:
xen/arm: gic-v3: Fix redistributor wakeup polling
Best regards,
Mykola
Quoted 36 lines · Stefano Stabellini
Quoted 9 lines · Edgar E. Iglesias
From: "Edgar E. Iglesias" <[email protected]>
timeout starts as false and is only set on the timeout break, so the loop always exits after one iteration and a stuck redistributor is silently treated as woken. Use while ( 1 ) to match the sibling
gicv3_do_wait_for_rwp().Fixes bc183a0235 ("xen/arm: Add support for GIC v3")Signed-off-by Edgar E. Iglesias <[email protected]>Reviewed-by Stefano Stabellini <[email protected]>Quoted 20 lines
--- xen/arch/arm/gic-v3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)xen/arch/arm/gic-v3.c +1
-2@@ -828,7 +828,7 @@ static int gicv3_enable_redist(void) }cpu_relax ();udelay (1 ); - }while ( timeout ); + }while (1 );if ( timeout ) { --2.43.0