[Qemu-devel] [RFC PATCH v2.1 05/12] qdev: hotplug: Introduce HotplugHandler.pre_plug() callback

2016-03-31 Thread Bharata B Rao
From: Igor Mammedov pre_plug callback is to be called before device.realize() is executed. This would allow to check/set device's properties from HotplugHandler. Signed-off-by: Igor Mammedov Signed-off-by: Bharata B Rao --- hw/core/hotplug.c| 11 +++ hw/core/qdev.c

[Qemu-devel] [RFC PATCH v2.1 10/12] spapr: CPU hotplug support

2016-03-31 Thread Bharata B Rao
Set up device tree entries for the hotplugged CPU core and use the exising RTAS event logging infrastructure to send CPU hotplug notification to the guest. Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 58 ++ hw/ppc/spapr_cpu_core.c

Re: [Qemu-devel] [RFC PATCH v2.1 08/12] spapr: Add CPU type specific core devices

2016-03-31 Thread Bharata B Rao
On Fri, Apr 01, 2016 at 04:08:44PM +1100, David Gibson wrote: > On Thu, Mar 31, 2016 at 02:09:17PM +0530, Bharata B Rao wrote: > > Introduce core devices for each CPU type supported by sPAPR. These > > core devices are derived from the base spapr-cpu-core device type. > > >

Re: [Qemu-devel] [RFC PATCH v2.1 00/12] Core based CPU hotplug for PowerPC sPAPR

2016-04-05 Thread Bharata B Rao
On Mon, Apr 04, 2016 at 04:44:27PM +0200, Igor Mammedov wrote: > On Thu, 31 Mar 2016 14:09:09 +0530 > Bharata B Rao wrote: > > > Hi, > > > > This is v2.1 of "Core based CPU hotplug for PowerPC sPAPR". v2 was > > posted here: > > https://lists.gn

[Qemu-devel] [FIX PATCH] spapr: Fix ibm,lrdr-capacity

2016-04-05 Thread Bharata B Rao
ibm,lrdr-capacity has a field to describe the maximum address in bytes and therefore, the most memory that can be allocated to this guest. We are using maxmem for this field, but instead should use the actual RAM address corresponding to the end of hotplug region. Signed-off-by: Bharata B Rao

Re: [Qemu-devel] [PATCH for-2.7 v6 2/2] spapr: implement query-hotpluggable-cpus callback

2016-04-11 Thread Bharata B Rao
cpus-count": 2, > > >"qom-path": "/machine/unattached/device[0]"} > > >]}' > > > > > > TODO: > > > add 'node' property for core <-> numa node mapping > > > > > > Signed-off-by

[Qemu-devel] [RFC PATCH v0 for 2.7] spapr: Work around the memory hotplug failure with DDW

2016-04-19 Thread Bharata B Rao
continues to have the DT nodes as in Scenario 1. However after 1st reboot, the DT representation changes over to Scenario 2. I haven't yet looked at Jian Jun's DRC migration patchset to ascertain if this change works well with DRC migration. (*) https://patchwork.ozlabs.org/patch/606912

Re: [Qemu-devel] [PATCH for-2.6] spapr_drc: fix aborts during DRC-count based hotplug

2016-04-25 Thread Bharata B Rao
rces types, since we cannot selectively track whether a > > resource has been signalled in cases where we signal attach as a count, > > set the 'signalled' state to true immediately upon making the > > resource available via drck->attach(). > > > > Repor

Re: [Qemu-devel] [RFC PATCH v2 2/2] spapr: Memory hot-unplug support

2016-04-25 Thread Bharata B Rao
On Mon, Apr 25, 2016 at 11:20:50AM +0200, Igor Mammedov wrote: > On Wed, 16 Mar 2016 10:11:54 +0530 > Bharata B Rao wrote: > > > On Wed, Mar 16, 2016 at 12:36:05PM +1100, David Gibson wrote: > > > On Tue, Mar 15, 2016 at 10:08:56AM +0530, Bharata B Rao wrote: > >

Re: [Qemu-devel] [RFC PATCH v0 for 2.7] spapr: Work around the memory hotplug failure with DDW

2016-04-25 Thread Bharata B Rao
On Tue, Apr 26, 2016 at 01:14:39PM +1000, Alexey Kardashevskiy wrote: > On 04/19/2016 09:51 PM, Bharata B Rao wrote: > >Memory hotplug can fail for some combinations of RAM and maxmem when > >DDW is enabled in the presence of devices like nec-xhci-usb. DDW depends > >on maxim

Re: [Qemu-devel] [RFC PATCH v2 2/2] spapr: Memory hot-unplug support

2016-04-27 Thread Bharata B Rao
On Wed, Apr 27, 2016 at 03:37:05PM +0200, Igor Mammedov wrote: > On Tue, 26 Apr 2016 16:03:37 -0500 > Michael Roth wrote: > > > Quoting Igor Mammedov (2016-04-26 02:52:36) > > > On Tue, 26 Apr 2016 10:39:23 +0530 > > > Bharata B Rao wrote: > > >

Re: [Qemu-devel] [RFC PATCH v2 2/2] spapr: Memory hot-unplug support

2016-04-29 Thread Bharata B Rao
On Fri, Apr 29, 2016 at 08:45:37AM +0200, Thomas Huth wrote: > On 29.04.2016 05:24, David Gibson wrote: > > On Tue, Apr 26, 2016 at 04:03:37PM -0500, Michael Roth wrote: > ... > >> In the case of pseries, the DIMM abstraction isn't really exposed to > >> the guest, but rather the memory blocks we u

Re: [Qemu-devel] [RFC PATCH v0 for 2.7] spapr: Work around the memory hotplug failure with DDW

