Re: [Qemu-devel] [PATCH RFC 00/16] Rework SMP parameters

2016-07-14 Thread Andrew Jones

Eduardo,

ping?

I'd like to spin a v1 soon, but have been putting it off until
I can get some input from you about this RFC.

Thanks,
drew


On Fri, Jun 10, 2016 at 07:40:11PM +0200, Andrew Jones wrote:
> This series is a first step in eliminating smp_* global
> variables (the last patch gets rid of two of them!) And, it's
> a first step in deprecating '-smp' in favor of using machine
> properties, e.g.
>  qemu -machine pc,sockets=2,cores=2,threads=2,maxcpus=8,cpus=8 ...
> 
> It's also a first step in allowing machine types to override
> the default parameter parsing, which makes assumptions that
> not all machine types may agree with. (mach-virt is coming...)
> 
> So, three first steps, I guess that's 3 steps. And a forth
> thing it does is some fixes for the smp parsing and also for
> SMBIOS use of cpu topology.
> 
> Tested with kvm-unit-tests on all five arches supported
> there, x86_64 both with KVM and TCG, and booting an x86_64
> guest (KVM) to check SMBIOS before and after in order to make
> sure it was the same. Also compile tested all targets.
> 
> Thanks,
> drew
> 
> 
> Andrew Jones (15):
>   vl: smp_parse: cleanups
>   vl: smp: add checks for maxcpus based topologies
>   hw/smbios/smbios: fix number of sockets calculation
>   hw/core/machine: add smp properites
>   vl: move smp parsing to machine pre_init
>   qom/cpu: make nr-cores,nr-threads real properties
>   hw/core/machine: set cpu global nr_cores,nr_threads in pre_init
>   hw/i386/pc: don't use smp_cores,smp_threads
>   hw/ppc/spapr: don't use smp_cores,smp_threads
>   target-ppc: don't use smp_threads
>   hw/arm/virt: rename *.smp_cpus to *.cpus
>   hw/arm/virt: don't use smp_cpus,max_cpus
>   hw/arm/virt: stash cpu topo info in VirtGuestInfo
>   smbios: don't use smp_cores,smp_threads
>   sysemu/cpus: bye, bye smp_cores,smp_threads
> 
> Igor Mammedov (1):
>   hw/core/machine: Introduce pre_init
> 
>  cpus.c   |   2 -
>  hw/arm/virt-acpi-build.c |  14 +--
>  hw/arm/virt.c|  41 +---
>  hw/core/machine.c| 210 
> +++
>  hw/i386/pc.c |  39 +---
>  hw/ppc/spapr.c   |   9 +-
>  hw/ppc/spapr_rtas.c  |   2 +-
>  hw/smbios/smbios.c   |  20 ++--
>  include/hw/arm/virt-acpi-build.h |   6 +-
>  include/hw/boards.h  |   7 ++
>  include/hw/smbios/smbios.h   |  10 ++
>  include/sysemu/cpus.h|  10 --
>  qom/cpu.c|   8 ++
>  target-ppc/translate_init.c  |  15 ++-
>  vl.c | 101 +++
>  15 files changed, 356 insertions(+), 138 deletions(-)
> 
> -- 
> 2.4.11
> 
> 



Re: [Qemu-devel] [PATCH RFC 00/16] Rework SMP parameters

2016-06-12 Thread Andrew Jones
On Fri, Jun 10, 2016 at 07:40:11PM +0200, Andrew Jones wrote:
> This series is a first step in eliminating smp_* global
> variables (the last patch gets rid of two of them!) And, it's
> a first step in deprecating '-smp' in favor of using machine
> properties, e.g.
>  qemu -machine pc,sockets=2,cores=2,threads=2,maxcpus=8,cpus=8 ...
> 
> It's also a first step in allowing machine types to override
> the default parameter parsing, which makes assumptions that
> not all machine types may agree with. (mach-virt is coming...)
> 
> So, three first steps, I guess that's 3 steps. And a forth
> thing it does is some fixes for the smp parsing and also for
> SMBIOS use of cpu topology.
> 
> Tested with kvm-unit-tests on all five arches supported
> there, x86_64 both with KVM and TCG, and booting an x86_64
> guest (KVM) to check SMBIOS before and after in order to make
> sure it was the same. Also compile tested all targets.

I forgot to run 'make check'. Just did now. All but one test
passed. Nope, it wasn't pc-cpu-test (the only cpu topology
using test) that failed. That one did output two new warnings,
so I should fix and/or deprecate it. The one that did fail was
vhost-user-test. I confirmed that it does not fail without this
series. I'll look into it soon, maybe tomorrow.

