Re: [Qemu-devel] [Nbd] [PATCH] doc: Revert swap of NBD_REP_SERVER fields in NBD_OPT_GO

2016-04-06 Thread Alex Bligh
On 7 Apr 2016, at 05:12, Eric Blake wrote: > Commit 730c5830 included a reordering of the fields of > NBD_REP_SERVER, under the guise of putting the variable-sized > data last. However, this makes life harder for sharing > code - the regular NBD_REP_SERVER used by NBD_OPT_LIST > already has _tw

[Qemu-devel] [PATCH v2 2/4] slirp: avoid use-after-free in slirp_pollfds_poll() if soread() returns an error

2016-04-06 Thread Steven Luo
From: Steven Luo Samuel Thibault pointed out that it's possible that slirp_pollfds_poll() will try to use a socket even after soread() returns an error, resulting in an use-after-free if the socket was removed while handling the error. Avoid this by refusing to continue to work with the socket in

[Qemu-devel] [PATCH v2 4/4] slirp: handle deferred ECONNREFUSED on non-blocking TCP sockets

2016-04-06 Thread Steven Luo
From: Steven Luo slirp currently only handles ECONNREFUSED in the case where connect() returns immediately with that error; since we use non-blocking sockets, most of the time we won't receive the error until we later try to read from the socket. Ensure that we deliver the appropriate RST to the

[Qemu-devel] [PATCH v2 3/4] slirp: Propagate host TCP RST to the guest.

2016-04-06 Thread Steven Luo
From: Edgar E. Iglesias When the host aborts (RST) it's side of a TCP connection we need to propagate that RST to the guest. The current code can leave such guest connections dangling forever. Spotted by Jason Wessel. [ste...@steven676.net: coding style adjustments] Signed-off-by: Steven Luo --

[Qemu-devel] [PATCH v2 1/4] slirp: don't crash when tcp_sockclosed() is called with a NULL tp

2016-04-06 Thread Steven Luo
From: Steven Luo Signed-off-by: Steven Luo Reviewed-by: Edgar E. Iglesias --- v1->v2: * added Reviewed-by line slirp/tcp_subr.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/slirp/tcp_subr.c b/slirp/tcp_subr.c index dbfd2c6..32ff452 100644 --- a/slirp/tcp_subr.c +

[Qemu-devel] [PATCH v2 0/4] slirp: deliver received TCP RSTs to the guest

2016-04-06 Thread Steven Luo
Changes from v1: * added patch 2, a fix for an use-after-free exposed by this series (thanks Samuel Thibault) * incorporated Reviewed-by lines * attributed patches correctly -Steven Luo === QEMU's user-mode networking does not currently pass received TCP RSTs to guests, meaning that applicati

[Qemu-devel] [PATCH V3] tap: vhost busy polling support

2016-04-06 Thread Jason Wang
This patch add the capability of basic vhost net busy polling which is supported by recent kernel. User could configure the maximum number of us that could be spent on busy polling through a new property of tap "vhost-poll-us". Signed-off-by: Jason Wang --- hw/net/vhost_net.c| 2

Re: [Qemu-devel] [PATCH V2] tap: vhost busy polling support

2016-04-06 Thread Jason Wang
On 04/07/2016 01:16 AM, Greg Kurz wrote: > On Wed, 6 Apr 2016 09:05:21 -0600 > Eric Blake wrote: > >> On 04/06/2016 03:15 AM, Jason Wang wrote: >>> This patch add the capability of basic vhost net busy polling which is >>> supported by recent kernel. User could configure the maximum number of >>

[Qemu-devel] [PATCH] doc: Revert swap of NBD_REP_SERVER fields in NBD_OPT_GO

2016-04-06 Thread Eric Blake
Commit 730c5830 included a reordering of the fields of NBD_REP_SERVER, under the guise of putting the variable-sized data last. However, this makes life harder for sharing code - the regular NBD_REP_SERVER used by NBD_OPT_LIST already has _two_ variable-sized fields: name, and an optional string o

Re: [Qemu-devel] [PATCH] xen: piix reuse pci generic class init function

2016-04-06 Thread Michael S. Tsirkin
On Wed, Apr 06, 2016 at 04:56:12PM -0700, Stefano Stabellini wrote: > On Sun, 3 Apr 2016, Michael S. Tsirkin wrote: > > piix3_ide_xen_class_init is identical to piix3_ide_class_init > > except it's buggy as it does not set exit and does not disable > > hotplug properly. > > > > Switch to the gener

[Qemu-devel] [PATCH 3/3] use g_path_get_basename instead of basename

2016-04-06 Thread Wei Jiangang
Using g_strdup and g_basename to get the last component of filename is not the best solution, Only g_path_get_basename can achive the purpose we want. Signed-off-by: Wei Jiangang --- fsdev/virtfs-proxy-helper.c | 6 +- hw/9pfs/9p-local.c | 6 +++--- hw/vfio/pci.c |

[Qemu-devel] [PATCH 0/3] bitsized task for glib conversion

2016-04-06 Thread Wei Jiangang
The series used to change basename and dirname to g_path_get_basename() and g_path_get_dirname() respectively. Refer to http://wiki.qemu.org/BiteSizedTasks#API_conversion *** BLURB HERE *** Wei Jiangang (3): linux-user: complete omission of removing uses of strdup use g_path_get_dirname inst

[Qemu-devel] [PATCH 2/3] use g_path_get_dirname instead of dirname

