[Qemu-devel] [PATCH 0/7] pc/spapr: unify handling of possible CPUs

Igor Mammedov posted 7 patches 7 years, 2 months ago
Failed in applying to current master (apply log)
include/hw/boards.h    |   8 +++-
include/hw/i386/pc.h   |   1 -
include/hw/ppc/spapr.h |   1 -
hw/acpi/cpu.c          |   2 +-
hw/core/machine.c      |  31 +++++++++++++
hw/i386/pc.c           | 124 +++++++++++++++++++++----------------------------
hw/ppc/spapr.c         | 117 +++++++++++++++++++++++++++-------------------
7 files changed, 162 insertions(+), 122 deletions(-)
[Qemu-devel] [PATCH 0/7] pc/spapr: unify handling of possible CPUs
Posted by Igor Mammedov 7 years, 2 months ago
Series is prerequsite split of from NUMA cpu mapping
refactoring and includes only possible_cpus[] generalization
to make it reusable for SPAPR and virt-arm targets as
has been requested by Eduardo [1].

Since virt-arm doesn't support -device based CPUs, ARM
patches are not included here and will be posted separately as
 'hw/arm/virt: -device cpu support'
series with dependency on this series.

This series doesn't include any of NUMA refactoring patches,
which will be posted on top once SPAPR and virt-arm would use
possible_cpus[].

Hence goal of this series is to make x86 specific possible_cpus[]
more generic, move it to MachineState and reuse it in SPAPR
machine so we could use it as common storage for topology
information when parsing -smp/-numa and then follow
the same/similar CPU creation pattern across the affected targets.

As result of this series:
  * possible_cpus[] becomes part of MachineState
  * SPAPR machine reuses it for persistent topololy storage
    and core bookkeeping
  * target specific query_hotpluggable_cpus() callbacks are
    generalized into common machine_query_hotpluggable_cpus()

Series depends on:
  [PATCH 0/3] spapr: fix cpu core hotunplug call flow
  https://www.mail-archive.com/qemu-devel@nongnu.org/msg427214.html
which is staged for next pull req in SPAPR tree.

git tree for testing:
  git@github.com:imammedo/qemu.git unify_poissible_cpus_v1

Regression tested CPU hotplug with ppc fedora25 guest on ppc host
with kvm enabled.

 1) "[RFC 00/13] numa: add '-numa cpu' option"
    https://www.mail-archive.com/qemu-devel@nongnu.org/msg423883.html

CC: David Gibson <david@gibson.dropbear.id.au> (supporter:sPAPR)
CC: Alexander Graf <agraf@suse.de> (supporter:sPAPR)
CC: qemu-ppc@nongnu.org 
CC: Bharata B Rao <bharata@linux.vnet.ibm.com>
CC: ehabkost@redhat.com
CC: drjones@redhat.com
CC: Marcel Apfelbaum <marcel@redhat.com>


Igor Mammedov (7):
  machine: move possible_cpus to MachineState
  pc: move pcms->possible_cpus init out of pc_cpus_init()
  pc: calculate topology only once when possible_cpus is initialised
  pc: pass apic_id to pc_find_cpu_slot() directly so lookup could be
    done without CPU object
  change CPUArchId.cpu type to Object*
  spapr: reuse machine->possible_cpus instead of cores[]
  machine: unify [pc_|spapr_]query_hotpluggable_cpus() callbacks

 include/hw/boards.h    |   8 +++-
 include/hw/i386/pc.h   |   1 -
 include/hw/ppc/spapr.h |   1 -
 hw/acpi/cpu.c          |   2 +-
 hw/core/machine.c      |  31 +++++++++++++
 hw/i386/pc.c           | 124 +++++++++++++++++++++----------------------------
 hw/ppc/spapr.c         | 117 +++++++++++++++++++++++++++-------------------
 7 files changed, 162 insertions(+), 122 deletions(-)

-- 
2.7.4


Re: [Qemu-devel] [PATCH 0/7] pc/spapr: unify handling of possible CPUs
Posted by Igor Mammedov 7 years, 2 months ago
On Thu,  9 Feb 2017 12:08:31 +0100
Igor Mammedov <imammedo@redhat.com> wrote:

[...]
> 
> Series depends on:
>   [PATCH 0/3] spapr: fix cpu core hotunplug call flow
>   https://www.mail-archive.com/qemu-devel@nongnu.org/msg427214.html
> which is staged for next pull req in SPAPR tree.

David,

could you merge it through your ppc tree as this series
depends on above patches that are there but not in master yet.


[...]

Re: [Qemu-devel] [PATCH 0/7] pc/spapr: unify handling of possible CPUs
Posted by David Gibson 7 years, 2 months ago
On Fri, Feb 10, 2017 at 11:31:08AM +0100, Igor Mammedov wrote:
> On Thu,  9 Feb 2017 12:08:31 +0100
> Igor Mammedov <imammedo@redhat.com> wrote:
> 
> [...]
> > 
> > Series depends on:
> >   [PATCH 0/3] spapr: fix cpu core hotunplug call flow
> >   https://www.mail-archive.com/qemu-devel@nongnu.org/msg427214.html
> > which is staged for next pull req in SPAPR tree.
> 
> David,
> 
> could you merge it through your ppc tree as this series
> depends on above patches that are there but not in master yet.

Ok, I've merged it into ppc-for-2.9, including the v2 6/7 and 8/7.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson