Re: [Qemu-devel] [PATCH v7 0/4] s390: Support for Hotplug of Standby Memory

2014-08-27 Thread Matthew Rosato
On 07/30/2014 02:15 PM, Matthew Rosato wrote: > This patchset adds support in s390 for a pool of standby memory, > which can be set online/offline by the guest (ie, via chmem). > The standby pool of memory is allocated as the difference between > the initial memory setting and the ma

[Qemu-devel] [PATCH v8 1/4] sclp-s390: Add device to manage s390 memory hotplug

2014-08-28 Thread Matthew Rosato
Add sclpMemoryHotplugDev to contain associated data structures, etc. Signed-off-by: Matthew Rosato --- hw/s390x/sclp.c | 30 ++ include/hw/s390x/sclp.h | 20 2 files changed, 50 insertions(+) diff --git a/hw/s390x/sclp.c b/hw/s390x

[Qemu-devel] [PATCH v8 0/4] s390: Support for Hotplug of Standby Memory

2014-08-28 Thread Matthew Rosato
to test in the cover letter. Changes for v5: * Since ACPI memory hotplug is now in, removed Igor's patches from this set. * Updated sclp.c to use object_resolve_path() instead of object_property_find(). Matthew Rosato (4): sclp-s390: Add device to manage s390 memory hotplug

[Qemu-devel] [PATCH v8 2/4] virtio-ccw: Include standby memory when calculating storage increment

2014-08-28 Thread Matthew Rosato
When determining the memory increment size, use the maxmem size if it was specified. Signed-off-by: Matthew Rosato --- hw/s390x/s390-virtio-ccw.c | 46 qemu-options.hx|3 ++- target-s390x/cpu.h |3 +++ 3 files changed

[Qemu-devel] [PATCH v8 3/4] s390-virtio: Apply same memory boundaries as virtio-ccw

2014-08-28 Thread Matthew Rosato
Although s390-virtio won't support memory hotplug, it should enforce the same memory boundaries so that it can use shared codepaths (like read_SCP_info). Signed-off-by: Matthew Rosato --- hw/s390x/s390-virtio.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff

[Qemu-devel] [PATCH v8 4/4] sclp-s390: Add memory hotplug SCLPs

2014-08-28 Thread Matthew Rosato
Add memory information to read SCP info and add handlers for Read Storage Element Information, Attach Storage Element, Assign Storage and Unassign Storage. Signed-off-by: Matthew Rosato --- hw/s390x/sclp.c| 259 ++-- target-s390x/cpu.h | 15

[Qemu-devel] [PATCH v3 2/4] sclp-s390: Add device to manage s390 memory hotplug

2014-05-07 Thread Matthew Rosato
Add sclpMemoryHotplugDev to contain associated data structures, etc. Signed-off-by: Matthew Rosato --- hw/s390x/sclp.c | 32 include/hw/s390x/sclp.h | 19 +++ 2 files changed, 51 insertions(+) diff --git a/hw/s390x/sclp.c b/hw/s390x

[Qemu-devel] [PATCH v3 0/4] s390: Support for Hotplug of Standby Memory

2014-05-07 Thread Matthew Rosato
nal code comments and other minor changes per Alexander Graf's comments Igor Mammedov (1): vl.c: extend -m option to support options for memory hotplug Matthew Rosato (3): sclp-s390: Add device to manage s390 memory hotplug virtio-ccw: Include standby memory when calculating storage inc

[Qemu-devel] [PATCH v3 1/4] vl.c: extend -m option to support options for memory hotplug

2014-05-07 Thread Matthew Rosato
From: Igor Mammedov From: Igor Mammedov Add following parameters: "slots" - total number of hotplug memory slots "maxmem" - maximum possible memory "slots" and "maxmem" should go in pair and "maxmem" should be greater than "mem&quo

[Qemu-devel] [PATCH v3 4/4] sclp-s390: Add memory hotplug SCLPs

2014-05-07 Thread Matthew Rosato
Add memory information to read SCP info and add handlers for Read Storage Element Information, Attach Storage Element, Assign Storage and Unassign Storage. Signed-off-by: Matthew Rosato --- hw/s390x/sclp.c| 245 ++-- target-s390x/cpu.h | 15

[Qemu-devel] [PATCH v3 3/4] virtio-ccw: Include standby memory when calculating storage increment

2014-05-07 Thread Matthew Rosato
When determining the memory increment size, use the maxmem size if it was specified. Signed-off-by: Matthew Rosato --- hw/s390x/s390-virtio-ccw.c | 44 target-s390x/cpu.h |3 +++ 2 files changed, 39 insertions(+), 8 deletions(-) diff

Re: [Qemu-devel] [PATCH v3 1/4] vl.c: extend -m option to support options for memory hotplug

2014-05-07 Thread Matthew Rosato
On 05/07/2014 02:50 PM, Alexander Graf wrote: > On 05/07/2014 08:05 PM, Matthew Rosato wrote: >> From: Igor Mammedov >> >> From: Igor Mammedov >> >> Add following parameters: >>"slots" - total number of hotplug memory slots >>"

Re: [Qemu-devel] [PATCH v3 3/4] virtio-ccw: Include standby memory when calculating storage increment

2014-05-13 Thread Matthew Rosato
On 05/12/2014 03:43 AM, Christian Borntraeger wrote: > On 07/05/14 20:05, Matthew Rosato wrote: >> When determining the memory increment size, use the maxmem size if >> it was specified. >> >> Signed-off-by: Matthew Rosato >> --- >

Re: [Qemu-devel] [PATCH v3 3/4] virtio-ccw: Include standby memory when calculating storage increment

2014-05-13 Thread Matthew Rosato
On 05/13/2014 09:43 AM, Alexander Graf wrote: > > On 13.05.14 15:16, Matthew Rosato wrote: >> On 05/12/2014 03:43 AM, Christian Borntraeger wrote: >>> On 07/05/14 20:05, Matthew Rosato wrote: >>>> When determining the memory increment size, use the max

Re: [Qemu-devel] [PATCH v3 4/4] sclp-s390: Add memory hotplug SCLPs

2014-05-13 Thread Matthew Rosato
On 05/12/2014 03:35 AM, Christian Borntraeger wrote: > On 07/05/14 20:05, Matthew Rosato wrote: >> Add memory information to read SCP info and add handlers for >> Read Storage Element Information, Attach Storage Element, >> Assign Storage and Unassign Storage. >> >&

[Qemu-devel] [PATCH v4 2/4] sclp-s390: Add device to manage s390 memory hotplug

2014-05-20 Thread Matthew Rosato
Add sclpMemoryHotplugDev to contain associated data structures, etc. Signed-off-by: Matthew Rosato --- hw/s390x/sclp.c | 38 ++ include/hw/s390x/sclp.h | 20 2 files changed, 58 insertions(+) diff --git a/hw/s390x/sclp.c b/hw

[Qemu-devel] [PATCH v4 3/4] virtio-ccw: Include standby memory when calculating storage increment

2014-05-20 Thread Matthew Rosato
When determining the memory increment size, use the maxmem size if it was specified. Signed-off-by: Matthew Rosato --- hw/s390x/s390-virtio-ccw.c | 46 qemu-options.hx|3 ++- target-s390x/cpu.h |3 +++ 3 files changed

[Qemu-devel] [PATCH v4 0/4] s390: Support for Hotplug of Standby Memory

2014-05-20 Thread Matthew Rosato
Patch 3 was inserted to add a new qom object that encapsulate variables used by s390 memory hotplug. Patches 4 and 5 adjusted to use this object. * Added additional code comments and other minor changes per Alexander Graf's comments Igor Mammedov (1): vl.c: extend -m option to

[Qemu-devel] [PATCH v4 1/4] vl.c: extend -m option to support options for memory hotplug

2014-05-20 Thread Matthew Rosato
quot; for memory hotplug to be enabled. Signed-off-by: Igor Mammedov Signed-off-by: Matthew Rosato --- include/hw/boards.h |2 ++ qemu-options.hx |9 ++--- vl.c| 51 +++ 3 files changed, 59 insertions(+), 3 deletion

[Qemu-devel] [PATCH v4 4/4] sclp-s390: Add memory hotplug SCLPs

2014-05-20 Thread Matthew Rosato
Add memory information to read SCP info and add handlers for Read Storage Element Information, Attach Storage Element, Assign Storage and Unassign Storage. Signed-off-by: Matthew Rosato --- hw/s390x/sclp.c| 259 ++-- target-s390x/cpu.h | 15

Re: [Qemu-devel] [PATCH v6 0/3] s390: Support for Hotplug of Standby Memory

2014-07-16 Thread Matthew Rosato
On 06/30/2014 10:00 AM, Matthew Rosato wrote: > This patchset adds support in s390 for a pool of standby memory, > which can be set online/offline by the guest (ie, via chmem). > The standby pool of memory is allocated as the difference between > the initial memory setting and the ma

Re: [Qemu-devel] [PATCH v6 3/3] sclp-s390: Add memory hotplug SCLPs

2014-07-29 Thread Matthew Rosato
On 07/29/2014 08:17 AM, Christian Borntraeger wrote: > On 30/06/14 16:00, Matthew Rosato wrote: >> Add memory information to read SCP info and add handlers for >> Read Storage Element Information, Attach Storage Element, >> Assign Storage and Unassign >> >&

[Qemu-devel] [PATCH v7 0/4] s390: Support for Hotplug of Standby Memory

2014-07-30 Thread Matthew Rosato
() instead of object_property_find(). Matthew Rosato (4): sclp-s390: Add device to manage s390 memory hotplug virtio-ccw: Include standby memory when calculating storage increment s390-virtio: Apply same memory boundaries as virtio-ccw sclp-s390: Add memory hotplug SCLPs hw/s390x/s390-virtio

[Qemu-devel] [PATCH v7 2/4] virtio-ccw: Include standby memory when calculating storage increment

2014-07-30 Thread Matthew Rosato
When determining the memory increment size, use the maxmem size if it was specified. Signed-off-by: Matthew Rosato --- hw/s390x/s390-virtio-ccw.c | 46 qemu-options.hx|3 ++- target-s390x/cpu.h |3 +++ 3 files changed

[Qemu-devel] [PATCH v7 3/4] s390-virtio: Apply same memory boundaries as virtio-ccw

2014-07-30 Thread Matthew Rosato
Although s390-virtio won't support memory hotplug, it should enforce the same memory boundaries so that it can use shared codepaths (like read_SCP_info). Signed-off-by: Matthew Rosato --- hw/s390x/s390-virtio.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff

[Qemu-devel] [PATCH v7 1/4] sclp-s390: Add device to manage s390 memory hotplug