2016-04-06 Thread Wei Jiangang
Use g_path_get_basename to get the directory components of a file name, and free its return when no longer needed. Signed-off-by: Wei Jiangang --- os-posix.c | 3 ++- util/oslib-posix.c | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/os-posix.c b/os-posix.c index

[Qemu-devel] [PATCH 1/3] linux-user: complete omission of removing uses of strdup

2016-04-06 Thread Wei Jiangang
The 900cfbc just removed two unchecked uses of strdup in fill_psinfo and missed the rest in core_dump_filename. This patch fixes it. Signed-off-by: Wei Jiangang --- linux-user/elfload.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/linux-user/elfload.c b/linux-user/e

Re: [Qemu-devel] [PATCH qemu v15 15/17] spapr_pci: Get rid of dma_loibn

2016-04-06 Thread David Gibson
s/dma_loibn/dma_liobn/ in subject line. On Mon, Apr 04, 2016 at 07:33:44PM +1000, Alexey Kardashevskiy wrote: > We are going to have 2 DMA windows which LIOBNs are calculated from > the PHB index and the window number using the SPAPR_PCI_LIOBN macro > so there is no actual use for dma_liobn. > >

Re: [Qemu-devel] [PATCH qemu v15 14/17] spapr_iommu, vfio, memory: Notify IOMMU about starting/stopping being used by VFIO

2016-04-06 Thread David Gibson
On Mon, Apr 04, 2016 at 07:33:43PM +1000, Alexey Kardashevskiy wrote: > The sPAPR TCE tables manage 2 copies when VFIO is using an IOMMU - > a guest view of the table and a hardware TCE table. If there is no VFIO > presense in the address space, then just the guest view is used, if > this is the ca

Re: [Qemu-devel] [PATCH qemu v15 16/17] vfio/spapr: Use VFIO_SPAPR_TCE_v2_IOMMU

2016-04-06 Thread David Gibson
Subject doesn't seem quite right, since you added at least minimal support for the SPAPRv2 IOMMU in the prereg patch. On Mon, Apr 04, 2016 at 07:33:45PM +1000, Alexey Kardashevskiy wrote: > New VFIO_SPAPR_TCE_v2_IOMMU type supports dynamic DMA window management. > This adds ability to VFIO common

Re: [Qemu-devel] Any progress with the Cortex-M4 emulation?

2016-04-06 Thread Michael Davidsaver
On 04/06/2016 06:23 PM, Liviu Ionescu wrote: > >> On 07 Apr 2016, at 01:04, Peter Maydell wrote: >> >> ... Somebody needs to do the necessary work to fix the >> code review issues. ... > > in this case I'll probably wait for this process to be completed and > reevaluate the situation by then.

Re: [Qemu-devel] [PATCH 07/10] tb hash: hash phys_pc, pc, and flags with xxhash

2016-04-06 Thread Emilio G. Cota
On Wed, Apr 06, 2016 at 20:23:42 +0200, Paolo Bonzini wrote: > On 06/04/2016 19:44, Emilio G. Cota wrote: > > I like this idea, because the ugliness of the sizeof checks is significant. > > However, the quality of the resulting hash is not as good when always using > > func5. > > For instance, whe

Re: [Qemu-devel] [PATCH 0/3] slirp: deliver received TCP RSTs to the guest

2016-04-06 Thread Samuel Thibault
Hello, Steven Luo, on Wed 06 Apr 2016 17:00:50 -0700, wrote: > That said, sorecvoob() also calls soread(), so I'd guess we need to > deal with the possibility that soread() frees the socket in that case > as well? Indeed, then sorecvoob() needs to return that information, so slirp_pollfds_poll ca

Re: [Qemu-devel] [PATCH 0/3] slirp: deliver received TCP RSTs to the guest

2016-04-06 Thread Steven Luo
On Wed, Apr 06, 2016 at 02:57:43PM +0200, Samuel Thibault wrote: > ste...@steven676.net, on Tue 05 Apr 2016 17:13:58 -0700, wrote: > > The second, > > which fixes delivery of an RST interrupting an already-established TCP > > connection, was submitted by Edgar Iglesias in 2008 and appears to have >

Re: [Qemu-devel] [PATCH] xen: piix reuse pci generic class init function

2016-04-06 Thread Stefano Stabellini
On Sun, 3 Apr 2016, Michael S. Tsirkin wrote: > piix3_ide_xen_class_init is identical to piix3_ide_class_init > except it's buggy as it does not set exit and does not disable > hotplug properly. > > Switch to the generic one. > > Reviewed-by: Stefano Stabellini > Signed-off-by: Michael S. Tsirki

Re: [Qemu-devel] [PATCH 1/2] qga: fix fd leak with guest-exec i/o channels

2016-04-06 Thread Michael Roth
Quoting Denis V. Lunev (2016-04-06 00:43:30) > From: Yuriy Pudgorodskiy > > Signed-off-by: Yuriy Pudgorodskiy > Signed-off-by: Denis V. Lunev > CC: Michael Roth > --- > qga/commands.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/qga/commands.c b/qga/commands.c > index e091ee1.

Re: [Qemu-devel] [PATCH 0/4] Fix QEMU crash on vhost-user socket disconnect.

2016-04-06 Thread Ilya Maximets
--- Original Message --- Sender : Michael S. Tsirkin Date : Apr 05, 2016 13:46 (GMT+03:00) Title : Re: [PATCH 0/4] Fix QEMU crash on vhost-user socket disconnect. > On Thu, Mar 31, 2016 at 09:02:01AM +0300, Ilya Maximets wrote: > > On 30.03.2016 20:01, Michael S. Tsirkin wrote: > > > On We

