Re: [Qemu-devel] [Bug 1613133] [NEW] SLIRP code regression fails to build on OpenBSD

2016-08-15 Thread Paolo Bonzini
On 15/08/2016 08:53, Thomas Huth wrote: > On 15.08.2016 02:46, Brad Smith wrote: >> Public bug reported: >> >> The SLIRP code has regressed between 2.6 and 2.7 and now fails to build >> on OpenBSD. > [...] >> In file included from /usr/include/net/if.h:454:0, >> from slirp/slirp.

Re: [Qemu-devel] [PATCH v3] docs: add cpu-hotplug.txt

2016-08-15 Thread Andrew Jones
On Mon, Aug 15, 2016 at 01:49:48PM +0800, Dou Liyang wrote: > This document describes how to use cpu hotplug in QEMU. > > Signed-off-by: Dou Liyang > --- > Change log v2 -> v3: > From drew's advice: > 1. modify the examples. > 2. Fix some syntax. > > Change log v1 -> v2: > From Fam's

Re: [Qemu-devel] [PATCH v2] help: Update help to reflect that GTK is the default

2016-08-15 Thread Markus Armbruster
Paolo Bonzini writes: > On 08/08/2016 08:56, Markus Armbruster wrote: >> Aside: -nographic is hard to understand because it does too many things. > > -nographic is "just" -serial mon:stdio -machine graphics=false -display > none. :) Assuming default_parallel is off, default_monitor is on, and ei

Re: [Qemu-devel] [PATCH] target-i386: kvm: Report kvm_pv_unhalt as unsupported w/o kernel_irqchip

2016-08-15 Thread Peter Xu
On Fri, Aug 12, 2016 at 03:14:32PM -0300, Eduardo Habkost wrote: > The kvm_pv_unhalt feature doesn't work if kernel_irqchip is > disabled, so we need to report it as unsupported. > > Signed-off-by: Eduardo Habkost Tested-by: Peter Xu -- peterx

Re: [Qemu-devel] [PATCH v3] docs: add cpu-hotplug.txt

2016-08-15 Thread David Gibson
On Mon, Aug 15, 2016 at 01:49:48PM +0800, Dou Liyang wrote: > This document describes how to use cpu hotplug in QEMU. > > Signed-off-by: Dou Liyang > --- > Change log v2 -> v3: > From drew's advice: > 1. modify the examples. > 2. Fix some syntax. > > Change log v1 -> v2: > From Fam's

Re: [Qemu-devel] [PATCH] qmp-commands.hx: remove outdated note

2016-08-15 Thread Markus Armbruster
Doc fix, nominating for 2.7. Marc-André Lureau writes: > input-send-event is now stable since > 6575ccddf4e7c2484bc14b10d5e89f57506c3953. > > Signed-off-by: Marc-André Lureau > --- > qmp-commands.hx | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/qmp-commands.hx b/qmp-commands.hx > i

Re: [Qemu-devel] [PATCH for-2.7 1/4] virtio: recalculate vq->inuse after migration

2016-08-15 Thread Cornelia Huck
On Fri, 12 Aug 2016 16:32:55 +0100 Stefan Hajnoczi wrote: > The vq->inuse field is not migrated. Many devices don't hold > VirtQueueElements across migration so it doesn't matter that vq->inuse > starts at 0 on the destination QEMU. > > At least virtio-serial, virtio-blk, and virtio-balloon mig

[Qemu-devel] [PATCH for-2.7] slirp: Rename "struct arphdr" to "struct slirp_arphdr"

2016-08-15 Thread Thomas Huth
struct arphdr is already used by the system headers on OpenBSD and thus QEMU does not compile here anymore. Fix it by renaming our struct to slirp_arphdr instead. Reported-by: Brad Smith Buglink: https://bugs.launchpad.net/qemu/+bug/1613133 Signed-off-by: Thomas Huth --- slirp/slirp.c | 10 +

Re: [Qemu-devel] [PATCH for-2.7 2/4] virtio: decrement vq->inuse in virtqueue_discard()

2016-08-15 Thread Cornelia Huck
On Fri, 12 Aug 2016 16:32:56 +0100 Stefan Hajnoczi wrote: > virtqueue_descard() moves vq->last_avail_idx back so the element can be > popped again. It's necessary to decrement vq->inuse to avoid "leaking" > the element count. > > Signed-off-by: Stefan Hajnoczi > --- > hw/virtio/virtio.c | 1 +

Re: [Qemu-devel] [Bug 1613133] [NEW] SLIRP code regression fails to build on OpenBSD

2016-08-15 Thread Thomas Huth
On 15.08.2016 09:15, Paolo Bonzini wrote: > > > On 15/08/2016 08:53, Thomas Huth wrote: >> On 15.08.2016 02:46, Brad Smith wrote: >>> Public bug reported: >>> >>> The SLIRP code has regressed between 2.6 and 2.7 and now fails to build >>> on OpenBSD. >> [...] >>> In file included from /usr/includ

Re: [Qemu-devel] [PATCH for-2.7 3/4] virtio: add virtqueue_rewind()

2016-08-15 Thread Cornelia Huck
On Fri, 12 Aug 2016 16:32:57 +0100 Stefan Hajnoczi wrote: > virtqueue_discard() requires a VirtQueueElement but virtio-balloon does > not migrate its in-use element. Introduce a new function that is > similar to virtqueue_discard() but doesn't require a VirtQueueElement. > > This will allow vir

Re: [Qemu-devel] [PATCH v24 11/12] support replication driver in blockdev-add

