Re: [Xen-devel] [PATCH] tools/misc/xenpm: fix getting info when some CPUs are offline

2018-10-31 Thread Jan Beulich
>>> On 31.10.18 at 11:53, wrote: > On Wed, Oct 31, 2018 at 03:33:58AM -0600, Jan Beulich wrote: >> I'm also afraid there are further quirks here, with various constructs >> along the lines of (as bodies of aforementioned for()) >> >> if ( show_cxstat_by_cpuid(xc_handle, i) == -ENODEV ) >>

Re: [Xen-devel] [PATCH] tools/misc/xenpm: fix getting info when some CPUs are offline

2018-10-31 Thread Marek Marczykowski
On Wed, Oct 31, 2018 at 03:33:58AM -0600, Jan Beulich wrote: > >>> On 30.10.18 at 23:16, wrote: > > --- a/tools/misc/xenpm.c > > +++ b/tools/misc/xenpm.c > > @@ -1231,7 +1231,7 @@ int main(int argc, char *argv[]) > > xc_interface_close(xc_handle); > > return ret; > > } > > -

Re: [Xen-devel] [PATCH] tools/misc/xenpm: fix getting info when some CPUs are offline

2018-10-31 Thread Jan Beulich
>>> On 30.10.18 at 23:16, wrote: > --- a/tools/misc/xenpm.c > +++ b/tools/misc/xenpm.c > @@ -1231,7 +1231,7 @@ int main(int argc, char *argv[]) > xc_interface_close(xc_handle); > return ret; > } > -max_cpu_nr = physinfo.nr_cpus; > +max_cpu_nr = physinfo.max_cpu_id;

Re: [Xen-devel] [PATCH] tools/misc/xenpm: fix getting info when some CPUs are offline

2018-10-30 Thread Andrew Cooper
On 30/10/2018 22:16, Marek Marczykowski-Górecki wrote: > Use physinfo.max_cpu_id instead of physinfo.nr_cpus to get max CPU id. > This fixes for example 'xenpm get-cpufreq-para' with smt=off, which > otherwise would miss half of the cores. > > Signed-off-by: Marek Marczykowski-Górecki > --- > Repo

[Xen-devel] [PATCH] tools/misc/xenpm: fix getting info when some CPUs are offline

2018-10-30 Thread Marek Marczykowski-Górecki
Use physinfo.max_cpu_id instead of physinfo.nr_cpus to get max CPU id. This fixes for example 'xenpm get-cpufreq-para' with smt=off, which otherwise would miss half of the cores. Signed-off-by: Marek Marczykowski-Górecki --- Reported by @tfm1: https://github.com/QubesOS/qubes-issues/isues/4456 --