[Qemu-devel] [Bug 1563887] Re: qemu-system-ppc64 freezes on starting image on ppc64le

2016-04-06 Thread Serge Hallyn
@leftyfb - what exactly is IBM asking to verify? Whether kvm works under powervm? Did smoser's info help? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1563887 Title: qemu-system-ppc64 freezes on

Re: [Qemu-devel] [PATCH 06/10] include: add xxhash.h

2016-04-06 Thread Emilio G. Cota
On Wed, Apr 06, 2016 at 12:39:42 +0100, Alex Bennée wrote: > > Emilio G. Cota writes: > > > xxhash is a fast, high-quality hashing function. The appended > > brings in the 32-bit version of it, with the small modification that > > it assumes the data to be hashed is made of 32-bit chunks; this i

[Qemu-devel] [PATCH v2 2/1 for-2.6] nbd: Don't kill server when client requests unknown option

2016-04-06 Thread Eric Blake
nbd-server.c currently fails to handle unsupported options properly. If during option haggling the client sends an unknown request, the server kills the connection instead of letting the client try to fall back to something older. This is precisely what advertising NBD_FLAG_FIXED_NEWSTYLE was supp

Re: [Qemu-devel] Any progress with the Cortex-M4 emulation?

2016-04-06 Thread Liviu Ionescu
> On 07 Apr 2016, at 01:04, Peter Maydell wrote: > > ... Somebody needs to do the necessary work to fix the > code review issues. ... in this case I'll probably wait for this process to be completed and reevaluate the situation by then. regards, Liviu

Re: [Qemu-devel] Any progress with the Cortex-M4 emulation?

2016-04-06 Thread Peter Maydell
On 6 April 2016 at 22:54, Liviu Ionescu wrote: > >> On 06 Apr 2016, at 17:42, Peter Maydell wrote: >> >> On 6 April 2016 at 13:52, Liviu Ionescu wrote: >>> >>> I also have on my TODO list to implement the SCB registers used >>> during exception processing (MMFAR, BFAR, CFSR); I checked and >>> i

Re: [Qemu-devel] Any progress with the Cortex-M4 emulation?

2016-04-06 Thread Liviu Ionescu
> On 06 Apr 2016, at 17:42, Peter Maydell wrote: > > On 6 April 2016 at 13:52, Liviu Ionescu wrote: >> >> I also have on my TODO list to implement the SCB registers used >> during exception processing (MMFAR, BFAR, CFSR); I checked and >> in version 2.5.1 apparently they are still not implemen

[Qemu-devel] [Bug 1563887] Re: qemu-system-ppc64 freezes on starting image on ppc64le

2016-04-06 Thread Scott Moser
Note, that Michael Roth's comments are probably valid. I suspect that if leftyfb ever saw this working on powerVM host, then it was through the kvm_pr module. In my experience, that works generally pretty well (buit my testing has only ever been done powerNV host). -- You received this bug noti

[Qemu-devel] [Bug 1563887] Re: qemu-system-ppc64 freezes on starting image on ppc64le

2016-04-06 Thread Scott Moser
ok. so after playing some, this all comes down to needing 'usb=off' on the qemu command line. works: qemu-system-ppc64 -enable-kvm -machine usb=off -device virtio-net-pci,netdev=net00 -netdev type=user,id=net00 -drive if=virtio,file=xenial-server-cloudimg-ppc64el-disk1.img,format=qcow2 -drive i

[Qemu-devel] [Bug 1563887] Re: qemu-system-ppc64 freezes on starting image on ppc64le

2016-04-06 Thread Mike Rushton
1. the bug reporter is using a powervm partition. KVM cannot be used there. This is not a KVM bug. PowerVM mode is an LPAR. It is not a kvm instance trying to run an KVM within. This was also working in 14.04 without issue and is being asked of us from IBM to certify 2. the xenial cloud images ha

[Qemu-devel] [Bug 1563887] Re: qemu-system-ppc64 freezes on starting image on ppc64le

2016-04-06 Thread Mike Rushton
I have also shown that this issue has the exact same results on PowerNV above. ** Changed in: qemu Status: Invalid => Confirmed ** Changed in: qemu (Ubuntu) Status: Invalid => Confirmed -- You received this bug notification because you are a member of qemu- devel-ml, which is sub

[Qemu-devel] [Bug 1563887] Re: qemu-system-ppc64 freezes on starting image on ppc64le

2016-04-06 Thread Scott Moser
** Changed in: qemu Status: New => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1563887 Title: qemu-system-ppc64 freezes on starting image on ppc64le Status in QEMU: Invalid Stat

[Qemu-devel] [Bug 1563887] Re: qemu-system-ppc64 freezes on starting image on ppc64le

2016-04-06 Thread Serge Hallyn
Ok so if I'm following this right there are two issues: 1. the bug reporter is using a powervm partition. KVM cannot be used there. This is not a KVM bug. 2. the xenial cloud images have an outdated 4.2 kernel which doesn't boot in kvm on powernv. A workaround is to use the isos which do boot.

[Qemu-devel] [PATCH v2] hw/i386: add device tree support

2016-04-06 Thread Antonio Borneo
With "-dtb" on command-line: - append the device tree blob to the kernel image; - pass the blob's pointer to the kernel through setup_data, as requested by upstream kernel commit da6b737b9ab7 ("x86: Add device tree support"). The device tree blob is passed as-is to the guest; none of its field