2014-07-30 Thread Matthew Rosato
Add sclpMemoryHotplugDev to contain associated data structures, etc. Signed-off-by: Matthew Rosato --- hw/s390x/sclp.c | 30 ++ include/hw/s390x/sclp.h | 20 2 files changed, 50 insertions(+) diff --git a/hw/s390x/sclp.c b/hw/s390x

[Qemu-devel] [PATCH v7 4/4] sclp-s390: Add memory hotplug SCLPs

2014-07-30 Thread Matthew Rosato
Add memory information to read SCP info and add handlers for Read Storage Element Information, Attach Storage Element, Assign Storage and Unassign Storage. Signed-off-by: Matthew Rosato --- hw/s390x/sclp.c| 259 ++-- target-s390x/cpu.h | 15

[Qemu-devel] [PATCH v2 0/5] s390: Support for Hotplug of Standby Memory

2014-02-24 Thread Matthew Rosato
tches 4 and 5 adjusted to use this object. * Added additional code comments and other minor changes per Alexander Graf's comments Igor Mammedov (2): vl: convert -m to QemuOpts vl.c: extend -m option to support options for memory hotplug Matthew Rosato (3): sclp-s390: Add device

[Qemu-devel] [PATCH v2 3/5] sclp-s390: Add device to manage s390 memory hotplug

2014-02-24 Thread Matthew Rosato
Add sclpMemoryHotplugDev to contain associated data structures, etc. Signed-off-by: Matthew Rosato --- hw/s390x/sclp.c | 32 include/hw/s390x/sclp.h | 19 +++ 2 files changed, 51 insertions(+) diff --git a/hw/s390x/sclp.c b/hw/s390x

[Qemu-devel] [PATCH v2 1/5] vl: convert -m to QemuOpts

2014-02-24 Thread Matthew Rosato
From: Igor Mammedov Adds option to -m "mem" - startup memory amount For compatibility with legacy CLI if suffix-less number is passed, it assumes amount in Mb. Otherwise user is free to use suffixed number using suffixes b,k/K,M,G Signed-off-by: Igor Mammedov --- qemu-options.hx |7

[Qemu-devel] [PATCH v2 2/5] vl.c: extend -m option to support options for memory hotplug

2014-02-24 Thread Matthew Rosato
From: Igor Mammedov Add following parameters: "slots" - total number of hotplug memory slots "maxmem" - maximum possible memory "slots" and "maxmem" should go in pair and "maxmem" should be greater than "mem" for memory hotplug to be enabled. Signed-off-by: Igor Mammedov --- qemu-options.

[Qemu-devel] [PATCH v2 5/5] sclp-s390: Add memory hotplug SCLPs

2014-02-24 Thread Matthew Rosato
Add memory information to read SCP info and add handlers for Read Storage Element Information, Attach Storage Element, Assign Storage and Unassign Storage. Signed-off-by: Matthew Rosato --- hw/s390x/sclp.c| 244 ++-- target-s390x/cpu.h | 15

[Qemu-devel] [PATCH v2 4/5] virtio-ccw: Include standby memory when calculating storage increment

2014-02-24 Thread Matthew Rosato
When determining the memory increment size, use the maxmem size if it was specified. Signed-off-by: Matthew Rosato --- hw/s390x/s390-virtio-ccw.c | 42 ++ target-s390x/cpu.h |3 +++ 2 files changed, 37 insertions(+), 8 deletions(-) diff

[Qemu-devel] [PATCH] sclp-s390: Define new SCLP codes and structures

2014-01-27 Thread Matthew Rosato
Define new SCLP codes and structures that will be needed for s390 memory hotplug. Signed-off-by: Matthew Rosato --- include/hw/s390x/sclp.h | 35 +++ 1 file changed, 35 insertions(+) Note: As requested, this patch is fit on: git://github.com/borntraeger

[Qemu-devel] [PATCH 0/5] s390: Support for Hotplug of Standby Memory

2013-12-16 Thread Matthew Rosato
ed on work originally done by Jeng-Fang (Nick) Wang. Matthew Rosato (5): Add the standby-mem machine option virtio-ccw: Include standby memory when calculating storage increment target-s390: Check for standby memory specification sclp-s390: Define new SCLP codes and structures sclp-s390:

[Qemu-devel] [PATCH 1/5] Add the standby-mem machine option

2013-12-16 Thread Matthew Rosato
Add the machine=...,standby-mem={size} option and associated documentation. Signed-off-by: Matthew Rosato --- qemu-options.hx |6 +- vl.c|6 ++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/qemu-options.hx b/qemu-options.hx index af34483..def4493

[Qemu-devel] [PATCH 4/5] sclp-s390: Define new SCLP codes and structures

2013-12-16 Thread Matthew Rosato
Define new SCLP codes and structures that will be needed for s390 memory hotplug. Signed-off-by: Matthew Rosato --- hw/s390x/sclp.c |2 +- include/hw/s390x/sclp.h | 46 ++ 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/hw

[Qemu-devel] [PATCH 2/5] virtio-ccw: Include standby memory when calculating storage increment

2013-12-16 Thread Matthew Rosato
When determining the memory increment size, include the standby memory as well as the core memory. Signed-off-by: Matthew Rosato --- hw/s390x/s390-virtio-ccw.c | 30 +- target-s390x/cpu.h |4 2 files changed, 29 insertions(+), 5 deletions(-) diff

[Qemu-devel] [PATCH 3/5] target-s390: Check for standby memory specification