2016-05-03 Thread Bharata B Rao
On Tue, May 03, 2016 at 06:30:51PM -0500, Michael Roth wrote: > Quoting Bharata B Rao (2016-04-19 06:51:41) > > Memory hotplug can fail for some combinations of RAM and maxmem when > > DDW is enabled in the presence of devices like nec-xhci-usb. DDW depends > > on maximum

Re: [Qemu-devel] [RFC PATCH v2.1 10/12] spapr: CPU hotplug support

2016-05-05 Thread Bharata B Rao
On Tue, Apr 05, 2016 at 06:47:16PM -0500, Michael Roth wrote: > Quoting Bharata B Rao (2016-03-31 03:39:19) > > Set up device tree entries for the hotplugged CPU core and use the > > exising RTAS event logging infrastructure to send CPU hotplug notification > > to the guest. &

Re: [Qemu-devel] [RFC PATCH v2.1 09/12] spapr: convert boot CPUs into CPU core devices

2016-05-05 Thread Bharata B Rao
On Fri, Apr 08, 2016 at 06:35:19PM -0500, Michael Roth wrote: > Quoting Bharata B Rao (2016-03-31 03:39:18) > > Introduce sPAPRMachineClass.dr_cpu_enabled to indicate support for > > CPU core hotplug. Initialize boot time CPUs as core deivces and prevent > > topologies tha

Re: [Qemu-devel] [RFC PATCH v2.1 10/12] spapr: CPU hotplug support

2016-05-06 Thread Bharata B Rao
On Fri, May 06, 2016 at 10:57:21AM +0200, Igor Mammedov wrote: > On Thu, 31 Mar 2016 14:09:19 +0530 > Bharata B Rao wrote: > > > Set up device tree entries for the hotplugged CPU core and use the > > exising RTAS event logging infrastructure to send CPU hotplug notifica

Re: [Qemu-devel] [RFC PATCH v2.1 12/12] spapr: CPU hot unplug support

2016-05-08 Thread Bharata B Rao
On Mon, Apr 04, 2016 at 02:27:24PM +1000, David Gibson wrote: > On Thu, Mar 31, 2016 at 02:09:21PM +0530, Bharata B Rao wrote: > > Remove the CPU core device by removing the underlying CPU thread devices. > > Hot removal of CPU for sPAPR guests is achieved by sending

Re: [Qemu-devel] [RFC PATCH v2 0/9] Core based CPU hotplug for PowerPC sPAPR

2016-03-15 Thread Bharata B Rao
On Mon, Mar 14, 2016 at 10:47:28AM +0100, Igor Mammedov wrote: > On Fri, 11 Mar 2016 10:24:29 +0530 > Bharata B Rao wrote: > > > Hi, > > > > This is the next version of "Core based CPU hotplug for PowerPC sPAPR" that > > was posted at > > ht

Re: [Qemu-devel] [RFC PATCH v2 2/2] spapr: Memory hot-unplug support

2016-03-15 Thread Bharata B Rao
On Wed, Mar 16, 2016 at 12:36:05PM +1100, David Gibson wrote: > On Tue, Mar 15, 2016 at 10:08:56AM +0530, Bharata B Rao wrote: > > Add support to hot remove pc-dimm memory devices. > > > > Signed-off-by: Bharata B Rao > > Reviewed-by: David Gibson > > Looks

Re: [Qemu-devel] [RFC v3 2/2] spapr: implement query-hotpluggable-cpus QMP command

2016-03-15 Thread Bharata B Rao
>"vcpus-count": 2, >"qom-path": "/machine/unattached/device[0]"} >]}' > > TODO: > add 'node' property for core <-> numa node mapping > > Signed-off-by: Igor Mammedov > --- > it's onl

Re: [Qemu-devel] [RFC PATCH v2 9/9] spapr: CPU hot unplug support

2016-03-15 Thread Bharata B Rao
On Wed, Mar 16, 2016 at 04:27:04PM +1100, David Gibson wrote: > On Fri, Mar 11, 2016 at 10:24:38AM +0530, Bharata B Rao wrote: > > Remove the CPU core device by removing the underlying CPU thread devices. > > Hot removal of CPU for sPAPR guests is achieved by sending

Re: [Qemu-devel] [RFC PATCH v2 0/9] Core based CPU hotplug for PowerPC sPAPR

2016-03-19 Thread Bharata B Rao
On Thu, Mar 17, 2016 at 09:03:43PM +1100, David Gibson wrote: > On Wed, Mar 16, 2016 at 04:48:50PM +0100, Igor Mammedov wrote: > > On Wed, 16 Mar 2016 09:18:03 +0530 > > Bharata B Rao wrote: > > > > > On Mon, Mar 14, 2016 at 10:47:28AM +0100, Igor Mammedov wrote:

Re: [Qemu-devel] [for-2.7 PATCH v3 03/15] cpu: Reclaim vCPU objects