Re: [Qemu-devel] [PATCH] hw/i386: add device tree support

2016-04-06 Thread Antonio Borneo
On Tue, Apr 5, 2016 at 10:43 PM, Eduardo Habkost wrote: > [...] > > One small comment below: > > [...] >> + >> +load_image(dtb_filename, setup_data->data); > > load_image() is deprecated, please use > load_image_size(dtb_filename, setup_data->data, dtb_size) > instead. Yes, correct! I mis

Re: [Qemu-devel] [PATCH 0/2] Add gpio_key and use it for ARM virt power button

2016-04-06 Thread Peter Maydell
On 6 April 2016 at 18:50, Emilio G. Cota wrote: > I might be doing something wrong, but aarch64-softmmu @ master only works for > me > after reverting 94f02c5ea94 "ARM: Virt: Use gpio_key for power button". > Bisect log > appended. > > This is what I get when booting aarch64 as per [1]: > $ aarc

Re: [Qemu-devel] [PATCH for-2.6] block: Forbid I/O throttling on nodes with multiple parents for 2.6

2016-04-06 Thread Alberto Garcia
On Mon 04 Apr 2016 05:26:02 PM CEST, Kevin Wolf wrote: > As the patches to move I/O throttling to BlockBackend didn't make it in > time for the 2.6 release, but the release adds new ways of configuring > VMs whose behaviour would change once the move is done, we need to > outlaw such configurations

[Qemu-devel] [PATCH v3 12/14] iotests.py: Allow concurrent qemu instances

2016-04-06 Thread Max Reitz
By adding an optional suffix to the files used for communication with a VM, we can launch multiple VM instances concurrently. Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/iotests.py b

Re: [Qemu-devel] [FreeBSD] Host build i386 failing to build aarch64 targets

2016-04-06 Thread Alex Bennée
Sean Bruno writes: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA512 > > > > On 03/20/16 12:20, Sean Bruno wrote: >> aarch64 targets are now failing to build on i386 hosts due to >> missing __atomic_load_8() calls since this commit: >> >> https://github.com/qemu/qemu/commit/a0aa44b488b3601415d

[Qemu-devel] [PATCH v3 13/14] socket_scm_helper: Accept fd directly

2016-04-06 Thread Max Reitz
This gives us more freedom about the fd that is passed to qemu, allowing us to e.g. pass sockets. Signed-off-by: Max Reitz --- tests/qemu-iotests/socket_scm_helper.c | 29 ++--- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/tests/qemu-iotests/socket_scm_

Re: [Qemu-devel] [PATCH v3 0/7] bdrv_flush_io_queue removal, shared LinuxAioState

2016-04-06 Thread Kevin Wolf
Am 06.04.2016 um 20:28 hat Paolo Bonzini geschrieben: > > > On 06/04/2016 20:19, Kevin Wolf wrote: > >> > > >> > Great, I'll send v4 as soon as possible for inclusion in the block-next > >> > branch. > > Are you still working on v4 or did I miss it? All of the block-next > > candidate series are

[Qemu-devel] [PATCH v3 11/14] iotests.py: Add qemu_nbd function

2016-04-06 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 8499e1b..b3c00dd 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotes

[Qemu-devel] [PATCH v3 05/14] block/nbd: Use qdict_put()

2016-04-06 Thread Max Reitz
Instead of inlining this nice macro (i.e. resorting to qdict_put_obj(..., QOBJECT(...))), use it. Signed-off-by: Max Reitz --- block/nbd.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/block/nbd.c b/block/nbd.c index efa5d3d..d12bcc6 100644 --- a/block/nbd.c ++

[Qemu-devel] [PATCH v3 14/14] iotests: Add test for NBD's blockdev-add interface

2016-04-06 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/147 | 194 + tests/qemu-iotests/147.out | 5 ++ tests/qemu-iotests/group | 1 + 3 files changed, 200 insertions(+) create mode 100755 tests/qemu-iotests/147 create mode 100644 tests/qemu-iotest

[Qemu-devel] [PATCH v3 08/14] block/nbd: Accept SocketAddress

2016-04-06 Thread Max Reitz
Add a new option "address" to the NBD block driver which accepts a SocketAddress. "path", "host" and "port" are still supported as legacy options and are mapped to their corresponding SocketAddress representation. Signed-off-by: Max Reitz --- block/nbd.c | 97 +

[Qemu-devel] [PATCH v3 04/14] block/nbd: Default port in nbd_refresh_filename()

2016-04-06 Thread Max Reitz
Instead of not emitting the port in nbd_refresh_filename(), just set it to the default if the user did not specify it. This makes the logic a bit simpler. Signed-off-by: Max Reitz --- block/nbd.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/block/nbd.c

[Qemu-devel] [PATCH v3 10/14] qapi: Allow blockdev-add for NBD

2016-04-06 Thread Max Reitz
Signed-off-by: Max Reitz --- qapi/block-core.json | 23 +-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 1d09079..6e38ff0 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -1632,13 +1632,14 @@ #

[Qemu-devel] [PATCH v3 09/14] block/nbd: Use SocketAddress options

2016-04-06 Thread Max Reitz
Drop the use of legacy options in favor of the SocketAddress representation, even for internal use (i.e. for storing the result of the filename parsing). Signed-off-by: Max Reitz --- block/nbd.c | 34 +- 1 file changed, 21 insertions(+), 13 deletions(-) diff --gi

[Qemu-devel] [PATCH v3 07/14] block/nbd: "address" in nbd_refresh_filename()

2016-04-06 Thread Max Reitz
As of a future patch, the NBD block driver will accept a SocketAddress structure for a new "address" option. In order to support this, nbd_refresh_filename() needs some changes. The two TODOs introduced by this patch will be removed in the very next one. They exist to explain that it is currently

[Qemu-devel] [PATCH v3 02/14] block/nbd: Drop trailing "." in error messages

2016-04-06 Thread Max Reitz
Signed-off-by: Max Reitz --- block/nbd.c | 4 ++-- tests/qemu-iotests/051.out| 4 ++-- tests/qemu-iotests/051.pc.out | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/block/nbd.c b/block/nbd.c index f7ea3b3..d9b946f 100644 --- a/block/nbd.c +++ b/block

[Qemu-devel] [PATCH v3 06/14] block/nbd: Add nbd_has_filename_options_conflict()

2016-04-06 Thread Max Reitz
Right now, we have four possible options that conflict with specifying an NBD filename, and a future patch will add another one ("address"). This future option is a nested QDict that is flattened at this point, requiring as to test each option whether its key has an "address." prefix. Therefore, we

[Qemu-devel] [PATCH v3 03/14] block/nbd: Reject port parameter without host

2016-04-06 Thread Max Reitz
This is better than the generic block layer finding out later that the port parameter has not been used. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block/nbd.c | 4 1 file changed, 4 insertions(+) diff --git a/block/nbd.c b/block/nbd.c index d9b946f..2112ec0 100644 --- a/block/n

[Qemu-devel] [PATCH v3 for-2.7 00/14] qapi: Allow blockdev-add for NBD

2016-04-06 Thread Max Reitz
Turns out NBD is not so simple to do if you do it right. Anyway, this series adds blockdev-add support for NBD clients. Patch 1 adds a QDict function which I needed in later NBD patches for handling legacy options (move "host" to "address.data.host" etc.). Patches 2, 3, 4, and 5 are minor patches

[Qemu-devel] [PATCH v3 01/14] qdict: Add qdict_change_key()

2016-04-06 Thread Max Reitz
This is a shorthand function for changing a QDict's entry's key. Signed-off-by: Max Reitz --- include/qapi/qmp/qdict.h | 1 + qobject/qdict.c | 23 +++ 2 files changed, 24 insertions(+) diff --git a/include/qapi/qmp/qdict.h b/include/qapi/qmp/qdict.h index 8a3ac13.

Re: [Qemu-devel] [PATCH v3 0/7] bdrv_flush_io_queue removal, shared LinuxAioState

2016-04-06 Thread Paolo Bonzini
On 06/04/2016 20:19, Kevin Wolf wrote: >> > >> > Great, I'll send v4 as soon as possible for inclusion in the block-next >> > branch. > Are you still working on v4 or did I miss it? All of the block-next > candidate series are waiting to be rebased on this one, and moving parts > at the bottom o

Re: [Qemu-devel] [PATCH 07/10] tb hash: hash phys_pc, pc, and flags with xxhash

2016-04-06 Thread Richard Henderson
On 04/06/2016 11:23 AM, Paolo Bonzini wrote: > Perhaps better is to always use a three-word xxhash, but pick the 64-bit > version if any of phys_pc and pc are 64-bits. The unrolling would be > very effective, and the performance penalty not too important (64-bit on > 32-bit is very slow anyway).

Re: [Qemu-devel] [PATCH 07/10] tb hash: hash phys_pc, pc, and flags with xxhash

2016-04-06 Thread Paolo Bonzini
On 06/04/2016 19:44, Emilio G. Cota wrote: > I like this idea, because the ugliness of the sizeof checks is significant. > However, the quality of the resulting hash is not as good when always using > func5. > For instance, when we'd otherwise use func3, two fifths of every input contain > exact

Re: [Qemu-devel] [PATCH v3 0/7] bdrv_flush_io_queue removal, shared LinuxAioState

2016-04-06 Thread Kevin Wolf
Am 30.03.2016 um 15:17 hat Paolo Bonzini geschrieben: > On 30/03/2016 15:06, Stefan Hajnoczi wrote: > > Acked-by: Stefan Hajnoczi > > Great, I'll send v4 as soon as possible for inclusion in the block-next > branch. Are you still working on v4 or did I miss it? All of the block-next candidate se

[Qemu-devel] [PATCH v2 for-2.7 6/8] block: Make bdrv_open() return a BDS

2016-04-06 Thread Max Reitz
There are no callers to bdrv_open() or bdrv_open_inherit() left that pass a pointer to a non-NULL BDS pointer as the first argument of these functions, so we can finally drop that parameter and just make them return the new BDS. Generally, the following pattern is applied: bs = NULL; ret

[Qemu-devel] [PATCH v2 for-2.7 4/8] block: Drop blk_new_with_bs()

2016-04-06 Thread Max Reitz
Its only caller is blk_new_open(), so we can just inline it there. Signed-off-by: Max Reitz --- block/block-backend.c | 28 ++-- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/block/block-backend.c b/block/block-backend.c index 66b8bad..4e8e8ab 100644 ---

[Qemu-devel] [PATCH v2 for-2.7 3/8] tests: Drop BDS from test-throttle.c

2016-04-06 Thread Max Reitz
Now that throttling has been moved to the BlockBackend level, we do not need to create a BDS along with the BB in the I/O throttling test. Signed-off-by: Max Reitz --- tests/test-throttle.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test-throttle.c b/tests/te

[Qemu-devel] [PATCH v2 for-2.7 2/8] block: Let bdrv_open_inherit() return the snapshot

2016-04-06 Thread Max Reitz
If bdrv_open_inherit() creates a snapshot BDS and *pbs is NULL, that snapshot BDS should be returned instead of the BDS under it. To this end, bdrv_append_temp_snapshot() now returns the snapshot BDS instead of just appending it on top of the snapshotted BDS. Also, it calls bdrv_ref() before bdrv_

[Qemu-devel] [PATCH v2 for-2.7 7/8] block: Assert !bs->refcnt in bdrv_close()

2016-04-06 Thread Max Reitz
The only caller of bdrv_close() left is bdrv_delete(). We may as well assert that, in a way (there are some things in bdrv_close() that make more sense under that assumption, such as the call to bdrv_release_all_dirty_bitmaps() which in turn assumes that no frozen bitmaps are attached to the BDS).

[Qemu-devel] [PATCH v2 for-2.7 8/8] block: Drop bdrv_parent_cb_...() from bdrv_close()

2016-04-06 Thread Max Reitz
bdrv_close() now asserts that the BDS's refcount is 0, therefore it cannot have any parents and the bdrv_parent_cb_change_media() call is a no-op. Signed-off-by: Max Reitz --- block.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/block.c b/block.c index 963abcc..7d7fd89 100644 --- a/block

[Qemu-devel] [PATCH v2 for-2.7 5/8] block: Drop bdrv_new_root()

2016-04-06 Thread Max Reitz
By now it has become just a wrapper around bdrv_new() and it has only a single user. Use bdrv_new() there instead and drop this function. Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia --- block.c | 5 - include/block/block.h | 1 - 2 files changed, 6 deletions(-) diff

[Qemu-devel] [PATCH v2 for-2.7 1/8] block: Drop useless bdrv_new() call

2016-04-06 Thread Max Reitz
bdrv_append_temp_snapshot() uses bdrv_new() to create an empty BDS before invoking bdrv_open() on that BDS. This is probably a relict from when it used to do some modifications on that empty BDS, but now that is unnecessary, so we can just set bs_snapshot to NULL and let bdrv_open() do the rest. S

[Qemu-devel] [PATCH v2 for-2.7 0/8] blockdev: (Nearly) free clean-up work

2016-04-06 Thread Max Reitz
After a lot has been restructed in the block layer in the past, we can now reap at least one of the fruits: Make bdrv_open() return a BDS! This series depends on the following series/patches: - Revert "block: Forbid I/O throttling on nodes with multiple parents for 2.6" This is something I su

Re: [Qemu-devel] [PATCH 0/2] Add gpio_key and use it for ARM virt power button

2016-04-06 Thread Emilio G. Cota
On Wed, Mar 23, 2016 at 16:12:46 +, Peter Maydell wrote: > On 17 March 2016 at 13:25, Shannon Zhao wrote: > > From: Shannon Zhao > > > > There is a problem for power button that it will not work if an early > > system_powerdown request happens before guest gpio driver loads. > > > > Here we a

Re: [Qemu-devel] [PATCH 07/10] tb hash: hash phys_pc, pc, and flags with xxhash

2016-04-06 Thread Emilio G. Cota
On Wed, Apr 06, 2016 at 13:52:21 +0200, Paolo Bonzini wrote: > > > On 06/04/2016 02:52, Emilio G. Cota wrote: > > +static inline uint32_t tb_hash_func5(uint64_t a0, uint64_t b0, uint32_t e, > > int seed) > > I would keep just this version and unconditionally zero-extend to > 64-bits. The compi

Re: [Qemu-devel] [PATCH 07/10] tb hash: hash phys_pc, pc, and flags with xxhash

2016-04-06 Thread Richard Henderson
On 04/06/2016 10:32 AM, Emilio G. Cota wrote: > On Wed, Apr 06, 2016 at 08:06:57 +0200, Laurent Desnogues wrote: >> On Tue, Apr 5, 2016 at 7:19 PM, Richard Henderson wrote: >>> On 04/05/2016 09:33 AM, Laurent Desnogues wrote: The 'flags' field is 64-bit. You're thinking of cflags, I guess. >

Re: [Qemu-devel] [PATCH 07/10] tb hash: hash phys_pc, pc, and flags with xxhash

2016-04-06 Thread Emilio G. Cota
On Wed, Apr 06, 2016 at 08:06:57 +0200, Laurent Desnogues wrote: > On Tue, Apr 5, 2016 at 7:19 PM, Richard Henderson wrote: > > On 04/05/2016 09:33 AM, Laurent Desnogues wrote: > >> The 'flags' field is 64-bit. You're thinking of cflags, I guess. > > > > Well that's silly. Since it's filled in v

Re: [Qemu-devel] [PATCH V2] tap: vhost busy polling support

2016-04-06 Thread Greg Kurz
On Wed, 6 Apr 2016 09:05:21 -0600 Eric Blake wrote: > On 04/06/2016 03:15 AM, Jason Wang wrote: > > This patch add the capability of basic vhost net busy polling which is > > supported by recent kernel. User could configure the maximum number of > > us that could be spent on busy polling through

Re: [Qemu-devel] [PATCH] xen: write information about supported backends