2016-08-15 Thread Kevin Wolf
Am 15.08.2016 um 03:49 hat Changlong Xie geschrieben: > On 08/09/2016 05:08 PM, Kevin Wolf wrote: > >Am 27.07.2016 um 09:01 hat Changlong Xie geschrieben: > >>From: Wen Congyang > >> > >>Signed-off-by: Wen Congyang > >>Signed-off-by: Changlong Xie > >>Signed-off-by: Wang WeiWei > >>Signed-off-b

Re: [Qemu-devel] [PULL 02/14] build-sys: fix building with make CFLAGS=.. argument

2016-08-15 Thread Christian Borntraeger
On 08/10/2016 03:57 PM, Paolo Bonzini wrote: > From: Marc-André Lureau > > When calling make with a CFLAGS=.. argument, the -g/-O filter is not > applied, which may result with build failure with ASAN for example. It > could be solved with an 'override' directive on CFLAGS, but that would > actua

Re: [Qemu-devel] [PULL 02/14] build-sys: fix building with make CFLAGS=.. argument

2016-08-15 Thread Christian Borntraeger
On 08/15/2016 10:41 AM, Christian Borntraeger wrote: > On 08/10/2016 03:57 PM, Paolo Bonzini wrote: >> From: Marc-André Lureau >> >> When calling make with a CFLAGS=.. argument, the -g/-O filter is not >> applied, which may result with build failure with ASAN for example. It >> could be solved wit

Re: [Qemu-devel] [PATCH v6 1/4] vfio: Mediated device Core driver

2016-08-15 Thread Tian, Kevin
> From: Kirti Wankhede [mailto:kwankh...@nvidia.com] > Sent: Friday, August 05, 2016 2:13 PM > > On 8/4/2016 12:51 PM, Tian, Kevin wrote: > >> From: Kirti Wankhede [mailto:kwankh...@nvidia.com] > >> Sent: Thursday, August 04, 2016 3:04 AM > >> > >> > >> 2. Physical device driver interface > >> Thi

Re: [Qemu-devel] [PATCH for-2.7? 1/5] block/ssh: Use QemuOpts for runtime options

2016-08-15 Thread Kevin Wolf
Am 12.08.2016 um 19:15 hat Max Reitz geschrieben: > Using QemuOpts will prevent qemu from crashing if the input options have > not been validated (which is the case when they are specified on the > command line or in a json: filename) and some have the wrong type. > > Signed-off-by: Max Reitz > -

Re: [Qemu-devel] [PATCH RFC 1/1] arm64: add an option to turn on/off vpmu support

2016-08-15 Thread Andrea Bolognani
On Sat, 2016-08-13 at 01:06 -0500, Wei Huang wrote: > > > Wouldn't that mean that you'd be unable to use > > >  > > >   -cpu foo,pmu=off > > >  > > > if CPU model 'foo' doesn't support a PMU? I'd expect that > > > to work. > >  > > The current precedent (has_el3) doesn't work like that: if > > foo

Re: [Qemu-devel] [PATCH v24 11/12] support replication driver in blockdev-add

2016-08-15 Thread Changlong Xie
On 08/15/2016 04:37 PM, Kevin Wolf wrote: Am 15.08.2016 um 03:49 hat Changlong Xie geschrieben: On 08/09/2016 05:08 PM, Kevin Wolf wrote: Am 27.07.2016 um 09:01 hat Changlong Xie geschrieben: From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie Signed-off-by: Wang We

Re: [Qemu-devel] [PATCH V1 1/1] arm64: Add an option to turn on/off host-backed vPMU support

2016-08-15 Thread Andrea Bolognani
On Sat, 2016-08-13 at 00:52 -0500, Wei Huang wrote: > This patch adds a pmu=[on/off] option to enable/disable host vPMU > support in guest VM. There are several reasons to justify this option. > First, host-backed vPMU can be problematic for cross-migration between > different SoC as perf counters

Re: [Qemu-devel] [PATCH v6 1/4] vfio: Mediated device Core driver

2016-08-15 Thread Tian, Kevin
> From: Kirti Wankhede [mailto:kwankh...@nvidia.com] > Sent: Saturday, August 13, 2016 8:37 AM > > > > On 8/13/2016 2:46 AM, Alex Williamson wrote: > > On Sat, 13 Aug 2016 00:14:39 +0530 > > Kirti Wankhede wrote: > > > >> On 8/10/2016 12:30 AM, Alex Williamson wrote: > >>> On Thu, 4 Aug 2016 00

Re: [Qemu-devel] [PATCH for-2.7? 0/5] block: Use QemuOpts for runtime options

