Message ID | 20180522174254.27551-4-julien.grall@arm.com |
---|---|
State | Superseded |
Headers | show |
Series | xen/arm: SSBD (aka Spectre-v4) mitigation (XSA-263) | expand |
On Tue, 22 May 2018, Julien Grall wrote: > Some errata will rely on the SMCCC version which is detected by > psci_init(). > > This is part of XSA-263. > > Signed-off-by: Julien Grall <julien.grall@arm.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> > --- > xen/arch/arm/setup.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c > index 1d6f6bf37e..ac93de4786 100644 > --- a/xen/arch/arm/setup.c > +++ b/xen/arch/arm/setup.c > @@ -171,8 +171,6 @@ static void __init processor_id(void) > } > > processor_setup(); > - > - check_local_cpu_errata(); > } > > void dt_unreserved_regions(paddr_t s, paddr_t e, > @@ -779,6 +777,12 @@ void __init start_xen(unsigned long boot_phys_offset, > printk(XENLOG_INFO "SMP: Allowing %u CPUs\n", cpus); > nr_cpu_ids = cpus; > > + /* > + * Some errata relies on SMCCC version which is detected by psci_init() > + * (called from smp_init_cpus()). > + */ > + check_local_cpu_errata(); > + > init_xen_time(); > > gic_init(); > -- > 2.11.0 >
Hi Stefano, On 05/23/2018 10:34 PM, Stefano Stabellini wrote: > On Tue, 22 May 2018, Julien Grall wrote: >> Some errata will rely on the SMCCC version which is detected by >> psci_init(). >> >> This is part of XSA-263. >> >> Signed-off-by: Julien Grall <julien.grall@arm.com> > > Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Thank you for the review. On an internal review Andre's suggested to move psci_init() outside smp_init_cpus(). Something like: processor_id(); /* Need PSCI version for firmware based errata workarounds */ psci_init(); check_local_cpu_errata(); smp_init_cpus(); I am wondering whether it would be clearer to have. What do you think? Cheers, > >> --- >> xen/arch/arm/setup.c | 8 ++++++-- >> 1 file changed, 6 insertions(+), 2 deletions(-) >> >> diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c >> index 1d6f6bf37e..ac93de4786 100644 >> --- a/xen/arch/arm/setup.c >> +++ b/xen/arch/arm/setup.c >> @@ -171,8 +171,6 @@ static void __init processor_id(void) >> } >> >> processor_setup(); >> - >> - check_local_cpu_errata(); >> } >> >> void dt_unreserved_regions(paddr_t s, paddr_t e, >> @@ -779,6 +777,12 @@ void __init start_xen(unsigned long boot_phys_offset, >> printk(XENLOG_INFO "SMP: Allowing %u CPUs\n", cpus); >> nr_cpu_ids = cpus; >> >> + /* >> + * Some errata relies on SMCCC version which is detected by psci_init() >> + * (called from smp_init_cpus()). >> + */ >> + check_local_cpu_errata(); >> + >> init_xen_time(); >> >> gic_init(); >> -- >> 2.11.0 >>
On Fri, 25 May 2018, Julien Grall wrote: > Hi Stefano, > > On 05/23/2018 10:34 PM, Stefano Stabellini wrote: > > On Tue, 22 May 2018, Julien Grall wrote: > > > Some errata will rely on the SMCCC version which is detected by > > > psci_init(). > > > > > > This is part of XSA-263. > > > > > > Signed-off-by: Julien Grall <julien.grall@arm.com> > > > > Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> > > Thank you for the review. On an internal review Andre's suggested to move > psci_init() outside smp_init_cpus(). Something like: > > processor_id(); > > /* Need PSCI version for firmware based errata workarounds */ > psci_init(); > > check_local_cpu_errata(); > > smp_init_cpus(); > > I am wondering whether it would be clearer to have. What do you think? That also works. I am fine either way, they both look OK to me. > > > > > > --- > > > xen/arch/arm/setup.c | 8 ++++++-- > > > 1 file changed, 6 insertions(+), 2 deletions(-) > > > > > > diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c > > > index 1d6f6bf37e..ac93de4786 100644 > > > --- a/xen/arch/arm/setup.c > > > +++ b/xen/arch/arm/setup.c > > > @@ -171,8 +171,6 @@ static void __init processor_id(void) > > > } > > > processor_setup(); > > > - > > > - check_local_cpu_errata(); > > > } > > > void dt_unreserved_regions(paddr_t s, paddr_t e, > > > @@ -779,6 +777,12 @@ void __init start_xen(unsigned long boot_phys_offset, > > > printk(XENLOG_INFO "SMP: Allowing %u CPUs\n", cpus); > > > nr_cpu_ids = cpus; > > > + /* > > > + * Some errata relies on SMCCC version which is detected by > > > psci_init() > > > + * (called from smp_init_cpus()). > > > + */ > > > + check_local_cpu_errata(); > > > + > > > init_xen_time(); > > > gic_init(); > > > -- > > > 2.11.0 > > > > > -- > Julien Grall >
Hi Stefano, On 05/29/2018 10:30 PM, Stefano Stabellini wrote: > On Fri, 25 May 2018, Julien Grall wrote: >> Hi Stefano, >> >> On 05/23/2018 10:34 PM, Stefano Stabellini wrote: >>> On Tue, 22 May 2018, Julien Grall wrote: >>>> Some errata will rely on the SMCCC version which is detected by >>>> psci_init(). >>>> >>>> This is part of XSA-263. >>>> >>>> Signed-off-by: Julien Grall <julien.grall@arm.com> >>> >>> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> >> >> Thank you for the review. On an internal review Andre's suggested to move >> psci_init() outside smp_init_cpus(). Something like: >> >> processor_id(); >> >> /* Need PSCI version for firmware based errata workarounds */ >> psci_init(); >> >> check_local_cpu_errata(); >> >> smp_init_cpus(); >> >> I am wondering whether it would be clearer to have. What do you think? > > That also works. I am fine either way, they both look OK to me. I will keep the current version then. Cheers, > > >> >>> >>>> --- >>>> xen/arch/arm/setup.c | 8 ++++++-- >>>> 1 file changed, 6 insertions(+), 2 deletions(-) >>>> >>>> diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c >>>> index 1d6f6bf37e..ac93de4786 100644 >>>> --- a/xen/arch/arm/setup.c >>>> +++ b/xen/arch/arm/setup.c >>>> @@ -171,8 +171,6 @@ static void __init processor_id(void) >>>> } >>>> processor_setup(); >>>> - >>>> - check_local_cpu_errata(); >>>> } >>>> void dt_unreserved_regions(paddr_t s, paddr_t e, >>>> @@ -779,6 +777,12 @@ void __init start_xen(unsigned long boot_phys_offset, >>>> printk(XENLOG_INFO "SMP: Allowing %u CPUs\n", cpus); >>>> nr_cpu_ids = cpus; >>>> + /* >>>> + * Some errata relies on SMCCC version which is detected by >>>> psci_init() >>>> + * (called from smp_init_cpus()). >>>> + */ >>>> + check_local_cpu_errata(); >>>> + >>>> init_xen_time(); >>>> gic_init(); >>>> -- >>>> 2.11.0 >>>> >> >> -- >> Julien Grall >>
diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c index 1d6f6bf37e..ac93de4786 100644 --- a/xen/arch/arm/setup.c +++ b/xen/arch/arm/setup.c @@ -171,8 +171,6 @@ static void __init processor_id(void) } processor_setup(); - - check_local_cpu_errata(); } void dt_unreserved_regions(paddr_t s, paddr_t e, @@ -779,6 +777,12 @@ void __init start_xen(unsigned long boot_phys_offset, printk(XENLOG_INFO "SMP: Allowing %u CPUs\n", cpus); nr_cpu_ids = cpus; + /* + * Some errata relies on SMCCC version which is detected by psci_init() + * (called from smp_init_cpus()). + */ + check_local_cpu_errata(); + init_xen_time(); gic_init();
Some errata will rely on the SMCCC version which is detected by psci_init(). This is part of XSA-263. Signed-off-by: Julien Grall <julien.grall@arm.com> --- xen/arch/arm/setup.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)