2016-04-06 Thread Stefano Stabellini
On Mon, 4 Apr 2016, Juergen Gross wrote: > On 01/04/16 16:56, Stefano Stabellini wrote: > > On Wed, 30 Mar 2016, Juergen Gross wrote: > >> Add a Xenstore directory for each supported pv backend. This will allow > >> Xen tools to decide which backend type to use in case there are > >> multiple possi

[Qemu-devel] [PATCH v2] nbd: Fix NBD unsupported options

2016-04-06 Thread Eric Blake
From: Alex Bligh nbd-client.c currently fails to handle unsupported options properly. If during option haggling the server finds an option that is unsupported, it returns an NBD_REP_ERR_UNSUP reply. According to nbd's proto.md, the format for such a reply should be: S: 64 bits, 0x3e889045565a

[Qemu-devel] [Bug 1563152] Re: general protection fault running VirtualBox in KVM guest

2016-04-06 Thread Serge Hallyn
** Changed in: qemu (Ubuntu) Importance: Undecided => Low -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1563152 Title: general protection fault running VirtualBox in KVM guest Status in QEMU:

Re: [Qemu-devel] [PATCH v3 0/7] virtio: aio handler API

2016-04-06 Thread Cornelia Huck
On Wed, 6 Apr 2016 12:16:21 +0200 Paolo Bonzini wrote: > This version removes patches 1 and 9, fixes some commit messages, and > fixes some small in the formatting issues. > > Michael S. Tsirkin (2): > virtio: add aio handler > virtio-blk: use aio handler for data plane > > Paolo Bonzini (

[Qemu-devel] [PATCH v2] qcow2: Prevent backing file names longer than 1023

2016-04-06 Thread Max Reitz
We reject backing file names with a length of more than 1023 characters when opening a qcow2 file, so we should not produce such files ourselves. Cc: qemu-sta...@nongnu.org Signed-off-by: Max Reitz --- v2: - Move the check to qcow2_change_backing_file() so the BDS state will not be modified if

Re: [Qemu-devel] [Qemu-block] [PATCH 6/7] qemu-iotests: 141: reduce likelihood of race condition on systems with fast IO

2016-04-06 Thread Kevin Wolf
Am 06.04.2016 um 18:15 hat Max Reitz geschrieben: > On 05.04.2016 11:21, Sascha Silbe wrote: > > On systems with fast IO, qemu-io may write more than 1 MiB before > > receiving the block-job-cancel command, causing the test case to fail. > > > > 141 is inherently racy, but we can at least reduce t

Re: [Qemu-devel] [PATCH] Fix NBD unsupported options

2016-04-06 Thread Alex Bligh
On 6 Apr 2016, at 17:14, Eric Blake wrote: > I just re-reviewed this patch. While what you have is a strict > improvement, it is still buggy for a server that sends a UTF-8 message > explaining the error: Indeed. That should be fixed too. I missed that one. -- Alex Bligh signature.asc De

Re: [Qemu-devel] [V8 2/4] hw/i386: ACPI table for AMD IOMMU

2016-04-06 Thread Igor Mammedov
On Fri, 1 Apr 2016 21:39:52 +0300 David Kiarie wrote: > Add IVRS table for AMD IOMMU. Generate IVRS or DMAR > depending on emulated IOMMU > > Signed-off-by: David Kiarie > --- > hw/i386/acpi-build.c | 98 > ++- > include/hw/acpi/acpi-defs.h

Re: [Qemu-devel] [Qemu-block] [PATCH 7/7] qemu-iotests: iotests.py: get rid of __all__

2016-04-06 Thread Max Reitz
On 05.04.2016 11:21, Sascha Silbe wrote: > The __all__ list contained a typo for as long as the iotests module > existed. That typo prevented "from iotests import *" (which is the > only case where iotests.__all__ is used at all) from ever working. Hahaha :D Nice one. > The names used by iotests

Re: [Qemu-devel] [PATCH] qcow2: Prevent backing file names longer than 1023

2016-04-06 Thread Kevin Wolf
Am 06.04.2016 um 17:14 hat Max Reitz geschrieben: > We reject backing file names with a length of more than 1023 characters > when opening a qcow2 file, so we should not produce such files > ourselves. > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Max Reitz > --- > block/qcow2.c | 5 + > 1

Re: [Qemu-devel] [Qemu-block] [PATCH 6/7] qemu-iotests: 141: reduce likelihood of race condition on systems with fast IO

2016-04-06 Thread Max Reitz
On 05.04.2016 11:21, Sascha Silbe wrote: > On systems with fast IO, qemu-io may write more than 1 MiB before > receiving the block-job-cancel command, causing the test case to fail. > > 141 is inherently racy, but we can at least reduce the likelihood of the > job completing before the cancel comm

Re: [Qemu-devel] [PATCH] Fix NBD unsupported options

2016-04-06 Thread Eric Blake
On 04/05/2016 12:55 PM, Alex Bligh wrote: > nbd-client.c currently fails to handle unsupported options properly. > If during option haggling the server finds an option that is > unsupported, it returns an NBD_REP_ERR_UNSUP reply. > > According to nbd's proto.md, the format for such a reply > shoul

Re: [Qemu-devel] [Qemu-block] [PATCH 5/7] qemu-iotests: 068: don't require KVM

2016-04-06 Thread Max Reitz
On 05.04.2016 11:21, Sascha Silbe wrote: > None of the other test cases explicitly enable KVM and there's no > obvious reason for 068 to require it. Drop this so all test cases can be > executed in environments where KVM is not available (e.g. because the > user doesn't have sufficient permissions

Re: [Qemu-devel] [FreeBSD] Host build i386 failing to build aarch64 targets

2016-04-06 Thread Sean Bruno
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 03/20/16 12:20, Sean Bruno wrote: > aarch64 targets are now failing to build on i386 hosts due to > missing __atomic_load_8() calls since this commit: > > https://github.com/qemu/qemu/commit/a0aa44b488b3601415d55041e4619aef5f 3a4ba8#diff-c143d6

Re: [Qemu-devel] [PATCH for-2.6 2/2] block/gluster: prevent data loss after i/o error

2016-04-06 Thread Jeff Cody
On Wed, Apr 06, 2016 at 04:47:32PM +0200, Niels de Vos wrote: > On Wed, Apr 06, 2016 at 08:44:18AM -0400, Jeff Cody wrote: > > On Wed, Apr 06, 2016 at 01:02:16PM +0200, Kevin Wolf wrote: > > > [ Adding some CCs ] > > > > > > Am 06.04.2016 um 05:29 hat Jeff Cody geschrieben: > > > > Upon receiving

Re: [Qemu-devel] [Qemu-block] [PATCH 4/7] qemu-iotests: 148: properly skip test if quorum support is missing

2016-04-06 Thread Max Reitz
On 05.04.2016 11:21, Sascha Silbe wrote: > qemu-iotests test case 148 already had some code for skipping the test > if quorum support is missing, but it didn't work in all > cases. TestQuorumEvents.setUp() gets run before the actual test class > (which contains the skipping code) and tries to start

Re: [Qemu-devel] [PATCH for-2.6] block: Forbid I/O throttling on nodes with multiple parents for 2.6

2016-04-06 Thread Paolo Bonzini
On 06/04/2016 17:55, Alberto Garcia wrote: >> > [BB] overlay >> > | >> > | >> > [BDS] qcow2 [BB] backing >> > || >> > ++ >> > .| >> > . I/O throttling >> >

Re: [Qemu-devel] [Qemu-block] [PATCH 3/7] qemu-iotests: iotests.VM: remove qtest socket on error

2016-04-06 Thread Max Reitz
On 05.04.2016 11:21, Sascha Silbe wrote: > On error, VM.launch() cleaned up the monitor unix socket, but left the > qtest unix socket behind. This caused the remaining sub-tests to fail > with EADDRINUSE: > > +== > +ERROR: testQuo

Re: [Qemu-devel] [PATCH for-2.6] block: Forbid I/O throttling on nodes with multiple parents for 2.6

2016-04-06 Thread Alberto Garcia
On Wed 06 Apr 2016 11:59:47 AM CEST, Kevin Wolf wrote: > Let me draw some ASCII art. I'm drawing I/O throttling like a filter > to make the difference clear; in reality it's part of the BDS now or > of the BB in 2.7, so don't let this confuse you. > > Let's assume these command line options: > > -d

Re: [Qemu-devel] [PATCH 05/10] include: add spinlock wrapper

2016-04-06 Thread Alex Bennée
Paolo Bonzini writes: > On 05/04/2016 07:30, Emilio G. Cota wrote: >> Wrap pthread_spin on POSIX, or QemuMutex on Windows. >> >> AFAIK there are is no off-the-shelf spinlock implementation for >> Windows, so we'll just use QemuMutex. > > It's much simpler to use a simple test-and-set spinlock. >

Re: [Qemu-devel] [Qemu-block] [PATCH 2/7] qemu-iotests: fix 051 on non-PC architectures

2016-04-06 Thread Max Reitz
On 05.04.2016 11:21, Sascha Silbe wrote: > Commit 61de4c68 [block: Remove BDRV_O_CACHE_WB] updated the reference > output for PCs, but neglected to do the same for the generic reference > output file. Fix 051 on all non-PC architectures by applying the same > change to the generic output file. > >

Re: [Qemu-devel] [Nbd] [PATCH] doc: Wording cleanups

2016-04-06 Thread Alex Bligh
On 6 Apr 2016, at 16:35, Eric Blake wrote: > Fix several document inconsistencies (missing references, > rewrap long lines, address typos, improve grammar) introduced > in recent patches. > > Signed-off-by: Eric Blake Reviewed-by: Alex Bligh Most of that mess was mine - thanks for clearing

[Qemu-devel] [PATCH 2/2] vhost-user: delete chardev on cleanup

2016-04-06 Thread marcandre . lureau
From: Marc-André Lureau Remove the chardev implicitely when cleaning up the netdev. This prevents from reusing the chardev since it would be in an incorrect state with the slave. Signed-off-by: Marc-André Lureau --- net/vhost-user.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/vhost

[Qemu-devel] [PATCH 1/2] vhost-user: release chardev on cleanup

2016-04-06 Thread marcandre . lureau
From: Marc-André Lureau On init, vhost-user does qemu_chr_fe_claim_no_fail(). Do the opposite on cleanup to allow removing or reusing the chardev. Signed-off-by: Marc-André Lureau --- net/vhost-user.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/vhost-user.c b/net/vhost-user.c ind

[Qemu-devel] [PATCH 0/2] vhost-user: release chardev on cleanup

2016-04-06 Thread marcandre . lureau
From: Marc-André Lureau The following 2 one-liners remove the chardev from the vhost-user netdev it is attached to. This prevents from further reuse of the chardev that would likely fail to setup again with the slave. Related to: https://bugzilla.redhat.com/show_bug.cgi?id=1256619 https://bugzil

  1   2   3   >