2016-08-15 Thread Kevin Wolf
Am 12.08.2016 um 19:15 hat Max Reitz geschrieben: > The SSH and NBD block drivers currently directly extract their runtime > options from the options QDict they receive. This is bad practice and > can lead to segmentation faults (which, however, will always be a NULL > pointer dereference, so it sh

Re: [Qemu-devel] [PATCH] monitor: Add an "xlate" command for translating a virtual address

2016-08-15 Thread Peter Maydell
On 14 August 2016 at 23:55, Benjamin Herrenschmidt wrote: > Looking at this... the attributes are a bit of a mess aren't they ? > > The requester_id is pretty much PCI specific and only useful for > load/stores coming from a device (for IOMMUs), the "secure" bit > seems to be an ARM thing and is a

Re: [Qemu-devel] [PATCH V1 1/1] arm64: Add an option to turn on/off host-backed vPMU support

2016-08-15 Thread Andrew Jones
On Sat, Aug 13, 2016 at 12:52:50AM -0500, Wei Huang wrote: > This patch adds a pmu=[on/off] option to enable/disable host vPMU > support in guest VM. There are several reasons to justify this option. > First, host-backed vPMU can be problematic for cross-migration between > different SoC as perf co

Re: [Qemu-devel] [PATCH] qcow2: fix iovec size at qcow2_co_pwritev_compressed

2016-08-15 Thread Kevin Wolf
Am 15.08.2016 um 11:39 hat Pavel Butsykin geschrieben: > Use bytes as the size would be more exact than s->cluster_size. Although > qemu_iovec_to_buf() will not allow to go beyond the qiov. > > Signed-off-by: Pavel Butsykin Thanks, applied to block-next. Kevin

Re: [Qemu-devel] ARM MCU Target Structure Question

2016-08-15 Thread Peter Maydell
On 15 August 2016 at 05:22, Carl Allendorph wrote: > I'm working on a new microcontroller target (Atmel ATSAM4E) for the > qemu-system-arm executable. I've successfully setup a machine and created > some peripherals. I have some questions about how to structure the files > for contributing this ta

Re: [Qemu-devel] [PULL 3/3] vhost-user: Attempt to fix a race with set_mem_table.

2016-08-15 Thread Peter Maydell
On 12 August 2016 at 16:49, Michael S. Tsirkin wrote: > On Fri, Aug 12, 2016 at 01:01:16PM +0100, Peter Maydell wrote: >> If somebody would like to send a revert-patch to the list I'll apply >> it to master (please cc me as I suspect the mailing list server is >> down at the moment...) I've been s

Re: [Qemu-devel] [PATCH v3 RFC] block/vxhs: Initial commit to add Veritas HyperScale VxHS block device support

2016-08-15 Thread Daniel P. Berrange
On Sat, Aug 13, 2016 at 09:35:12PM -0700, Ashish Mittal wrote: > This patch adds support for a new block device type called "vxhs". > Source code for the library that this code loads can be downloaded from: > https://github.com/MittalAshish/libqnio.git > > Sample command line with a vxhs block dev

Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/6] target-ppc: Implement darn instruction

2016-08-15 Thread David Gibson
On Fri, Aug 12, 2016 at 11:29:17AM +0200, Thomas Huth wrote: > On 12.08.2016 10:41, Nikunj A Dadhania wrote: > > Thomas Huth writes: > You can not rely on /dev/random for this job, since it might block. So > your guest would stop executing when there is not enough random data > avai

[Qemu-devel] [PATCH 1/1] pc-bios/s390-ccw.img: Fix build

2016-08-15 Thread Christian Borntraeger
Since commit a9c87304b76d ("build-sys: fix building with make CFLAGS=.. argument") pc-bios/s390-ccw.img build might fail with --- snip --- main.o: In function `virtio_setup': qemu/pc-bios/s390-ccw/main.c:117: undefined reference to `__stack_chk_fail' --- snip --- Changing the CFLAGS to QEMU_CFLA

[Qemu-devel] [PATCH 0/1] pc-bios/s390-ccw.img build fix for 2.7

2016-08-15 Thread Christian Borntraeger
This was done pretty quickly, so some review would be nice. If OK, I think this should go via Conny for 2.7. Christian Borntraeger (1): pc-bios/s390-ccw.img: Fix build pc-bios/s390-ccw/Makefile | 6 -- pc-bios/s390-ccw/virtio.c | 7 ++- 2 files changed, 10 insertions(+), 3 deletions(-)

[Qemu-devel] MTTCG status updates, benchmark results and KVM forum plans

2016-08-15 Thread Alex Bennée
Hi, Numbers! First things first, I ran some more benchmarks on the base patches + cmpxchg branch over the weekend when I had access to some bigger boxen which weren't being used. I also added some KVM runs for comparison: ━

Re: [Qemu-devel] [PATCH v3 RFC] block/vxhs: Initial commit to add Veritas HyperScale VxHS block device support