drew



Re: [Qemu-devel] [PATCH RFC 00/16] Rework SMP parameters

2016-06-12 Thread Andrew Jones
On Sat, Jun 11, 2016 at 08:42:14AM +0200, Thomas Huth wrote:
> On 10.06.2016 19:40, Andrew Jones wrote:
> > This series is a first step in eliminating smp_* global
> > variables (the last patch gets rid of two of them!) And, it's
> > a first step in deprecating '-smp' in favor of using machine
> > properties, e.g.
> >  qemu -machine pc,sockets=2,cores=2,threads=2,maxcpus=8,cpus=8 ...
> 
> Why isn't '-smp' good enough anymore so that it got to be deprecated?
>

cpu topology is machine state, and the QEMU style of providing state
values for objects is through properties. So adding properties brings
cpu topology descriptions more in line. Keeping a redundant (not "in
line") command line option could confuse things.

Also, switching how the command line is used provides a clean breaking
point. -smp assumes values when none are provided. This can lead to
unexpected results for some machines. Rather than trying to code every
assumption possible, it's easier to just require all properties be
specified. Machines are still free to provide short-hand properties to
get defaults, if the 45 character collection of properties is too
annoying to use all the time (I agree that it may be).

Thanks,
drew



Re: [Qemu-devel] [PATCH RFC 00/16] Rework SMP parameters

2016-06-11 Thread Thomas Huth
On 10.06.2016 19:40, Andrew Jones wrote:
> This series is a first step in eliminating smp_* global
> variables (the last patch gets rid of two of them!) And, it's
> a first step in deprecating '-smp' in favor of using machine
> properties, e.g.
>  qemu -machine pc,sockets=2,cores=2,threads=2,maxcpus=8,cpus=8 ...

Why isn't '-smp' good enough anymore so that it got to be deprecated?

 Thomas




[Qemu-devel] [PATCH RFC 00/16] Rework SMP parameters

2016-06-10 Thread Andrew Jones
This series is a first step in eliminating smp_* global
variables (the last patch gets rid of two of them!) And, it's
a first step in deprecating '-smp' in favor of using machine
properties, e.g.
 qemu -machine pc,sockets=2,cores=2,threads=2,maxcpus=8,cpus=8 ...

It's also a first step in allowing machine types to override
the default parameter parsing, which makes assumptions that
not all machine types may agree with. (mach-virt is coming...)

So, three first steps, I guess that's 3 steps. And a forth
thing it does is some fixes for the smp parsing and also for
SMBIOS use of cpu topology.

Tested with kvm-unit-tests on all five arches supported
there, x86_64 both with KVM and TCG, and booting an x86_64
guest (KVM) to check SMBIOS before and after in order to make
sure it was the same. Also compile tested all targets.

Thanks,
drew


Andrew Jones (15):
  vl: smp_parse: cleanups
  vl: smp: add checks for maxcpus based topologies
  hw/smbios/smbios: fix number of sockets calculation
  hw/core/machine: add smp properites
  vl: move smp parsing to machine pre_init
  qom/cpu: make nr-cores,nr-threads real properties
  hw/core/machine: set cpu global nr_cores,nr_threads in pre_init
  hw/i386/pc: don't use smp_cores,smp_threads
  hw/ppc/spapr: don't use smp_cores,smp_threads
  target-ppc: don't use smp_threads
  hw/arm/virt: rename *.smp_cpus to *.cpus
  hw/arm/virt: don't use smp_cpus,max_cpus
  hw/arm/virt: stash cpu topo info in VirtGuestInfo
  smbios: don't use smp_cores,smp_threads
  sysemu/cpus: bye, bye smp_cores,smp_threads

Igor Mammedov (1):
  hw/core/machine: Introduce pre_init

 cpus.c   |   2 -
 hw/arm/virt-acpi-build.c |  14 +--
 hw/arm/virt.c|  41 +---
 hw/core/machine.c| 210 +++
 hw/i386/pc.c |  39 +---
 hw/ppc/spapr.c   |   9 +-
 hw/ppc/spapr_rtas.c  |   2 +-
 hw/smbios/smbios.c   |  20 ++--
 include/hw/arm/virt-acpi-build.h |   6 +-
 include/hw/boards.h  |   7 ++
 include/hw/smbios/smbios.h   |  10 ++
 include/sysemu/cpus.h|  10 --
 qom/cpu.c|   8 ++
 target-ppc/translate_init.c  |  15 ++-
 vl.c | 101 +++
 15 files changed, 356 insertions(+), 138 deletions(-)

-- 
2.4.11