Re: [PATCH CPU v1] cpuid: initialize cpuinfo with boot_cpu_data

2022-02-11 Thread Roger Pau Monné
On Fri, Feb 11, 2022 at 12:42:11PM +0100, Jan Beulich wrote: > On 11.02.2022 12:19, Roger Pau Monné wrote: > > On Fri, Feb 11, 2022 at 11:50:46AM +0100, Jan Beulich wrote: > >> On 11.02.2022 11:47, Roger Pau Monné wrote: > >>> On Fri, Feb 11, 2022 at 11:32:45AM +0100, Jan Beulich wrote: > On 1

Re: [PATCH CPU v1] cpuid: initialize cpuinfo with boot_cpu_data

2022-02-11 Thread Norbert Manthey
On 2/11/22 11:34, Jan Beulich wrote: > On 11.02.2022 08:23, Norbert Manthey wrote: >> --- a/xen/arch/x86/cpuid.c >> +++ b/xen/arch/x86/cpuid.c >> @@ -609,7 +609,7 @@ void __init init_guest_cpuid(void) >> bool recheck_cpu_features(unsigned int cpu) >> { >> bool okay = true; >> -struct cpu

Re: [PATCH CPU v1] cpuid: initialize cpuinfo with boot_cpu_data

2022-02-11 Thread Jan Beulich
On 11.02.2022 12:19, Roger Pau Monné wrote: > On Fri, Feb 11, 2022 at 11:50:46AM +0100, Jan Beulich wrote: >> On 11.02.2022 11:47, Roger Pau Monné wrote: >>> On Fri, Feb 11, 2022 at 11:32:45AM +0100, Jan Beulich wrote: On 11.02.2022 10:02, Roger Pau Monné wrote: > On Fri, Feb 11, 2022 at 0

Re: [PATCH CPU v1] cpuid: initialize cpuinfo with boot_cpu_data

2022-02-11 Thread Roger Pau Monné
On Fri, Feb 11, 2022 at 11:50:46AM +0100, Jan Beulich wrote: > On 11.02.2022 11:47, Roger Pau Monné wrote: > > On Fri, Feb 11, 2022 at 11:32:45AM +0100, Jan Beulich wrote: > >> On 11.02.2022 10:02, Roger Pau Monné wrote: > >>> On Fri, Feb 11, 2022 at 08:23:27AM +0100, Norbert Manthey wrote: >

Re: [PATCH CPU v1] cpuid: initialize cpuinfo with boot_cpu_data

2022-02-11 Thread Jan Beulich
On 11.02.2022 11:47, Roger Pau Monné wrote: > On Fri, Feb 11, 2022 at 11:32:45AM +0100, Jan Beulich wrote: >> On 11.02.2022 10:02, Roger Pau Monné wrote: >>> On Fri, Feb 11, 2022 at 08:23:27AM +0100, Norbert Manthey wrote: When re-identifying CPU data, we might use uninitialized data when

Re: [PATCH CPU v1] cpuid: initialize cpuinfo with boot_cpu_data

2022-02-11 Thread Roger Pau Monné
On Fri, Feb 11, 2022 at 11:32:45AM +0100, Jan Beulich wrote: > On 11.02.2022 10:02, Roger Pau Monné wrote: > > On Fri, Feb 11, 2022 at 08:23:27AM +0100, Norbert Manthey wrote: > >> When re-identifying CPU data, we might use uninitialized data when > >> checking for the cache line property to adapt

Re: [PATCH CPU v1] cpuid: initialize cpuinfo with boot_cpu_data

2022-02-11 Thread Jan Beulich
On 11.02.2022 08:23, Norbert Manthey wrote: > --- a/xen/arch/x86/cpuid.c > +++ b/xen/arch/x86/cpuid.c > @@ -609,7 +609,7 @@ void __init init_guest_cpuid(void) > bool recheck_cpu_features(unsigned int cpu) > { > bool okay = true; > -struct cpuinfo_x86 c; > +struct cpuinfo_x86 c = boot

Re: [PATCH CPU v1] cpuid: initialize cpuinfo with boot_cpu_data

2022-02-11 Thread Jan Beulich
On 11.02.2022 10:02, Roger Pau Monné wrote: > On Fri, Feb 11, 2022 at 08:23:27AM +0100, Norbert Manthey wrote: >> When re-identifying CPU data, we might use uninitialized data when >> checking for the cache line property to adapt the cache >> alignment. The data that depends on this uninitialized r

Re: [PATCH CPU v1] cpuid: initialize cpuinfo with boot_cpu_data

2022-02-11 Thread Roger Pau Monné
On Fri, Feb 11, 2022 at 08:23:27AM +0100, Norbert Manthey wrote: > When re-identifying CPU data, we might use uninitialized data when > checking for the cache line property to adapt the cache > alignment. The data that depends on this uninitialized read is > currently not forwarded. > > To avoid p

[PATCH CPU v1] cpuid: initialize cpuinfo with boot_cpu_data

2022-02-10 Thread Norbert Manthey
When re-identifying CPU data, we might use uninitialized data when checking for the cache line property to adapt the cache alignment. The data that depends on this uninitialized read is currently not forwarded. To avoid problems in the future, initialize the data cpuinfo structure before re-identi