Re: [Xen-devel] [PATCH] xentrace: handle sparse cpu ids correctly in xen trace buffer handling

2018-09-13 Thread George Dunlap
On 08/30/2018 10:28 AM, Juergen Gross wrote: > On 30/08/18 10:26, Jan Beulich wrote: > On 30.08.18 at 09:52, wrote: >>> @@ -202,7 +202,7 @@ static int alloc_trace_bufs(unsigned int pages) >>> * Allocate buffers for all of the cpus. >>> * If any fails, deallocate what you have so

Re: [Xen-devel] [PATCH] xentrace: handle sparse cpu ids correctly in xen trace buffer handling

2018-09-10 Thread Jan Beulich
>>> On 10.09.18 at 13:34, wrote: > On 30/08/18 11:28, Juergen Gross wrote: >> On 30/08/18 10:26, Jan Beulich wrote: >> On 30.08.18 at 09:52, wrote: @@ -202,7 +202,7 @@ static int alloc_trace_bufs(unsigned int pages) * Allocate buffers for all of the cpus. * If any

Re: [Xen-devel] [PATCH] xentrace: handle sparse cpu ids correctly in xen trace buffer handling

2018-09-10 Thread Juergen Gross
On 30/08/18 11:28, Juergen Gross wrote: > On 30/08/18 10:26, Jan Beulich wrote: > On 30.08.18 at 09:52, wrote: >>> @@ -202,7 +202,7 @@ static int alloc_trace_bufs(unsigned int pages) >>> * Allocate buffers for all of the cpus. >>> * If any fails, deallocate what you have so far

Re: [Xen-devel] [PATCH] xentrace: handle sparse cpu ids correctly in xen trace buffer handling

2018-08-30 Thread Juergen Gross
On 30/08/18 10:26, Jan Beulich wrote: On 30.08.18 at 09:52, wrote: >> @@ -202,7 +202,7 @@ static int alloc_trace_bufs(unsigned int pages) >> * Allocate buffers for all of the cpus. >> * If any fails, deallocate what you have so far and exit. >> */ >> -

Re: [Xen-devel] [PATCH] xentrace: handle sparse cpu ids correctly in xen trace buffer handling

2018-08-30 Thread Jan Beulich
>>> On 30.08.18 at 09:52, wrote: > @@ -202,7 +202,7 @@ static int alloc_trace_bufs(unsigned int pages) > * Allocate buffers for all of the cpus. > * If any fails, deallocate what you have so far and exit. > */ > -for_each_online_cpu(cpu) > +for_each_present_cpu(cpu) >

[Xen-devel] [PATCH] xentrace: handle sparse cpu ids correctly in xen trace buffer handling

2018-08-30 Thread Juergen Gross
The per-cpu buffers for Xentrace are addressed by cpu-id, but the info array for the buffers is sized only by number of online cpus. This might lead to crashes when using Xentrace with smt=0. The t_info structure has to be sized based on nr_cpu_ids. Signed-off-by: Juergen Gross ---