[Qemu-devel] [PATCH V3 07/11] block: export function bdrv_find_snapshot()

2013-01-14 Thread Wenchao Xia
This patch move it from savevm.c to block.c and export it. Signed-off-by: Wenchao Xia --- block.c | 23 +++ include/block/block.h |2 ++ savevm.c | 22 -- 3 files changed, 25 insertions(+), 22 deletions(-) diff --git a

[Qemu-devel] [PATCH V3 04/11] qemu-img: switch image retrieving function

2013-01-14 Thread Wenchao Xia
Now qemu-img call block layer function to get image info. Signed-off-by: Wenchao Xia Reviewed-by: Eric Blake --- qemu-img.c | 86 +-- 1 files changed, 2 insertions(+), 84 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 9dab48f

[Qemu-devel] 100% CPU when sockfd is half-closed and unexpected behavior for qemu_co_send()

2013-01-14 Thread Liu Yuan
Hi List, This problem can be reproduced by: 1. start a sheepdog cluster and create a volume 'test'* 2. attach 'test' to a bootable image like $ qemu -hda image -drive if=virtio,file=sheepdog:test 3. pkill sheep # create a half-closed situation I have straced it that QEMU is busy doing

Re: [Qemu-devel] [PATCH v12 0/8] pv event to notify host when the guest is panicked

2013-01-14 Thread Hu Tao
Hi Marcelo, Sorry for the late reply. On Tue, Dec 25, 2012 at 07:52:05PM -0200, Marcelo Tosatti wrote: > On Thu, Dec 20, 2012 at 03:53:59PM +0800, Hu Tao wrote: > > Hi, > > > > Any comments? > > As far as i can see, items 2 and 3 of > > https://lkml.org/lkml/2012/11/12/588 > > Have not been a

Re: [Qemu-devel] [PATCH v12 0/8] pv event to notify host when the guest is panicked

2013-01-14 Thread Hu Tao
On Tue, Dec 25, 2012 at 07:54:20PM -0200, Marcelo Tosatti wrote: > On Thu, Dec 20, 2012 at 03:53:59PM +0800, Hu Tao wrote: > > Hi, > > > > Any comments? > > Did you verify possibilities listed at > https://lkml.org/lkml/2012/11/20/653 ? Except the EIO one you mentioned. I don't know how to repr

[Qemu-devel] [Bug 1033727] Re: USB passthrough doesn't work anymore with qemu-kvm 1.1.1

2013-01-14 Thread Michael Tokarev
Thank you very much Peter for the work you did. That is not of historic interest, not at all - it is of a good value for Debian users! And thank you Nikolaus for the testing, as well! I take your (both of you!) words that the problem is now solved, and am uploading new release to debian archives

Re: [Qemu-devel] nic-specific options ? (Re: [RFC] updated e1000 mitigation patch)

2013-01-14 Thread Stefan Hajnoczi
On Fri, Jan 11, 2013 at 03:53:50PM +0100, Luigi Rizzo wrote: > On Thu, Jan 10, 2013 at 01:25:48PM +0100, Stefan Hajnoczi wrote: > > On Thu, Dec 27, 2012 at 11:06:58AM +0100, Luigi Rizzo wrote: > > > diff -urp qemu-1.3.0-orig/hw/e1000.c qemu-1.3.0/hw/e1000.c > > > --- qemu-1.3.0-orig/hw/e1000.c2

Re: [Qemu-devel] [PATCH] readline: avoid memcpy() of overlapping regions

2013-01-14 Thread Stefan Hajnoczi
On Sat, Jan 12, 2013 at 10:46:18AM +, Blue Swirl wrote: > On Thu, Jan 10, 2013 at 12:43 PM, Stefan Hajnoczi wrote: > > On Wed, Jan 09, 2013 at 08:43:51PM +, Blue Swirl wrote: > >> On Tue, Jan 8, 2013 at 9:03 AM, Stefan Hajnoczi wrote: > >> > On Mon, Jan 07, 2013 at 03:38:39PM -0500, Nicko

Re: [Qemu-devel] [PATCH] reading files from qcow2-formated image disk for windows system

2013-01-14 Thread Stefan Hajnoczi
On Sat, Jan 12, 2013 at 12:00:45PM +, Blue Swirl wrote: > On Fri, Jan 11, 2013 at 7:27 AM, 马磊 wrote: > > > > > > On Fri, Jan 11, 2013 at 2:28 PM, Wanlong Gao > > wrote: > >> > >> On 01/11/2013 11:39 AM, 马磊 wrote: > >> > > >> > > >> > On Thu, Jan 10, 2013 at 8:20 PM, Daniel P. Berrange >> > <

Re: [Qemu-devel] Fix the glib deprecated APIs

2013-01-14 Thread Stefan Hajnoczi
On Fri, Jan 11, 2013 at 06:01:53PM +0100, Paolo Bonzini wrote: > Il 11/01/2013 17:10, Ramesh G ha scritto: > > > > Hi, > > > > I got a couple of below compilation errors while compiling with glib > > > 2.32. > > > > $ make > > CC../trace/simple.o > > ../trace/simple.c: In function ‘trace

Re: [Qemu-devel] [Bug 1033727] Re: USB passthrough doesn't work anymore with qemu-kvm 1.1.1

2013-01-14 Thread Gerd Hoffmann
On 01/12/13 09:20, Michael Tokarev wrote: > Gerd, can you take a (maybe quick) look please? > > This bug is quite old and, as Peter notes, may be fixed in 1.3 > so there's no goo motivation to fix it for older version... > I tried to reproduce (to be able to get a trace, or bisect) it > several ti

Re: [Qemu-devel] Fix the glib deprecated APIs

