[PATCH] xen/arm: print update firmware only once

Bertrand Marquis posted 1 patch 3 years, 6 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/xen tags/patchew/09d04b34e6b3b77ac206a42657b1b4116e7e11f3.1602068661.git.bertrand.marquis@arm.com
Maintainers: Julien Grall <julien@xen.org>, Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>, Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/cpuerrata.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] xen/arm: print update firmware only once
Posted by Bertrand Marquis 3 years, 6 months ago
Fix enable_smccc_arch_workaround_1 to only print the warning asking to
update the firmware once.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
---
 xen/arch/arm/cpuerrata.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/arm/cpuerrata.c b/xen/arch/arm/cpuerrata.c
index 6c09017515..0c63dfa779 100644
--- a/xen/arch/arm/cpuerrata.c
+++ b/xen/arch/arm/cpuerrata.c
@@ -187,7 +187,7 @@ warn:
         ASSERT(system_state < SYS_STATE_active);
         warning_add("No support for ARM_SMCCC_ARCH_WORKAROUND_1.\n"
                     "Please update your firmware.\n");
-        warned = false;
+        warned = true;
     }
 
     return 0;
-- 
2.17.1


Re: [PATCH] xen/arm: print update firmware only once
Posted by Julien Grall 3 years, 6 months ago
Hi Bertrand,

On 07/10/2020 12:05, Bertrand Marquis wrote:
> Fix enable_smccc_arch_workaround_1 to only print the warning asking to
> update the firmware once.
> 
> Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
> ---
>   xen/arch/arm/cpuerrata.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/xen/arch/arm/cpuerrata.c b/xen/arch/arm/cpuerrata.c
> index 6c09017515..0c63dfa779 100644
> --- a/xen/arch/arm/cpuerrata.c
> +++ b/xen/arch/arm/cpuerrata.c
> @@ -187,7 +187,7 @@ warn:
>           ASSERT(system_state < SYS_STATE_active);
>           warning_add("No support for ARM_SMCCC_ARCH_WORKAROUND_1.\n"
>                       "Please update your firmware.\n");
> -        warned = false;
> +        warned = true;

Thanks for spotting it. It looks like I introduced this bug in commit 
976319fa3de7f98b558c87b350699fffc278effc "xen/arm64: Kill 
PSCI_GET_VERSION as a variant-2 workaround".

I would suggest to add a fixes tag (can be done on commit).

Reviewed-by: Julien Grall <jgrall@amazon.com>

>       }
>   
>       return 0;
> 

-- 
Julien Grall

Re: [PATCH] xen/arm: print update firmware only once
Posted by Bertrand Marquis 3 years, 6 months ago

> On 7 Oct 2020, at 14:00, Julien Grall <julien@xen.org> wrote:
> 
> Hi Bertrand,
> 
> On 07/10/2020 12:05, Bertrand Marquis wrote:
>> Fix enable_smccc_arch_workaround_1 to only print the warning asking to
>> update the firmware once.
>> Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
>> ---
>>  xen/arch/arm/cpuerrata.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> diff --git a/xen/arch/arm/cpuerrata.c b/xen/arch/arm/cpuerrata.c
>> index 6c09017515..0c63dfa779 100644
>> --- a/xen/arch/arm/cpuerrata.c
>> +++ b/xen/arch/arm/cpuerrata.c
>> @@ -187,7 +187,7 @@ warn:
>>          ASSERT(system_state < SYS_STATE_active);
>>          warning_add("No support for ARM_SMCCC_ARCH_WORKAROUND_1.\n"
>>                      "Please update your firmware.\n");
>> -        warned = false;
>> +        warned = true;
> 
> Thanks for spotting it. It looks like I introduced this bug in commit 976319fa3de7f98b558c87b350699fffc278effc "xen/arm64: Kill PSCI_GET_VERSION as a variant-2 workaround".
> 
> I would suggest to add a fixes tag (can be done on commit).

If you can do it during the commit that works for me.

> 
> Reviewed-by: Julien Grall <jgrall@amazon.com>

Thanks

Cheers
Bertrand


Re: [PATCH] xen/arm: print update firmware only once
Posted by Stefano Stabellini 3 years, 6 months ago
On Wed, 7 Oct 2020, Julien Grall wrote:
> Hi Bertrand,
> 
> On 07/10/2020 12:05, Bertrand Marquis wrote:
> > Fix enable_smccc_arch_workaround_1 to only print the warning asking to
> > update the firmware once.
> > 
> > Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
> > ---
> >   xen/arch/arm/cpuerrata.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/xen/arch/arm/cpuerrata.c b/xen/arch/arm/cpuerrata.c
> > index 6c09017515..0c63dfa779 100644
> > --- a/xen/arch/arm/cpuerrata.c
> > +++ b/xen/arch/arm/cpuerrata.c
> > @@ -187,7 +187,7 @@ warn:
> >           ASSERT(system_state < SYS_STATE_active);
> >           warning_add("No support for ARM_SMCCC_ARCH_WORKAROUND_1.\n"
> >                       "Please update your firmware.\n");
> > -        warned = false;
> > +        warned = true;
> 
> Thanks for spotting it. It looks like I introduced this bug in commit
> 976319fa3de7f98b558c87b350699fffc278effc "xen/arm64: Kill PSCI_GET_VERSION as
> a variant-2 workaround".
> 
> I would suggest to add a fixes tag (can be done on commit).
> 
> Reviewed-by: Julien Grall <jgrall@amazon.com>

Acked-by: Stefano Stabellini <sstabellini@kernel.org>