Re: [Qemu-devel] [PATCH v2] scsi-disk: add UNMAP limits to block limits VPD page

2013-12-22 Thread Bharata B Rao
on option. SCSI drivers are > used to online firmware updates so I'm not yet adding versioning support > for SCSI, but we're probably getting close to the point when it's worth > thinking about it. > > Reported-by: Bharata B Rao > Signed-off-by: Paolo Bonzini This

Re: [Qemu-devel] [RFC PATCH v0 1/2] gluster: Change licence to GPLv2+

2014-03-03 Thread Bharata B Rao
On Thu, Jan 30, 2014 at 10:30:53AM +0100, Stefan Hajnoczi wrote: > On Wed, Jan 29, 2014 at 07:59:55PM +0530, Bharata B Rao wrote: > > Pipe handling mechanism in gluster driver was based on similar > > implementation > > in RBD driver and hence had GPLv2 and associated

[Qemu-devel] [RFC PATCH v0] ppc: Force CPU threads count to be a power of 2.

2014-03-03 Thread Bharata B Rao
reads count. Signed-off-by: Bharata B Rao --- target-ppc/translate_init.c | 8 1 file changed, 8 insertions(+) diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index 445c360..f3eff5e 100644 --- a/target-ppc/translate_init.c +++ b/target-ppc/translate_init.c @@ -18,6

[Qemu-devel] [RFC PATCH v0 1/2] gluster: Change licence to GPLv2+

2014-01-29 Thread Bharata B Rao
cence to GPLv2+ and remove RBD copyrights. Signed-off-by: Bharata B Rao --- block/gluster.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/block/gluster.c b/block/gluster.c index a009b15..ba56005 100644 --- a/block/gluster.c +++ b/block/gluster.c @@ -3,17

[Qemu-devel] [RFC PATCH v0 0/2] gluster: licence change and cleanups

2014-01-29 Thread Bharata B Rao
Licence change of gluster driver from GPLv2 to GPLv2+ and some cleanups. Bharata B Rao (2): gluster: Change licence to GPLv2+ gluster: Remove unused defines and header include block/gluster.c | 16 ++-- 1 file changed, 2 insertions(+), 14 deletions(-) -- 1.7.11.7

[Qemu-devel] [RFC PATCH v0 2/2] gluster: Remove unused defines and header include

2014-01-29 Thread Bharata B Rao
Remove the definitions of GLUSTER_FD_WRITE and GLUSTER_FD_READ which are no longer used. Also sockets.h isn't needed any more. Signed-off-by: Bharata B Rao --- block/gluster.c | 4 1 file changed, 4 deletions(-) diff --git a/block/gluster.c b/block/gluster.c index ba56005..1838373 1

Re: [Qemu-devel] [PATCH 1/2] block: gluster - code movements, state storage changes