2016-05-26 Thread Bharata B Rao
On Thu, May 26, 2016 at 12:19:05PM +0200, Paolo Bonzini wrote: > > > On 12/05/2016 05:48, Bharata B Rao wrote: > > @@ -1531,6 +1563,9 @@ static void tcg_exec_all(void) > > break; > > } > > } else if (cpu->stop || cpu-

Re: [Qemu-devel] [PATCH qemu v16 19/19] spapr_pci/spapr_pci_vfio: Support Dynamic DMA Windows (DDW)

2016-05-26 Thread Bharata B Rao
On Fri, May 27, 2016 at 10:14 AM, David Gibson wrote: > On Tue, May 17, 2016 at 11:02:48AM +0530, Bharata B Rao wrote: >> On Mon, May 16, 2016 at 11:55 AM, Alexey Kardashevskiy >> wrote: >> > On 05/13/2016 06:41 PM, Bharata B Rao wrote: >> >> >>

Re: [Qemu-devel] [PATCH qemu v16 19/19] spapr_pci/spapr_pci_vfio: Support Dynamic DMA Windows (DDW)

2016-05-31 Thread Bharata B Rao
On Fri, May 27, 2016 at 11:19 AM, Bharata B Rao wrote: > On Fri, May 27, 2016 at 10:14 AM, David Gibson > wrote: >> On Tue, May 17, 2016 at 11:02:48AM +0530, Bharata B Rao wrote: >>> On Mon, May 16, 2016 at 11:55 AM, Alexey Kardashevskiy >>> wrote: >>>

[Qemu-devel] [RFC PATCH v0 2/2] spapr: Increase max memslots to 512

2016-06-01 Thread Bharata B Rao
KVM now supports 512 memslots on PowerPC (earlier it was 32). Hence allow user to specify a max of 512 hotpluggable memory slots. Instead of hard coding the max value, use the KVM supplied value if KVM is enabled. Otherwise resort to the default value of 32. Signed-off-by: Bharata B Rao --- hw

[Qemu-devel] [RFC PATCH v0 0/2] Increase max memslots to 512 for PowerPC

2016-06-01 Thread Bharata B Rao
Recently the number of memory slots supported by KVM for PowerPC was changed from 32 to 512. QEMU was restricting the user specifiable hot-pluggable memory slots to 32. This patchset changes that to 512. This allows more number of slots to be available for memory hotplugging. Bharata B Rao (2

[Qemu-devel] [RFC PATCH v0 1/2] kvm: API to obtain max supported mem slots

2016-06-01 Thread Bharata B Rao
Introduce kvm_get_max_memslots() API that can be used to obtain the maximum number of memslots supported by KVM. Signed-off-by: Bharata B Rao --- include/sysemu/kvm.h | 1 + kvm-all.c| 7 +++ 2 files changed, 8 insertions(+) diff --git a/include/sysemu/kvm.h b/include/sysemu

Re: [Qemu-devel] [RFC PATCH v0 0/2] Increase max memslots to 512 for PowerPC

2016-06-01 Thread Bharata B Rao
On Thu, Jun 02, 2016 at 10:42:23AM +1000, David Gibson wrote: > On Wed, Jun 01, 2016 at 12:18:22PM +0200, Thomas Huth wrote: > > On 01.06.2016 11:51, Bharata B Rao wrote: > > > Recently the number of memory slots supported by KVM for PowerPC was > > > changed >

Re: [Qemu-devel] [RFC PATCH v0 0/2] Increase max memslots to 512 for PowerPC

2016-06-02 Thread Bharata B Rao
On Thu, Jun 02, 2016 at 09:03:15AM +0200, Thomas Huth wrote: > On 02.06.2016 06:39, Bharata B Rao wrote: > ... > > Agreed. Here is the updated patch: > > > > spapr: Increase hotpluggable memory slots to 256 > > > > From: Bharata B Rao > > > > K

[Qemu-devel] [RFC PATCH v1 0/3] spapr: Work around the memory hotplug failure with DDW

2016-06-02 Thread Bharata B Rao
hotplug to fail. While guest fix has been proposed, this patchset works around the problem within QEMU. The workaround is described in patch 3/3. In summary this patchset changes the alignment gap b/n RAM and hotplug region for pseries-2.7 onwards so that memory hotplug works with buggy guests when

[Qemu-devel] [RFC PATCH v1 3/3] spapr: spapr: Work around the memory hotplug failure with DDW

2016-06-02 Thread Bharata B Rao
to 256M (LMB size in PowerKVM) so that we don't end up with any gaps between boot time RAM and hotplug region. Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 59 +++--- include/hw/ppc/spapr.h | 5 +++-- 2 files changed, 45 insertions(

[Qemu-devel] [RFC PATCH v1 1/3] spapr: Introduce pseries-2.7 machine type

2016-06-02 Thread Bharata B Rao
Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 44e401a..30b9731 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -2344,18 +2344,36 @@ static const TypeInfo

[Qemu-devel] [RFC PATCH v1 2/3] spapr: Remove alignment gap b/n RAM and hotplug regions

2016-06-02 Thread Bharata B Rao
Let the alignment b/n RAM and memory hotplug region be equal to LMB size (256MB) so that there is no gap b/n RAM and hotplug region. This new alignment is true for only pseries-2.7 onwards and the older machine types continue to have the earlier 1GB alignment. Suggested-by: David Gibson Signed

Re: [Qemu-devel] [RFC PATCH v1 3/3] spapr: spapr: Work around the memory hotplug failure with DDW

2016-06-05 Thread Bharata B Rao
On Fri, Jun 03, 2016 at 05:10:48PM +1000, David Gibson wrote: > On Fri, Jun 03, 2016 at 11:19:44AM +0530, Bharata B Rao wrote: > > Memory hotplug can fail for some combinations of RAM and maxmem when > > DDW is enabled in the presence of devices like nec-usb-xhci. DDW depends

[Qemu-devel] [RFC PATCH v2] spapr: Ensure all LMBs are represented in ibm, dynamic-memory

2016-06-06 Thread Bharata B Rao
mark RMA LMBs and also the LMBs for the gap b/n RAM and hotpluggable region as reserved so that these LMBs are not recounted/counted by guest. Signed-off-by: Bharata B Rao --- Changes in v2: - Dropped the patch that removed alignment gap b/n RAM and hotplug region, but instead populated ibm,dy

Re: [Qemu-devel] [RFC PATCH v2] spapr: Ensure all LMBs are represented in ibm, dynamic-memory

2016-06-06 Thread Bharata B Rao
On Mon, Jun 06, 2016 at 09:14:48AM -0500, Nathan Fontenot wrote: > On 06/06/2016 06:37 AM, Bharata B Rao wrote: > > Memory hotplug can fail for some combinations of RAM and maxmem when > > DDW is enabled in the presence of devices like nec-usb-xhci. DDW depends > > on maxim

[Qemu-devel] [PATCH v3] spapr: Ensure all LMBs are represented in ibm, dynamic-memory

2016-06-06 Thread Bharata B Rao
mark RMA LMBs and also the LMBs for the gap b/n RAM and hotpluggable region as reserved so that these LMBs are not recounted/counted by guest. Signed-off-by: Bharata B Rao --- Changes in v3: - Not touching spapr_create_lmb_dr_connectors() so that we continue to have DRC objects for only hotplug

Re: [Qemu-devel] [PATCH v3] spapr: Ensure all LMBs are represented in ibm, dynamic-memory

2016-06-07 Thread Bharata B Rao
On Tue, Jun 07, 2016 at 06:37:28PM -0500, Michael Roth wrote: > Quoting Bharata B Rao (2016-06-07 00:19:03) > > Memory hotplug can fail for some combinations of RAM and maxmem when > > DDW is enabled in the presence of devices like nec-usb-xhci. DDW depends > > on maxim

Re: [Qemu-devel] [for-2.7 PATCH v3 07/15] spapr: Abstract CPU core device and type specific core devices

2016-06-08 Thread Bharata B Rao
On Fri, Jun 03, 2016 at 03:25:08PM +1000, David Gibson wrote: > On Thu, May 12, 2016 at 09:18:17AM +0530, Bharata B Rao wrote: > > Add sPAPR specific abastract CPU core device that is based on generic > > CPU core device. Use this as base type to create sPAPR CPU specific c

Re: [Qemu-devel] [for-2.7 PATCH v3 08/15] spapr: convert boot CPUs into CPU core devices

2016-06-08 Thread Bharata B Rao
On Fri, Jun 03, 2016 at 03:32:10PM +1000, David Gibson wrote: > On Thu, May 12, 2016 at 09:18:18AM +0530, Bharata B Rao wrote: > > Introduce sPAPRMachineClass.dr_cpu_enabled to indicate support for > > CPU core hotplug. Initialize boot time CPUs as core deivces and prevent >

Re: [Qemu-devel] [PATCH v3] spapr: Ensure all LMBs are represented in ibm, dynamic-memory

2016-06-08 Thread Bharata B Rao
On Wed, Jun 08, 2016 at 10:05:12AM -0500, Michael Roth wrote: > Quoting Bharata B Rao (2016-06-07 21:35:54) > > On Tue, Jun 07, 2016 at 06:37:28PM -0500, Michael Roth wrote: > > > Quoting Bharata B Rao (2016-06-07 00:19:03) > > > > Memory hotplug can fail for some

[Qemu-devel] [PATCH v4 5/9] spapr: CPU hotplug support

2016-06-09 Thread Bharata B Rao
Set up device tree entries for the hotplugged CPU core and use the exising RTAS event logging infrastructure to send CPU hotplug notification to the guest. Signed-off-by: Bharata B Rao Reviewed-by: David Gibson --- hw/ppc/spapr.c | 78

[Qemu-devel] [PATCH v4 2/9] spapr: Abstract CPU core device and type specific core devices

2016-06-09 Thread Bharata B Rao
Add sPAPR specific abastract CPU core device that is based on generic CPU core device. Use this as base type to create sPAPR CPU specific core devices. TODO: - Add core types for other remaining CPU types - Handle CPU model alias correctly Signed-off-by: Bharata B Rao --- hw/ppc/Makefile.objs

[Qemu-devel] [PATCH v4 1/9] qom: API to get instance_size of a type

2016-06-09 Thread Bharata B Rao
Add an API object_type_get_size(const char *typename) that returns the instance_size of the give typename. Signed-off-by: Bharata B Rao --- include/qom/object.h | 8 +++- qom/object.c | 8 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/include/qom/object.h b

[Qemu-devel] [PATCH v4 0/9] Core based CPU hotplug for PowerPC sPAPR

2016-06-09 Thread Bharata B Rao
id logic when populating core id in spapr_query_hotpluggable_cpus(). - Handle CPU compat properly (-cpu host,compat=POWER7) v3: https://lists.gnu.org/archive/html/qemu-devel/2016-05/msg01829.html Bharata B Rao (7): qom: API to get instance_size of a type spapr: Abstract CPU core device and

[Qemu-devel] [PATCH v4 4/9] spapr: convert boot CPUs into CPU core devices

2016-06-09 Thread Bharata B Rao
as hotplug CPUs. Signed-off-by: Bharata B Rao Reviewed-by: David Gibson --- hw/ppc/spapr.c | 73 +++-- hw/ppc/spapr_cpu_core.c | 58 include/hw/ppc/spapr.h | 2 ++ include/hw/ppc/spapr_cpu_core.h |

[Qemu-devel] [PATCH v4 3/9] spapr: Move spapr_cpu_init() to spapr_cpu_core.c

2016-06-09 Thread Bharata B Rao
Start consolidating CPU init related routines in spapr_cpu_core.c. As part of this, move spapr_cpu_init() and its dependencies from spapr.c to spapr_cpu_core.c No functionality change in this patch. Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 47

[Qemu-devel] [PATCH v4 6/9] spapr: CPU hot unplug support

2016-06-09 Thread Bharata B Rao
Remove the CPU core device by removing the underlying CPU thread devices. Hot removal of CPU for sPAPR guests is achieved by sending the hot unplug notification to the guest. Release the vCPU object after CPU hot unplug so that vCPU fd can be parked and reused. Signed-off-by: Bharata B Rao

[Qemu-devel] [PATCH v4 8/9] hmp: Add 'info hotpluggable-cpus' HMP command

2016-06-09 Thread Bharata B Rao
This is the HMP equivalent for QMP query-hotpluggable-cpus. Signed-off-by: Bharata B Rao Reviewed-by: David Gibson --- hmp-commands-info.hx | 14 ++ hmp.c| 41 + hmp.h| 1 + 3 files changed, 56 insertions

[Qemu-devel] [PATCH v4 7/9] QMP: Add query-hotpluggable-cpus

2016-06-09 Thread Bharata B Rao
iders as CPU object. Signed-off-by: Igor Mammedov Signed-off-by: Bharata B Rao Reviewed-by: David Gibson --- include/hw/boards.h | 5 + monitor.c | 13 + qapi-schema.json| 55 + qmp-commands.hx | 23

[Qemu-devel] [PATCH v4 9/9] spapr: implement query-hotpluggable-cpus callback

2016-06-09 Thread Bharata B Rao
uot;: { "core": 8 }, "type": "POWER8-spapr-cpu-core", "vcpus-count": 2 }, { "props": { "core": 0 }, "type": "POWER8-spapr-cpu-core", "vcpus-count": 2, "qom-path": "/machin

Re: [Qemu-devel] [PATCH v3] spapr: Ensure all LMBs are represented in ibm, dynamic-memory

2016-06-09 Thread Bharata B Rao
On Thu, Jun 09, 2016 at 12:03:30PM +1000, David Gibson wrote: > On Wed, Jun 08, 2016 at 10:05:12AM -0500, Michael Roth wrote: > > Quoting Bharata B Rao (2016-06-07 21:35:54) > > > On Tue, Jun 07, 2016 at 06:37:28PM -0500, Michael Roth wrote: > > > > Quoting Bhar

[Qemu-devel] [PATCH v4] spapr: Ensure all LMBs are represented in ibm, dynamic-memory

2016-06-09 Thread Bharata B Rao
mark RMA LMBs and also the LMBs for the gap b/n RAM and hotpluggable region as reserved and as having no valid DRC so that these LMBs are not considered by the guest. Signed-off-by: Bharata B Rao --- Changes in v4: - Included address information for all LMBs in ibm,dynamic-memory. - Use both RES

Re: [Qemu-devel] [Qemu-ppc] [PATCH v4 0/9] Core based CPU hotplug for PowerPC sPAPR

2016-06-15 Thread Bharata B Rao
On Wed, Jun 15, 2016 at 04:04:14PM +1000, David Gibson wrote: > On Fri, Jun 10, 2016 at 03:14:14PM +1000, David Gibson wrote: > > On Fri, Jun 10, 2016 at 06:28:59AM +0530, Bharata B Rao wrote: > > > Hi, > > > > > > This is the next version of the CPU hotp

[Qemu-devel] [RFC PATCH v0 1/1] spapr: Support setting of compat CPU type for CPU cores

2016-06-18 Thread Bharata B Rao
sPAPRCPUCore devices like: (qemu) device_add POWER8E-spapr-cpu-core,id=core3,compat=power7,core-id=24 Signed-off-by: Bharata B Rao --- Applies on ppc-for-2.7 branch of David Gibson's tree. hw/ppc/spapr.c | 8 + hw/ppc/spapr_cpu_core.c

Re: [Qemu-devel] [RFC PATCH v0 1/1] spapr: Support setting of compat CPU type for CPU cores

2016-06-21 Thread Bharata B Rao
On Tue, Jun 21, 2016 at 09:09:57AM +0200, Igor Mammedov wrote: > On Sat, 18 Jun 2016 14:04:06 +0530 > Bharata B Rao wrote: > > > Compat CPU type is typically specified on -cpu cmdline option like: > > -cpu host,compat=power7 or -cpu POWER8E,compat=power7 etc. > > Wit

Re: [Qemu-devel] [RFC PATCH v0 1/1] spapr: Support setting of compat CPU type for CPU cores

2016-06-21 Thread Bharata B Rao
On Tue, Jun 21, 2016 at 08:04:12AM +0200, Thomas Huth wrote: > On 18.06.2016 10:34, Bharata B Rao wrote: > > Compat CPU type is typically specified on -cpu cmdline option like: > > -cpu host,compat=power7 or -cpu POWER8E,compat=power7 etc. > > With the introduction of sPAPR

Re: [Qemu-devel] [RFC PATCH v0 1/1] spapr: Support setting of compat CPU type for CPU cores

2016-06-21 Thread Bharata B Rao
On Tue, Jun 21, 2016 at 03:10:00PM +1000, David Gibson wrote: > On Sat, Jun 18, 2016 at 02:04:06PM +0530, Bharata B Rao wrote: > > Compat CPU type is typically specified on -cpu cmdline option like: > > -cpu host,compat=power7 or -cpu POWER8E,compat=power7 etc. > > With the

[Qemu-devel] [RFC PATCH v1 1/1] spapr: Support setting of compat CPU type for CPU cores

2016-06-22 Thread Bharata B Rao
sPAPRCPUCore devices like: (qemu) device_add POWER8E-spapr-cpu-core,id=core3,compat=power7,core-id=24 Signed-off-by: Bharata B Rao --- Changes in v1: - In the routine that extracts "compat=" from -cpu cmdline, made the parsing generic as suggested by Thomas Huth so that it works in th

Re: [Qemu-devel] [RFC PATCH v0 1/1] spapr: Support setting of compat CPU type for CPU cores

2016-06-23 Thread Bharata B Rao
On Thu, Jun 23, 2016 at 12:55:36PM -0300, Eduardo Habkost wrote: > On Wed, Jun 22, 2016 at 09:09:46AM +0200, Igor Mammedov wrote: > > On Wed, 22 Jun 2016 08:00:28 +0530 > > Bharata B Rao wrote: > > > > > On Tue, Jun 21, 2016 at 09:09:57AM +0200, Igor Mammedov wrot

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

2016-05-11 Thread Bharata B Rao
cpu_exec_init() does vmstate_register for the CPU device. This needs to be undone from cpu_exec_exit(). This change is needed to support CPU hot removal. Signed-off-by: Bharata B Rao Reviewed-by: Thomas Huth Reviewed-by: David Gibson --- exec.c | 9 + 1 file changed, 9 insertions

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

2016-05-11 Thread Bharata B Rao
->cpu_index indicates that we have already dequeued the cpu for CONFIG_USER_ONLY case also. Signed-off-by: Bharata B Rao Reviewed-by: David Gibson Reviewed-by: Thomas Huth --- exec.c | 32 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/exec.

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

2016-05-11 Thread 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-off-by: Bharata B

[Qemu-devel] [for-2.7 PATCH v3 08/15] spapr: convert boot CPUs into CPU core devices

2016-05-11 Thread Bharata B Rao
as hotplug CPUs. Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 76 +++-- hw/ppc/spapr_cpu_core.c | 58 +++ include/hw/ppc/spapr.h | 2 ++ include/hw/ppc/spapr_cpu_core.h | 3 ++ 4 files changed,

[Qemu-devel] [for-2.7 PATCH v3 05/15] qdev: hotplug: Introduce HotplugHandler.pre_plug() callback

2016-05-11 Thread Bharata B Rao
From: Igor Mammedov pre_plug callback is to be called before device.realize() is executed. This would allow to check/set device's properties from HotplugHandler. Signed-off-by: Igor Mammedov Signed-off-by: Bharata B Rao Reviewed-by: David Gibson --- hw/core/hotplug.c| 11 ++

[Qemu-devel] [for-2.7 PATCH v3 00/15] Core based CPU hotplug for PowerPC sPAPR

2016-05-11 Thread Bharata B Rao
vent QEMU crash due to DRC detach racing against attach. - Addressed miscellaneous review comments from previous post. v2.1: https://lists.gnu.org/archive/html/qemu-ppc/2016-03/msg00649.html Bharata B Rao (11): exec: Remove cpu from cpus list during cpu_exec_exit() exec: Do vmstate unre

[Qemu-devel] [for-2.7 PATCH v3 06/15] cpu: Abstract CPU core type

2016-05-11 Thread Bharata B Rao
Add an abstract CPU core type that could be used by machines that want to define and hotplug CPUs in core granularity. Signed-off-by: Bharata B Rao Signed-off-by: Igor Mammedov [Integer core property] Reviewed-by: David Gibson --- hw/cpu/Makefile.objs | 1 + hw/cpu/core.c

[Qemu-devel] [for-2.7 PATCH v3 13/15] QMP: Add query-hotpluggable-cpus

2016-05-11 Thread Bharata B Rao
iders as CPU object. Signed-off-by: Igor Mammedov Signed-off-by: Bharata B Rao --- include/hw/boards.h | 5 + monitor.c | 13 + qapi-schema.json| 55 + qmp-commands.hx | 23 ++ 4 files

[Qemu-devel] [for-2.7 PATCH v3 11/15] spapr_drc: Prevent detach racing against attach for CPU DR

2016-05-11 Thread Bharata B Rao
ISOLATED state, we need a logic that works for CPU too. Signed-off-by: Bharata B Rao Reviewed-by: Michael Roth Signed-off-by: Michael Roth [Don't set awaiting_attach for PCI devices] --- hw/ppc/spapr_drc.c | 12 include/hw/ppc/spapr_drc.h | 1 + 2

[Qemu-devel] [for-2.7 PATCH v3 03/15] cpu: Reclaim vCPU objects

2016-05-11 Thread Bharata B Rao
suggested: https://www.mail-archive.com/kvm@vger.kernel.org/msg102839.html Signed-off-by: Chen Fan Signed-off-by: Gu Zheng Signed-off-by: Zhu Guihua Signed-off-by: Bharata B Rao [- Explicit CPU_REMOVE() from qemu_kvm/tcg_destroy_vcpu() isn't needed as

[Qemu-devel] [for-2.7 PATCH v3 12/15] spapr: CPU hot unplug support

2016-05-11 Thread Bharata B Rao
Remove the CPU core device by removing the underlying CPU thread devices. Hot removal of CPU for sPAPR guests is achieved by sending the hot unplug notification to the guest. Release the vCPU object after CPU hot unplug so that vCPU fd can be parked and reused. Signed-off-by: Bharata B Rao

[Qemu-devel] [for-2.7 PATCH v3 10/15] xics, xics_kvm: Handle CPU unplug correctly

2016-05-11 Thread Bharata B Rao
s allows reboot of a VM that has undergone CPU hotplug and unplug to work correctly. Signed-off-by: Bharata B Rao Reviewed-by: David Gibson --- hw/intc/xics.c| 14 ++ hw/intc/xics_kvm.c| 8 include/hw/ppc/xics.h | 1 + 3 files changed, 19 insertions(+), 4 d

[Qemu-devel] [for-2.7 PATCH v3 07/15] spapr: Abstract CPU core device and type specific core devices

2016-05-11 Thread Bharata B Rao
Add sPAPR specific abastract CPU core device that is based on generic CPU core device. Use this as base type to create sPAPR CPU specific core devices. TODO: - Add core types for other remaining CPU types - Handle CPU model alias correctly Signed-off-by: Bharata B Rao --- hw/ppc/Makefile.objs

[Qemu-devel] [for-2.7 PATCH v3 15/15] spapr: implement query-hotpluggable-cpus callback

2016-05-11 Thread Bharata B Rao
uot;: { "core": 8 }, "type": "POWER8-spapr-cpu-core", "vcpus-count": 2 }, { "props": { "core": 0 }, "type": "POWER8-spapr-cpu-core", "vcpus-count": 2, "qom-path": "/machin

[Qemu-devel] [for-2.7 PATCH v3 09/15] spapr: CPU hotplug support

2016-05-11 Thread Bharata B Rao
Set up device tree entries for the hotplugged CPU core and use the exising RTAS event logging infrastructure to send CPU hotplug notification to the guest. Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 91 ++--- hw/ppc/spapr_cpu_core.c

[Qemu-devel] [for-2.7 PATCH v3 14/15] hmp: Add 'info hotpluggable-cpus' HMP command

2016-05-11 Thread Bharata B Rao
This is the HMP equivalent for QMP query-hotpluggable-cpus. Signed-off-by: Bharata B Rao --- hmp-commands-info.hx | 14 ++ hmp.c| 41 + hmp.h| 1 + 3 files changed, 56 insertions(+) diff --git a/hmp-commands

Re: [Qemu-devel] [PATCH qemu v16 19/19] spapr_pci/spapr_pci_vfio: Support Dynamic DMA Windows (DDW)

2016-05-13 Thread Bharata B Rao
--- > hw/ppc/spapr_rtas_ddw.c | 292 > > include/hw/pci-host/spapr.h | 8 +- > include/hw/ppc/spapr.h | 16 ++- > trace-events| 4 + > 7 files changed, 381 insertions(+), 20 deletions(-) > c

Re: [Qemu-devel] [PATCH qemu v16 19/19] spapr_pci/spapr_pci_vfio: Support Dynamic DMA Windows (DDW)

2016-05-13 Thread Bharata B Rao
On Fri, May 13, 2016 at 2:11 PM, Bharata B Rao wrote: > On Wed, May 4, 2016 at 12:22 PM, Alexey Kardashevskiy wrote: >> +static void rtas_ibm_create_pe_dma_window(PowerPCCPU *cpu, >> + sPAPRMach

Re: [Qemu-devel] [PATCH qemu v16 19/19] spapr_pci/spapr_pci_vfio: Support Dynamic DMA Windows (DDW)

2016-05-16 Thread Bharata B Rao
On Mon, May 16, 2016 at 11:55 AM, Alexey Kardashevskiy wrote: > On 05/13/2016 06:41 PM, Bharata B Rao wrote: >> >> On Wed, May 4, 2016 at 12:22 PM, Alexey Kardashevskiy >> wrote: > > >> >>> + >>> +avail = SPAPR_PCI_DMA_

Re: [Qemu-devel] [RFC PATCH v3 06/24] spapr: Consolidate cpu init code into a routine

2015-05-05 Thread Bharata B Rao
On Mon, May 04, 2015 at 06:10:59PM +0200, Thomas Huth wrote: > On Fri, 24 Apr 2015 12:17:28 +0530 > Bharata B Rao wrote: > > > Factor out bits of sPAPR specific CPU initialization code into > > a separate routine so that it can be called from CPU hotplug > > path

Re: [Qemu-devel] [RFC PATCH v3 07/24] cpu: Prepare Socket container type

2015-05-05 Thread Bharata B Rao
On Tue, May 05, 2015 at 11:47:30AM +1000, David Gibson wrote: > On Fri, Apr 24, 2015 at 12:17:29PM +0530, Bharata B Rao wrote: > > From: Andreas Färber > > > > Signed-off-by: Andreas Färber > > Signed-off-by: Bharata B Rao > > So, how to organize this gene

Re: [Qemu-devel] [RFC PATCH v3 08/24] ppc: Prepare CPU socket/core abstraction

2015-05-05 Thread Bharata B Rao
On Mon, May 04, 2015 at 05:15:04PM +0200, Thomas Huth wrote: > On Fri, 24 Apr 2015 12:17:30 +0530 > Bharata B Rao wrote: > > > Signed-off-by: Bharata B Rao > > Signed-off-by: Andreas Färber > > Not sure if QEMU is fully following the kernel Sob-process, but if >

Re: [Qemu-devel] [RFC PATCH v3 10/24] ppc: Update cpu_model in MachineState

2015-05-05 Thread Bharata B Rao
On Tue, May 05, 2015 at 04:49:08PM +1000, David Gibson wrote: > On Fri, Apr 24, 2015 at 12:17:32PM +0530, Bharata B Rao wrote: > > Keep cpu_model field in MachineState uptodate so that it can be used > > from the CPU hotplug path. > > > > Signed-off-by: Bharata B

Re: [Qemu-devel] [RFC PATCH v3 12/24] spapr: CPU hotplug support

2015-05-05 Thread Bharata B Rao
On Mon, May 04, 2015 at 05:53:23PM +0200, Thomas Huth wrote: > On Fri, 24 Apr 2015 12:17:34 +0530 > Bharata B Rao wrote: > > > Support CPU hotplug via device-add command. Set up device tree > > entries for the hotplugged CPU core and use the exising EPOW event > >

Re: [Qemu-devel] [RFC PATCH v3 18/24] xics_kvm: Don't enable KVM_CAP_IRQ_XICS if already enabled

2015-05-05 Thread Bharata B Rao
On Tue, May 05, 2015 at 05:22:52PM +1000, David Gibson wrote: > On Fri, Apr 24, 2015 at 12:17:40PM +0530, Bharata B Rao wrote: > > When supporting CPU hot removal by parking the vCPU fd and reusing > > it during hotplug again, there can be cases where we try to reenable > >

Re: [Qemu-devel] [RFC PATCH v3 12/24] spapr: CPU hotplug support

2015-05-05 Thread Bharata B Rao
On Tue, May 05, 2015 at 04:59:51PM +1000, David Gibson wrote: > On Fri, Apr 24, 2015 at 12:17:34PM +0530, Bharata B Rao wrote: > > Support CPU hotplug via device-add command. Set up device tree > > entries for the hotplugged CPU core and use the exising EPOW event > > infra

Re: [Qemu-devel] [RFC PATCH v3 17/24] cpus: Reclaim vCPU objects

2015-05-05 Thread Bharata B Rao
On Tue, May 05, 2015 at 05:20:04PM +1000, David Gibson wrote: > On Fri, Apr 24, 2015 at 12:17:39PM +0530, 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 n

Re: [Qemu-devel] [RFC PATCH v3 20/24] spapr: CPU hot unplug support

2015-05-06 Thread Bharata B Rao
On Tue, May 05, 2015 at 05:28:38PM +1000, David Gibson wrote: > On Fri, Apr 24, 2015 at 12:17:42PM +0530, Bharata B Rao wrote: > > Support hot removal of CPU for sPAPR guests by sending the hot unplug > > notification to the guest via EPOW interrupt. Release the vCPU object &g

Re: [Qemu-devel] [RFC PATCH v3 21/24] spapr: Initialize hotplug memory address space

2015-05-06 Thread Bharata B Rao
On Tue, May 05, 2015 at 05:33:33PM +1000, David Gibson wrote: > On Fri, Apr 24, 2015 at 12:17:43PM +0530, Bharata B Rao wrote: > > Initialize a hotplug memory region under which all the hotplugged > > memory is accommodated. Also enable memory hotplug by setting > &g

Re: [Qemu-devel] [RFC PATCH v3 21/24] spapr: Initialize hotplug memory address space

2015-05-06 Thread Bharata B Rao
On Tue, May 05, 2015 at 10:48:50AM +0200, Igor Mammedov wrote: > On Fri, 24 Apr 2015 12:17:43 +0530 > Bharata B Rao wrote: > > > Initialize a hotplug memory region under which all the hotplugged > > memory is accommodated. Also enable memory hotplug by setting &

Re: [Qemu-devel] [RFC PATCH v3 23/24] spapr: Support ibm, dynamic-reconfiguration-memory

2015-05-06 Thread Bharata B Rao
On Tue, May 05, 2015 at 05:40:32PM +1000, David Gibson wrote: > On Fri, Apr 24, 2015 at 12:17:45PM +0530, Bharata B Rao wrote: > > Parse ibm,architecture.vec table obtained from the guest and enable > > memory node configuration via ibm,dynamic-reconfiguration-memory if guest > &

Re: [Qemu-devel] [RFC PATCH v3 24/24] spapr: Memory hotplug support

2015-05-06 Thread Bharata B Rao
On Tue, May 05, 2015 at 05:45:01PM +1000, David Gibson wrote: > On Fri, Apr 24, 2015 at 12:17:46PM +0530, Bharata B Rao wrote: > > Make use of pc-dimm infrastructure to support memory hotplug > > for PowerPC. > > > > Modelled on i386 memory hotplug. > > C

Re: [Qemu-devel] [RFC PATCH v3 06/24] spapr: Consolidate cpu init code into a routine

2015-05-06 Thread Bharata B Rao
On Wed, May 06, 2015 at 08:32:03AM +0200, Thomas Huth wrote: > On Wed, 6 May 2015 09:58:09 +0530 > Bharata B Rao wrote: > > > On Mon, May 04, 2015 at 06:10:59PM +0200, Thomas Huth wrote: > > > On Fri, 24 Apr 2015 12:17:28 +0530 > > > Bharata B Rao wrote: > &

Re: [Qemu-devel] [PATCH 3/4] spapr: Remove obsolete entry_point field from sPAPRMachineState

2015-05-06 Thread Bharata B Rao
versions which bypassed the > firmware when using -kernel. In any case it has no function now, so remove > it. > > Signed-off-by: David Gibson > --- > hw/ppc/spapr.c | 4 +--- > include/hw/ppc/spapr.h | 2 +- > 2 files changed, 2 insertions(+), 4 deletions(-) &g

Re: [Qemu-devel] [RFC PATCH v3 21/24] spapr: Initialize hotplug memory address space

2015-05-06 Thread Bharata B Rao
On Thu, May 07, 2015 at 11:12:36AM +1000, David Gibson wrote: > On Wed, May 06, 2015 at 01:53:05PM +0530, Bharata B Rao wrote: > > On Tue, May 05, 2015 at 10:48:50AM +0200, Igor Mammedov wrote: > > > On Fri, 24 Apr 2015 12:17:43 +0530 > > > Bharata B Rao wrote:

[Qemu-devel] [RFC PATCH v0] numa: API to lookup NUMA node by address

2015-05-07 Thread Bharata B Rao
memory hotplug. Signed-off-by: Bharata B Rao Reviewed-by: David Gibson --- This patch was earlier posted as part of sPAPR hotplug patchset here: https://lists.gnu.org/archive/html/qemu-ppc/2015-04/msg00204.html include/sysemu/numa.h | 3 +++ numa.c| 61

Re: [Qemu-devel] [RFC v0 PATCH] cpus: Convert cpu_index into a bitmap

2015-05-07 Thread Bharata B Rao
On Wed, Mar 18, 2015 at 11:50:04AM +0530, Bharata B Rao wrote: > On Tue, Mar 17, 2015 at 11:56:04AM +0100, Andreas Färber wrote: > > Am 17.03.2015 um 09:39 schrieb Bharata B Rao: > > > On Tue, Mar 17, 2015 at 07:56:41AM +0100, Alexander Graf wrote: > > >> > > &g

[Qemu-devel] [RFC v1 PATCH 0/3] cpus: Convert cpu_index into a bitmap

2015-05-08 Thread Bharata B Rao
chive/html/qemu-devel/2015-03/msg02950.html Bharata B Rao (3): cpus: Add Error argument to cpu_exec_init() cpus: Convert cpu_index into a bitmap ppc: Move cpu_exec_init() call to realize function exec.c | 39 +++ include/exec/

[Qemu-devel] [RFC v1 PATCH 1/3] cpus: Add Error argument to cpu_exec_init()

2015-05-08 Thread Bharata B Rao
. Signed-off-by: Bharata B Rao Reviewed-by: David Gibson --- exec.c | 2 +- include/exec/exec-all.h | 2 +- target-alpha/cpu.c | 2 +- target-arm/cpu.c| 2 +- target-cris/cpu.c | 2 +- target-i386/cpu.c | 2 +- target-lm32/cpu.c

<    4   5   6   7   8   9   10   11   12   >