2013-12-16 Thread Matthew Rosato
When machine=...,standby-mem={size} has been specified, convert the value to bytes and store it for use. Signed-off-by: Matthew Rosato --- target-s390x/kvm.c | 16 1 file changed, 16 insertions(+) diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c index 02ac4ba..d4081f4

[Qemu-devel] [PATCH 5/5] sclp-s390: Add memory hotplug SCLPs

2013-12-16 Thread Matthew Rosato
Add memory information to read SCP info and add handlers for Read Storage Element Information, Attach Storage Element, Assign Storage and Unassign Storage. Signed-off-by: Matthew Rosato --- hw/s390x/sclp.c | 233 +-- include/hw/s390x/sclp.h

Re: [Qemu-devel] [PATCH 1/5] Add the standby-mem machine option

2013-12-17 Thread Matthew Rosato
On 12/17/2013 05:09 AM, Paolo Bonzini wrote: > Il 16/12/2013 21:51, Matthew Rosato ha scritto: >> Add the machine=...,standby-mem={size} option and associated >> documentation. > > See how Igor Mammedov's x86 memory hotplug instead added "-m NN,maxmem=NN".

Re: [Qemu-devel] [PATCH 3/5] target-s390: Check for standby memory specification

2013-12-17 Thread Matthew Rosato
On 12/16/2013 04:25 PM, Alexander Graf wrote: > > On 16.12.2013, at 21:51, Matthew Rosato wrote: > >> When machine=...,standby-mem={size} has been specified, convert the value >> to bytes and store it for use. >> >> Signed-off-by: Matthew Rosato &g

Re: [Qemu-devel] [PATCH 5/5] sclp-s390: Add memory hotplug SCLPs

2013-12-17 Thread Matthew Rosato
On 12/16/2013 04:42 PM, Alexander Graf wrote: > > On 16.12.2013, at 21:51, Matthew Rosato wrote: > >> Add memory information to read SCP info and add handlers for >> Read Storage Element Information, Attach Storage Element, >> Assign Storage and Unassign Storage. &

Re: [Qemu-devel] [PATCH 5/5] sclp-s390: Add memory hotplug SCLPs

2013-12-17 Thread Matthew Rosato
On 12/16/2013 06:18 PM, Alexander Graf wrote: > > On 16.12.2013, at 22:42, Alexander Graf wrote: > >> >> On 16.12.2013, at 21:51, Matthew Rosato wrote: >> > > [...] > >> >>> +} >>> +} >>> +} &

Re: [Qemu-devel] [PATCH] qmp: object-add: Validate class before creating object