2016-08-15 Thread Kevin Wolf
Am 15.08.2016 um 12:20 hat Daniel P. Berrange geschrieben: > On Sat, Aug 13, 2016 at 09:35:12PM -0700, Ashish Mittal wrote: > > +/* > > + * vxhs_parse_uri: Parse the incoming URI and populate *conf with the > > + * vdisk_id, and all the host(s) information. Host at index 0 is local > > storage > >

Re: [Qemu-devel] [PATCH v3 RFC] block/vxhs: Initial commit to add Veritas HyperScale VxHS block device support

2016-08-15 Thread Daniel P. Berrange
On Mon, Aug 15, 2016 at 12:47:52PM +0200, Kevin Wolf wrote: > Am 15.08.2016 um 12:20 hat Daniel P. Berrange geschrieben: > > On Sat, Aug 13, 2016 at 09:35:12PM -0700, Ashish Mittal wrote: > > > +/* > > > + * vxhs_parse_uri: Parse the incoming URI and populate *conf with the > > > + * vdisk_id, and

Re: [Qemu-devel] [PATCH 1/1] pc-bios/s390-ccw.img: Fix build

2016-08-15 Thread Cornelia Huck
On Mon, 15 Aug 2016 12:28:11 +0200 Christian Borntraeger wrote: > Since > commit a9c87304b76d ("build-sys: fix building with make CFLAGS=.. argument") > > pc-bios/s390-ccw.img build might fail with > > --- snip --- > main.o: In function `virtio_setup': > qemu/pc-bios/s390-ccw/main.c:117: undefi

Re: [Qemu-devel] MTTCG status updates, benchmark results and KVM forum plans

2016-08-15 Thread Peter Maydell
On 15 August 2016 at 11:46, Alex Bennée wrote: > I only ran up to -smp 8 as that is as > much as the -m virt model will actually accept. FWIW, -machine gic-version=3 should allow you more than 8 cores. > I have noticed some instability in the test though for high -smp values > which caused the t

[Qemu-devel] [PATCH v2 1/1] pc-bios/s390-ccw.img: Fix build

2016-08-15 Thread Christian Borntraeger
Since commit a9c87304b76d ("build-sys: fix building with make CFLAGS=.. argument") pc-bios/s390-ccw.img build might fail with --- snip --- main.o: In function `virtio_setup': qemu/pc-bios/s390-ccw/main.c:117: undefined reference to `__stack_chk_fail' --- snip --- Changing the CFLAGS to QEMU_CFLA

[Qemu-devel] [PATCH] qcow2: fix iovec size at qcow2_co_pwritev_compressed

2016-08-15 Thread Pavel Butsykin
Use bytes as the size would be more exact than s->cluster_size. Although qemu_iovec_to_buf() will not allow to go beyond the qiov. Signed-off-by: Pavel Butsykin --- block/qcow2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/qcow2.c b/block/qcow2.c index adf4514..c07

Re: [Qemu-devel] MTTCG status updates, benchmark results and KVM forum plans

2016-08-15 Thread Alex Bennée
Peter Maydell writes: > On 15 August 2016 at 11:46, Alex Bennée wrote: >> I only ran up to -smp 8 as that is as >> much as the -m virt model will actually accept. > > FWIW, -machine gic-version=3 should allow you more than 8 cores. Good to know. Thanks. >> I have noticed some instability in t

Re: [Qemu-devel] [PATCH for-2.7] slirp: Rename "struct arphdr" to "struct slirp_arphdr"

2016-08-15 Thread Samuel Thibault
Thomas Huth, on Mon 15 Aug 2016 10:24:54 +0200, wrote: > struct arphdr is already used by the system headers on OpenBSD > and thus QEMU does not compile here anymore. Fix it by renaming > our struct to slirp_arphdr instead. > > Reported-by: Brad Smith > Buglink: https://bugs.launchpad.net/qemu/+bu

Re: [Qemu-devel] [PATCH] monitor: Add an "xlate" command for translating a virtual address

2016-08-15 Thread Benjamin Herrenschmidt
On Mon, 2016-08-15 at 11:02 +0100, Peter Maydell wrote: > > Some of these attributes are determined before the MMU > (eg "user", "requester ID"), and some of them are (for > a particular CPU architecture) determined by the MMU > from the translation tables ("secure"). From the point of > view of t

Re: [Qemu-devel] [PATCH 5/7] nios2: Add periodic timer emulation

2016-08-15 Thread Dmitry Osipenko
On 12.08.2016 11:51, Marek Vasut wrote: > On 08/10/2016 12:30 PM, Dmitry Osipenko wrote: >> On 07.08.2016 23:27, Marek Vasut wrote: >>> On 07/30/2016 11:42 PM, Dmitry Osipenko wrote: Hello Marek, >>> >>> Hi! >>> >>> Sorry for the late reply, I got back from vacation only recently. >>> >>> I no

Re: [Qemu-devel] [PATCH] monitor: Add an "xlate" command for translating a virtual address

2016-08-15 Thread Peter Maydell
On 15 August 2016 at 12:34, Benjamin Herrenschmidt wrote: > On Mon, 2016-08-15 at 11:02 +0100, Peter Maydell wrote: >> Some of these attributes are determined before the MMU >> (eg "user", "requester ID"), and some of them are (for >> a particular CPU architecture) determined by the MMU >> from th

[Qemu-devel] Subject: [PATCH] qcow2 resize with snapshot, mod

2016-08-15 Thread zhangzhiming
hi, i modified my code by Kevin Wolf’s review. and thanks for review again. Signed-off-by: zhangzhiming --- block.c| 19 block/qcow2-cluster.c | 55 ++-- block/qcow2-snapshot.c | 34 ++--

Re: [Qemu-devel] [PATCH] monitor: Add an "xlate" command for translating a virtual address

2016-08-15 Thread Benjamin Herrenschmidt
On Mon, 2016-08-15 at 12:44 +0100, Peter Maydell wrote: > Certainly I think the QMP protocol command should just > return all the info (I think current best-practice is > to implement new HMP commands as wrappers round an > equivalent QMP command). At that point we get into UI > design questions ab

Re: [Qemu-devel] [PATCH v3] balloon: Fix failure of updating guest memory status

2016-08-15 Thread Stefan Hajnoczi
On Fri, Aug 05, 2016 at 01:36:32PM +0200, Ladi Prosek wrote: > diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c > index 5af429a..65457e9 100644 > --- a/hw/virtio/virtio-balloon.c > +++ b/hw/virtio/virtio-balloon.c > @@ -423,6 +423,26 @@ static int virtio_balloon_load_device(Virt

[Qemu-devel] [PATCH v3] qemu-img: change opening method for the output in dd

2016-08-15 Thread Reda Sallahi
dd was creating an output image regardless of whether there was one already created. With this patch we try to open first the output image and resize it if necessary. We also make it mandatory to specify conv=notrunc when the file already exists. Signed-off-by: Reda Sallahi --- Depends on: [PATC

Re: [Qemu-devel] [PATCH 0/2] coroutine: Assertions and debugging aids

2016-08-15 Thread Kevin Wolf
Am 11.08.2016 um 18:22 hat Kevin Wolf geschrieben: > A while ago we were debugging a hang where coroutines were waiting for a mutex > to be unlocked, but we couldn't find out who held the lock. This series adds > some information to Coroutine and CoMutex that both allows to add a few > assertions t

Re: [Qemu-devel] [PATCH for-2.7 3/4] virtio: add virtqueue_rewind()

2016-08-15 Thread Stefan Hajnoczi
On Mon, Aug 15, 2016 at 10:36:25AM +0200, Cornelia Huck wrote: > On Fri, 12 Aug 2016 16:32:57 +0100 > Stefan Hajnoczi wrote: > > > virtqueue_discard() requires a VirtQueueElement but virtio-balloon does > > not migrate its in-use element. Introduce a new function that is > > similar to virtqueue

[Qemu-devel] [PATCH for-2.7? v2 0/5] block: Use QemuOpts for runtime options

2016-08-15 Thread Max Reitz
The SSH and NBD block drivers currently directly extract their runtime options from the options QDict they receive. This is bad practice and can lead to segmentation faults (which, however, will always be a NULL pointer dereference, so it should not be exploitable beyond a DoS). This series fixes

[Qemu-devel] [PATCH for-2.7? v2 1/5] block/ssh: Use QemuOpts for runtime options

2016-08-15 Thread Max Reitz
Using QemuOpts will prevent qemu from crashing if the input options have not been validated (which is the case when they are specified on the command line or in a json: filename) and some have the wrong type. Signed-off-by: Max Reitz --- block/ssh.c | 80 +

[Qemu-devel] [PATCH for-2.7? v2 5/5] iotests: Test case for wrong runtime option types

2016-08-15 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf --- tests/qemu-iotests/162 | 96 ++ tests/qemu-iotests/162.out | 17 tests/qemu-iotests/group | 1 + 3 files changed, 114 insertions(+) create mode 100755 tests/qemu-iotests/162 create

[Qemu-devel] [PATCH for-2.7? v2 3/5] block/blkdebug: Store config filename

2016-08-15 Thread Max Reitz
Store the configuration file's filename so it can later be used in bdrv_refresh_filename() without having to directly access the options QDict which may contain a value of a non-string type. Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf --- block/blkdebug.c | 17 - 1 file cha

Re: [Qemu-devel] [PATCH v3] balloon: Fix failure of updating guest memory status

2016-08-15 Thread Ladi Prosek
On Mon, Aug 15, 2016 at 2:09 PM, Stefan Hajnoczi wrote: > On Fri, Aug 05, 2016 at 01:36:32PM +0200, Ladi Prosek wrote: >> diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c >> index 5af429a..65457e9 100644 >> --- a/hw/virtio/virtio-balloon.c >> +++ b/hw/virtio/virtio-balloon.c >>

[Qemu-devel] [PATCH for-2.7? v2 2/5] block/nbd: Use QemuOpts for runtime options

2016-08-15 Thread Max Reitz
Using QemuOpts will prevent qemu from crashing if the input options have not been validated (which is the case when they are specified on the command line or in a json: filename) and some have the wrong type. Signed-off-by: Max Reitz --- block/nbd.c | 74 +

[Qemu-devel] [PATCH for-2.7? v2 4/5] block/nbd: Store runtime option values

2016-08-15 Thread Max Reitz
Store the runtime option values in the BDRVNBDState so they can later be used in nbd_refresh_filename() without having to directly access the options QDict which may contain values of non-string types. Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf --- block/nbd.c | 105 ++

[Qemu-devel] [PATCH v9 00/11] Provide a QOM-based authorization API

2016-08-15 Thread Daniel P. Berrange
This is a followup of previously posted work in 2.6 cycle: v1: https://lists.gnu.org/archive/html/qemu-devel/2016-02/msg04618.html v2: https://lists.gnu.org/archive/html/qemu-devel/2016-03/msg01454.html v3: https://lists.gnu.org/archive/html/qemu-devel/2016-03/msg02498.html v4: https://lists.g

[Qemu-devel] [PATCH v9 05/11] qapi: add a QmpInputVisitor that does string conversion

2016-08-15 Thread Daniel P. Berrange
Currently the QmpInputVisitor assumes that all scalar values are directly represented as their final types. ie it assumes an 'int' is using QInt, and a 'bool' is using QBool. This adds an alternative constructor for QmpInputVisitor that will set it up such that it expects a QString for all scalar

[Qemu-devel] [PATCH v9 02/11] option: make parse_option_bool/number non-static

2016-08-15 Thread Daniel P. Berrange
The opts-visitor.c opts_type_bool() method has code for parsing a string to set a bool value, as does the qemu-option.c parse_option_bool() method, except it handles fewer cases. To enable consistency across the codebase, extend parse_option_bool() to handle "yes", "no", "y" and "n", and make it n

[Qemu-devel] [PATCH v9 04/11] qapi: rename QmpOutputVisitor to QObjectOutputVisitor

2016-08-15 Thread Daniel P. Berrange
The QmpOutputVisitor has no direct dependancy on QMP. It is valid to use it anywhere that one wants a QObject. Rename it to better reflect its functionality as a generic QAPI to QObject convertor. Signed-off-by: Daniel P. Berrange --- block/qapi.c | 4 +-

[Qemu-devel] [PATCH v9 01/11] qdict: implement a qdict_crumple method for un-flattening a dict

2016-08-15 Thread Daniel P. Berrange
The qdict_flatten() method will take a dict whose elements are further nested dicts/lists and flatten them by concatenating keys. The qdict_crumple() method aims to do the reverse, taking a flat qdict, and turning it into a set of nested dicts/lists. It will apply nesting based on the key name, wi

[Qemu-devel] [PATCH v9 08/11] util: add QAuthZSimple object type for a simple access control list

2016-08-15 Thread Daniel P. Berrange
Add a QAuthZSimple object type that implements the QAuthZ interface. This simple built-in implementation maintains a trivial access control list with a sequence of match rules and a final default policy. This replicates the functionality currently provided by the qemu_acl module. To create an inst

[Qemu-devel] [PATCH v9 03/11] qapi: rename QmpInputVisitor to QObjectInputVisitor

2016-08-15 Thread Daniel P. Berrange
The QmpInputVisitor has no direct dependancy on QMP. It is valid to use it anywhere that one has a QObject. Rename it to better reflect its functionality as a generic QObject to QAPI convertor. Signed-off-by: Daniel P. Berrange --- docs/qapi-code-gen.txt | 2 +- ...

[Qemu-devel] [PATCH 2/2] virtio: decrement vq->inuse in virtqueue_discard()

2016-08-15 Thread Stefan Hajnoczi
virtqueue_discard() moves vq->last_avail_idx back so the element can be popped again. It's necessary to decrement vq->inuse to avoid "leaking" the element count. Signed-off-by: Stefan Hajnoczi Reviewed-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck --- hw/virtio/virtio.c | 1 + 1 file chan

[Qemu-devel] [PATCH v9 07/11] util: add QAuthZ object as an authorization base class

2016-08-15 Thread Daniel P. Berrange
The current qemu_acl module provides a simple access control list facility inside QEMU, which is used via a set of monitor commands acl_show, acl_policy, acl_add, acl_remove & acl_reset. Note there is no ability to create ACLs - the network services (eg VNC server) were expected to create ACLs tha

[Qemu-devel] [PATCH v9 09/11] acl: delete existing ACL implementation

2016-08-15 Thread Daniel P. Berrange
The 'qemu_acl' type was a previous non-QOM based attempt to provide an authorization facility in QEMU. Because it is non-QOM based it cannot be created via the command line and requires special monitor commands to manipulate it. The new QAuthZ and QAuthZSimple QOM classes provide a superset of the

[Qemu-devel] [PATCH v9 10/11] util: add QAuthZPAM object type for authorizing using PAM

2016-08-15 Thread Daniel P. Berrange
Add an authorization backend that talks to PAM to check whether the user identity is allowed. This only uses the PAM account validation facility, which is essentially just a check to see if the provided username is permitted access. It doesn't use the authentication or session parts of PAM, since t

[Qemu-devel] [PATCH v9 06/11] qom: support arbitrary non-scalar properties with -object

2016-08-15 Thread Daniel P. Berrange
The current -object command line syntax only allows for creation of objects with scalar properties, or a list with a fixed scalar element type. Objects which have properties that are represented as structs in the QAPI schema cannot be created using -object. This is a design limitation of the way t

[Qemu-devel] [PATCH v9 11/11] qmp: add support for mixed typed input visitor

2016-08-15 Thread Daniel P. Berrange
Add a qmp_mixed_input_visitor_new() method which returns a QMP input visitor that accepts either strings or the native data types. Signed-off-by: Daniel P. Berrange --- include/qapi/qobject-input-visitor.h | 22 qapi/qobject-input-visitor.c | 98 +

Re: [Qemu-devel] [PATCH v3] balloon: Fix failure of updating guest memory status

2016-08-15 Thread Stefan Hajnoczi
On Mon, Aug 15, 2016 at 1:35 PM, Ladi Prosek wrote: > On Mon, Aug 15, 2016 at 2:09 PM, Stefan Hajnoczi wrote: >> On Fri, Aug 05, 2016 at 01:36:32PM +0200, Ladi Prosek wrote: >>> diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c >>> index 5af429a..65457e9 100644 >>> --- a/hw/vir

[Qemu-devel] [PATCH 1/2] virtio: recalculate vq->inuse after migration

2016-08-15 Thread Stefan Hajnoczi
The vq->inuse field is not migrated. Many devices don't hold VirtQueueElements across migration so it doesn't matter that vq->inuse starts at 0 on the destination QEMU. At least virtio-serial, virtio-blk, and virtio-balloon migrate while holding VirtQueueElements. For these devices we need to re

Re: [Qemu-devel] [PATCH for-2.7? v2 0/5] block: Use QemuOpts for runtime options

2016-08-15 Thread Jeff Cody
On Mon, Aug 15, 2016 at 02:34:52PM +0200, Max Reitz wrote: > The SSH and NBD block drivers currently directly extract their runtime > options from the options QDict they receive. This is bad practice and > can lead to segmentation faults (which, however, will always be a NULL > pointer dereference,

[Qemu-devel] [PATCH 0/2] virtio: fix VirtQueue->inuse field

2016-08-15 Thread Stefan Hajnoczi
The VirtQueue->inuse field is not always updated correctly. These patches fix it. Originally this series was called "virtio-balloon: fix stats vq migration" but Ladi Prosek posted a nicer fix called "balloon: Fix failure of updating guest memory status". I dropped the virtio-balloon patches. Ch

Re: [Qemu-devel] [PATCH v3] balloon: Fix failure of updating guest memory status

2016-08-15 Thread Ladi Prosek
On Mon, Aug 15, 2016 at 2:50 PM, Stefan Hajnoczi wrote: > On Mon, Aug 15, 2016 at 1:35 PM, Ladi Prosek wrote: >> On Mon, Aug 15, 2016 at 2:09 PM, Stefan Hajnoczi wrote: >>> On Fri, Aug 05, 2016 at 01:36:32PM +0200, Ladi Prosek wrote: diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virti

Re: [Qemu-devel] [PATCH v9 00/11] Provide a QOM-based authorization API

2016-08-15 Thread no-reply
Hi, Your series seems to have some coding style problems. See output below for more information: Message-id: 1471265145-12558-1-git-send-email-berra...@redhat.com Subject: [Qemu-devel] [PATCH v9 00/11] Provide a QOM-based authorization API Type: series === TEST SCRIPT BEGIN === #!/bin/bash BASE

Re: [Qemu-devel] [PATCH v9 00/11] Provide a QOM-based authorization API

2016-08-15 Thread Daniel P. Berrange
On Mon, Aug 15, 2016 at 06:04:02AM -0700, no-re...@ec2-52-6-146-230.compute-1.amazonaws.com wrote: > Hi, > > Your series seems to have some coding style problems. See output below for > more information: > > Message-id: 1471265145-12558-1-git-send-email-berra...@redhat.com > Subject: [Qemu-devel

Re: [Qemu-devel] [PATCH v9 00/11] Provide a QOM-based authorization API

2016-08-15 Thread no-reply
Hi, Your series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Message-id: 1471265145-12558-1-git-send-email-berra...@redhat.com Subject: [Qemu-devel] [PATCH v9 00/11] Provide a QOM-based a

[Qemu-devel] [PATCH for-2.7? v3 0/5] block: Use QemuOpts for runtime options

2016-08-15 Thread Max Reitz
The SSH and NBD block drivers currently directly extract their runtime options from the options QDict they receive. This is bad practice and can lead to segmentation faults (which, however, will always be a NULL pointer dereference, so it should not be exploitable beyond a DoS). This series fixes

[Qemu-devel] [PATCH for-2.7? v3 3/5] block/blkdebug: Store config filename

2016-08-15 Thread Max Reitz
Store the configuration file's filename so it can later be used in bdrv_refresh_filename() without having to directly access the options QDict which may contain a value of a non-string type. Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf Reviewed-by: Jeff Cody --- block/blkdebug.c | 17 +

[Qemu-devel] [PATCH for-2.7? v3 4/5] block/nbd: Store runtime option values

2016-08-15 Thread Max Reitz
Store the runtime option values in the BDRVNBDState so they can later be used in nbd_refresh_filename() without having to directly access the options QDict which may contain values of non-string types. Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf Reviewed-by: Jeff Cody --- block/nbd.c | 10

[Qemu-devel] [PATCH for-2.7? v3 2/5] block/nbd: Use QemuOpts for runtime options

2016-08-15 Thread Max Reitz
Using QemuOpts will prevent qemu from crashing if the input options have not been validated (which is the case when they are specified on the command line or in a json: filename) and some have the wrong type. Signed-off-by: Max Reitz Reviewed-by: Jeff Cody --- block/nbd.c | 74 +

[Qemu-devel] [PATCH for-2.7? v3 5/5] iotests: Test case for wrong runtime option types

2016-08-15 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf Reviewed-by: Jeff Cody --- tests/qemu-iotests/162 | 96 ++ tests/qemu-iotests/162.out | 17 tests/qemu-iotests/group | 1 + 3 files changed, 114 insertions(+) create mode 100755 tests/q

[Qemu-devel] [PATCH for-2.7? v3 1/5] block/ssh: Use QemuOpts for runtime options

2016-08-15 Thread Max Reitz
Using QemuOpts will prevent qemu from crashing if the input options have not been validated (which is the case when they are specified on the command line or in a json: filename) and some have the wrong type. Signed-off-by: Max Reitz --- block/ssh.c | 79 +

Re: [Qemu-devel] [PATCH v3] balloon: Fix failure of updating guest memory status

2016-08-15 Thread Michael S. Tsirkin
On Fri, Aug 05, 2016 at 01:36:32PM +0200, Ladi Prosek wrote: > The stats_vq_elem field keeps track of the state of the balloon stats > virtqueue protocol but it wasn't preserved across migrations, resulting > in losing guest memory status updates on the receiving VM. > > This commit adds a new VM

Re: [Qemu-devel] [PATCH for-2.7] linux-user: Fix llseek with high bit of offset_low set

2016-08-15 Thread Chanho Park
It works perfectly. Thanks. Tested-by: Chanho Park On Fri, Aug 12, 2016 at 2:59 AM, Peter Maydell wrote: > The llseek syscall takes two 32-bit arguments, offset_high > and offset_low, which must be combined to form a single > 64-bit offset. Unfortunately we were combining them with >(uint64

[Qemu-devel] [PATCH] Revert "vhost-user: Attempt to fix a race with set_mem_table."

2016-08-15 Thread Michael S. Tsirkin
This reverts commit 28ed5ef16384f12500abd3647973ee21b03cbe23. I still think it's the right thing to do, but tests have been failing sporadically. Revert for now, and hope to fix it before the release. Cc: Prerna Saxena Cc: Peter Maydell Cc: Marc-André Lureau Signed-off-by: Michael S. Tsirkin

Re: [Qemu-devel] [PATCH] Revert "vhost-user: Attempt to fix a race with set_mem_table."

2016-08-15 Thread Prerna Saxena
Ack. You beat me to the patch by a few minutes :) Prerna On 15/08/16 7:05 pm, "Michael S. Tsirkin" wrote: >This reverts commit 28ed5ef16384f12500abd3647973ee21b03cbe23. > >I still think it's the right thing to do, but >tests have been failing sporadically. > >Revert for now, and hope to fix

[Qemu-devel] [PULL 3/5] block/blkdebug: Store config filename

2016-08-15 Thread Kevin Wolf
From: Max Reitz Store the configuration file's filename so it can later be used in bdrv_refresh_filename() without having to directly access the options QDict which may contain a value of a non-string type. Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf Reviewed-by: Jeff Cody Signed-off-by:

[Qemu-devel] [PULL 0/5] Block layer patches for 2.7.0-rc3

2016-08-15 Thread Kevin Wolf
The following changes since commit 60ac136102098a70b97ab0c07bc7bf53131c: target-arm: Fix warn about implicit conversion (2016-08-12 11:12:24 +0100) are available in the git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you to fetch changes up to 7d3e693646ad07459e

[Qemu-devel] [PULL 4/5] block/nbd: Store runtime option values

2016-08-15 Thread Kevin Wolf
From: Max Reitz Store the runtime option values in the BDRVNBDState so they can later be used in nbd_refresh_filename() without having to directly access the options QDict which may contain values of non-string types. Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf Reviewed-by: Jeff Cody Sig

Re: [Qemu-devel] [PATCH for-2.7? v3 0/5] block: Use QemuOpts for runtime options

2016-08-15 Thread Kevin Wolf
Am 15.08.2016 um 15:29 hat Max Reitz geschrieben: > The SSH and NBD block drivers currently directly extract their runtime > options from the options QDict they receive. This is bad practice and > can lead to segmentation faults (which, however, will always be a NULL > pointer dereference, so it sh

[Qemu-devel] [PULL 1/5] block/ssh: Use QemuOpts for runtime options

2016-08-15 Thread Kevin Wolf
From: Max Reitz Using QemuOpts will prevent qemu from crashing if the input options have not been validated (which is the case when they are specified on the command line or in a json: filename) and some have the wrong type. Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- block/ssh.c |

[Qemu-devel] [PULL 2/5] block/nbd: Use QemuOpts for runtime options

2016-08-15 Thread Kevin Wolf
From: Max Reitz Using QemuOpts will prevent qemu from crashing if the input options have not been validated (which is the case when they are specified on the command line or in a json: filename) and some have the wrong type. Signed-off-by: Max Reitz Reviewed-by: Jeff Cody Signed-off-by: Kevin

[Qemu-devel] [PULL 5/5] iotests: Test case for wrong runtime option types

2016-08-15 Thread Kevin Wolf
From: Max Reitz Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf Reviewed-by: Jeff Cody Signed-off-by: Kevin Wolf --- tests/qemu-iotests/162 | 96 ++ tests/qemu-iotests/162.out | 17 tests/qemu-iotests/group | 1 + 3 files changed,

Re: [Qemu-devel] [Patch v2 00/29] s390x CPU models: exposing features

2016-08-15 Thread David Hildenbrand
I'll wait a bit until sending out another series that fixes two minor style problems. What about > 80 chars per line. Is it okay for these definitions + function prototype or a no-go? David

Re: [Qemu-devel] [Patch v2 00/29] s390x CPU models: exposing features

2016-08-15 Thread Christian Borntraeger
On 08/15/2016 04:00 PM, David Hildenbrand wrote: > > I'll wait a bit until sending out another series that fixes two minor style > problems. > > What about > 80 chars per line. Is it okay for these definitions + function > prototype or a no-go? As long as we are < 90 I think its better than wrap

[Qemu-devel] [PATCH v10 02/11] option: make parse_option_bool/number non-static

2016-08-15 Thread Daniel P. Berrange
The opts-visitor.c opts_type_bool() method has code for parsing a string to set a bool value, as does the qemu-option.c parse_option_bool() method, except it handles fewer cases. To enable consistency across the codebase, extend parse_option_bool() to handle "yes", "no", "y" and "n", and make it n

[Qemu-devel] [PATCH v10 00/11] Provide a QOM-based authorization API

2016-08-15 Thread Daniel P. Berrange
This is a followup of previously posted work in 2.6 cycle: v1: https://lists.gnu.org/archive/html/qemu-devel/2016-02/msg04618.html v2: https://lists.gnu.org/archive/html/qemu-devel/2016-03/msg01454.html v3: https://lists.gnu.org/archive/html/qemu-devel/2016-03/msg02498.html v4: https://lists.g

[Qemu-devel] [PATCH v10 09/11] acl: delete existing ACL implementation

2016-08-15 Thread Daniel P. Berrange
The 'qemu_acl' type was a previous non-QOM based attempt to provide an authorization facility in QEMU. Because it is non-QOM based it cannot be created via the command line and requires special monitor commands to manipulate it. The new QAuthZ and QAuthZSimple QOM classes provide a superset of the

[Qemu-devel] [PATCH v10 04/11] qapi: rename QmpOutputVisitor to QObjectOutputVisitor

2016-08-15 Thread Daniel P. Berrange
The QmpOutputVisitor has no direct dependancy on QMP. It is valid to use it anywhere that one wants a QObject. Rename it to better reflect its functionality as a generic QAPI to QObject convertor. Signed-off-by: Daniel P. Berrange --- block/qapi.c | 4 +-

[Qemu-devel] [PATCH v10 01/11] qdict: implement a qdict_crumple method for un-flattening a dict

2016-08-15 Thread Daniel P. Berrange
The qdict_flatten() method will take a dict whose elements are further nested dicts/lists and flatten them by concatenating keys. The qdict_crumple() method aims to do the reverse, taking a flat qdict, and turning it into a set of nested dicts/lists. It will apply nesting based on the key name, wi

  1   2   3   >