2013-01-14 Thread Stefan Hajnoczi
On Fri, Jan 11, 2013 at 09:40:59PM +0530, Ramesh G wrote: > Hi, > > I got a couple of below compilation errors while compiling with glib > > 2.32. > > $ make > CC../trace/simple.o > ../trace/simple.c: In function ‘trace_thread_create’: > ../trace/simple.c:407:5: error: ‘g_thread_create’ is

Re: [Qemu-devel] 100% CPU when sockfd is half-closed and unexpected behavior for qemu_co_send()

2013-01-14 Thread Paolo Bonzini
Il 14/01/2013 09:16, Liu Yuan ha scritto: > Hi List, > This problem can be reproduced by: > 1. start a sheepdog cluster and create a volume 'test'* > 2. attach 'test' to a bootable image like > $ qemu -hda image -drive if=virtio,file=sheepdog:test > 3. pkill sheep # create a half-close

Re: [Qemu-devel] [PATCH 01/27] qemu-option: move standard option definitions out of qemu-config.c

2013-01-14 Thread Stefan Hajnoczi
On Sat, Jan 12, 2013 at 06:35:12PM +0100, Paolo Bonzini wrote: > @@ -2566,6 +2755,22 @@ int main(int argc, char **argv, char **envp) > > module_call_init(MODULE_INIT_QOM); > > +qemu_add_opts(&qemu_drive_opts); > +qemu_add_opts(&qemu_chardev_opts); > +qemu_add_opts(&qemu_device_

Re: [Qemu-devel] [Bug 1087114] Re: assertion "QLIST_EMPTY(&bs->tracked_requests)" failed

2013-01-14 Thread Markus Armbruster
Austin Seipp writes: > I was experiencing this bug fairly regularly with QEMU 1.3.0 on OS X > 10.8. All my emulations of debian environments couldn't even get past > installation, because this bug would hit too early. > > Brad, it looks like 2 weeks ago you got a patch authored that fixes this >

Re: [Qemu-devel] 100% CPU when sockfd is half-closed and unexpected behavior for qemu_co_send()

2013-01-14 Thread Liu Yuan
On 01/14/2013 05:09 PM, Paolo Bonzini wrote: >> Another unexpected behavior is that qemu_co_send() will send data >> > successfully for the half-closed situation, even the other end is >> > completely down. I think the *expected* behavior is that we get notified >> > by a HUP and close the affected

Re: [Qemu-devel] [PULL 00/27] More source reorganization and build system TLC

2013-01-14 Thread Stefan Hajnoczi
On Sat, Jan 12, 2013 at 06:35:11PM +0100, Paolo Bonzini wrote: > The following changes since commit 63fb2590839162afdf14d7c0ee02d460766c0956: > > Merge branch 'target-arm.next' of > git://git.linaro.org/people/pmaydell/qemu-arm (2013-01-12 12:47:07 +) > > are available in the git repositor

Re: [Qemu-devel] [Bug 1033727] Re: USB passthrough doesn't work anymore with qemu-kvm 1.1.1

2013-01-14 Thread Michael Tokarev
14.01.2013 13:18, Gerd Hoffmann пишет: On 01/12/13 09:20, Michael Tokarev wrote: Gerd, can you take a (maybe quick) look please? This bug is quite old and, as Peter notes, may be fixed in 1.3 so there's no goo motivation to fix it for older version... I tried to reproduce (to be able to get a t

Re: [Qemu-devel] [PATCH 01/27] qemu-option: move standard option definitions out of qemu-config.c

2013-01-14 Thread Paolo Bonzini
> On Sat, Jan 12, 2013 at 06:35:12PM +0100, Paolo Bonzini wrote: > > @@ -2566,6 +2755,22 @@ int main(int argc, char **argv, char **envp) > > > > module_call_init(MODULE_INIT_QOM); > > > > +qemu_add_opts(&qemu_drive_opts); > > +qemu_add_opts(&qemu_chardev_opts); > > +qemu_add_op

[Qemu-devel] [PATCH 1/6] block: do not probe zero-sized disks

2013-01-14 Thread Kevin Wolf
From: Paolo Bonzini A blank CD or DVD is visible as a zero-sized disks. Probing such disks will lead to an EIO and a failure to start the VM. Treating them as raw is a better solution. Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- block.c |2 +- 1 files changed, 1 insertion

[Qemu-devel] [PULL 0/6] Block patches

2013-01-14 Thread Kevin Wolf
The following changes since commit 63fb2590839162afdf14d7c0ee02d460766c0956: Merge branch 'target-arm.next' of git://git.linaro.org/people/pmaydell/qemu-arm (2013-01-12 12:47:07 +) are available in the git repository at: git://repo.or.cz/qemu/kevin.git for-anthony Liu Yuan (1): s

[Qemu-devel] [PATCH 4/6] block: make qiov_is_aligned() public

2013-01-14 Thread Kevin Wolf
From: Stefan Hajnoczi The qiov_is_aligned() function checks whether a QEMUIOVector meets a BlockDriverState's alignment requirements. This is needed by virtio-blk-data-plane so: 1. Move the function from block/raw-posix.c to block/block.c. 2. Make it public in block/block.h. 3. Rename to bdrv_q

[Qemu-devel] [PATCH 3/6] raw-posix: fix bdrv_aio_ioctl

2013-01-14 Thread Kevin Wolf
From: Paolo Bonzini When the raw-posix aio=thread code was moved from posix-aio-compat.c to block/raw-posix.c, there was an unintended change to the ioctl code. The code used to return the ioctl command, which posix_aio_read() would later morph into a zero. This hack is not necessary anymore, an

[Qemu-devel] [PATCH 6/6] dataplane: handle misaligned virtio-blk requests

2013-01-14 Thread Kevin Wolf
From: Stefan Hajnoczi O_DIRECT on Linux has alignment requirements on I/O buffers and misaligned requests result in -EINVAL. The Linux virtio_blk guest driver usually submits aligned requests so I forgot to handle misaligned requests. It turns out that virtio-win guest drivers submit misaligned

[Qemu-devel] [PATCH 2/6] sheepdog: implement direct write semantics

2013-01-14 Thread Kevin Wolf
From: Liu Yuan Sheepdog supports both writeback/writethrough write but has not yet supported DIRECTIO semantics which bypass the cache completely even if Sheepdog daemon is set up with cache enabled. Suppose cache is enabled on Sheepdog daemon size, the new cache control is cache=writeback # en

Re: [Qemu-devel] [PATCH V2 07/10] snapshot: qmp use new internal API for external snapshot transaction

2013-01-14 Thread Stefan Hajnoczi
On Mon, Jan 14, 2013 at 10:56:30AM +0800, Wenchao Xia wrote: > 于 2013-1-11 17:12, Stefan Hajnoczi 写道: > >On Fri, Jan 11, 2013 at 02:22:28PM +0800, Wenchao Xia wrote: > >>于 2013-1-10 20:41, Stefan Hajnoczi 写道: > >>>On Thu, Jan 10, 2013 at 11:21:22AM +0800, Wenchao Xia wrote: > 于 2013-1-9 20:44,

Re: [Qemu-devel] 100% CPU when sockfd is half-closed and unexpected behavior for qemu_co_send()

2013-01-14 Thread Paolo Bonzini
Il 14/01/2013 10:29, Liu Yuan ha scritto: > I don't think so. I use netstat to assure that the connection is in > closed_wait state and I added a printf in the qemu_co_send() and it > indeed sent successfully, this can be backed by the Linux kernel > source code: > > static ssize_t do_tcp_sendpage

Re: [Qemu-devel] [PATCH V2 00/10] snapshot: take block snapshots in unified way

2013-01-14 Thread Stefan Hajnoczi
On Mon, Jan 14, 2013 at 10:09:45AM +0800, Wenchao Xia wrote: > 于 2013-1-11 21:56, Luiz Capitulino 写道: > >On Thu, 10 Jan 2013 14:01:27 +0800 > >Wenchao Xia wrote: > > > >>于 2013-1-10 6:34, Eric Blake 写道: > >>>On 01/07/2013 12:27 AM, Wenchao Xia wrote: > These patch added a seperated layer t

[Qemu-devel] [PATCH 5/6] dataplane: extract virtio-blk read/write processing into do_rdwr_cmd()

2013-01-14 Thread Kevin Wolf
From: Stefan Hajnoczi Extract code for read/write command processing into do_rdwr_cmd(). This brings together pieces that are spread across process_request(). The real motivation is to set the stage for handling misaligned requests, which the next patch tackles. Signed-off-by: Stefan Hajnoczi

Re: [Qemu-devel] 100% CPU when sockfd is half-closed and unexpected behavior for qemu_co_send()

2013-01-14 Thread Stefan Hajnoczi
On Mon, Jan 14, 2013 at 04:16:34PM +0800, Liu Yuan wrote: > Hi List, > This problem can be reproduced by: > 1. start a sheepdog cluster and create a volume 'test'* > 2. attach 'test' to a bootable image like > $ qemu -hda image -drive if=virtio,file=sheepdog:test > 3. pkill sheep # cre

[Qemu-devel] [PATCH v8 0/4] Add subcommand compare for qemu-img

2013-01-14 Thread Miroslav Rezanina
This is 8th version of patch adding compare subcommand that compares two images. Compare has following criteria: - only data part is compared - unallocated sectors are not read - in case of different image size, exceeding part of bigger disk has to be zeroed/unallocated to compare rest - qemu-

[Qemu-devel] [PATCH v8 1/4] block: Add synchronous wrapper for bdrv_co_is_allocated_above

2013-01-14 Thread Miroslav Rezanina
There's no synchronous wrapper for bdrv_co_is_allocated_above function so it's not possible to check for sector allocation in in mage with a backing file. This patch adds the missing synchronous wrapper. Signed-off-by: Miroslav Rezanina --- block.c | 39 +

[Qemu-devel] [PATCH v8 2/4] qemu-img: Add "Quiet mode" option

2013-01-14 Thread Miroslav Rezanina
There can be a need to turn output to stdout off. This patch adds a -q option that enable "Quiet mode". In Quiet mode, only errors are printed out. Signed-off-by: Miroslav Rezanina --- block.c | 12 +++-- blockdev.c|6 +- include/block/block.h |3 +- qemu-img-

Re: [Qemu-devel] 100% CPU when sockfd is half-closed and unexpected behavior for qemu_co_send()

2013-01-14 Thread Liu Yuan
On 01/14/2013 06:23 PM, Stefan Hajnoczi wrote: > On Mon, Jan 14, 2013 at 04:16:34PM +0800, Liu Yuan wrote: >> Hi List, >> This problem can be reproduced by: >> 1. start a sheepdog cluster and create a volume 'test'* >> 2. attach 'test' to a bootable image like >> $ qemu -hda image -drive

[Qemu-devel] [PATCH v8 3/4] qemu-img: Add compare subcommand

2013-01-14 Thread Miroslav Rezanina
This patch adds new qemu-img subcommand that compares content of two disk images. Signed-off-by: Miroslav Rezanina --- qemu-img-cmds.hx |6 ++ qemu-img.c | 266 ++ 2 files changed, 272 insertions(+), 0 deletions(-) diff --git a/qemu

[Qemu-devel] [PATCH v8 4/4] Add qemu-img compare documentation

2013-01-14 Thread Miroslav Rezanina
Adding documentation for new qemu-img subcommand compare. Signed-off-by: Miroslav Rezanina --- qemu-img.c|7 ++- qemu-img.texi | 32 2 files changed, 38 insertions(+), 1 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 0c12692..6aebdc3 10064

Re: [Qemu-devel] [PATCH V3 11/11] hmp: show snapshot on single block device

2013-01-14 Thread Pavel Hrdina
On Mon, 2013-01-14 at 15:09 +0800, Wenchao Xia wrote: > This patch use block layer API to qmp snapshot info on a block > device, then use the same code dumping vm snapshot info, to print > in monitor. > > Signed-off-by: Wenchao Xia > --- > Note: > This patch need previous hmp extention patch

Re: [Qemu-devel] [PATCH V3 04/11] qemu-img: switch image retrieving function

2013-01-14 Thread Pavel Hrdina
On Mon, 2013-01-14 at 15:09 +0800, Wenchao Xia wrote: > Now qemu-img call block layer function to get image info. > > Signed-off-by: Wenchao Xia > Reviewed-by: Eric Blake > --- > qemu-img.c | 86 +-- > 1 files changed, 2 insertions(+),

Re: [Qemu-devel] [PATCH 08/20] mirror: allow customizing the granularity

2013-01-14 Thread Stefan Hajnoczi
On Wed, Dec 12, 2012 at 02:46:27PM +0100, Paolo Bonzini wrote: > @@ -962,6 +963,7 @@ Arguments: >file/device (NewImageMode, optional, default 'absolute-paths') > - "speed": maximum speed of the streaming job, in bytes per second >(json-int) > +- "granularity": granularity of the dirty bitm

[Qemu-devel] [PATCH v4 9/10] chardev: add socket chardev support to chardev-add (qmp)

2013-01-14 Thread Gerd Hoffmann
qemu_chr_open_socket is split into two functions. All initialization after creating the socket file handler is split away into the new qemu_chr_open_socket_fd function. chr->filename doesn't get filled from QemuOpts any more. Qemu gathers the information using getsockname and getnameinfo instead

Re: [Qemu-devel] [PATCH 10/20] mirror: add buf-size argument to drive-mirror

2013-01-14 Thread Stefan Hajnoczi
On Wed, Dec 12, 2012 at 02:46:29PM +0100, Paolo Bonzini wrote: > diff --git a/qmp-commands.hx b/qmp-commands.hx > index d8faad0..97c52c9 100644 > --- a/qmp-commands.hx > +++ b/qmp-commands.hx > @@ -939,7 +939,7 @@ EQMP > .name = "drive-mirror", > .args_type = "sync:s,device

[Qemu-devel] [PATCH] pc-testdev: use typedefs

2013-01-14 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/pc-testdev.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/pc-testdev.c b/hw/pc-testdev.c index ec0bc4b..cf64a1f 100644 --- a/hw/pc-testdev.c +++ b/hw/pc-testdev.c @@ -58,13 +58,13 @@ typedef struct PCTestdev { #

[Qemu-devel] [PULL] testdev cleanup

2013-01-14 Thread Gerd Hoffmann
Hi, Small testdev cleanup. please pull, Gerd The following changes since commit 63fb2590839162afdf14d7c0ee02d460766c0956: Merge branch 'target-arm.next' of git://git.linaro.org/people/pmaydell/qemu-arm (2013-01-12 12:47:07 +) are available in the git repository at: git://git.kra

[Qemu-devel] [PATCH 1/2] qxl: Fix SPICE_RING_PROD_ITEM(), SPICE_RING_CONS_ITEM() sanity check

2013-01-14 Thread Gerd Hoffmann
From: Markus Armbruster The pointer arithmetic there is safe, but ugly. Coverity grouses about it. However, the actual comparison is off by one: <= end instead of < end. Fix by rewriting the check in a cleaner way. Signed-off-by: Markus Armbruster Signed-off-by: Gerd Hoffmann --- hw/qxl.c

[Qemu-devel] [PULL 0/2] spice patch queue

2013-01-14 Thread Gerd Hoffmann
Hi, Here comes the spice patch queue, carrying two coverity fixes in qxl. please pull, Gerd The following changes since commit 63fb2590839162afdf14d7c0ee02d460766c0956: Merge branch 'target-arm.next' of git://git.linaro.org/people/pmaydell/qemu-arm (2013-01-12 12:47:07 +) are availa

[Qemu-devel] [PULL 0/6] usb patch queue

2013-01-14 Thread Gerd Hoffmann
Hi, The usb patch queue, with coverity fixes. Also makes xhci cancel inflight transfers on usb device unplug. please pull, Gerd The following changes since commit 63fb2590839162afdf14d7c0ee02d460766c0956: Merge branch 'target-arm.next' of git://git.linaro.org/people/pmaydell/qemu-arm (2

[Qemu-devel] [PATCH 3/6] xhci: nuke transfe5rs on detach

2013-01-14 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-xhci.c |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index 5b2e7f8..5fb0c48 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -1197,6 +1197,7 @@ static int xhci_ep_nuke_xfers(

[Qemu-devel] [PATCH 6/6] usb-host: Initialize dev->port the obviously safe way

2013-01-14 Thread Gerd Hoffmann
From: Markus Armbruster Coverity worries the strcpy() could overrun the destination. It can't, because the source always points to usb_host_scan()'s auto port[], which has the same size. Use pstrcpy() anyway, to hush the checker. Signed-off-by: Markus Armbruster Signed-off-by: Gerd Hoffmann

[Qemu-devel] [PATCH 1/6] xhci: create xhci_detach_slot helper function

2013-01-14 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-xhci.c | 24 ++-- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index 92f2eee..3ff8bc1 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -2198,6 +2198,23 @@ static unsi

[Qemu-devel] [PATCH 5/6] usb-host: Drop superfluous null test from usb_host_auto_scan()

2013-01-14 Thread Gerd Hoffmann
From: Markus Armbruster Coverity points out that port is later passed to usb_host_open(), which dereferences it. It actually can't be null: it always points to usb_host_scan()'s auto port[]. Drop the superfluous port == NULL test. Signed-off-by: Markus Armbruster Signed-off-by: Gerd Hoffmann

[Qemu-devel] [PATCH] pixman: pass extra cflags and ldflags

2013-01-14 Thread Gerd Hoffmann
Store --extra-cflags and --extra-ldflags in config-host.mak, then pass them on to the pixman configure script. Cc: Scott Wood Signed-off-by: Gerd Hoffmann --- Makefile |2 +- configure |4 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0200

[Qemu-devel] [PULL] pixman patch queue

2013-01-14 Thread Gerd Hoffmann
Hi, Coming with a lonely buildfix for the internal pixman copy. please pull, Gerd The following changes since commit 63fb2590839162afdf14d7c0ee02d460766c0956: Merge branch 'target-arm.next' of git://git.linaro.org/people/pmaydell/qemu-arm (2013-01-12 12:47:07 +) are available in the

[Qemu-devel] [PATCH 4/6] ehci: Assert state machine is sane w.r.t. EHCIQueue

2013-01-14 Thread Gerd Hoffmann
From: Markus Armbruster Coverity worries the EHCIQueue pointer could be null when we pass it to functions that reference it. The state machine ensures it can't be null then. Assert that, to hush the checker. Signed-off-by: Markus Armbruster Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-ehci.c

[Qemu-devel] [PATCH 2/2] qxl: Don't drop client capability bits

2013-01-14 Thread Gerd Hoffmann
From: Markus Armbruster interface_set_client_capabilities() copies only the first few bits, because it falls into a Classic C trap: you can declare a parameter uint8_t caps[58], but the resulting parameter type is uint8_t *, not uint8_t[58]. In particular, sizeof(caps) is sizeof(uint8_t *), not

[Qemu-devel] [PATCH 2/6] xhci: call xhci_detach_slot on root port detach too

2013-01-14 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-xhci.c |1 + 1 file changed, 1 insertion(+) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index 3ff8bc1..5b2e7f8 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -2957,6 +2957,7 @@ static void xhci_detach(USBPort *usbport) XHCISt

Re: [Qemu-devel] [PATCHv3 0/2] Preparing safe sigprocmask wrapper on qemu-user

2013-01-14 Thread Alex Barcelo
ping My first two submissions were quite broken, but I think that this one was solid enough. Though there was too much silence. Do I repatch for the current head? Something worth changing? Or it is not worth patching it? (IMHO it should be patched at some time). On Mon, Nov 19, 2012 at 8:01 PM, A

Re: [Qemu-devel] [PATCH 00/20] Block device mirroring enhancements, 12-12-12 edition

2013-01-14 Thread Stefan Hajnoczi
On Wed, Dec 12, 2012 at 02:46:19PM +0100, Paolo Bonzini wrote: > Here are my block mirroring patches for QEMU 1.4, please review. > > Patches 1-12 implement improvements and optimizations to the code > that went in 1.3. I had one question which may be a bug: I can't see anything that sets s->in_f

Re: [Qemu-devel] [PATCH 11/20] mirror: support more than one in-flight AIO operation

2013-01-14 Thread Stefan Hajnoczi
On Wed, Dec 12, 2012 at 02:46:30PM +0100, Paolo Bonzini wrote: > @@ -137,21 +163,58 @@ static void coroutine_fn > mirror_iteration(MirrorBlockJob *s) > bdrv_round_to_clusters(s->target, > sector_num, nb_sectors_chunk, > §or_n

[Qemu-devel] KVM call for 2013-01-15

2013-01-14 Thread Juan Quintela
Hi Please send in any agenda topics that you have. Thanks, Juan.

Re: [Qemu-devel] [libvirt] [PATCH 06/10] vl.c: handle invalid NUMA CPU ranges properly

2013-01-14 Thread Eduardo Habkost
On Fri, Jan 11, 2013 at 02:32:48PM -0700, Eric Blake wrote: > On 01/11/2013 11:15 AM, Eduardo Habkost wrote: > > Add checks for the following cases: > > > > * Empty string: will be ignored and won't set any CPU bitmap, > > parser won't abort. > > * Missing end value after "-": parser will abort.

Re: [Qemu-devel] [PATCH 11/20] mirror: support more than one in-flight AIO operation

2013-01-14 Thread Paolo Bonzini
Il 14/01/2013 13:56, Stefan Hajnoczi ha scritto: >> > +/* Wait for I/O to this cluster (from a previous iteration) to be >> > done. */ >> > +while (test_bit(cluster_num, s->in_flight_bitmap)) { >> > +trace_mirror_yield_in_flight(s, sector_num, s->in_flight); >> > +qemu_cor

Re: [Qemu-devel] [PATCH] pc87312: Replace register_ioport_*() with MemoryRegion

2013-01-14 Thread Andreas Färber
Am 13.01.2013 10:46, schrieb Hervé Poussineau: > Andreas Färber a écrit : >> Prepare an instance_init function for the MemoryRegion init. >> >> Signed-off-by: Andreas Färber >> Cc: Hervé Poussineau >> --- >> hw/pc87312.c | 26 ++ >> hw/pc87312.h |2 ++ >> 2 Dateien

Re: [Qemu-devel] [PATCH] pc87312: avoid define conflict on mingw32

2013-01-14 Thread Andreas Färber
Am 13.01.2013 10:47, schrieb Hervé Poussineau: > Blue Swirl a écrit : >> Mingw32 headers define FAR, causing this warning: >> /src/qemu/hw/pc87312.c:38:0: warning: "FAR" redefined [enabled by >> default] >> In file included from >> /usr/local/lib/gcc/i686-mingw32msvc/4.7.0/../../../../i686-mingw32m

Re: [Qemu-devel] [RFC ppc-next v3 08/10] mac_nvram: QOM'ify MacIO NVRAM

2013-01-14 Thread Markus Armbruster
Andreas Färber writes: > It was not qdev'ified before, turn it into a SysBusDevice and > initialize it via static properties. > > Prepare Old World specific MacIO state and embed the NVRAM state there. > > Drop macio_nvram_setup_bar() in favor of sysbus_mmio_map() or > direct use of Memory API. [

Re: [Qemu-devel] [RFC ppc-next v3 00/10] target-ppc: MacIO QOM'ification

2013-01-14 Thread Markus Armbruster
Andreas Färber writes: > Hello, > > As requested by Markus, here's a conversion of MacIO IDE to QOM. > There's more work to be done, but in light of the approaching Soft Freeze > here's my current state of affairs, lightly tested. > > Patch 1 is a generic QOM API fix and could be applied independ

Re: [Qemu-devel] [PATCH 01/10] qom: Make object_resolve_path_component() path argument const

2013-01-14 Thread Markus Armbruster
Andreas Färber writes: > This allows to navigate partial well-known paths from an object. Why does making the argument const allow such navigation? > Signed-off-by: Andreas Färber > Cc: Anthony Liguori > --- > include/qom/object.h |2 +- > qom/object.c |2 +- > 2 Dateien geän

Re: [Qemu-devel] [PATCH V5 4/6] HMP: filter out space before check of sub-command

2013-01-14 Thread Markus Armbruster
Wenchao Xia writes: > 于 2013-1-12 4:12, Luiz Capitulino 写道: >> On Fri, 11 Jan 2013 17:14:03 +0800 >> Wenchao Xia wrote: >> >>>This fix the case when user input "@command ". Original >>> it will return NULL for monitor_parse_command(), now >>> it will return the @command related instance. >>>

Re: [Qemu-devel] [PATCH V2] hd-geometry.c: Integrate HDIO_GETGEO in guessing

2013-01-14 Thread Markus Armbruster
Einar Lueck writes: > This patch extends the function hd_geometry_guess. If no geo could > be guessed via guess_disk_lchs, a new function called guess_disk_pchs is > called. The latter utilizes HDIO_GET_GEO ioctl to ask the underlying disk > for geometry. > If this is not successful (e.g. image f

Re: [Qemu-devel] [PATCHv3 0/2] Preparing safe sigprocmask wrapper on qemu-user

2013-01-14 Thread Alex Barcelo
> FWIW this mail did not arrive as reply to any previous post on the list > so it may not be obvious for reviewers what "this one" refers to. You > may want to check what went wrong (also it arrived as HTML so that > quotes below are broken). Ok, sorry, gmail backend does nasty things. I should mi

Re: [Qemu-devel] [PATCH v3 0/2] QOM realize, device-only

2013-01-14 Thread Igor Mammedov
ping

Re: [Qemu-devel] [PATCH 1/3] qga: add support to get host time

2013-01-14 Thread Eric Blake
On 01/13/2013 08:17 PM, Lei Li wrote: > On 01/11/2013 11:37 PM, Eric Blake wrote: >> On 01/11/2013 12:18 AM, Lei Li wrote: >>> For this version, it's a one-hour offset represented as:±[hh]. >>> Negative values are west, andpositive values are east of UTC. >> Won't work. There are timezones with a

Re: [Qemu-devel] [PATCH 07/17] target-i386: prepare cpu_x86_parse_featurestr() to return a set of key, value property pairs

2013-01-14 Thread Eduardo Habkost
On Fri, Jan 11, 2013 at 03:10:21AM +0100, Igor Mammedov wrote: > It prepares for converting "+feature,-feature,feature=foo,feature" into > a set of key,value property pairs that will be applied to CPU by > x86_cpu_set_props(). > > It separates legacy format parsing from property setting, later it

Re: [Qemu-devel] [PATCH 09/17] target-i386: print deprecated warning if xlevel < 0x80000000

2013-01-14 Thread Eduardo Habkost
On Fri, Jan 11, 2013 at 03:10:23AM +0100, Igor Mammedov wrote: > Signed-off-by: Igor Mammedov Reviewed-by: Eduardo Habkost > --- > target-i386/cpu.c |2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > > diff --git a/target-i386/cpu.c b/target-i386/cpu.c > index 485154d..9cf0ade 10

Re: [Qemu-devel] [PATCH] bswap: improve gluing

2013-01-14 Thread Richard Henderson
On 2013-01-13 08:35, Blue Swirl wrote: Fix by applying glue(). Also add do {} while(0) wrapping and fix semicolon use while at it. Signed-off-by: Blue Swirl --- include/qemu/bswap.h | 20 ++-- 1 files changed, 10 insertions(+), 10 deletions(-) Reviewed-by: Richard Henderso

[Qemu-devel] [PATCH] usb: add usb-bot device (scsi bulk-only transport).

2013-01-14 Thread Gerd Hoffmann
Basically the same as usb-storage, but without automatic scsi device setup. Also features support for up to 16 LUNs. Signed-off-by: Gerd Hoffmann --- docs/usb-storage.txt | 11 ++- hw/usb/dev-storage.c | 85 +- 2 files changed, 80 insertio

Re: [Qemu-devel] [PATCH 16/17] target-i386: set custom 'tsc-frequency' without intermediate x86_def_t

2013-01-14 Thread Eduardo Habkost
On Fri, Jan 11, 2013 at 03:10:30AM +0100, Igor Mammedov wrote: > Signed-off-by: Igor Mammedov Reviewed-by: Eduardo Habkost Will this be converted to a simple qdict_put() of the raw string value, to be parsed using visit_type_freq() (or something equivalent), in the future? It would be interesti

Re: [Qemu-devel] [PATCH 25/27] build: some simplifications for "trace/Makefile.objs"

2013-01-14 Thread Lluís Vilanova
Paolo Bonzini writes: > Signed-off-by: Lluís Vilanova > Signed-off-by: Paolo Bonzini > --- > trace.h => include/trace.h | 0 > trace/Makefile.objs| 26 +- > 2 files changed, 13 insertions(+), 13 deletions(-) > rename trace.h => include/trace.h (100%) > diff --

Re: [Qemu-devel] [PATCH 17/17] target-i386: remove setting tsc-frequency from x86_def_t

2013-01-14 Thread Eduardo Habkost
On Fri, Jan 11, 2013 at 03:10:31AM +0100, Igor Mammedov wrote: > Setting tsc-frequency from x86_def_t is NOP because default tsc_khz > in x86_def_t is 0 and CPUX86State.tsc_khz is also initialized to 0 > by default. So there is not need to set ovewrite tsc_khz with default > 0 because field was alr

[Qemu-devel] [PATCH 0/7] Discard improvements

2013-01-14 Thread Paolo Bonzini
This series builds on the patch from Kusanagi Kouichi, and also adds discard support for non-passthrough block devices (BLKDISCARD), and asynchronous discard support. SCSI already calls bdrv_aio_discard, so it is not affected by these patches. Kusanagi Kouichi (1): raw-posix: support discard on

[Qemu-devel] [PATCH resend 0/7] Discard improvements

2013-01-14 Thread Paolo Bonzini
This series builds on the patch from Kusanagi Kouichi, and also adds discard support for non-passthrough block devices (BLKDISCARD), and asynchronous discard support. SCSI already calls bdrv_aio_discard, so it is not affected by these patches. Kusanagi Kouichi (1): raw-posix: support discard on

[Qemu-devel] [PATCH 1/7] raw-posix: support discard on more filesystems

2013-01-14 Thread Paolo Bonzini
From: Kusanagi Kouichi Linux 2.6.38 introduced the filesystem independent interface to deallocate part of a file. As of Linux 3.7, btrfs, ext4, ocfs2, tmpfs and xfs support it. Even though the system calls here are in practice issued on Linux, the code is structured to allow plugging in alternat

[Qemu-devel] [PATCH 5/7] ide: fix TRIM with empty range entry

2013-01-14 Thread Paolo Bonzini
ATA-ACS-3 says "If the two byte range length is zero, then the LBA Range Entry shall be discarded as padding." iovecs are used as if they are linearized, so it is incorrect to discard the rest of this iovec. Signed-off-by: Paolo Bonzini --- hw/ide/core.c | 2 +- 1 file changed, 1 insertion(+),

[Qemu-devel] [PATCH 3/7] raw: support discard on block devices

2013-01-14 Thread Paolo Bonzini
Block devices use a ioctl instead of fallocate, so add a separate implementation. Signed-off-by: Paolo Bonzini --- block/raw-posix.c | 36 1 file changed, 36 insertions(+) diff --git a/block/raw-posix.c b/block/raw-posix.c index b647cfb..1d32139 100644 --- a

[Qemu-devel] [PATCH 4/7] block: make discard asynchronous

2013-01-14 Thread Paolo Bonzini
This is easy with the thread pool, because we can use s->is_xfs and s->has_discard from the worker function. QEMU has a widespread assumption that each I/O operation writes less than 2^32 bytes. This patch doesn't fix it throughout of course, but it starts correcting struct RawPosixAIOData so tha

[Qemu-devel] [Bug 1099403] [NEW] High CPU utilization in vnc mode

2013-01-14 Thread Anuj Kalia
Public bug reported: We start a gentoo guest using ./x86-64-softmmu/qemu-x86-64 -hda .qcow2 -vnc :6. Then we start a vncviewer session to this guest from a remote computer. In this session, we start a video. After starting the video, the CPU utilization of the guest (the qemu-x86-64 process) incr

Re: [Qemu-devel] [PATCH V5 4/6] HMP: filter out space before check of sub-command

2013-01-14 Thread Luiz Capitulino
On Mon, 14 Jan 2013 14:46:35 +0100 Markus Armbruster wrote: > Wenchao Xia writes: > > > 于 2013-1-12 4:12, Luiz Capitulino 写道: > >> On Fri, 11 Jan 2013 17:14:03 +0800 > >> Wenchao Xia wrote: > >> > >>>This fix the case when user input "@command ". Original > >>> it will return NULL for moni

Re: [Qemu-devel] [PATCH 16/17] target-i386: set custom 'tsc-frequency' without intermediate x86_def_t

2013-01-14 Thread Igor Mammedov
On Mon, 14 Jan 2013 13:20:44 -0200 Eduardo Habkost wrote: > On Fri, Jan 11, 2013 at 03:10:30AM +0100, Igor Mammedov wrote: > > Signed-off-by: Igor Mammedov > > Reviewed-by: Eduardo Habkost > > Will this be converted to a simple qdict_put() of the raw string value, > to be parsed using visit_t

[Qemu-devel] [PATCH 7/7] block: clear dirty bitmap when discarding

2013-01-14 Thread Paolo Bonzini
Note that resetting bits in the dirty bitmap is done _before_ actually processing the request. Writes, instead, set bits after the request is completed. This way, when there are concurrent write and discard requests, the outcome will always be that the blocks are marked dirty. This scenario shou

[Qemu-devel] [PATCH 2/7] raw-posix: remember whether discard failed

2013-01-14 Thread Paolo Bonzini
Avoid sending system calls repeatedly if they shall fail. This does not apply to XFS: if the filesystem-specific ioctl fails, something weird is happening. Signed-off-by: Paolo Bonzini --- block/raw-posix.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/block/raw-p

[Qemu-devel] [PATCH 6/7] ide: issue discard asynchronously but serialize the pieces

2013-01-14 Thread Paolo Bonzini
Now that discard can take a long time, make it asynchronous. Each LBA range entry is processed separately because discard can be an expensive operation. Signed-off-by: Paolo Bonzini --- hw/ide/core.c | 79 --- 1 file changed, 54 insertions(

Re: [Qemu-devel] [PATCH 25/27] build: some simplifications for "trace/Makefile.objs"

2013-01-14 Thread Paolo Bonzini
Il 14/01/2013 16:19, Lluís Vilanova ha scritto: > This patch looks outdated. Last revision in master has an explicit line to > generate a .o that reads: > > #v+ > $(obj)/generated-tracers-dtrace.o: trace/generated-tracers-dtrace.dtrace > $(call quiet-command,dtrace -o $@ -G -s $<, " GEN $

Re: [Qemu-devel] [PATCH 16/17] target-i386: set custom 'tsc-frequency' without intermediate x86_def_t

2013-01-14 Thread Eduardo Habkost
On Mon, Jan 14, 2013 at 04:49:23PM +0100, Igor Mammedov wrote: > On Mon, 14 Jan 2013 13:20:44 -0200 > Eduardo Habkost wrote: > > > On Fri, Jan 11, 2013 at 03:10:30AM +0100, Igor Mammedov wrote: > > > Signed-off-by: Igor Mammedov > > > > Reviewed-by: Eduardo Habkost > > > > Will this be conver

Re: [Qemu-devel] [PATCH V2] hd-geometry.c: Integrate HDIO_GETGEO in guessing

2013-01-14 Thread Einar Lueck
On 01/14/2013 02:23 PM, Markus Armbruster wrote: Einar Lueck writes: This patch extends the function hd_geometry_guess. If no geo could be guessed via guess_disk_lchs, a new function called guess_disk_pchs is called. The latter utilizes HDIO_GET_GEO ioctl to ask the underlying disk for geometr

Re: [Qemu-devel] [PATCH] libcacard: correct T0 historical bytes size

2013-01-14 Thread Marc-André Lureau
ping On Sun, Dec 2, 2012 at 10:00 PM, Marc-André Lureau wrote: > The VCARD_ATR_PREFIX macro adds a prefix of 6 characters only. > > pcsc_scan was complaining before the patch: > > + Historical bytes: 56 43 41 52 44 5F 4E 53 53 > ERROR! ATR is truncated: 2 byte(s) is/are missing > --- > libcacar

Re: [Qemu-devel] [RFC ppc-next v3 08/10] mac_nvram: QOM'ify MacIO NVRAM

2013-01-14 Thread Andreas Färber
Am 14.01.2013 13:34, schrieb Markus Armbruster: > Andreas Färber writes: > >> It was not qdev'ified before, turn it into a SysBusDevice and >> initialize it via static properties. >> >> Prepare Old World specific MacIO state and embed the NVRAM state there. >> >> Drop macio_nvram_setup_bar() in f

Re: [Qemu-devel] [PATCH 0/6] Simple qemu-ga fixes and cleanups

2013-01-14 Thread Luiz Capitulino
On Fri, 11 Jan 2013 11:24:56 +0100 Markus Armbruster wrote: > Markus Armbruster (6): > qemu-ga: Document intentional fall through in channel_event_cb() > qemu-ga: Drop pointless lseek() from ga_open_pidfile() > qemu-ga: Plug file descriptor leak on ga_open_pidfile() error path > qemu-ga:

[Qemu-devel] [PATCH] qcow2: Fix segfault on zero-length write

2013-01-14 Thread Kevin Wolf
One of the recent refactoring patches (commit f50f88b9) didn't take care to initialise l2meta properly, so with zero-length writes, which don't even enter the write loop, qemu just segfaulted. Signed-off-by: Kevin Wolf --- block/qcow2.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-)

Re: [Qemu-devel] [PATCH V2] hd-geometry.c: Integrate HDIO_GETGEO in guessing

2013-01-14 Thread Markus Armbruster
Einar Lueck writes: > On 01/14/2013 02:23 PM, Markus Armbruster wrote: >> Einar Lueck writes: >> >>> This patch extends the function hd_geometry_guess. If no geo could >>> be guessed via guess_disk_lchs, a new function called guess_disk_pchs is >>> called. The latter utilizes HDIO_GET_GEO ioctl

Re: [Qemu-devel] [PATCH V6 0/5] HMP: allow parsing for sub command

2013-01-14 Thread Luiz Capitulino
On Mon, 14 Jan 2013 14:06:24 +0800 Wenchao Xia wrote: > These patches enhance HMP to allow it parse 2nd level of commands, such > as info sub command list, which means foldered command with parameter is > possible now. I've applied this series to qmp-next, as I've a pull request pending. Revi

Re: [Qemu-devel] [PATCH 01/10] qom: Make object_resolve_path_component() path argument const

2013-01-14 Thread Andreas Färber
Am 14.01.2013 13:19, schrieb Markus Armbruster: > Andreas Färber writes: > >> This allows to navigate partial well-known paths from an object. > > Why does making the argument const allow such navigation? Without const, object_resolve_path_component(foo, "bar") results in a compile error (09/10

  1   2   3   >