[Qemu-devel] [PATCH v9 0/4] GlusterFS support in QEMU - v9

2012-09-24 Thread Bharata B Rao
Hi, This is v9 of the patchset to support GlusterFS backend from QEMU. Changes in v9 - - Drop all inet_parse related patches from the patchset. - Include generic URI parsing code from libxml2 and libvirt in QEMU and use that in gluster block backend instead of private URI parsing

[Qemu-devel] [PATCH v9 1/4] aio: Fix qemu_aio_wait() to maintain correct walking_handlers count

2012-09-24 Thread Bharata B Rao
nzini Signed-off-by: Bharata B Rao --- aio.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/aio.c b/aio.c index 0a9eb10..99b8b72 100644 --- a/aio.c +++ b/aio.c @@ -119,7 +119,7 @@ bool qemu_aio_wait(void) return true; } -walking_handler

[Qemu-devel] [PATCH v9 3/4] configure: Add a config option for GlusterFS as block backend

2012-09-24 Thread Bharata B Rao
configure: Add a config option for GlusterFS as block backend From: Bharata B Rao GlusterFS support in QEMU depends on libgfapi, libgfrpc and libgfxdr provided by GlusterFS. Signed-off-by: Bharata B Rao --- configure | 35 +++ 1 files changed, 35 insertions

[Qemu-devel] [PATCH v9 4/4] block: Support GlusterFS as a QEMU block backend.

2012-09-24 Thread Bharata B Rao
block: Support GlusterFS as a QEMU block backend. From: Bharata B Rao This patch adds gluster as the new block backend in QEMU. This gives QEMU the ability to boot VM images from gluster volumes. Its already possible to boot from VM images on gluster volumes using FUSE mount, but this patchset

Re: [Qemu-devel] [PATCH v9 4/4] block: Support GlusterFS as a QEMU block backend.