2014-04-15 Thread Matthew Rosato
; QDict *qdict, > } > } > > -if (!object_dynamic_cast(obj, TYPE_USER_CREATABLE)) { > -error_setg(&local_err, "object type '%s' isn't supported by > object-add", > - type); > - goto out; > -} > - > user_creatable_complete(obj, &local_err); > if (local_err) { > goto out; > I'm no expert here, but this seems straightforward: Reviewed-by: Matthew Rosato Also applied and tested both error paths, so feel to consider it: Tested-by: Matthew Rosato

Re: [Qemu-devel] [PATCH v2] qmp: object-add: Validate class before creating object

2014-04-16 Thread Matthew Rosato
's already done on device_add. Changes look fine to me, re-tested to verify. Reviewed-by: Matthew Rosato Tested-by: Matthew Rosato > --- > qmp.c | 21 ++--- > 1 file changed, 14 insertions(+), 7 deletions(-) > > diff --git a/qmp.c b/qmp.c > index 87a28f7..9a93ab

Re: [Qemu-devel] [PATCH v2 0/5] s390: Support for Hotplug of Standby Memory

2014-03-10 Thread Matthew Rosato
On 02/24/2014 04:30 PM, Matthew Rosato wrote: > This patchset adds support in s390 for a pool of standby memory, > which can be set online/offline by the guest (ie, via chmem). > New options, maxmem and slots, are added to the QEMU command line > memory parameter to specify the tot

Re: [Qemu-devel] [PATCH v2 0/5] s390: Support for Hotplug of Standby Memory

2014-03-19 Thread Matthew Rosato
On 03/10/2014 10:39 AM, Matthew Rosato wrote: > On 02/24/2014 04:30 PM, Matthew Rosato wrote: >> This patchset adds support in s390 for a pool of standby memory, >> which can be set online/offline by the guest (ie, via chmem). >> New options, maxmem and slots, are added to

Re: [Qemu-devel] [PATCH 4/5] sclp-s390: Define new SCLP codes and structures

2014-03-20 Thread Matthew Rosato
On 03/20/2014 05:56 AM, Christian Borntraeger wrote: > On 16/12/13 21:51, Matthew Rosato wrote: >> Define new SCLP codes and structures that will be needed for s390 memory >> hotplug. >> >> Signed-off-by: Matthew Rosato >> --- >> hw/s390x/sclp.c

[Qemu-devel] [PATCH] memory: Fix double unref of flatview

2015-02-12 Thread Matthew Rosato
ount for a memory region attempts to go negative during hot-unplug of guest memory. Signed-off-by: Matthew Rosato --- memory.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/memory.c b/memory.c index 130152c..d08abe5 100644 --- a/memory.c +++ b/memory.c @@ -755,7 +755,6

Re: [Qemu-devel] [PATCH] memory: Fix double unref of flatview

2015-02-12 Thread Matthew Rosato
On 02/12/2015 12:34 PM, Paolo Bonzini wrote: > > > On 12/02/2015 17:21, Matthew Rosato wrote: >> Since 374f2981d1 "memory: protect current_map by RCU", >> address_space_update_topology unrefs the old_flatview twice, >> once by call_rcu and once by direct ca

Re: [Qemu-devel] [PATCH] memory: Fix double unref of flatview

2015-02-12 Thread Matthew Rosato
On 02/12/2015 03:43 PM, Paolo Bonzini wrote: > > > On 12/02/2015 20:32, Matthew Rosato wrote: >> Could it be that the order in which flatview_unref (and therefore >> memory_region_unref) vs object_unparent(mr) matters (ie, object_unparent >> should always happen la

Re: [Qemu-devel] [PATCH 3/3] docs: clarify memory region lifecycle

2015-02-13 Thread Matthew Rosato
On 02/13/2015 09:57 AM, Paolo Bonzini wrote: > Now that objects actually obey the rules, document them. > > Signed-off-by: Paolo Bonzini Reviewed-by: Matthew Rosato > --- > docs/memory.txt | 74 > - > 1 file c

Re: [Qemu-devel] [PATCH 2/3] pci: split shpc_cleanup and shpc_free

2015-02-13 Thread Matthew Rosato
led from the instance_finalize callback. > > shpc_free follows the same coding style that Alex suggested for VFIO > (i.e. since a test for NULL is requested, clear the field at end). > > Signed-off-by: Paolo Bonzini Reviewed-by: Matthew Rosato > --- > hw/pci-bridge/pci_bridg

[Qemu-devel] [PATCH 0/4] s390: Allow hotplug of s390 CPUs

2015-11-09 Thread Matthew Rosato
ch set is based on work previously done by Jason Herne. Matthew Rosato (4): s390x/cpu: Cleanup init in preparation for hotplug s390x/cpu: Set initial CPU state in common routine s390x/cpu: Add function to set CPU state s390x/cpu: Allow hotplug of CPUs hw/s390x/s390-virtio-ccw.c | 3 ++-

[Qemu-devel] [PATCH 2/4] s390x/cpu: Set initial CPU state in common routine

2015-11-09 Thread Matthew Rosato
Both initial and hotplugged CPUs need to set the same initial state. Signed-off-by: Matthew Rosato Reviewed-by: David Hildenbrand --- hw/s390x/s390-virtio.c | 4 target-s390x/cpu.c | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/s390x/s390-virtio.c b/hw/s390x

[Qemu-devel] [PATCH 1/4] s390x/cpu: Cleanup init in preparation for hotplug

2015-11-09 Thread Matthew Rosato
Ensure a valid cpu_model is set upfront by setting the default value directly into the MachineState when none is specified. This is needed to ensure hotplugged CPUs share the same cpu_model. Signed-off-by: Matthew Rosato Reviewed-by: David Hildenbrand --- hw/s390x/s390-virtio-ccw.c | 2

[Qemu-devel] [PATCH 4/4] s390x/cpu: Allow hotplug of CPUs

2015-11-09 Thread Matthew Rosato
Implement cpu hotplug routine and add the machine hook. Signed-off-by: Matthew Rosato Reviewed-by: David Hildenbrand --- hw/s390x/s390-virtio-ccw.c | 1 + target-s390x/cpu.c | 45 +++-- target-s390x/cpu.h | 1 + 3 files changed, 45

[Qemu-devel] [PATCH 3/4] s390x/cpu: Add function to set CPU state

2015-11-09 Thread Matthew Rosato
Introduce s390_cpu_set_cpustate, which will set/update the machine/cpu[n] link with the current CPU state. Additionally, maintain an array of state pointers indexed by CPU id for fast lookup during interrupt handling. Signed-off-by: Matthew Rosato Acked-by: David Hildenbrand --- hw/s390x/s390

Re: [Qemu-devel] [PATCH 0/4] s390: Allow hotplug of s390 CPUs

2015-11-09 Thread Matthew Rosato
On 11/09/2015 10:55 AM, Christian Borntraeger wrote: > Am 09.11.2015 um 16:37 schrieb Christian Borntraeger: >> Am 09.11.2015 um 16:35 schrieb Christian Borntraeger: >>> Am 09.11.2015 um 16:28 schrieb Andreas Färber: >>>> Hi, >>>> >>>> A

Re: [Qemu-devel] [PATCH v6 05/11] cpu: Reclaim vCPU objects

2016-01-27 Thread Matthew Rosato
On 01/08/2016 01:55 AM, Bharata B Rao wrote: > From: Gu Zheng > > In order to deal well with the kvm vcpus (which can not be removed without any > protection), we do not close KVM vcpu fd, just record and mark it as stopped > into a list, so that we can reuse it for the appending cpu hot-add requ

[Qemu-devel] [PATCH v3 01/10] exec: Remove cpu from cpus list during cpu_exec_exit()

2016-01-27 Thread Matthew Rosato
From: Bharata B Rao CPUState *cpu gets added to the cpus list during cpu_exec_init(). It should be removed from cpu_exec_exit(). cpu_exec_init() is called from generic CPU::instance_finalize and some archs like PowerPC call it from CPU unrealizefn. So ensure that we dequeue the cpu only once. N

[Qemu-devel] [PATCH v3 00/10] Allow hotplug of s390 CPUs

2016-01-27 Thread Matthew Rosato
from cpus list during cpu_exec_exit() exec: Do vmstate unregistration from cpu_exec_exit() cpu: Add a sync version of cpu_remove() Gu Zheng (1): cpu: Reclaim vCPU objects Matthew Rosato (6): s390x/cpu: Cleanup init in preparation for hotplug s390x/cpu: Set initial CPU state in commo

[Qemu-devel] [PATCH v3 08/10] s390x/cpu: Add functions to (un)register CPU state

2016-01-27 Thread Matthew Rosato
Introduce s390_(un)register_cpustate, which will set the machine/cpu[n] link with the current CPU state. Additionally, maintain an array of state pointers indexed by CPU id for fast lookup during interrupt handling. Signed-off-by: Matthew Rosato --- hw/s390x/s390-virtio.c | 54

[Qemu-devel] [PATCH v3 05/10] s390x/cpu: Cleanup init in preparation for hotplug

2016-01-27 Thread Matthew Rosato
Ensure a valid cpu_model is set upfront by setting the default value directly into the MachineState when none is specified. This is needed to ensure hotplugged CPUs share the same cpu_model. Signed-off-by: Matthew Rosato Reviewed-by: David Hildenbrand --- hw/s390x/s390-virtio-ccw.c | 2 +- hw

[Qemu-devel] [PATCH v3 07/10] s390x/cpu: Move some CPU initialization into realize

2016-01-27 Thread Matthew Rosato
In preparation for hotplug, defer some CPU initialization until the device is actually being realized. Signed-off-by: Matthew Rosato --- target-s390x/cpu.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/target-s390x/cpu.c b/target-s390x/cpu.c index b0f95ce

[Qemu-devel] [PATCH v3 06/10] s390x/cpu: Set initial CPU state in common routine

2016-01-27 Thread Matthew Rosato
Both initial and hotplugged CPUs need to set the same initial state. Signed-off-by: Matthew Rosato Reviewed-by: David Hildenbrand --- hw/s390x/s390-virtio.c | 4 target-s390x/cpu.c | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/s390x/s390-virtio.c b/hw/s390x

[Qemu-devel] [PATCH v3 04/10] cpu: Add a sync version of cpu_remove()

2016-01-27 Thread Matthew Rosato
From: Bharata B Rao This sync API will be used by the CPU hotplug code to wait for the CPU to completely get removed before flagging the failure to the device_add command. Sync version of this call is needed to correctly recover from CPU realization failures when ->plug() handler fails. Signed-

[Qemu-devel] [PATCH v3 09/10] s390/virtio-ccw: Add hotplug handler and prepare for unplug

2016-01-27 Thread Matthew Rosato
Prepare for hotplug and unplug of s390-cpu. In the case of unplug, s390 does not have a safe way of communicating the loss of CPU to a guest, so a full system reset will be performed on the guest. Signed-off-by: Matthew Rosato --- hw/s390x/s390-virtio-ccw.c | 28

[Qemu-devel] [PATCH v3 10/10] s390x/cpu: Allow hot plug/unplug of CPUs

2016-01-27 Thread Matthew Rosato
Allow hotplug of s390-cpu devices via device_add, and unplug via device_del. Signed-off-by: Matthew Rosato --- target-s390x/cpu.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/target-s390x/cpu.c b/target-s390x/cpu.c index 46b1115..7160f33 100644 --- a/target-s390x/cpu.c +++ b

[Qemu-devel] [PATCH v3 02/10] exec: Do vmstate unregistration from cpu_exec_exit()

2016-01-27 Thread Matthew Rosato
From: Bharata B Rao cpu_exec_init() does vmstate_register and register_savevm for the CPU device. These need to be undone from cpu_exec_exit(). These changes are needed to support CPU hot removal and also to correctly fail hotplug attempts beyond max_cpus. Signed-off-by: Bharata B Rao Reviewed-

[Qemu-devel] [PATCH v3 03/10] cpu: Reclaim vCPU objects

2016-01-27 Thread Matthew Rosato
From: Gu Zheng In order to deal well with the kvm vcpus (which can not be removed without any protection), we do not close KVM vcpu fd, just record and mark it as stopped into a list, so that we can reuse it for the appending cpu hot-add request if possible. It is also the approach that kvm guys

[Qemu-devel] [PATCH v2 5/9] s390x/cpu: Move some CPU initialization into realize

2015-11-19 Thread Matthew Rosato
In preparation for hotplug, defer some CPU initialization until the device is actually being realized. Signed-off-by: Matthew Rosato --- target-s390x/cpu.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/target-s390x/cpu.c b/target-s390x/cpu.c index aafbbdc

[Qemu-devel] [PATCH v2 1/9] cpus: Reclaim vCPU objects

2015-11-19 Thread Matthew Rosato
done from cpu_exec_exit()] Signed-off-by: Matthew Rosato --- cpus.c | 41 + include/qom/cpu.h| 10 + include/sysemu/kvm.h | 1 + kvm-all.c| 57 +++- kvm-stub.c

[Qemu-devel] [PATCH v2 8/9] s390/virtio-ccw: Add hotplug handler and prepare for unplug

2015-11-19 Thread Matthew Rosato
Prepare for hotplug and unplug of s390-cpu. In the case of unplug, s390 does not have a safe way of communicating the loss of CPU to a guest, so a full system reset will be performed on the guest. Signed-off-by: Matthew Rosato --- hw/s390x/s390-virtio-ccw.c | 28

[Qemu-devel] [PATCH v2 3/9] s390x/cpu: Cleanup init in preparation for hotplug

2015-11-19 Thread Matthew Rosato
Ensure a valid cpu_model is set upfront by setting the default value directly into the MachineState when none is specified. This is needed to ensure hotplugged CPUs share the same cpu_model. Signed-off-by: Matthew Rosato Reviewed-by: David Hildenbrand --- hw/s390x/s390-virtio-ccw.c | 2

[Qemu-devel] [PATCH v2 9/9] s390x/cpu: Allow hot plug/unplug of CPUs

2015-11-19 Thread Matthew Rosato
Allow hotplug of s390-cpu devices via device_add, and unplug via device_del. Signed-off-by: Matthew Rosato --- target-s390x/cpu.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/target-s390x/cpu.c b/target-s390x/cpu.c index 4b83a09..a4be7b7 100644 --- a/target-s390x/cpu.c +++ b

[Qemu-devel] [PATCH v2 4/9] s390x/cpu: Set initial CPU state in common routine

2015-11-19 Thread Matthew Rosato
Both initial and hotplugged CPUs need to set the same initial state. Signed-off-by: Matthew Rosato Reviewed-by: David Hildenbrand --- hw/s390x/s390-virtio.c | 4 target-s390x/cpu.c | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/s390x/s390-virtio.c b/hw/s390x

[Qemu-devel] [PATCH v2 6/9] s390x/cpu: Add functions to (un)register CPU state

2015-11-19 Thread Matthew Rosato
Introduce s390_(un)register_cpustate, which will set the machine/cpu[n] link with the current CPU state. Additionally, maintain an array of state pointers indexed by CPU id for fast lookup during interrupt handling. Signed-off-by: Matthew Rosato --- hw/s390x/s390-virtio.c | 54

[Qemu-devel] [PATCH v2 2/9] cpus: Add a sync version of cpu_remove()

2015-11-19 Thread Matthew Rosato
ned-off-by: Bharata B Rao Signed-off-by: Matthew Rosato [Call cpu_remove() directly from cpu_remove_sync()] --- cpus.c| 12 include/qom/cpu.h | 8 2 files changed, 20 insertions(+) diff --git a/cpus.c b/cpus.c index af2b274..c2444ba 100644 --

[Qemu-devel] [PATCH v2 7/9] s390x/cpu: Extra cleanup during CPU finalize

2015-11-19 Thread Matthew Rosato
In preparation for unplug, do some additional cleanup work to undo work originally done in cpu_exec_init. This patch is based on work done by Bharata B Rao. Signed-off-by: Matthew Rosato --- target-s390x/cpu.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/target-s390x

[Qemu-devel] [PATCH v2 0/9] s390: Allow hotplug of s390 CPUs

2015-11-19 Thread Matthew Rosato
that has been removed, so this event triggers a reset of the guest in order to force recognition. This patch set is based on work previously done by Jason Herne. Bharata B Rao (1): cpus: Add a sync version of cpu_remove() Matthew Rosato (8): cpus: Reclaim vCPU objects s390x/cpu: Cleanup

Re: [Qemu-devel] [PATCH v2 2/9] cpus: Add a sync version of cpu_remove()

2015-11-19 Thread Matthew Rosato
On 11/19/2015 10:25 AM, Paolo Bonzini wrote: > > > On 19/11/2015 16:10, Matthew Rosato wrote: >> From: Bharata B Rao >> >> This sync API will be used by the CPU hotplug code to wait for the CPU to >> completely get removed before flagging the failure to the

Re: [Qemu-devel] [PATCH v2 1/9] cpus: Reclaim vCPU objects

2015-11-20 Thread Matthew Rosato
On 11/19/2015 09:33 PM, Bharata B Rao wrote: > On Thu, Nov 19, 2015 at 10:10:06AM -0500, Matthew Rosato wrote: >> From: Gu Zheng >> >> In order to deal well with the kvm vcpus (which can not be removed without >> any >> protection), we do not close KVM vcpu fd, j

[Qemu-devel] [PATCH v4 0/5] Allow hotplug of s390 CPUs

2016-02-17 Thread Matthew Rosato
the total number of desired guest CPUs. At this point, the guest must bring the CPU online for use -- This can be achieved via "echo 1 > /sys/devices/system/cpu/cpuX/online" or via a management tool like cpuplugd. This patch set is based on work previously done by Jason Herne. Matt

[Qemu-devel] [PATCH v4 5/5] s390x/cpu: Allow hotplug of CPUs

2016-02-17 Thread Matthew Rosato
Implement cpu hotplug routine and add the machine hook. Signed-off-by: Matthew Rosato --- hw/s390x/s390-virtio-ccw.c | 1 + target-s390x/cpu.c | 40 target-s390x/cpu.h | 1 + 3 files changed, 42 insertions(+) diff --git a/hw/s390x/s390

[Qemu-devel] [PATCH v4 1/5] s390x/cpu: Cleanup init in preparation for hotplug

2016-02-17 Thread Matthew Rosato
Ensure a valid cpu_model is set upfront by setting the default value directly into the MachineState when none is specified. This is needed to ensure hotplugged CPUs share the same cpu_model. Signed-off-by: Matthew Rosato Reviewed-by: David Hildenbrand --- hw/s390x/s390-virtio-ccw.c | 2 +- hw

[Qemu-devel] [PATCH v4 3/5] s390x/cpu: Move some CPU initialization into realize

2016-02-17 Thread Matthew Rosato
In preparation for hotplug, defer some CPU initialization until the device is actually being realized. Signed-off-by: Matthew Rosato Reviewed-by: David Hildenbrand --- target-s390x/cpu.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/target-s390x/cpu.c b

[Qemu-devel] [PATCH v4 2/5] s390x/cpu: Set initial CPU state in common routine

2016-02-17 Thread Matthew Rosato
Both initial and hotplugged CPUs need to set the same initial state. Signed-off-by: Matthew Rosato Reviewed-by: David Hildenbrand --- hw/s390x/s390-virtio.c | 4 target-s390x/cpu.c | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/s390x/s390-virtio.c b/hw/s390x

[Qemu-devel] [PATCH v4 4/5] s390x/cpu: Add functions to register CPU state

2016-02-17 Thread Matthew Rosato
Introduce s390_register_cpustate, which will set the machine/cpu[n] link with the current CPU state. Additionally, maintain an array of state pointers indexed by CPU id for fast lookup during interrupt handling. Signed-off-by: Matthew Rosato --- hw/s390x/s390-virtio.c | 45

Re: [Qemu-devel] [RFC PATCH v0 0/9] Generic cpu-core device

2015-12-10 Thread Matthew Rosato
On 12/10/2015 01:15 AM, Bharata B Rao wrote: > Hi, > > This is an attempt to define a generic CPU device that serves as a > containing device to underlying arch-specific CPU devices. The motivation > for this is to have an arch-neutral way to specify CPUs mainly during > hotplug. > > Instead of i

Re: [Qemu-devel] [PATCH v4 4/5] s390x/cpu: Add functions to register CPU state

2016-02-18 Thread Matthew Rosato
On 02/18/2016 04:36 AM, Igor Mammedov wrote: > On Wed, 17 Feb 2016 15:12:34 -0500 > Matthew Rosato wrote: > >> Introduce s390_register_cpustate, which will set the >> machine/cpu[n] link with the current CPU state. Additionally, >> maintain an array of state pointers

[Qemu-devel] [PATCH v5 1/6] s390x/cpu: Cleanup init in preparation for hotplug

2016-02-18 Thread Matthew Rosato
Ensure a valid cpu_model is set upfront by setting the default value directly into the MachineState when none is specified. This is needed to ensure hotplugged CPUs share the same cpu_model. Signed-off-by: Matthew Rosato Reviewed-by: David Hildenbrand --- hw/s390x/s390-virtio-ccw.c | 2 +- hw

[Qemu-devel] [PATCH v5 0/6] Allow hotplug of s390 CPUs

2016-02-18 Thread Matthew Rosato
unt , where is the total number of desired guest CPUs. At this point, the guest must bring the CPU online for use -- This can be achieved via "echo 1 > /sys/devices/system/cpu/cpuX/online" or via a management tool like cpuplugd. This patch set is based on work previously don

[Qemu-devel] [PATCH v5 2/6] s390x/cpu: Set initial CPU state in common routine

2016-02-18 Thread Matthew Rosato
Both initial and hotplugged CPUs need to set the same initial state. Signed-off-by: Matthew Rosato Reviewed-by: David Hildenbrand --- hw/s390x/s390-virtio.c | 4 target-s390x/cpu.c | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/s390x/s390-virtio.c b/hw/s390x

[Qemu-devel] [PATCH v5 3/6] s390x/cpu: Move some CPU initialization into realize

2016-02-18 Thread Matthew Rosato
In preparation for hotplug, defer some CPU initialization until the device is actually being realized. Signed-off-by: Matthew Rosato --- target-s390x/cpu.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/target-s390x/cpu.c b/target-s390x/cpu.c index 603c2a1..8dfd063

[Qemu-devel] [PATCH v5 5/6] s390/virtio-ccw: Add hotplug handler

2016-02-18 Thread Matthew Rosato
First consumer will be CPU hotplug, to update machine/cpu[n] links during cpu plug. Signed-off-by: Matthew Rosato --- hw/s390x/s390-virtio-ccw.c | 40 1 file changed, 40 insertions(+) diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c

[Qemu-devel] [PATCH v5 6/6] s390x/cpu: Allow hotplug of CPUs

2016-02-18 Thread Matthew Rosato
Implement cpu hotplug routine and add the machine hook. Signed-off-by: Matthew Rosato --- hw/s390x/s390-virtio-ccw.c | 1 + target-s390x/cpu.c | 45 + target-s390x/cpu.h | 1 + 3 files changed, 47 insertions(+) diff --git a/hw/s390x

[Qemu-devel] [PATCH v5 4/6] s390x/cpu: Add CPU property links

2016-02-18 Thread Matthew Rosato
Link each CPUState as property machine/cpu[n] during initialization. Additionally, maintain an array of state pointers indexed by CPU id for fast lookup during interrupt handling. Signed-off-by: Matthew Rosato --- hw/s390x/s390-virtio.c | 26 +- 1 file changed, 17

Re: [Qemu-devel] [PATCH v5 6/6] s390x/cpu: Allow hotplug of CPUs

2016-02-19 Thread Matthew Rosato
On 02/19/2016 09:28 AM, Igor Mammedov wrote: > On Thu, 18 Feb 2016 23:03:37 -0500 > Matthew Rosato wrote: > >> Implement cpu hotplug routine and add the machine hook. >> >> Signed-off-by: Matthew Rosato >> --- >> hw/s390x/s390-virtio-ccw.c |

  1   2   3   4   5   6   >