2014-02-06 Thread Bharata B Rao
On Wed, Feb 05, 2014 at 08:25:36PM +0100, Benoît Canet wrote: > Le Tuesday 04 Feb 2014 à 14:26:58 (-0500), Jeff Cody a écrit : > > > > +static void qemu_gluster_parse_flags(int bdrv_flags, int *open_flags) > > +{ > > +assert(open_flags != NULL); > > + > > +*open_flags |= O_BINARY; > > + >

Re: [Qemu-devel] [PATCH 1/2] block: gluster - code movements, state storage changes

2014-02-07 Thread Bharata B Rao
On Fri, Feb 07, 2014 at 03:22:29PM +0100, Benoît Canet wrote: > Le Friday 07 Feb 2014 à 09:14:50 (+0530), Bharata B Rao a écrit : > > On Wed, Feb 05, 2014 at 08:25:36PM +0100, Benoît Canet wrote: > > > Le Tuesday 04 Feb 2014 à 14:26:58 (-0500), Jeff Cody a écrit : > > &g

Re: [Qemu-devel] [RFC PATCH v0 2/3] gluster: Implement .bdrv_co_write_zeroes for gluster

2013-12-05 Thread Bharata B Rao
On Wed, Dec 04, 2013 at 02:16:28PM -0500, Jeff Cody wrote: > On Fri, Nov 22, 2013 at 12:46:17PM +0530, Bharata B Rao wrote: > > + > > +ret = glfs_zerofill_async(s->fd, offset, size, &gluster_finish_aiocb, > > acb); > > +if (ret < 0) { > >

[Qemu-devel] [RFC PATCH v1 3/3] gluster: Add support for creating zero-filled image

2013-12-05 Thread Bharata B Rao
achieve the zeroing. Signed-off-by: Bharata B Rao --- block/gluster.c | 50 +- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/block/gluster.c b/block/gluster.c index 1390270..c167abe 100644 --- a/block/gluster.c +++ b/block/gluster

[Qemu-devel] [RFC PATCH v1 2/3] gluster: Implement .bdrv_co_write_zeroes for gluster

2013-12-05 Thread Bharata B Rao
Support .bdrv_co_write_zeroes() from gluster driver by using GlusterFS API glfs_zerofill() that off-loads the writing of zeroes to GlusterFS server. Signed-off-by: Bharata B Rao --- block/gluster.c | 77 + configure | 8 ++ 2

[Qemu-devel] [RFC PATCH v1 1/3] gluster: Convert aio routines into coroutines

2013-12-05 Thread Bharata B Rao
Convert the read, write, flush and discard implementations from aio-based ones to coroutine based ones. Signed-off-by: Bharata B Rao --- block/gluster.c | 184 +++- 1 file changed, 63 insertions(+), 121 deletions(-) diff --git a/block

[Qemu-devel] [RFC PATCH v1 0/3] gluster: conversion to coroutines and supporting write_zeroes

2013-12-05 Thread Bharata B Rao
/qemu_gluster_co_rw. - Use errno appropriately from read, write, flush, discard and zerofill routines in gluster driver. - Fix a memory leak in qemu_gluster_create(). - Proceed with glfs_zerofill() only if glfs_ftruncate() succeeds in qemu_gluster_create(). Bharata B Rao (3): gluster: Convert aio

Re: [Qemu-devel] [RFC PATCH v0 1/3] gluster: Convert aio routines into coroutines

2013-12-05 Thread Bharata B Rao
On Tue, Dec 03, 2013 at 03:04:01PM +0100, Stefan Hajnoczi wrote: > On Fri, Nov 22, 2013 at 12:46:16PM +0530, Bharata B Rao wrote: > > +qemu_bh_delete(acb->bh); > > +acb->bh = NULL; > > +qemu_coroutine_enter(acb->coroutine, NULL); > > +if

[Qemu-devel] [RFC PATCH v0 0/3] gluster: conversion to coroutines and supporting write_zeroes

2013-11-21 Thread Bharata B Rao
(-o preallocation=full) that can be used for raw images on GlusterFS backend to create fully allocated and zero-filled images. Bharata B Rao (3): gluster: Convert aio routines into coroutines gluster: Implement .bdrv_co_write_zeroes for gluster gluster: Add support for creating zero-filled

[Qemu-devel] [RFC PATCH v0 1/3] gluster: Convert aio routines into coroutines

2013-11-21 Thread Bharata B Rao
Convert the read, write, flush and discard implementations from aio-based ones to coroutine based ones. Signed-off-by: Bharata B Rao --- block/gluster.c | 168 +--- 1 file changed, 63 insertions(+), 105 deletions(-) diff --git a/block

[Qemu-devel] [RFC PATCH v0 2/3] gluster: Implement .bdrv_co_write_zeroes for gluster

2013-11-21 Thread Bharata B Rao
Support .bdrv_co_write_zeroes() from gluster driver by using GlusterFS API glfs_zerofill() that off-loads the writing of zeroes to GlusterFS server. Signed-off-by: Bharata B Rao --- block/gluster.c | 101 configure | 8 + 2

[Qemu-devel] [RFC PATCH v0 3/3] gluster: Add support for creating zero-filled image

2013-11-21 Thread Bharata B Rao
achieve the zeroing. Signed-off-by: Bharata B Rao --- block/gluster.c | 45 + 1 file changed, 45 insertions(+) diff --git a/block/gluster.c b/block/gluster.c index 15f5dfb..2368997 100644 --- a/block/gluster.c +++ b/block/gluster.c @@ -

Re: [Qemu-devel] [Bug 1308542] [NEW] hang in qemu_gluster_init

2014-04-17 Thread Bharata B Rao
On Thu, Apr 17, 2014 at 11:27:52AM +0200, Kevin Wolf wrote: > Am 16.04.2014 um 15:25 hat John Eckersberg geschrieben: > > Public bug reported: > > > > In qemu_gluster_init, if the call to either glfs_set_volfile_server or > > glfs_set_logging fails into the "out" case, glfs_fini is called without

Re: [Qemu-devel] [PATCH 1/1 V2] target-ppc: Adding Functionality to rtas_ibm_get_system_parameter.

2014-04-17 Thread Tomohiro B Berry
Hi, I was just wondering if anything else needed to be done to get this pushed upstream? Thanks, Tomo Tomohiro B Berry/Austin/IBM@IBMUS wrote on 03/20/2014 04:17:33 PM: > From: Tomohiro B Berry/Austin/IBM@IBMUS > To: qemu-devel@nongnu.org, > Cc: Tomohiro B Berry/Austin/IBM@IBM

Re: [Qemu-devel] [Bug 1308542] Re: hang in qemu_gluster_init

2014-04-20 Thread Bharata B Rao
On Fri, Apr 18, 2014 at 02:38:57PM -, Soumya Koduri wrote: > " glfs_init" cannot be called before since it checks for > cmds_args->volfile_server which is allocated only in > "glfs_set_volfile_server". We should either modify "glfs_fini" or Soumya - Thanks for offering to fix this in gluster

Re: [Qemu-devel] [PATCH v5] target-ppc: ppc64 target's virtio can be either endian

2014-04-20 Thread Bharata B Rao
On Mon, Apr 14, 2014 at 5:42 PM, Greg Kurz wrote: > > + > +#if !defined(CONFIG_USER_ONLY) > +bool virtio_is_big_endian(void) > +{ > +PowerPCCPU *cp = POWERPC_CPU(first_cpu); > +CPUPPCState *env = &cp->env; > + > +/* NOTE: booke uses the same number for another unrelated spr. > + *

Re: [Qemu-devel] [PATCH v5] target-ppc: ppc64 target's virtio can be either endian

2014-04-21 Thread Bharata B Rao
On Mon, Apr 21, 2014 at 1:26 PM, Alexander Graf wrote: > > > Am 21.04.2014 um 06:16 schrieb Bharata B Rao : > > On Mon, Apr 14, 2014 at 5:42 PM, Greg Kurz wrote: > >> >> + >> +#if !defined(CONFIG_USER_ONLY) >> +bool virtio_is_big_endian(void) >> +

Re: [Qemu-devel] [PATCH v5] target-ppc: ppc64 target's virtio can be either endian

2014-04-21 Thread Bharata B Rao
On Mon, Apr 21, 2014 at 4:48 PM, Greg Kurz wrote: > On Mon, 21 Apr 2014 09:56:48 +0200 > Alexander Graf wrote: > > > > > > > > Am 21.04.2014 um 06:16 schrieb Bharata B Rao : > > > > > >> On Mon, Apr 14, 2014 at 5:42 PM, Greg Kurz > wrote:

Re: [Qemu-devel] [PATCH 1/4] dump: Make DumpState and endian conversion routines available for arch-specific dump code

2014-04-29 Thread Bharata B Rao
On Tue, Apr 29, 2014 at 2:59 PM, Greg Kurz wrote: > On Tue, 29 Apr 2014 11:16:51 +0200 > Alexander Graf wrote: > > > > On 28.04.14 13:29, Greg Kurz wrote: > > > From: Bharata B Rao > > > > > > Make DumpState and endian conversion routines available

Re: [Qemu-devel] [PATCH 07/22] gluster: use BlockDriverState's AioContext

2014-05-05 Thread Bharata B Rao
handlers, timers, or BHs stay registered when > requests have been drained. > > Cc: Bharata B Rao > Signed-off-by: Stefan Hajnoczi > --- > block/gluster.c | 7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) Changes look fine from gluster driver's point of view. Regards, Bharata.

[Qemu-devel] [PATCH v1] ppc: Force CPU threads count to be a power of 2.

2014-03-04 Thread Bharata B Rao
reads count. Signed-off-by: Bharata B Rao Acked-by: Stewart Smith --- Changes in v1: Make error message more descriptive as per Stewart's suggestion. v0: https://lists.gnu.org/archive/html/qemu-devel/2014-03/msg00355.html target-ppc/translate_init.c | 9 + 1 file changed, 9 insertion

Re: [Qemu-devel] [PATCH v1] ppc: Force CPU threads count to be a power of 2.

2014-03-04 Thread Bharata B Rao
On Tue, Mar 04, 2014 at 09:13:38PM -0700, Eric Blake wrote: > On 03/04/2014 08:36 PM, Bharata B Rao wrote: > > PowerPC kernel expects the number of SMT threads in a core to be a power > > of 2. Since QEMU doesn't enforce this, it leads to an early guest kernel > > crash i

[Qemu-devel] [PATCH v2] ppc: Force CPU threads count to be a power of 2.

2014-03-05 Thread Bharata B Rao
reads count. Signed-off-by: Bharata B Rao --- Changes in v2: Use is_power_of_2() from QEMU itself instead of depending on libm. v1: https://lists.gnu.org/archive/html/qemu-devel/2014-03/msg00660.html v0: https://lists.gnu.org/archive/html/qemu-devel/2014-03/msg00355.html target-ppc/translate_init.

[Qemu-devel] qemu patch for adding functionality to rtas_ibm_get_system_parameter

2014-03-12 Thread Tomohiro B Berry
okay, too. Regards, Tomo Berry diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c index 1cb276d..318fdcd 100644 --- a/hw/ppc/spapr_rtas.c +++ b/hw/ppc/spapr_rtas.c @@ -225,6 +225,9 @@ static void rtas_stop_self(PowerPCCPU *cpu, sPAPREnvironment *spapr, } #define DIAGNOSTICS_RUN_MODE

Re: [Qemu-devel] qemu patch for adding functionality to rtas_ibm_get_system_parameter [Version 2]

2014-03-13 Thread Tomohiro B Berry
. Regards, Tomo Berry Signed-off-by: Tomo Berry diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c index 1cb276d..931ba06 100644 --- a/hw/ppc/spapr_rtas.c +++ b/hw/ppc/spapr_rtas.c @@ -225,6 +225,9 @@ static void rtas_stop_self(PowerPCCPU *cpu, sPAPREnvironment *spapr, } #define

Re: [Qemu-devel] [PATCH v2] ppc: Force CPU threads count to be a power of 2.

2014-03-18 Thread Bharata B Rao
On Wed, Mar 05, 2014 at 06:59:29AM -0700, Eric Blake wrote: > On 03/05/2014 01:32 AM, Bharata B Rao wrote: > > PowerPC kernel expects the number of SMT threads in a core to be a power > > of 2. Since QEMU doesn't enforce this, it leads to an early guest kernel > > crash i

Re: [Qemu-devel] [RFC PATCH v1 11/13] spapr: Initialize hotplug memory address space

2015-02-11 Thread Bharata B Rao
On Thu, Feb 12, 2015 at 04:19:36PM +1100, David Gibson wrote: > > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c > > index 44405b2..9ff08ff 100644 > > --- a/hw/ppc/spapr.c > > +++ b/hw/ppc/spapr.c > > @@ -120,6 +120,8 @@ struct sPAPRMachineState { > > &

Re: [Qemu-devel] [RFC PATCH v1 11/13] spapr: Initialize hotplug memory address space

2015-02-16 Thread Bharata B Rao
On Mon, Feb 16, 2015 at 03:56:24PM +1100, David Gibson wrote: > > > > diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h > > > > index ae8b4e1..64681c4 100644 > > > > --- a/include/hw/ppc/spapr.h > > > > +++ b/include/hw/ppc/spapr.h

Re: [Qemu-devel] [RFC PATCH v1 04/13] spapr: Factor out CPU initialization code into realizefn

2015-02-22 Thread Bharata B Rao
On Fri, Jan 30, 2015 at 01:19:39PM +0530, Bharata B Rao wrote: > On Thu, Jan 29, 2015 at 12:07:42PM +1100, David Gibson wrote: > > On Thu, Jan 08, 2015 at 11:40:11AM +0530, Bharata B Rao wrote: > > > Move some CPU initialization code from machine init function to > > > C

Re: [Qemu-devel] [RFC PATCH v1 13/13] spapr: Memory hotplug support

2015-02-24 Thread Bharata B Rao
On Tue, Feb 24, 2015 at 05:26:12PM +1100, David Gibson wrote: > On Thu, Jan 08, 2015 at 11:40:20AM +0530, Bharata B Rao wrote: > > Make use of pc-dimm infrastructure to support memory hotplug > > for PowerPC. > > > > Modelled on i386 memory hotplug. > >

Re: [Qemu-devel] [PATCH v6 02/15] spapr_drc: initial implementation of sPAPRDRConnector device

2015-02-27 Thread Bharata B Rao
On Fri, Feb 27, 2015 at 8:41 AM, Michael Roth wrote: > +static void attach(sPAPRDRConnector *drc, DeviceState *d, void *fdt, > + int fdt_start_offset, bool coldplug, Error **errp) > +{ > +DPRINTFN("drc: %x, attach", get_index(drc)); > + > +if (drc->isolation_state != SPAP

[Qemu-devel] [PATCH v1 0/3] Fix pc DIMMs capacity calculation

2015-01-22 Thread Bharata B Rao
http://lists.gnu.org/archive/html/qemu-devel/2015-01/msg01020.html Bharata B Rao (3): pc: Fix DIMMs capacity calculation pc-dimm: Make pc_existing_dimms_capacity global pc-dimm: Add Error argument to pc_existing_dimms_capacity hw/i386/pc.c | 40 +--

[Qemu-devel] [PATCH v1 1/3] pc: Fix DIMMs capacity calculation

2015-01-22 Thread Bharata B Rao
pc_existing_dimms_capacity() is returning DIMMs count rather than capacity. Fix this to return the capacity. Also consider only realized devices for capacity calculation. Signed-off-by: Bharata B Rao Reviewed-by: Igor Mammedov --- hw/i386/pc.c | 26 ++ 1 file changed

[Qemu-devel] [PATCH 3/3] pc-dimm: Add Error argument to pc_existing_dimms_capacity

2015-01-22 Thread Bharata B Rao
Now that pc_existing_dimms_capacity() is an API, include Error pointer as an argument and modify the caller appropriately. Suggested-by: Igor Mammedov Signed-off-by: Bharata B Rao --- hw/i386/pc.c | 4 ++-- hw/mem/pc-dimm.c | 31 ++- include/hw

[Qemu-devel] [PATCH v1 2/3] pc-dimm: Make pc_existing_dimms_capacity global

2015-01-22 Thread Bharata B Rao
Move pc_existing_dimms_capacity() to pc-dimm.c since it would be needed by PowerPC memory hotplug code too. Signed-off-by: Bharata B Rao --- hw/i386/pc.c | 24 hw/mem/pc-dimm.c | 25 + include/hw/mem/pc-dimm.h | 1 + 3 files

[Qemu-devel] [PATCH v2 0/3] Fix pc DIMMs capacity calculation

2015-01-26 Thread Bharata B Rao
/qemu-devel/2015-01/msg01020.html Bharata B Rao (3): pc: Fix DIMMs capacity calculation pc-dimm: Make pc_existing_dimms_capacity global pc-dimm: Add Error argument to pc_existing_dimms_capacity hw/i386/pc.c | 40 +--- hw/mem/pc-dimm.c

[Qemu-devel] [PATCH v2 1/3] pc: Fix DIMMs capacity calculation

2015-01-26 Thread Bharata B Rao
pc_existing_dimms_capacity() is returning DIMMs count rather than capacity. Fix this to return the capacity. Also consider only realized devices for capacity calculation. Signed-off-by: Bharata B Rao Reviewed-by: Igor Mammedov --- hw/i386/pc.c | 26 ++ 1 file changed

[Qemu-devel] [PATCH v2 2/3] pc-dimm: Make pc_existing_dimms_capacity global

2015-01-26 Thread Bharata B Rao
Move pc_existing_dimms_capacity() to pc-dimm.c since it would be needed by PowerPC memory hotplug code too. Signed-off-by: Bharata B Rao Reviewed-by: Igor Mammedov --- hw/i386/pc.c | 24 hw/mem/pc-dimm.c | 25 + include/hw

[Qemu-devel] [PATCH v2 3/3] pc-dimm: Add Error argument to pc_existing_dimms_capacity

2015-01-26 Thread Bharata B Rao
Now that pc_existing_dimms_capacity() is an API, include Error pointer as an argument and modify the caller appropriately. Suggested-by: Igor Mammedov Signed-off-by: Bharata B Rao --- hw/i386/pc.c | 4 ++-- hw/mem/pc-dimm.c | 32 ++-- include/hw

Re: [Qemu-devel] [PATCH v2 00/11] cpu: add i386 cpu hot remove support

2015-01-27 Thread Bharata B Rao
On Tue, Jan 27, 2015 at 7:30 AM, Zhu Guihua wrote: > On Mon, 2015-01-26 at 12:27 +0100, Alexandre DERUMIER wrote: >> >>About this, I can do it successfully on my qemu. >> >>So can you tell us more information about your operation? >> simply start with >> >> -smp 2,sockets=2,cores=2,maxcpus=4 -devi

Re: [Qemu-devel] [PATCH v4 08/17] spapr_events: re-use EPOW event infrastructure for hotplug events

2015-01-27 Thread Bharata B Rao
HOTPLUG >> > + | RTAS_LOG_TYPE_HOTPLUG); >> > +hdr->extended_length = cpu_to_be32(sizeof(*new_hp) >> > + - sizeof(new_hp->hdr)); >> > + >> > +spapr_init_v6hdr

Re: [Qemu-devel] [RFC PATCH v1 06/13] spapr: CPU hotplug support

2015-01-27 Thread Bharata B Rao
On Thu, Jan 22, 2015 at 04:16:01PM -0600, Michael Roth wrote: > Quoting Bharata B Rao (2015-01-08 00:10:13) > > +static void spapr_machine_device_plug(HotplugHandler *hotplug_dev, > > + DeviceState *dev, Error **errp) > > +{ > > +

Re: [Qemu-devel] [RFC PATCH v1 06/13] spapr: CPU hotplug support

2015-01-29 Thread Bharata B Rao
On Fri, Jan 23, 2015 at 01:41:38PM +0100, Igor Mammedov wrote: > On Thu, 8 Jan 2015 11:40:13 +0530 > Bharata B Rao wrote: > > > Support CPU hotplug via device-add command. Use the exising EPOW event > > infrastructure to send CPU hotplug notification to the guest. &

Re: [Qemu-devel] [RFC PATCH v1 04/13] spapr: Factor out CPU initialization code into realizefn

2015-01-29 Thread Bharata B Rao
On Thu, Jan 29, 2015 at 12:07:42PM +1100, David Gibson wrote: > On Thu, Jan 08, 2015 at 11:40:11AM +0530, Bharata B Rao wrote: > > Move some CPU initialization code from machine init function to > > CPU realizefn so that it can be used from CPU hotplug path too. > > >

Re: [Qemu-devel] [RFC PATCH v1 05/13] spapr: Support ibm, lrdr-capacity device tree property

2015-01-29 Thread Bharata B Rao
On Thu, Jan 29, 2015 at 12:16:09PM +1100, David Gibson wrote: > On Thu, Jan 08, 2015 at 11:40:12AM +0530, Bharata B Rao wrote: > > -int spapr_rtas_device_tree_setup(void *fdt, hwaddr rtas_addr, > > - hwaddr rtas_size) > > +int spapr_r

Re: [Qemu-devel] [RFC PATCH v1 07/13] spapr: Start all the threads of CPU core when core is hotplugged

2015-01-30 Thread Bharata B Rao
On Thu, Jan 29, 2015 at 12:36:55PM +1100, David Gibson wrote: > On Thu, Jan 08, 2015 at 11:40:14AM +0530, Bharata B Rao wrote: > > PowerPC kernel adds or removes CPUs in core granularity and hence > > onlines/offlines all the SMT threads of a core during hot plug/unplug. > > S

Re: [Qemu-devel] [RFC PATCH v1 09/13] spapr: CPU hot unplug support

2015-01-30 Thread Bharata B Rao
On Thu, Jan 29, 2015 at 12:39:58PM +1100, David Gibson wrote: > On Thu, Jan 08, 2015 at 11:40:16AM +0530, Bharata B Rao wrote: > > Support hot removal of CPU for sPAPR guests. > > > > Signed-off-by: Bharata B Rao > > --- > > hw/ppc/spapr.c | 43 +

Re: [Qemu-devel] [RFC PATCH v1 10/13] cpus, spapr: reclaim allocated vCPU objects

2015-01-30 Thread Bharata B Rao
On Thu, Jan 29, 2015 at 12:48:39PM +1100, David Gibson wrote: > On Thu, Jan 08, 2015 at 11:40:17AM +0530, Bharata B Rao wrote: > > From: Gu Zheng > > This needs a commit message, it's not at all clear from the 1-line > description. Borrowed patch, but I should ha

Re: [Qemu-devel] [RFC PATCH v1 05/13] spapr: Support ibm, lrdr-capacity device tree property

2015-01-30 Thread Bharata B Rao
On Thu, Jan 22, 2015 at 03:55:40PM -0600, Michael Roth wrote: > Quoting Bharata B Rao (2015-01-08 00:10:12) > > Add support for ibm,lrdr-capacity since this is needed by the guest > > kernel to know about the possible hot-pluggable CPUs and Memory. > > > > Define minim

Re: [Qemu-devel] [RFC PATCH v1 00/13] CPU and Memory hotplug for PowerPC guests

2015-02-02 Thread Bharata B Rao
On Thu, Jan 29, 2015 at 06:46:30PM +0100, Andreas Färber wrote: > Hi, > > Am 08.01.2015 um 07:10 schrieb Bharata B Rao: > > This patchset enables CPU and memory hotplug support for PowerPC guests. > > > > Changes in this patchset (v1): > > > > - Based on

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

2015-03-17 Thread Bharata B Rao
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: > >> > >> > >> On 13.03.15 12:56, Bharata B Rao wrote: > >>

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

2015-03-17 Thread Bharata B Rao
On Tue, Mar 17, 2015 at 11:51:36AM +0100, Andreas Färber wrote: > Am 13.03.2015 um 12:56 schrieb Bharata B Rao: > > From: Bharata B Rao > > > > Currently CPUState.cpu_index is monotonically increasing and a newly > > created CPU always gets the next higher index. The

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

2015-03-17 Thread Bharata B Rao
On Wed, Mar 18, 2015 at 11:49:59AM +1100, David Gibson wrote: > On Fri, Mar 13, 2015 at 05:26:36PM +0530, Bharata B Rao wrote: > > From: Bharata B Rao > > > > Currently CPUState.cpu_index is monotonically increasing and a newly > > created CPU always gets the

[Qemu-devel] [RFC PATCH v2 01/23] spapr: enable PHB/CPU/LMB hotplug for pseries-2.3

2015-03-23 Thread Bharata B Rao
onditional enable creation of DRC objects and device-tree description to facilitate hotplug of PHBs/CPUs/LMBs. Since we can't migrate this state to older machine types, default the option to false and only enable it for new machine types. Signed-off-by: Michael Roth Signed-off-by

[Qemu-devel] [RFC PATCH v2 00/23] CPU and Memory hotplug for PowerPC sPAPR guests

2015-03-23 Thread Bharata B Rao
le, these user space tools will not be needed. Andreas Färber (1): cpu: Prepare Socket container type Bharata B Rao (20): spapr: Add DRC dt entries for CPUs spapr: Consider max_cpus during xics initialization spapr: Support ibm,lrdr-capacity device tree property spapr: Reorganize CPU dt gen

[Qemu-devel] [RFC PATCH v2 07/23] cpu: Prepare Socket container type

2015-03-23 Thread Bharata B Rao
From: Andreas Färber Signed-off-by: Andreas Färber Signed-off-by: Bharata B Rao --- hw/cpu/Makefile.objs| 2 +- hw/cpu/socket.c | 21 + include/hw/cpu/socket.h | 14 ++ 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 hw/cpu

[Qemu-devel] [RFC PATCH v2 04/23] spapr: Support ibm, lrdr-capacity device tree property

2015-03-23 Thread Bharata B Rao
storing maximum possible memory for the guest in sPAPREnvironment. Signed-off-by: Bharata B Rao --- docs/specs/ppc-spapr-hotplug.txt | 18 ++ hw/ppc/spapr.c | 3 ++- hw/ppc/spapr_rtas.c | 18 -- include/hw/ppc/spapr.h | 7

[Qemu-devel] [RFC PATCH v2 05/23] spapr: Reorganize CPU dt generation code

2015-03-23 Thread Bharata B Rao
Reorganize CPU device tree generation code so that it be reused from hotplug path. CPU dt entries are now generated from spapr_finalize_fdt() instead of spapr_create_fdt_skel(). Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 288 ++--- 1

[Qemu-devel] [RFC PATCH v2 02/23] spapr: Add DRC dt entries for CPUs

2015-03-23 Thread Bharata B Rao
Advertise CPU DR-capability to the guest via device tree. Signed-off-by: Bharata B Rao Signed-off-by: Michael Roth [spapr_drc_reset implementation] Reviewed-by: David Gibson --- hw/ppc/spapr.c | 29 + 1 file changed, 29 insertions(+) diff --git a/hw

[Qemu-devel] [RFC PATCH v2 10/23] ppc: Update cpu_model in MachineState

2015-03-23 Thread Bharata B Rao
Keep cpu_model field in MachineState uptodate so that it can be used from the CPU hotplug path. Signed-off-by: Bharata B Rao --- hw/ppc/mac_newworld.c | 10 +- hw/ppc/mac_oldworld.c | 7 +++ hw/ppc/ppc440_bamboo.c | 7 +++ hw/ppc/prep.c | 7 +++ hw/ppc/spapr.c

[Qemu-devel] [RFC PATCH v2 03/23] spapr: Consider max_cpus during xics initialization

2015-03-23 Thread Bharata B Rao
Use max_cpus instead of smp_cpus when intializating xics system. Also report max_cpus in ibm,interrupt-server-ranges device tree property of interrupt controller node. Signed-off-by: Bharata B Rao Reviewed-by: David Gibson --- hw/ppc/spapr.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[Qemu-devel] [RFC PATCH v2 11/23] ppc: Create sockets and cores for CPUs

2015-03-23 Thread Bharata B Rao
ppc machine init functions create individual CPU threads. Change this for sPAPR by switching to socket creation. CPUs are created recursively by socket and core instance init routines. TODO: Switching to socket level CPU creation is done only for sPAPR target now. Signed-off-by: Bharata B Rao

[Qemu-devel] [RFC PATCH v2 08/23] ppc: Prepare CPU socket/core abstraction

2015-03-23 Thread Bharata B Rao
Signed-off-by: Bharata B Rao Signed-off-by: Andreas Färber --- hw/ppc/Makefile.objs| 1 + hw/ppc/cpu-core.c | 46 hw/ppc/cpu-socket.c | 47 + include/hw/ppc/cpu-core.h | 32

[Qemu-devel] [RFC PATCH v2 06/23] spapr: Consolidate cpu init code into a routine

2015-03-23 Thread Bharata B Rao
Factor out bits of sPAPR specific CPU initialization code into a separate routine so that it can be called from CPU hotplug path too. Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 54 +- 1 file changed, 29 insertions(+), 25 deletions

[Qemu-devel] [RFC PATCH v2 09/23] spapr: Add CPU hotplug handler

2015-03-23 Thread Bharata B Rao
Add CPU hotplug handler to spapr machine class and let the plug handler initialize spapr CPU specific initialization bits for a realized CPU. This lets CPU boot path and hotplug path to share as much code as possible. Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 25

[Qemu-devel] [RFC PATCH v2 13/23] cpus: Add Error argument to cpu_exec_init()

2015-03-23 Thread Bharata B Rao
. Signed-off-by: Bharata B Rao --- 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 | 2 +- target-m68k/cpu.c

[Qemu-devel] [RFC PATCH v2 12/23] spapr: CPU hotplug support

2015-03-23 Thread Bharata B Rao
Support CPU hotplug via device-add command. Set up device tree entries for the hotplugged CPU core and use the exising EPOW event infrastructure to send CPU hotplug notification to the guest. Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c| 75

[Qemu-devel] [RFC PATCH v2 20/23] spapr: Remove vCPU objects after CPU hot unplug

2015-03-23 Thread Bharata B Rao
Release the vCPU objects after CPU hot unplug so that vCPU fd can be parked and reused. Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 7b8784d..3e56d9e 100644 --- a/hw

[Qemu-devel] [RFC PATCH v2 17/23] xics_kvm: Don't enable KVM_CAP_IRQ_XICS if already enabled

2015-03-23 Thread Bharata B Rao
t was already enabled earlier. This change allows CPU hot removal to work for sPAPR. Signed-off-by: Bharata B Rao --- hw/intc/xics_kvm.c| 10 ++ include/hw/ppc/xics.h | 1 + 2 files changed, 11 insertions(+) diff --git a/hw/intc/xics_kvm.c b/hw/intc/xics_kvm.c index c15453f..5b27bf8 1

[Qemu-devel] [RFC PATCH v2 15/23] ppc: Move cpu_exec_init() call to realize function

2015-03-23 Thread Bharata B Rao
Move cpu_exec_init() call from instance_init to realize. This allows any failures from cpu_exec_init() to be handled appropriately. Also add cpu_exec_exit() call from unrealize. Signed-off-by: Bharata B Rao --- target-ppc/translate_init.c | 9 +++-- 1 file changed, 7 insertions(+), 2

[Qemu-devel] [RFC PATCH v2 14/23] cpus: Convert cpu_index into a bitmap

2015-03-23 Thread Bharata B Rao
/archive/html/qemu-devel/2015-02/msg02604.html), generating cpu_index this way will not work for PowerPC. This patch changes the way cpu_index is handed out by maintaining a bit map of the CPUs that tracks both addition and removal of CPUs. Signed-off-by: Bharata B Rao --- exec.c| 37

[Qemu-devel] [RFC PATCH v2 16/23] cpus: Reclaim vCPU objects

2015-03-23 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 --- cpus.c | 44 include/qom/cpu.h| 11

[Qemu-devel] [RFC PATCH v2 22/23] spapr: Support ibm, dynamic-reconfiguration-memory

2015-03-23 Thread Bharata B Rao
a SLOF enhancement which is already part of upstream SLOF. Signed-off-by: Bharata B Rao --- docs/specs/ppc-spapr-hotplug.txt | 48 + hw/ppc/spapr.c | 228 +++ hw/ppc/spapr_hcall.c | 51 +++-- include/hw/ppc/spapr.h

[Qemu-devel] [RFC PATCH v2 18/23] xics_kvm: Add cpu_destroy method to XICS

2015-03-23 Thread Bharata B Rao
XICS is setup for each CPU during initialization. Provide a routine to undo the same when CPU is unplugged. This allows reboot of a VM that has undergone CPU hotplug and unplug to work correctly. Signed-off-by: Bharata B Rao --- hw/intc/xics.c| 12 hw/intc/xics_kvm.c

[Qemu-devel] [RFC PATCH v2 23/23] spapr: Memory hotplug support

2015-03-23 Thread Bharata B Rao
Make use of pc-dimm infrastructure to support memory hotplug for PowerPC. Modelled on i386 memory hotplug. Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c| 119 +- hw/ppc/spapr_events.c | 3 ++ 2 files changed, 120 insertions(+), 2

[Qemu-devel] [RFC PATCH v2 19/23] spapr: CPU hot unplug support

2015-03-23 Thread Bharata B Rao
Support hot removal of CPU for sPAPR guests by sending the hot unplug notification to the guest via EPOW interrupt. Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c| 78 ++- linux-headers/linux/kvm.h | 1 + target-ppc/kvm.c | 7

[Qemu-devel] [RFC PATCH v2 21/23] spapr: Initialize hotplug memory address space

2015-03-23 Thread Bharata B Rao
Initialize a hotplug memory region under which all the hotplugged memory is accommodated. Also enable memory hotplug by setting CONFIG_MEM_HOTPLUG. Modelled on i386 memory hotplug. Signed-off-by: Bharata B Rao --- default-configs/ppc64-softmmu.mak | 1 + hw/ppc/spapr.c| 50

Re: [Qemu-devel] [RFC PATCH v2 02/23] spapr: Add DRC dt entries for CPUs

2015-03-24 Thread Bharata B Rao
On Wed, Mar 25, 2015 at 11:07:10AM +1100, David Gibson wrote: > On Mon, Mar 23, 2015 at 07:05:43PM +0530, Bharata B Rao wrote: > > Advertise CPU DR-capability to the guest via device tree. > > > > Signed-off-by: Bharata B Rao > > Signed-off-by: Michael Roth > >

Re: [Qemu-devel] [RFC PATCH v2 05/23] spapr: Reorganize CPU dt generation code

2015-03-25 Thread Bharata B Rao
On Wed, Mar 25, 2015 at 12:36:38PM +1100, David Gibson wrote: > On Mon, Mar 23, 2015 at 07:05:46PM +0530, Bharata B Rao wrote: > > Reorganize CPU device tree generation code so that it be reused from > > hotplug path. CPU dt entries are now generated from spapr_finalize_fdt()

Re: [Qemu-devel] [RFC PATCH v2 11/23] ppc: Create sockets and cores for CPUs

2015-03-25 Thread Bharata B Rao
On Wed, Mar 25, 2015 at 01:39:02PM +1100, David Gibson wrote: > On Mon, Mar 23, 2015 at 07:05:52PM +0530, Bharata B Rao wrote: > > ppc machine init functions create individual CPU threads. Change this > > for sPAPR by switching to socket creation. CPUs are created recursively &g

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

2015-03-25 Thread Bharata B Rao
On Wed, Mar 25, 2015 at 02:03:45PM +1100, David Gibson wrote: > On Mon, Mar 23, 2015 at 07:05:53PM +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 v2 14/23] cpus: Convert cpu_index into a bitmap

2015-03-25 Thread Bharata B Rao
On Wed, Mar 25, 2015 at 02:23:29PM +1100, David Gibson wrote: > On Mon, Mar 23, 2015 at 07:05:55PM +0530, Bharata B Rao wrote: > > Currently CPUState.cpu_index is monotonically increasing and a newly > > created CPU always gets the next higher index. The next available > > i

Re: [Qemu-devel] [RFC PATCH v2 15/23] ppc: Move cpu_exec_init() call to realize function

2015-03-25 Thread Bharata B Rao
On Wed, Mar 25, 2015 at 02:25:09PM +1100, David Gibson wrote: > On Mon, Mar 23, 2015 at 07:05:56PM +0530, Bharata B Rao wrote: > > Move cpu_exec_init() call from instance_init to realize. This allows > > any failures from cpu_exec_init() to be handled appropriately. > > >

Re: [Qemu-devel] [RFC PATCH v2 17/23] xics_kvm: Don't enable KVM_CAP_IRQ_XICS if already enabled

2015-03-25 Thread Bharata B Rao
On Wed, Mar 25, 2015 at 04:24:39PM +1100, David Gibson wrote: > On Mon, Mar 23, 2015 at 07:05:58PM +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 v2 19/23] spapr: CPU hot unplug support

2015-03-25 Thread Bharata B Rao
On Wed, Mar 25, 2015 at 04:44:48PM +1100, David Gibson wrote: > On Mon, Mar 23, 2015 at 07:06:00PM +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. > > > > S

Re: [Qemu-devel] [PATCH RFC 3/4] pc: Create sockets and cores for CPUs

2015-03-25 Thread Bharata B Rao
hw/i386/pc.c | 66 > > 1 file changed, 58 insertions(+), 8 deletions(-) > > diff --git a/hw/i386/pc.c b/hw/i386/pc.c > index 2c48277..492c262 100644 > --- a/hw/i386/pc.c > +++ b/hw/i386/pc.c > @@ -54,11 +54,14 @@ > #include "exec/memory.h"

Re: [Qemu-devel] [PATCH RFC 3/4] pc: Create sockets and cores for CPUs

2015-03-25 Thread Bharata B Rao
On Wed, Mar 25, 2015 at 10:43 PM, Andreas Färber wrote: > Am 25.03.2015 um 17:55 schrieb Bharata B Rao: >> On Mon, Mar 23, 2015 at 11:02 PM, Andreas Färber wrote: >>> Inline realized=true from pc_new_cpu() so that the realization can be >>> deferred, as it would otherw

Re: [Qemu-devel] [RFC PATCH v2 00/23] CPU and Memory hotplug for PowerPC sPAPR guests

2015-03-25 Thread Bharata B Rao
On Thu, Mar 26, 2015 at 02:58:12PM +1100, David Gibson wrote: > On Mon, Mar 23, 2015 at 07:05:41PM +0530, Bharata B Rao wrote: > > Hi, > > > > This is the version 2 of the patchset that provides CPU and memory hotplug > > support for PowerPC sPAPR guests. > > Tha

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

2015-03-30 Thread Bharata B Rao
is O(N^2) in number of nodes, which is a bit hideous for > something so simple. Will something like below work ? Will all archs be ok with this ? numa: Store start and end address range of each node in numa_info Keep track of start and end address of each NUMA node in numa_info structure so th

Re: [Qemu-devel] [RFC PATCH v2 04/23] spapr: Support ibm, lrdr-capacity device tree property

2015-03-31 Thread Bharata B Rao
On Wed, Mar 25, 2015 at 11:15:55AM +1100, David Gibson wrote: > On Mon, Mar 23, 2015 at 07:05:45PM +0530, Bharata B Rao wrote: > > Add support for ibm,lrdr-capacity since this is needed by the guest > > kernel to know about the possible hot-pluggable CPUs and Memory. With > >

Re: [Qemu-devel] [RFC PATCH v2 00/23] CPU and Memory hotplug for PowerPC sPAPR guests

2015-04-06 Thread Bharata B Rao
On Mon, Mar 23, 2015 at 07:05:41PM +0530, Bharata B Rao wrote: > Hi, > > This is the version 2 of the patchset that provides CPU and memory hotplug > support for PowerPC sPAPR guests. [snip] > TODOs > - > - Share code between pc_dimm_plug() and spapr_memory_plug(). &

Re: [Qemu-devel] [PATCH 04/12] spapr_pci: add set-indicator RTAS interface

2014-12-31 Thread Bharata B Rao
On Tue, Dec 23, 2014 at 8:42 PM, Michael Roth wrote: > > Hi Bharata, > > I've submitted v4 of PCI hotplug. The development branch is here: > > https://github.com/mdroth/qemu/commits/spapr-hotplug-pci > > and is based on top of a 'core' branch organized similar to what you proposed: > > https:/

Re: [Qemu-devel] [PATCH v4 02/17] spapr_drc: initial implementation of sPAPRDRConnector device

2015-01-02 Thread Bharata B Rao
+++ > include/hw/ppc/spapr_drc.h | 201 ++ > 3 files changed, 705 insertions(+), 1 deletion(-) > create mode 100644 hw/ppc/spapr_drc.c > create mode 100644 include/hw/ppc/spapr_drc.h > > diff --git a/hw/ppc/Makefile.objs b/hw/ppc

[Qemu-devel] [RFC PATCH v1 11/13] spapr: Initialize hotplug memory address space

2015-01-07 Thread Bharata B Rao
Initialize a hotplug memory region under which all the hotplugged memory is accommodated. Also enable memory hotplug by setting CONFIG_MEM_HOTPLUG. Modelled on i386 memory hotplug. Signed-off-by: Bharata B Rao --- default-configs/ppc64-softmmu.mak | 1 + hw/ppc/spapr.c| 26

<    1   2   3   4   5   6   7   8   9   10   >