2012-09-24 Thread Bharata B Rao
ing manually. Look at the below gdb debug steps of your uri.c... 2302test("gluster+unix:///b?c=d%26e=f"); (gdb) s test (x=0x4062c4 "gluster+unix:///b?c=d%26e=f") at uri.c:2279 2279URI *uri = uri_parse(x); (gdb) n 2283if (!uri) { (gdb) p *uri $1 = {scheme =

Re: [Qemu-devel] [PATCH] aio: another fix to the walking_handlers logic

2012-09-24 Thread Bharata B Rao
On Mon, Sep 24, 2012 at 05:06:11PM +0200, Paolo Bonzini wrote: > The AIO dispatch loop will call QLIST_REMOVE and g_free even if there > are other pending calls to qemu_aio_wait outside the current one. > > Signed-off-by: Paolo Bonzini > --- > This is on top of the existing fix that is po

Re: [Qemu-devel] KVM call agenda for September 25th

2012-09-25 Thread Bharata B Rao
On Tue, Sep 25, 2012 at 04:51:15PM +0200, Kevin Wolf wrote: > Am 25.09.2012 14:57, schrieb Anthony Liguori: > > qemu -device \ > > isa-serial,index=0,chr=tcp://localhost:1025/?server=on&wait=off > > Your examples kind of prove this: They aren't much shorter than what > exists today, but they

Re: [Qemu-devel] [PATCH v9 4/4] block: Support GlusterFS as a QEMU block backend.

2012-09-26 Thread Bharata B Rao
On Wed, Sep 26, 2012 at 12:00:47PM +0200, Kevin Wolf wrote: > Am 24.09.2012 11:13, schrieb Bharata B Rao: > > +static int parse_volume_options(GlusterConf *gconf, char *path) > > +{ > > +char *token, *saveptr; > > + > > +/* volname */ > > +

Re: [Qemu-devel] [PATCH v9 4/4] block: Support GlusterFS as a QEMU block backend.

2012-09-26 Thread Bharata B Rao
On Wed, Sep 26, 2012 at 06:38:02PM +0200, Paolo Bonzini wrote: > Il 26/09/2012 18:11, Bharata B Rao ha scritto: > >>> +static int parse_volume_options(GlusterConf *gconf, char *path) > >>> > > +{ > >>> > > +char *token, *saveptr; > >&

Re: [Qemu-devel] [PATCH v9 4/4] block: Support GlusterFS as a QEMU block backend.

2012-09-27 Thread Bharata B Rao
On Thu, Sep 27, 2012 at 09:19:34AM +0200, Paolo Bonzini wrote: > > > > For gluster://server/volnamepath/to/image, the image is extracted as > > "//path/to/image". > > Should there be three /'s here? I assume it's just a typo. Yes it was a typo. > > I'm concerned that there is no documenta

[Qemu-devel] [PATCH v10 0/5] GlusterFS support in QEMU - v10

2012-09-27 Thread Bharata B Rao
Hi, This is v10 of the patchset to support GlusterFS backend from QEMU. Changes in v10 -- - Included another fix to qemu_aio_wait() from Paolo in the series. - A few more fixes to the volume and image parsing code. - Removed unnecessary unescaping of URI query parameters. - Fail if se

[Qemu-devel] [PATCH v10 1/5] aio: Fix qemu_aio_wait() to maintain correct walking_handlers count

2012-09-27 Thread Bharata B Rao
nzini Signed-off-by: Bharata B Rao --- aio.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/aio.c b/aio.c index 0a9eb10..99b8b72 100644 --- a/aio.c +++ b/aio.c @@ -119,7 +119,7 @@ bool qemu_aio_wait(void) return true; } -walking_handler

[Qemu-devel] [PATCH v10 2/5] aio: Another fix to the walking_handlers logic

2012-09-27 Thread Bharata B Rao
aio: Another fix to the walking_handlers logic From: Paolo Bonzini The AIO dispatch loop will call QLIST_REMOVE and g_free even if there are other pending calls to qemu_aio_wait outside the current one. Signed-off-by: Paolo Bonzini Signed-off-by: Bharata B Rao --- aio.c | 10

[Qemu-devel] [PATCH v10 4/5] configure: Add a config option for GlusterFS as block backend

2012-09-27 Thread Bharata B Rao
configure: Add a config option for GlusterFS as block backend From: Bharata B Rao GlusterFS support in QEMU depends on libgfapi, libgfrpc and libgfxdr provided by GlusterFS. Signed-off-by: Bharata B Rao --- configure | 35 +++ 1 files changed, 35 insertions

[Qemu-devel] [PATCH v10 5/5] block: Support GlusterFS as a QEMU block backend.

2012-09-27 Thread Bharata B Rao
block: Support GlusterFS as a QEMU block backend. From: Bharata B Rao This patch adds gluster as the new block backend in QEMU. This gives QEMU the ability to boot VM images from gluster volumes. Its already possible to boot from VM images on gluster volumes using FUSE mount, but this patchset

Re: [Qemu-devel] [PATCH v6 2/2] block: Support GlusterFS as a QEMU block backend

2012-09-05 Thread Bharata B Rao
On Thu, Aug 09, 2012 at 06:32:16PM +0530, Bharata B Rao wrote: > +static void qemu_gluster_complete_aio(GlusterAIOCB *acb) > +{ > +int ret; > + > +if (acb->canceled) { > +qemu_aio_release(acb); > +return; > +} > + > +if (acb->re

Re: [Qemu-devel] [PATCH v6 2/2] block: Support GlusterFS as a QEMU block backend

2012-09-05 Thread Bharata B Rao
On Wed, Sep 05, 2012 at 01:11:06PM +0530, Bharata B Rao wrote: > On Thu, Aug 09, 2012 at 06:32:16PM +0530, Bharata B Rao wrote: > > +static void qemu_gluster_complete_aio(GlusterAIOCB *acb) > > +{ > > +int ret; > > + > > +if (acb->canceled)

Re: [Qemu-devel] [PATCH v6 2/2] block: Support GlusterFS as a QEMU block backend

2012-09-05 Thread Bharata B Rao
On Wed, Sep 05, 2012 at 12:01:58PM +0200, Kevin Wolf wrote: > Am 05.09.2012 09:41, schrieb Bharata B Rao: > > On Thu, Aug 09, 2012 at 06:32:16PM +0530, Bharata B Rao wrote: > >> +static void qemu_gluster_complete_aio(GlusterAIOCB *acb) > >> +{ > >> +int ret

Re: [Qemu-devel] [PATCH v6 2/2] block: Support GlusterFS as a QEMU block backend

2012-09-06 Thread Bharata B Rao
sonable to me. > > Excludes ] from the valid characters in the file name of the socket, but > > that shouldn't be a problem in practice. > > Bikeshedding, but I prefer > > gluster:///path/to/unix/domain/socket:/volname/image?transport=unix So if the unix domain socke

Re: [Qemu-devel] [PATCH v6 2/2] block: Support GlusterFS as a QEMU block backend

2012-09-06 Thread Bharata B Rao
On Thu, Sep 06, 2012 at 04:47:17PM +0100, Daniel P. Berrange wrote: > IMHO this is all gross. URIs already have a well defined way to provide > multiple parameters, dealing with escaping of special characters. ie query > parameters. The whole benefit of using URI syntax is to let apps process > the

Re: [Qemu-devel] [PATCH v6 2/2] block: Support GlusterFS as a QEMU block backend

2012-09-06 Thread Bharata B Rao
On Thu, Sep 06, 2012 at 09:35:04AM +0200, Paolo Bonzini wrote: > > +static int qemu_gluster_open(BlockDriverState *bs, const char *filename, > > +int bdrv_flags) > > +{ > > +BDRVGlusterState *s = bs->opaque; > > +int open_flags = 0; > > +int ret = 0; > > +GlusterURI *uri = g_mal

Re: [Qemu-devel] [PATCH v6 2/2] block: Support GlusterFS as a QEMU block backend

2012-09-07 Thread Bharata B Rao
On Thu, Sep 06, 2012 at 12:29:30PM +0200, Kevin Wolf wrote: > Am 06.09.2012 12:18, schrieb Paolo Bonzini: > > Il 06/09/2012 12:07, Kevin Wolf ha scritto: > >>> The AIOCB is already invalid at the time the callback is entered, so we > >>> could release it before the call. However, not all implement

Re: [Qemu-devel] [PATCH v6 2/2] block: Support GlusterFS as a QEMU block backend

2012-09-08 Thread Bharata B Rao
On Fri, Sep 07, 2012 at 05:11:33PM +0200, Paolo Bonzini wrote: > This is a bug that has to be fixed anyway. There are provisions in > aio.c, but they are broken apparently. Can you try this: > > diff --git a/aio.c b/aio.c > index 0a9eb10..99b8b72 100644 > --- a/aio.c > ++

[Qemu-devel] [PATCH v1] Make inet_parse() non-static

2012-09-11 Thread Bharata B Rao
From: Bharata B Rao Make inet_parse() non static. - Make inet_parse() non-static so that other subsystems like gluster can use it to parse inet addresses. As a pre-requisite, define and globalize the qemu_inet_opts. - Extend inet_parse() to parse just 'address' also in a

Re: [Qemu-devel] [PATCH v1] Make inet_parse() non-static

2012-09-11 Thread Bharata B Rao
On Tue, Sep 11, 2012 at 02:34:09PM +0200, Markus Armbruster wrote: > Bharata B Rao writes: > > > From: Bharata B Rao > > > > Make inet_parse() non static. > > > > - Make inet_parse() non-static so that other subsystems like gluster > > can use it t

Re: [Qemu-devel] [PATCH v6 2/2] block: Support GlusterFS as a QEMU block backend

2012-09-12 Thread Bharata B Rao
On Fri, Sep 07, 2012 at 11:57:58AM +0200, Kevin Wolf wrote: > Am 07.09.2012 11:36, schrieb Paolo Bonzini: > > Hmm, why don't we do the exact same thing as libvirt > > (http://libvirt.org/remote.html): > > > > ipv4 - gluster+tcp://1.2.3.4:0/testvol/dir/a.img > > ipv6 - gluster+tcp://[1:2:3:4:5:6:7

[Qemu-devel] [RFC v7 0/5] GlusterFS support in QEMU - v7

2012-09-17 Thread Bharata B Rao
Hi, This is the v7 of the patchset to support GlusterFS backend from QEMU. Changes in v7 - - Added a few more patches to the patchset that are needed by gluster block driver: inet_parse and qemu_aio_count fixes. - URI specification of gluster drive on QEMU cmdline has been changed.

[Qemu-devel] [PATCH v7 1/5] sockets: Make inet_parse() non static.

2012-09-17 Thread Bharata B Rao
sockets: Make inet_parse() non static. From: Bharata B Rao Make inet_parse() non-static so that other subsystems like gluster can use it to parse inet addresses. As a pre-requisite, define and globalize the qemu_inet_opts. Signed-off-by: Bharata B Rao --- Makefile.objs |2 +- qemu

[Qemu-devel] [PATCH v7 2/5] sockets: Change inet_parse() to accept address specification without port

2012-09-17 Thread Bharata B Rao
sockets: Change inet_parse() to accept address specification without port From: Bharata B Rao inet_parse() expects address:port. Change it to work without explicit port specification. In addition, don't depend solely on the return value of sscanf but also consider the value obtained f

[Qemu-devel] [PATCH v7 3/5] aio: Fix qemu_aio_wait() to maintain correct walking_handlers count

2012-09-17 Thread Bharata B Rao
nzini Signed-off-by: Bharata B Rao --- aio.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/aio.c b/aio.c index 0a9eb10..99b8b72 100644 --- a/aio.c +++ b/aio.c @@ -119,7 +119,7 @@ bool qemu_aio_wait(void) return true; } -walking_handler

[Qemu-devel] [PATCH v7 4/5] configure: Add a config option for GlusterFS as block backend

2012-09-17 Thread Bharata B Rao
configure: Add a config option for GlusterFS as block backend From: Bharata B Rao GlusterFS support in QEMU depends on libgfapi, libgfrpc and libgfxdr provided by GlusterFS. Signed-off-by: Bharata B Rao --- configure | 35 +++ 1 files changed, 35 insertions

[Qemu-devel] [PATCH v7 5/5] block: Support GlusterFS as a QEMU block backend.

2012-09-17 Thread Bharata B Rao
block: Support GlusterFS as a QEMU block backend. From: Bharata B Rao This patch adds gluster as the new block backend in QEMU. This gives QEMU the ability to boot VM images from gluster volumes. Its already possible to boot from VM images on gluster volumes using FUSE mount, but this patchset

Re: [Qemu-devel] [PULL 08/18] block/gluster: drop qemu_gluster_aio_flush_cb()

2013-08-16 Thread Bharata B Rao
> From: Stefan Hajnoczi > Since .io_flush() is no longer called we do not need > qemu_gluster_aio_flush_cb() anymore. It turns out that qemu_aio_count > is unused now and can be dropped. > > Signed-off-by: Stefan Hajnoczi Tested-by: Bharata B Rao Tested GlusterFS backend,

Re: [Qemu-devel] [PATCH] block: Fix race in gluster_finish_aiocb

2013-08-21 Thread Bharata B Rao
On Wed, Aug 21, 2013 at 05:40:11PM +0200, Paolo Bonzini wrote: > Il 21/08/2013 17:24, Stefan Hajnoczi ha scritto: > > On Wed, Aug 21, 2013 at 10:02:47AM +0800, Asias He wrote: > >> In block/gluster.c, we have > >> > >> gluster_finish_aiocb > >> { > >>if (retval != sizeof(acb)) { > >> qemu

Re: [Qemu-devel] [PATCH] block: Fix race in gluster_finish_aiocb

2013-08-22 Thread Bharata B Rao
On Thu, Aug 22, 2013 at 11:06:47AM +0200, Paolo Bonzini wrote: > Il 22/08/2013 09:48, Stefan Hajnoczi ha scritto: > >> > gluster_finish_aiocb gets called from gluster thread, is it safe to > >> > create > >> > and schedule a bh from such a thread ? > >> > > >> > In my first implementation > >> >

Re: [Qemu-devel] [PATCH] block: Fix race in gluster_finish_aiocb

2013-08-22 Thread Bharata B Rao
On Thu, Aug 22, 2013 at 12:00:48PM +0200, Paolo Bonzini wrote: > Il 22/08/2013 11:55, Bharata B Rao ha scritto: > > This was the first apporach I had. I used to abort when writes to pipe > > fail. But there were concerns raised about handling the failures gracefully > > and he

Re: [Qemu-devel] [PATCH] block: Fix race in gluster_finish_aiocb

2013-08-22 Thread Bharata B Rao
On Thu, Aug 22, 2013 at 01:15:59PM +0200, Paolo Bonzini wrote: > Il 22/08/2013 12:28, Bharata B Rao ha scritto: > > On Thu, Aug 22, 2013 at 12:00:48PM +0200, Paolo Bonzini wrote: > >> Il 22/08/2013 11:55, Bharata B Rao ha scritto: > >>> This was the first appora

Re: [Qemu-devel] [PATCH] block: Fix race in gluster_finish_aiocb

2013-08-22 Thread Bharata B Rao
On Thu, Aug 22, 2013 at 03:27:35PM +0200, Paolo Bonzini wrote: > Looking at write(2), it looks like it is impossible > > EAGAIN or EWOULDBLOCK > can't happen, blocking file descriptor > > EBADF, EPIPE > shouldn't happen

Re: [Qemu-devel] [PATCH] block: Fix race in gluster_finish_aiocb

2013-08-22 Thread Bharata B Rao
ion handing by BH based method. Signed-off-by: Bharata B Rao --- block/gluster.c | 69 ++- 1 file changed, 8 insertions(+), 61 deletions(-) diff --git a/block/gluster.c b/block/gluster.c index 46f36f8..598b335 100644 --- a/block/gluster

Re: [Qemu-devel] [PATCH] block: Fix race in gluster_finish_aiocb

2013-08-23 Thread Bharata B Rao
On Fri, Aug 23, 2013 at 09:33:21AM +0200, Paolo Bonzini wrote: > > (gdb) p *bh > > $1 = {ctx = 0x0, cb = 0x555ffdcd , opaque = > > 0x7fffd00419c0, next = 0x56345e70, scheduled = false, idle = false, > > deleted = true} > > This looks like a use-after-free, with bh->ctx corrupted wh

[Qemu-devel] [PATCH] gluster: Abort on AIO completion failure

2013-08-26 Thread Bharata B Rao
and hence simplify the code that handles this error recovery. Signed-off-by: Bharata B Rao --- block/gluster.c | 15 ++- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/block/gluster.c b/block/gluster.c index 46f36f8..942154a 100644 --- a/block/gluster.c +++ b/block

Re: [Qemu-devel] [PATCH] gluster: Abort on AIO completion failure

2013-08-27 Thread Bharata B Rao
On Tue, Aug 27, 2013 at 08:58:05AM +0200, Paolo Bonzini wrote: > > diff --git a/block/gluster.c b/block/gluster.c > > index 46f36f8..942154a 100644 > > --- a/block/gluster.c > > +++ b/block/gluster.c > > @@ -427,20 +427,9 @@ static void gluster_finish_aiocb(struct

[Qemu-devel] [PATCH v1] gluster: Abort on AIO completion failure

2013-08-27 Thread Bharata B Rao
and hence simplify the code that handles this error recovery. Signed-off-by: Bharata B Rao --- Changes in v1: Print errno information. block/gluster.c | 15 ++- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/block/gluster.c b/block/gluster.c index 46f36f8..dbb03f4

[Qemu-devel] [RFC PATCH v0 2/2] target-ppc: Fix an invalid free in opcode table handling code.

2014-09-26 Thread Bharata B Rao
Opcode table has direct, indirect and double indirect handlers, but ppc_cpu_unrealizefn() frees direct handlers which are never allocated and never frees double indirect handlers. Signed-off-by: Bharata B Rao --- target-ppc/translate_init.c | 19 --- 1 file changed, 16

[Qemu-devel] [RFC PATCH v0 1/2] target-ppc: Use macros in opcodes table handling code

2014-09-26 Thread Bharata B Rao
Define and use macros instead of direct numbers wherever possible in ppc opcodes table handling code. This doesn't change any code functionality. Signed-off-by: Bharata B Rao --- target-ppc/cpu.h| 3 ++- target-ppc/translate_init.c | 24 ++-- 2 files ch

[Qemu-devel] [RFC PATCH v0 0/2] target-ppc: Fix an invalid free

2014-09-26 Thread Bharata B Rao
removal path while working on CPU [un]hotplug support for sPAPR guests. Bharata B Rao (2): target-ppc: Use macros in opcodes table handling code target-ppc: Fix an invalid free in opcode table handling code. target-ppc/cpu.h| 3 ++- target-ppc/translate_init.c | 43

Re: [Qemu-devel] [RFC PATCH v0 10/15] ppc: Factor out CPU initialization code to a new routine

2014-09-28 Thread Bharata B Rao
On Fri, Sep 26, 2014 at 05:29:02PM +0200, Igor Mammedov wrote: > On Thu, 4 Sep 2014 11:36:20 +0530 > Bharata B Rao wrote: > > > Separate out CPU initialization code into a new routine ppc_new_cpu() > > so that it can be used from CPU hotplug path too. > > >

Re: [Qemu-devel] [PATCH v2 36/36] qdev: HotplugHandler: add support for unplugging BUS-less devices

2014-10-01 Thread Bharata B Rao
1 file changed, 34 insertions(+), 27 deletions(-) > > diff --git a/hw/core/qdev.c b/hw/core/qdev.c > index bc45a59..215effb 100644 > --- a/hw/core/qdev.c > +++ b/hw/core/qdev.c > @@ -223,9 +223,28 @@ void qdev_set_legacy_instance_id(DeviceState *dev, int > alias_id, > d

Re: [Qemu-devel] [PATCH v2 36/36] qdev: HotplugHandler: add support for unplugging BUS-less devices

2014-10-01 Thread Bharata B Rao
On Wed, Oct 01, 2014 at 11:57:37AM +0200, Igor Mammedov wrote: > On Wed, 1 Oct 2014 14:27:19 +0530 > Bharata B Rao wrote: > > > On Fri, Sep 26, 2014 at 09:28:41AM +, Igor Mammedov wrote: > > > Signed-off-by: Igor Mammedov > > > --- > > > v2: >

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

2014-06-23 Thread Bharata B Rao
Verified that this fixes the hang and no change is required in gluster driver of QEMU after this fix in glusterfs code. On Mon, Jun 23, 2014 at 11:59 PM, nixpanic wrote: > A complete fix has been included in the glusterfs master-branch. It has > not (yet) been requested or marked for backportin

Re: [Qemu-devel] [PATCH 01/12] spapr: populate DRC entries for root dt node

2014-09-02 Thread Bharata B Rao
athan Fontenot > Signed-off-by: Michael Roth > --- > hw/ppc/spapr.c | 143 > + > hw/ppc/spapr_pci.c | 1 + > include/hw/ppc/spapr.h | 35 ++++ > 3 files changed, 179 insertions(+) > > diff --git a/hw/pp

Re: [Qemu-devel] [PATCH 09/12] spapr_pci: enable basic hotplug operations

2014-09-03 Thread Bharata B Rao
h > --- > hw/ppc/spapr_pci.c | 235 > +++-- > include/hw/ppc/spapr.h | 1 + > 2 files changed, 228 insertions(+), 8 deletions(-) > > diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c > index 96a57be..23864ab 100644 > --- a/hw/ppc/spa

[Qemu-devel] [RFC PATCH v0 03/15] ppc: Rename sPAPRDrcEntry.phb_buid to sPAPRDrcEntry.id

2014-09-03 Thread Bharata B Rao
sPAPRDrcEntry.phb_buid field can be reused for CPU entries too, hence call it by a generic name. This patch doesn't change any functionality. Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 8 include/hw/ppc/spapr.h | 2 +- 2 files changed, 5 insertions(+), 5 dele

[Qemu-devel] [RFC PATCH v0 09/15] ppc: Consider max_cpus during xics initialization

2014-09-03 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 --- hw/ppc/spapr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ppc

[Qemu-devel] [RFC PATCH v0 01/15] ppc: Store dr entity state bits at the right bit offset

2014-09-03 Thread Bharata B Rao
Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index c65b13a..47fc21d 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -367,7 +367,7 @@ sPAPRDrcEntry *spapr_add_phb_to_drc_table(uint64_t buid

[Qemu-devel] [RFC PATCH v0 00/15] CPU hotplug support of PowerPC sPAPR guests

2014-09-03 Thread Bharata B Rao
issue in the patch 15/15. Also this needs a few endian fixes to PowerPC kernel (in the CPU hotplug code path), which I will be posting later separately. Bharata B Rao (15): ppc: Store dr entity state bits at the right bit offset ppc: Rename SPAPR_DRC_TABLE_SIZE to SPAPR_DRC_PHB

[Qemu-devel] [RFC PATCH v0 06/15] ppc: stop after getting first unused DR slot in DRC table

2014-09-03 Thread Bharata B Rao
When adding a new entry to the DRC table, stop looking at more entries after finding the first free slot. Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 441a4a7..6a0b9c5 100644 --- a/hw/ppc/spapr.c +++ b

[Qemu-devel] [RFC PATCH v0 04/15] ppc: Make creation of DRC entries in FDT endian safe

2014-09-03 Thread Bharata B Rao
Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 29b7de4..bdbda1f 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -397,10 +397,10 @@ static void spapr_create_drc_dt_entries

[Qemu-devel] [RFC PATCH v0 07/15] ppc: Initialize DRC table before initializing CPUs

2014-09-03 Thread Bharata B Rao
CPU initialization code expects the DRC table to be setup already. Hence do spapr_init_drc_table() early before the CPUs are initialized. Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index

[Qemu-devel] [RFC PATCH v0 14/15] ppc: Add CPU hotplug support for sPAPR guests

2014-09-03 Thread Bharata B Rao
Add support for cpu-add monitor command. Use the exising EPOW event infrastructure to send CPU hotplug notification to the guest. Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 240 - hw/ppc/spapr_events.c | 35 ++-- include/hw

[Qemu-devel] [RFC PATCH v0 05/15] ppc: Accommodate CPU DRC entries in DRC table

2014-09-03 Thread Bharata B Rao
Extend the DRC table to accommodate CPU DRC entries too. Generalize spapr_add_phb_to_drc_table() to add CPU entries too. Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 73 +- include/hw/ppc/spapr.h | 8 +- 2 files changed, 62

[Qemu-devel] [RFC PATCH v0 10/15] ppc: Factor out CPU initialization code to a new routine

2014-09-03 Thread Bharata B Rao
Separate out CPU initialization code into a new routine ppc_new_cpu() so that it can be used from CPU hotplug path too. Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 73 +- 1 file changed, 42 insertions(+), 31 deletions(-) diff --git

[Qemu-devel] [RFC PATCH v0 11/15] ppc: Move RTAS indicator defines to a header file

2014-09-03 Thread Bharata B Rao
Move RTAS indicator defines and helpers from spapr_pci.c to spapr.h as these are needed by CPU hotplug code too. This patch doesn't change any functionality. Signed-off-by: Bharata B Rao --- hw/ppc/spapr_pci.c | 30 -- include/hw/ppc/spapr.h

[Qemu-devel] [RFC PATCH v0 02/15] ppc: Rename SPAPR_DRC_TABLE_SIZE to SPAPR_DRC_PHB_TABLE_SIZE

2014-09-03 Thread Bharata B Rao
DRC table could contain entries for both PHB and CPU types. The existing size of this table is only for PHB entries, reflect the same in the code. This patch doesn't change the code functionality. Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 26 +- in

[Qemu-devel] [RFC PATCH v0 12/15] ppc: Support ibm, lrdr-capacity device tree property

2014-09-03 Thread Bharata B Rao
Add support for ibm,lrdr-capacity since this is needed by the guest kernel to know about the possible hot-pluggable CPUs. Also start storing maximum possible memory for the guest in sPAPREnvironment. Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 3 ++- hw/ppc/spapr_rtas.c| 28

[Qemu-devel] [RFC PATCH v0 15/15] ppc: Allow hotplugging of CPU cores only

2014-09-03 Thread Bharata B Rao
open question as to what kind of CPU hotplug semantics we should support here, this patch restricts cpu-add monitor command to allow only CPU cores to be added. All the threads of the hot-plugged core at onlined at once. Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 27 ++---

[Qemu-devel] [RFC PATCH v0 13/15] ppc: Make ibm, configure-connector endian-safe

2014-09-03 Thread Bharata B Rao
Store RTAS data in ibm,configure-connector RTAS call in big endian format as per sPAPR specifications. Signed-off-by: Bharata B Rao --- hw/ppc/spapr_pci.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index 76463b3

[Qemu-devel] [RFC PATCH v0 08/15] ppc: Add CPU dynamic reconfiguration (DR) support

2014-09-03 Thread Bharata B Rao
Add DR specific device tree entries for CPU. Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 122 include/hw/ppc/spapr.h | 2 + target-ppc/translate_init.c | 5 ++ 3 files changed, 129 insertions(+) diff --git a/hw/ppc

Re: [Qemu-devel] [PATCH 09/12] spapr_pci: enable basic hotplug operations

2014-09-04 Thread Bharata B Rao
On Thu, Sep 4, 2014 at 4:33 AM, Michael Roth wrote: >> > +static int spapr_device_hotplug_add(DeviceState *qdev, PCIDevice *dev) >> > +{ >> > +sPAPRPHBState *phb = SPAPR_PCI_HOST_BRIDGE(qdev); >> > +sPAPRDrcEntry *drc_entry, *drc_entry_slot; >> > +sPAPRConfigureConnectorState *ccs; >>

Re: [Qemu-devel] [RFC V2 10/10] cpus: reclaim allocated vCPU objects

2014-09-11 Thread Bharata B Rao
On Thu, Aug 28, 2014 at 9:06 AM, Gu Zheng wrote: > After ACPI get a signal to eject a vCPU, the vCPU must be > removed from CPU list,before the vCPU really removed, then > release the all related vCPU objects. > But we do not close KVM vcpu fd, just record it into a list, in > order to reuse it.

Re: [Qemu-devel] [RFC V2 10/10] cpus: reclaim allocated vCPU objects

2014-09-11 Thread Bharata B Rao
On Thu, Sep 11, 2014 at 3:23 PM, Gu Zheng wrote: > On 09/11/2014 05:35 PM, Bharata B Rao wrote: > >> On Thu, Aug 28, 2014 at 9:06 AM, Gu Zheng wrote: >>> After ACPI get a signal to eject a vCPU, the vCPU must be >>> removed from CPU list,before the vCPU really remo

Re: [Qemu-devel] [RFC V2 10/10] cpus: reclaim allocated vCPU objects

2014-09-12 Thread Bharata B Rao
On Fri, Sep 12, 2014 at 6:54 AM, Gu Zheng wrote: > Is guest os enabled acpi cpu hotplug? What's the guest's cpu info? > Please try latest QEMU, and any feedback is welcome. > Tried with latest QEMU git + your patchset and Fedora 20 guest, but QEMU monitor still shows the removed CPU. Guest kerne

Re: [Qemu-devel] [RFC V2 10/10] cpus: reclaim allocated vCPU objects

2014-09-12 Thread Bharata B Rao
On Fri, Sep 12, 2014 at 3:23 PM, Gu Zheng wrote: > Hi Bharata, > On 09/12/2014 04:09 PM, Bharata B Rao wrote: > >> On Fri, Sep 12, 2014 at 6:54 AM, Gu Zheng wrote: >>> Is guest os enabled acpi cpu hotplug? What's the guest's cpu info? >>> Please t

Re: [Qemu-devel] [RFC V2 10/10] cpus: reclaim allocated vCPU objects

2014-09-12 Thread Bharata B Rao
On Fri, Sep 12, 2014 at 4:23 PM, Anshul Makkar wrote: > During plugging we can see this event: echo 1 > cpu8/online. > > But during unplugging , we can't see the event echo 0 > cpu8/online. That's because I didn't do that explicitly, was always trying to remove an online cpu from the monitor w/o

Re: [Qemu-devel] [RFC V2 10/10] cpus: reclaim allocated vCPU objects

2014-09-15 Thread Bharata B Rao
On Mon, Sep 15, 2014 at 12:09 PM, Gu Zheng wrote: > Hi Bharata, > On 09/12/2014 09:52 PM, Bharata B Rao wrote: > >> On Fri, Sep 12, 2014 at 4:23 PM, Anshul Makkar >> wrote: >>> During plugging we can see this event: echo 1 > cpu8/online. >>> >>

Re: [Qemu-devel] [RFC V2 10/10] cpus: reclaim allocated vCPU objects

2014-09-15 Thread Bharata B Rao
On Mon, Sep 15, 2014 at 4:03 PM, Anshul Makkar wrote: > That explains the cause. > > Please verify you have the iasl compiler installed and are not using the > hold .hex (compile .dsl ) files. (Faced this issue in our build setup using > sbuil.). > > I hope you have verified that your .dsl file ha

[Qemu-devel] [PATCH V5] Guest stop notification

2012-01-11 Thread Eric B Munson
patch uses the qemu Notifier system to tell the guest it is about to be stopped. Signed-off-by: Eric B Munson Cc: Avi Kivity Cc: Marcelo Tosatti Cc: Jan Kiszka Cc: ry...@linux.vnet.ibm.com Cc: aligu...@us.ibm.com Cc: k...@vger.kernel.org --- Changes from V4: Test if the guest paused capability is

[Qemu-devel] [PATCH V6] Guest stop notification

2012-01-17 Thread Eric B Munson
patch uses the qemu Notifier system to tell the guest it is about to be stopped. Signed-off-by: Eric B Munson Cc: Avi Kivity Cc: Marcelo Tosatti Cc: Jan Kiszka Cc: ry...@linux.vnet.ibm.com Cc: aligu...@us.ibm.com Cc: k...@vger.kernel.org --- Changes from V5: KVM_GUEST_PAUSED is now a per vm ioctl

[Qemu-devel] [PATCH V7] Guest stop notification

2012-01-17 Thread Eric B Munson
patch uses the qemu Notifier system to tell the guest it is about to be stopped. Signed-off-by: Eric B Munson Cc: Avi Kivity Cc: Marcelo Tosatti Cc: Jan Kiszka Cc: ry...@linux.vnet.ibm.com Cc: aligu...@us.ibm.com Cc: k...@vger.kernel.org --- Changes from V6: Remove unnecessary include Changes

[Qemu-devel] -numa and -smp options

2011-08-16 Thread Bharata B Rao
Hi, While trying out -numa and -smp command line options, I found that it is possible to specify inconsistent or impossible or incomplete topology specifications on qemu command line and have qemu silently boot a VM with such a topology without complaining. Example 1: With "-numa node,nodeid=0,c

[Qemu-devel] X86 CPU topology broken in qemu ?

2011-08-16 Thread Bharata B Rao
ing cpuid_apic_id before cpuid information is passed to the host kernel. Signed-off-by: Bharata B Rao ---  hw/pc.c           |    4 +---  target-i386/kvm.c |    3 +++  2 files changed, 4 insertions(+), 3 deletions(-) Index: qemu-kvm-0.14.1/hw/p

Re: [Qemu-devel] X86 CPU topology broken in qemu ?

2011-08-19 Thread Bharata B Rao
On Wed, Aug 17, 2011 at 10:55 AM, Bharata B Rao wrote: > Hi, > > I see that x86 CPU topology inside VM is not showing up as specified. > With some debugging, I found out that the root cause for this: qemu is > not enumerating the apic ids correctly for vcpus. I made the below >

[Qemu-devel] [RFC PATCH 1/3] qemu: Add a config option for GlusterFS as block backend

2012-06-11 Thread Bharata B Rao
qemu: Add a config option for GlusterFS as block backend From: Bharata B Rao Signed-off-by: Bharata B Rao --- configure | 36 1 files changed, 36 insertions(+), 0 deletions(-) diff --git a/configure b/configure index b55a792..dc89592 100755 --- a

[Qemu-devel] [RFC PATCH 0/3] GlusterFS support in QEMU

2012-06-11 Thread Bharata B Rao
Hi, This set of patches enables QEMU to boot VM images from gluster volumes. This is achieved by adding gluster as a new block backend driver in QEMU. Its already possible to boot from VM images on gluster volumes using Fuse mount, but this patchset provides the ability to boot VM images from glus

[Qemu-devel] [RFC PATCH 3/3] block: gluster as block backend

2012-06-11 Thread Bharata B Rao
block: gluster as block backend From: Bharata B Rao This patch adds gluster as the new block backend in QEMU. This gives QEMU the ability to boot VM images from gluster volumes. Signed-off-by: Bharata B Rao --- Makefile.objs |2 block/gluster.c | 435

[Qemu-devel] [RFC PATCH 2/3] block: GlusterFS helpers to interface with libglusterfs

2012-06-11 Thread Bharata B Rao
block: GlusterFS helpers to interface with libglusterfs From: Bharata B Rao This patch does two things: - Adds GlusterFS specific init routines that enable QEMU to load volume file and load necessary translators. - Implements routines like gluster_open(), gluster_read(), gluster_write

[Qemu-devel] [PATCH] Fix for qemu crash on assertion error when adding PCI passthru device.

2012-06-12 Thread Ma, Stephen B.
r.c|1 + hw/qdev.c|3 +-- hw/scsi-bus.c|4 +++- hw/usb/bus.c |1 + hw/usb/dev-storage.c |5 +++-- 10 files changed, 26 insertions(+), 10 deletions(-) diff --git a/hw/grlib.h b/hw/grlib.h index e1c4137..2e9742c 100644 --- a/hw/grlib.h +++ b/hw/grl

Re: [Qemu-devel] [PATCH] Fix for qemu crash on assertion error when adding PCI passthru device.

2012-06-16 Thread Ma, Stephen B.
Michael, Thanks for the review. I added the unparent to the qdev_free. --- hw/qdev.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.c index d2dc28b..ed1328d 100644 --- a/hw/qdev.c +++ b/hw/qdev.c @@ -264,6 +264,7 @@ void qdev_init_nofail

[Qemu-devel] [RFC PATCH] Exporting Guest RAM information for NUMA binding

2011-10-29 Thread Bharata B Rao
st appropriate NUMA node memory. Allow admin tools like libvirt to achieve this by exporting guest RAM information via QEMU monitor. Signed-off-by: Bharata B Rao --- memory.c | 33 + memory.h |2 ++ monitor.c | 12 3 files changed, 47 inser

Re: [Qemu-devel] X86 CPU topology broken in qemu ?

2011-08-29 Thread Bharata B Rao
On Thu, Aug 25, 2011 at 3:31 PM, Avi Kivity wrote: >> Hi, >> >> I see that x86 CPU topology inside VM is not showing up as specified. >> With some debugging, I found out that the root cause for this: qemu is >> not enumerating the apic ids correctly for vcpus. I made the below >> hackish change to

Re: [Qemu-devel] X86 CPU topology broken in qemu ?

2011-08-29 Thread Bharata B Rao
On Thu, Aug 25, 2011 at 4:17 PM, Jan Kiszka wrote: > On 2011-08-17 07:25, Bharata B Rao wrote: >> Index: qemu-kvm-0.14.1/target-i386/kvm.c >> === >> --- qemu-kvm-0.14.1.orig/target-i386/kvm.c >> +++ qemu-k

[Qemu-devel] [FIX] X86 CPU topology broken in KVM mode

2011-09-06 Thread Bharata B Rao
st kernel. This is done by moving the setting of cpuid_apic_id to cpu_x86_init() where it will work for both KVM as well as TCG modes. Signed-off-by: Bharata B Rao --- hw/pc.c |1 - target-i386/helper.c |5 + 2 files changed, 5 insertions(+), 1 deletion(-) I

Re: [Qemu-devel] [FIX] X86 CPU topology broken in KVM mode

2011-09-07 Thread Bharata B Rao
On Wed, Sep 7, 2011 at 1:37 PM, Jan Kiszka wrote: > On 2011-09-07 06:21, Bharata B Rao wrote: >> - I am not sure what is the problem with i486 as I haven't been able >> to boot an i486 VM successfully, hence haven't attempted to fix this. > > -smp 2 -cpu i486 bo

Re: [Qemu-devel] [FIX] X86 CPU topology broken in KVM mode

2011-09-07 Thread Bharata B Rao
On Wed, Sep 7, 2011 at 6:29 PM, Anthony Liguori wrote: > On 09/06/2011 11:21 PM, Bharata B Rao wrote: >> >> Hi, >> > Please post patches as top-level threads with [PATCH] in the subject. I posted a new thread and hence it has appeared as a top-level thread. This was a

Re: [Qemu-devel] [PATCH v2] Fix X86 CPU topology in KVM mode

2011-09-10 Thread Bharata B Rao
On Fri, Sep 9, 2011 at 10:44 PM, Anthony Liguori wrote: > > This breaks the build: > >  CC    i386-linux-user/helper.o > /home/anthony/git/qemu/target-i386/helper.c: In function ‘cpu_x86_init’: > /home/anthony/git/qemu/target-i386/helper.c:1260:47: error: ‘smp_cpus’ > undeclared (first use in this

Re: [Qemu-devel] [PATCH] scsi-disk: add non-zero MAX UNMAP LBA COUNT to block limits VPD page

2013-12-20 Thread Bharata B Rao
On Fri, Dec 20, 2013 at 03:58:08PM +0100, Paolo Bonzini wrote: > Linux prefers WRITE SAME to UNMAP if the count is zero, and WRITE > SAME does not discard anything unless the device can guarantee that > the resulting block is zero. > > This fixes thin provisioning on glusterfs. I don't see discar

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

2013-12-21 Thread Bharata B Rao
d 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 routines into coroutines gluster: Implement .bdrv_co_write_zeroes for gluster

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

2013-12-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 | 79 +++-- configure | 8 ++ 2

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

2013-12-21 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 3c796be..98f6859 100644 --- a/block/gluster.c +++ b/block/gluster

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

2013-12-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 | 221 +++- 1 file changed, 74 insertions(+), 147 deletions(-) diff --git a/block

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