Re: [Qemu-devel] [PATCH v5 0/7] tcg: allocate TB structs preceding translate

2017-06-09 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Subject: [Qemu-devel] [PATCH v5 0/7] tcg: allocate TB structs preceding translate Message-id: 20170609053719.26251-1-...@twiddle.net === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1

Re: [Qemu-devel] [PATCH v8 02/11] migration: pass MigrationIncomingState* into migration check functions

2017-06-09 Thread Peter Xu
On Fri, Jun 09, 2017 at 09:21:38AM +0300, Alexey Perevalov wrote: > On 06/09/2017 07:10 AM, Peter Xu wrote: > >On Wed, Jun 07, 2017 at 12:46:29PM +0300, Alexey Perevalov wrote: > >>That tiny refactoring is necessary to be able to set > >>UFFD_FEATURE_THREAD_ID while requesting features, and then >

Re: [Qemu-devel] [PATCH v8 07/11] migration: add bitmap for copied page

2017-06-09 Thread Alexey Perevalov
On 06/09/2017 09:06 AM, Peter Xu wrote: On Wed, Jun 07, 2017 at 05:13:00PM +0300, Alexey Perevalov wrote: On 06/07/2017 12:46 PM, Alexey Perevalov wrote: This patch adds ability to track down already copied pages, it's necessary for calculation vCPU block time in postcopy migration feature, may

Re: [Qemu-devel] [Qemu devel v5 PATCH 0/5] Add support for Smartfusion2 SoC

2017-06-09 Thread sundeep subbaraya
Hi Philippe, On Wed, May 31, 2017 at 11:06 AM, Philippe Mathieu-Daudé wrote: > Hi Sundeep, > > On 05/29/2017 02:28 AM, sundeep subbaraya wrote: > >> Hi Philippe, >> >> Any update on this? I will wait for your comments too >> and send next iteration fixing Alistair comments. >> > > Sorry I'm supp

Re: [Qemu-devel] [PATCH v8 02/11] migration: pass MigrationIncomingState* into migration check functions

2017-06-09 Thread Alexey Perevalov
On 06/09/2017 10:14 AM, Peter Xu wrote: On Fri, Jun 09, 2017 at 09:21:38AM +0300, Alexey Perevalov wrote: On 06/09/2017 07:10 AM, Peter Xu wrote: On Wed, Jun 07, 2017 at 12:46:29PM +0300, Alexey Perevalov wrote: That tiny refactoring is necessary to be able to set UFFD_FEATURE_THREAD_ID while

Re: [Qemu-devel] [PATCH v2 1/6] machine: export register_compat_prop()

2017-06-09 Thread Juan Quintela
Peter Xu wrote: > We have HW_COMPAT_*, however that's only binded to machines, not other > things (like accelerators). Behind it, it was register_compat_prop() > that played the trick. Let's export the function for further use > outside HW_COMPAT_* magic. > > CC: Eduardo Habkost > CC: Markus Ar

Re: [Qemu-devel] [PATCH v2 2/6] migration: let MigrationState be a qdev

2017-06-09 Thread Juan Quintela
Peter Xu wrote: > Let the old man "MigrationState" join the object family. Direct benefit > is that we can start to use all the property features derived from > current QDev, like: HW_COMPAT_* bits, command line setup for migration > parameters (so will never need to set them up each time using HM

Re: [Qemu-devel] [PATCH v2 3/6] migration: move global_state.optional out

2017-06-09 Thread Juan Quintela
Peter Xu wrote: > Put it into MigrationState then we can use the properties to specify > whether to enable storing global state. > > Removing global_state_set_optional() since now we can use HW_COMPAT_2_3 > for x86/power in general, and the register_compat_prop() for xen_init(). > > Signed-off-by:

Re: [Qemu-devel] [PATCH v2 4/6] migration: move only_migratable to MigrationState

2017-06-09 Thread Juan Quintela
Peter Xu wrote: > One less global variable, and it does only matter with migration. > > We keep the old "--only-migratable" option, but also now we support: > > -global migration.only-migratable=true > > Currently still keep the old interface. > > Signed-off-by: Peter Xu Reviewed-by: Juan Quin

Re: [Qemu-devel] [PATCH v2 5/6] migration: move skip_configuration out

2017-06-09 Thread Juan Quintela
Peter Xu wrote: > It was in SaveState but now moved to MigrationState altogether. Again, > using HW_COMPAT_2_3 for old PC/SPAPR machines, and > register_compat_prop() for xen_init(). > > Signed-off-by: Peter Xu Reviewed-by: Juan Quintela if you had to respin, I think it would be better to chan

Re: [Qemu-devel] [PATCH v2 6/6] migration: move skip_section_footers

2017-06-09 Thread Juan Quintela
Peter Xu wrote: > Move it into MigrationState, with a property binded to it. Same trick is > played like previous patches. > > Signed-off-by: Peter Xu Reviewed-by: Juan Quintela Same here. Rename it to "section-footers". For previous one, "global-configuration"? Later, Juan.

Re: [Qemu-devel] [PATCH v2 0/6] migration: objectify MigrationState

2017-06-09 Thread Juan Quintela
Peter Xu wrote: > v2 > - (I didn't add Juan's r-b since I touched the patches) > - remove once parameter in migrate_get_current() since not needed > - add one more patch to export register_compat_prop(), then use it in > the following patches in xen_init(). > > I picked this topic out as suggest

Re: [Qemu-devel] [PATCH] spapr: manage hotplugged devices while the VM is not started

2017-06-09 Thread Igor Mammedov
On Thu, 08 Jun 2017 15:00:53 -0500 Michael Roth wrote: > Quoting David Gibson (2017-05-30 23:35:57) > > On Tue, May 30, 2017 at 06:04:45PM +0200, Laurent Vivier wrote: > > > For QEMU, a hotlugged device is a device added using the HMP/QMP > > > interface. > > > For SPAPR, a hotplugged device is

Re: [Qemu-devel] [PATCH v4 4/4] fsdev: QMP interface for throttling

2017-06-09 Thread Pradeep Jagadeesh
On 6/8/2017 6:49 PM, Greg Kurz wrote: On Thu, 18 May 2017 15:30:06 +0200 Pradeep Jagadeesh wrote: On 5/17/2017 7:09 PM, Eric Blake wrote: On 05/17/2017 11:29 AM, Greg Kurz wrote: First point: is fsdev a Linux-only feature, or can it be compiled on BSD? If it is Linux-only, then compiling

Re: [Qemu-devel] [PATCH v4 3/4] qmp: refactor duplicate code

2017-06-09 Thread Pradeep Jagadeesh
On 6/8/2017 4:20 PM, Greg Kurz wrote: On Fri, 12 May 2017 10:03:02 +0200 Pradeep Jagadeesh wrote: On 5/11/2017 9:50 AM, Greg Kurz wrote: On Wed, 10 May 2017 04:41:22 -0400 Pradeep Jagadeesh wrote: This patch factor out the duplicate qmp throttle interface code that was present in both bloc

Re: [Qemu-devel] [PATCH] Add manpage for QEMU Backup Tool

2017-06-09 Thread Stefan Hajnoczi
On Thu, Jun 08, 2017 at 07:29:55PM -0700, no-re...@patchew.org wrote: > === OUTPUT BEGIN === > Checking PATCH 1/1: Add manpage for QEMU Backup Tool... > ERROR: trailing whitespace > #28: FILE: contrib/backup/qemu-backup.texi:1: > + $ Hi Ishani, In case you are wondering about the

Re: [Qemu-devel] [PATCH v2 6/6] migration: move skip_section_footers

2017-06-09 Thread Peter Xu
On Fri, Jun 09, 2017 at 09:47:09AM +0200, Juan Quintela wrote: > Peter Xu wrote: > > Move it into MigrationState, with a property binded to it. Same trick is > > played like previous patches. > > > > Signed-off-by: Peter Xu > > Reviewed-by: Juan Quintela > > Same here. Rename it to "section-f

Re: [Qemu-devel] [PATCH v2 0/6] migration: objectify MigrationState

2017-06-09 Thread Peter Xu
On Fri, Jun 09, 2017 at 09:48:32AM +0200, Juan Quintela wrote: > Peter Xu wrote: > > v2 > > - (I didn't add Juan's r-b since I touched the patches) > > - remove once parameter in migrate_get_current() since not needed > > - add one more patch to export register_compat_prop(), then use it in > >

Re: [Qemu-devel] [PATCH v4 4/4] fsdev: QMP interface for throttling

2017-06-09 Thread Greg Kurz
On Fri, 9 Jun 2017 10:31:58 +0200 Pradeep Jagadeesh wrote: > On 6/8/2017 6:49 PM, Greg Kurz wrote: > > On Thu, 18 May 2017 15:30:06 +0200 > > Pradeep Jagadeesh wrote: > > > >> On 5/17/2017 7:09 PM, Eric Blake wrote: > >>> On 05/17/2017 11:29 AM, Greg Kurz wrote: > >>> > > > > First

Re: [Qemu-devel] unplug_request and migration

2017-06-09 Thread Igor Mammedov
On Fri, 9 Jun 2017 00:41:06 +1000 David Gibson wrote: > Hi Dave & Juan, > > I'm hoping one of you can answer this. > > I'm currently grappling with (amongst other things) a pseries machine > racing a hot unplug operation with a migrate. There's various issues > with what interim state we need,

Re: [Qemu-devel] [PATCH v4 4/4] fsdev: QMP interface for throttling

2017-06-09 Thread Pradeep Jagadeesh
On 6/9/2017 11:07 AM, Greg Kurz wrote: GEN qmp-commands.h /tmp/qemu-test/src/qapi-schema.json:85: No such file or directory: qapi/fsdev.json Makefile:438: recipe for target 'qmp-commands.h' failed Please fix that. Ho ok, I will have a look. How are you trying to compile, using "make dock

Re: [Qemu-devel] [PATCH v4 4/4] fsdev: QMP interface for throttling

2017-06-09 Thread Greg Kurz
On Fri, 9 Jun 2017 11:13:50 +0200 Pradeep Jagadeesh wrote: > On 6/9/2017 11:07 AM, Greg Kurz wrote: > > GEN qmp-commands.h > > /tmp/qemu-test/src/qapi-schema.json:85: No such file or directory: > > qapi/fsdev.json > > Makefile:438: recipe for target 'qmp-commands.h' failed > > > > Please f

Re: [Qemu-devel] [PATCH v2 3/4] nvdimm: add a boolean option "restrict"

2017-06-09 Thread Stefan Hajnoczi
On Thu, Jun 08, 2017 at 03:56:42PM +0300, Michael S. Tsirkin wrote: > On Tue, Jun 06, 2017 at 03:22:28PM +0800, Haozhong Zhang wrote: > > If a vNVDIMM device is not backed by a DAX device and its "restrict" > > option is enabled, bit 3 of state flags in its region mapping > > structure will be set,

Re: [Qemu-devel] [PATCH v4 0/6] spapr/xics: fix migration of older machine types

2017-06-09 Thread Greg Kurz
On Fri, 9 Jun 2017 12:28:13 +1000 David Gibson wrote: > On Thu, Jun 08, 2017 at 03:42:32PM +0200, Greg Kurz wrote: > > I've provided answers for all comments from the v3 review that I > > deliberately > > don't address in v4. > > I've merged patches 1-4. 5 & 6 I'm still reviewing. > Cool.

Re: [Qemu-devel] [PATCH v2] block: change variable names in BlockDriverState

2017-06-09 Thread Stefan Hajnoczi
On Fri, Jun 09, 2017 at 02:22:55AM +0300, Manos Pitsidianakis wrote: > diff --git a/hw/ide/core.c b/hw/ide/core.c > index 0b48b64..1a74339 100644 > --- a/hw/ide/core.c > +++ b/hw/ide/core.c > @@ -416,16 +416,16 @@ static void ide_issue_trim_cb(void *opaque, int ret) > /* 6-byte LBA

[Qemu-devel] AArch64 regression

2017-06-09 Thread Edgar E. Iglesias
Hi, I was running a bunch of tests in preparation for the MMIO/exec series but am running into regressions on master. I'm at commit 64175afc695c0672876fbbfc31b299c86d562cb4 On the xlnx-zcu102 I see lockups, the console goes unresponsive. On one of my vexpress-a15 setups (with an a57), I see weird

[Qemu-devel] [PATCH v3 1/4] net/socket: Drop the odd 'default' case and comment

2017-06-09 Thread Mao Zhongyi
In the net_socket_fd_init(), the 'default' case and comment is odd. If @fd really was a pty, getsockopt() would fail with ENOTSOCK. If @fd was a socket, but neither SOCK_DGRAM nor SOCK_STREAM. It should not be treated as if it was SOCK_STREAM. If there is a genuine reason to support something like

[Qemu-devel] [PATCH v3 0/4] Improve error reporting

2017-06-09 Thread Mao Zhongyi
Daniel's patch(commit 6701e551, Revert "Change net/socket.c to use socket_*() functions" again) has been in upstream. Continue this patchset. In v2, this series convert the non-blocking connect mechanism to QIOchannel by replace the socket_connect(), and some errors also are converted to Error.

[Qemu-devel] [PATCH v3 2/4] net/net: Convert parse_host_port() to Error

2017-06-09 Thread Mao Zhongyi
Cc: berra...@redhat.com Cc: kra...@redhat.com Cc: pbonz...@redhat.com Cc: jasow...@redhat.com Cc: arm...@redhat.com Signed-off-by: Mao Zhongyi --- include/qemu/sockets.h | 2 +- net/net.c | 21 - net/socket.c | 37 ++---

[Qemu-devel] [PATCH v3 3/4] net/socket: Convert error report message to Error

2017-06-09 Thread Mao Zhongyi
Currently, net_socket_mcast_create(), net_socket_fd_init_dgram() and net_socket_fd_init() use the function such as fprintf(), perror() to report an error message. Now, convert these functions to Error. Cc: jasow...@redhat.com Cc: arm...@redhat.com Cc: berra...@redhat.com Signed-off-by: Mao Zhongy

Re: [Qemu-devel] [PATCH v3 42/43] RFC: qdict: add uint

2017-06-09 Thread Marc-André Lureau
Hi - Original Message - > Marc-André Lureau writes: > > > Similar to int support, add uint support. > > > > Note this is RFC because this is currently unused in qemu, I haven't > > found a good user for it yet (kaslr qemu-ga code did use it though). > > > > Signed-off-by: Marc-André Lure

[Qemu-devel] [PATCH v3 4/4] net/socket: Improve -net socket error reporting

2017-06-09 Thread Mao Zhongyi
When -net socket fails, it first reports a specific error, then a generic one, like this: $ qemu-system-x86_64 -net socket, qemu-system-x86_64: -net socket: exactly one of fd=, listen=, connect=, mcast= or udp= is required qemu-system-x86_64: -net socket: Device 'socket' could not be

Re: [Qemu-devel] [PATCH v3 17/43] qdev: avoid type casts between signed and unsigned

2017-06-09 Thread Marc-André Lureau
Hi - Original Message - > Marc-André Lureau writes: > > > Modify the unsigned type for various properties to use QNUM_U64, to > > avoid type casts. > > > > There are a few empty lines added to improve code reading/style. > > > > Signed-off-by: Marc-André Lureau > > --- > > include/hw/q

Re: [Qemu-devel] [PATCH] hw/ppc/prep: Remove superfluous call to soundhw_init()

2017-06-09 Thread Sahid Orentino Ferdjaoui
On Fri, Jun 09, 2017 at 08:53:17AM +0200, Thomas Huth wrote: > When using the 40p machine, soundhw_init() is currently called twice, > one time from vl.c and one time from ibm_40p_init(). The call in > ibm_40p_init() was likely just a copy-and-paste from a old version > of the prep machine - but th

Re: [Qemu-devel] [PATCH v2] block: change variable names in BlockDriverState

2017-06-09 Thread Manos Pitsidianakis
On Fri, Jun 09, 2017 at 10:41:13AM +0100, Stefan Hajnoczi wrote: On Fri, Jun 09, 2017 at 02:22:55AM +0300, Manos Pitsidianakis wrote: diff --git a/hw/ide/core.c b/hw/ide/core.c index 0b48b64..1a74339 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -416,16 +416,16 @@ static void ide_issue_trim_

Re: [Qemu-devel] [PATCH v3 43/43] qobject: move dump_qobject() from block/ to qobject/

2017-06-09 Thread Marc-André Lureau
- Original Message - > Marc-André Lureau writes: > > > The dump functions could be generally useful for any qobject user or for > > debugging etc. > > > > Signed-off-by: Marc-André Lureau > > --- > > include/qapi/qmp/qdict.h | 2 ++ > > include/qapi/qmp/qlist.h | 2 ++ > > inclu

Re: [Qemu-devel] [PATCH v3 43/43] qobject: move dump_qobject() from block/ to qobject/

2017-06-09 Thread Marc-André Lureau
Hi - Original Message - > > > > The title claims "move dump_qobject() from block/ to qobject/", but > > that's not what the patch does. It *replaces* dump_qobject() by > > qobject_to_string(). The former dumps to a callback, the latter to a > > dynamic string buffer. > > > > Providing

[Qemu-devel] [PATCH v3] block: change variable names in BlockDriverState

2017-06-09 Thread Manos Pitsidianakis
Change the 'int count' parameter in *pwrite_zeros, *pdiscard related functions (and some others) to 'int bytes', as they both refer to bytes. This helps with code legibility. Signed-off-by: Manos Pitsidianakis --- block/blkdebug.c | 36 +++ block/blkrepl

Re: [Qemu-devel] [PATCH v2 6/6] migration: move skip_section_footers

2017-06-09 Thread Eric Blake
On 06/08/2017 10:49 PM, Peter Xu wrote: > Move it into MigrationState, with a property binded to it. Same trick is s/binded/bound/ > played like previous patches. > > Signed-off-by: Peter Xu > --- -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualizati

[Qemu-devel] [PATCH v11 0/6] Virtio-balloon Enhancement

2017-06-09 Thread Wei Wang
This patch series enhances the existing virtio-balloon with the following new features: 1) fast ballooning: transfer ballooned pages between the guest and host in chunks, instead of one by one; and 2) cmdq: a new virtqueue to send commands between the device and driver. Currently, it supports comma

[Qemu-devel] [PATCH v11 1/6] virtio-balloon: deflate via a page list

2017-06-09 Thread Wei Wang
From: Liang Li This patch saves the deflated pages to a list, instead of the PFN array. Accordingly, the balloon_pfn_to_page() function is removed. Signed-off-by: Liang Li Signed-off-by: Michael S. Tsirkin Signed-off-by: Wei Wang --- drivers/virtio/virtio_balloon.c | 22 -

[Qemu-devel] [PATCH v11 2/6] virtio-balloon: coding format cleanup

2017-06-09 Thread Wei Wang
Clean up the comment format. Signed-off-by: Wei Wang --- drivers/virtio/virtio_balloon.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 4a9f307..ecb64e9 100644 --- a/drivers/virtio/virtio_balloon.c

[Qemu-devel] [PATCH v11 3/6] virtio-balloon: VIRTIO_BALLOON_F_PAGE_CHUNKS

2017-06-09 Thread Wei Wang
Add a new feature, VIRTIO_BALLOON_F_PAGE_CHUNKS, which enables the transfer of the ballooned (i.e. inflated/deflated) pages in chunks to the host. The implementation of the previous virtio-balloon is not very efficient, because the ballooned pages are transferred to the host one by one. Here is th

[Qemu-devel] [PATCH v11 4/6] mm: function to offer a page block on the free list

2017-06-09 Thread Wei Wang
Add a function to find a page block on the free list specified by the caller. Pages from the page block may be used immediately after the function returns. The caller is responsible for detecting or preventing the use of such pages. Signed-off-by: Wei Wang Signed-off-by: Liang Li --- include/li

[Qemu-devel] [PATCH v11 5/6] mm: export symbol of next_zone and first_online_pgdat

2017-06-09 Thread Wei Wang
This patch enables for_each_zone()/for_each_populated_zone() to be invoked by a kernel module. Signed-off-by: Wei Wang --- mm/mmzone.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/mmzone.c b/mm/mmzone.c index a51c0a6..08a2a3a 100644 --- a/mm/mmzone.c +++ b/mm/mmzone.c @@ -13,6 +13,7

Re: [Qemu-devel] AArch64 regression

2017-06-09 Thread Alex Bennée
Edgar E. Iglesias writes: > Hi, > > I was running a bunch of tests in preparation for the MMIO/exec > series but am running into regressions on master. > I'm at commit 64175afc695c0672876fbbfc31b299c86d562cb4 > > On the xlnx-zcu102 I see lockups, the console goes unresponsive. > On one of my vex

[Qemu-devel] [PATCH v11 6/6] virtio-balloon: VIRTIO_BALLOON_F_CMD_VQ

2017-06-09 Thread Wei Wang
Add a new vq, cmdq, to handle requests between the device and driver. This patch implements two commands send from the device and handled in the driver. 1) cmd VIRTIO_BALLOON_CMDQ_REPORT_STATS: this command is used to report the guest memory statistics to the host. The stats_vq mechanism is not us

Re: [Qemu-devel] [PATCH v3 3/5] xics: setup cpu at realize time

2017-06-09 Thread David Gibson
On Fri, Jun 09, 2017 at 08:45:50AM +0200, Greg Kurz wrote: > On Fri, 9 Jun 2017 12:24:52 +1000 > David Gibson wrote: > > > On Thu, Jun 08, 2017 at 10:45:30AM +0200, Greg Kurz wrote: > > > On Thu, 8 Jun 2017 12:01:12 +1000 > > > David Gibson wrote: > > > > > > > On Wed, Jun 07, 2017 at 07:17:0

Re: [Qemu-devel] [PATCH] spapr: manage hotplugged devices while the VM is not started

2017-06-09 Thread David Gibson
On Thu, Jun 08, 2017 at 03:00:53PM -0500, Michael Roth wrote: > Quoting David Gibson (2017-05-30 23:35:57) > > On Tue, May 30, 2017 at 06:04:45PM +0200, Laurent Vivier wrote: > > > For QEMU, a hotlugged device is a device added using the HMP/QMP > > > interface. > > > For SPAPR, a hotplugged device

Re: [Qemu-devel] unplug_request and migration

2017-06-09 Thread David Gibson
On Fri, Jun 09, 2017 at 11:09:10AM +0200, Igor Mammedov wrote: > On Fri, 9 Jun 2017 00:41:06 +1000 > David Gibson wrote: > > > Hi Dave & Juan, > > > > I'm hoping one of you can answer this. > > > > I'm currently grappling with (amongst other things) a pseries machine > > racing a hot unplug ope

Re: [Qemu-devel] [PATCH v4 0/6] spapr/xics: fix migration of older machine types

2017-06-09 Thread David Gibson
On Fri, Jun 09, 2017 at 11:36:31AM +0200, Greg Kurz wrote: > On Fri, 9 Jun 2017 12:28:13 +1000 > David Gibson wrote: > > > On Thu, Jun 08, 2017 at 03:42:32PM +0200, Greg Kurz wrote: > > > I've provided answers for all comments from the v3 review that I > > > deliberately > > > don't address in v

Re: [Qemu-devel] [PATCH RFC] spapr: ignore interrupts during reset state

2017-06-09 Thread David Gibson
On Fri, Jun 09, 2017 at 10:32:25AM +0530, Nikunj A Dadhania wrote: > David Gibson writes: > > > On Thu, Jun 08, 2017 at 12:06:08PM +0530, Nikunj A Dadhania wrote: > >> Rebooting a SMP TCG guest is broken for both single/multi threaded TCG. > > > > Ouch. When exactly did this happen? > > Broken

Re: [Qemu-devel] [PATCH] spapr: manage hotplugged devices while the VM is not started

2017-06-09 Thread David Gibson
On Fri, Jun 09, 2017 at 10:27:33AM +0200, Igor Mammedov wrote: > On Thu, 08 Jun 2017 15:00:53 -0500 > Michael Roth wrote: > > > Quoting David Gibson (2017-05-30 23:35:57) > > > On Tue, May 30, 2017 at 06:04:45PM +0200, Laurent Vivier wrote: > > > > For QEMU, a hotlugged device is a device added

[Qemu-devel] [PATCH v2] spapr: manage hotplugged devices while the VM is not started

2017-06-09 Thread Laurent Vivier
For QEMU, a hotlugged device is a device added using the HMP/QMP interface. For SPAPR, a hotplugged device is a device added while the machine is running. In this case QEMU doesn't update internal state but relies on the OS for this part In the case of migration, when we (libvirt) hotplug a device

Re: [Qemu-devel] [PATCH] nbd: Fix regression on resiliency to port scan

2017-06-09 Thread Eric Blake
On 06/08/2017 05:26 PM, Eric Blake wrote: > Back in qemu 2.5, qemu-nbd was immune to port probes (a transient > server would not quit, regardless of how many probe connections > came and went, until a connection actually negotiated). But we > broke that in commit ee7d7aa > Simple test across two

Re: [Qemu-devel] [PATCH v11 0/6] Virtio-balloon Enhancement

2017-06-09 Thread Wang, Wei W
On Friday, June 9, 2017 6:42 PM, Wang, Wei W wrote: > To: virtio-...@lists.oasis-open.org; linux-ker...@vger.kernel.org; qemu- > de...@nongnu.org; virtualizat...@lists.linux-foundation.org; > k...@vger.kernel.org; linux...@kvack.org; m...@redhat.com; > da...@redhat.com; Hansen, Dave ; > cornelia.h.

[Qemu-devel] [PATCH v4 3/7] pci: Fix the return value checking

2017-06-09 Thread Mao Zhongyi
pci_add_capability returns a strictly positive value on success, correct asserts. Cc: dmi...@daynix.com Cc: jasow...@redhat.com Cc: kra...@redhat.com Cc: alex.william...@redhat.com Cc: arm...@redhat.com Signed-off-by: Mao Zhongyi --- hw/net/e1000e.c | 2 +- hw/net/eepro100.c | 2 +- hw/usb/hcd

[Qemu-devel] [PATCH v4 2/7] pci: Add comment for pci_add_capability2()

2017-06-09 Thread Mao Zhongyi
Comments for pci_add_capability2() to explain the return value. This may help to make a correct return value check for its callers. Cc: m...@redhat.com Cc: mar...@redhat.com Cc: arm...@redhat.com Suggested-by: Markus Armbruster Signed-off-by: Mao Zhongyi --- hw/pci/pci.c | 6 ++ 1 file chan

[Qemu-devel] [PATCH v4 6/7] pci: Convert to realize

2017-06-09 Thread Mao Zhongyi
The pci-birdge device i82801b11 and io3130_upstream/downstream still implements the old PCIDeviceClass .init() through *_init() instead of the new .realize(). All devices need to be converted to .realize(). So convert it and rename it to *_realize(). Cc: m...@redhat.com Cc: mar...@redhat.com Cc: a

[Qemu-devel] [PATCH v4 5/7] pci: Replace pci_add_capability() with pci_add_capability2()

2017-06-09 Thread Mao Zhongyi
After the patch 'Make errp the last parameter of pci_add_capability()', pci_add_capability() and pci_add_capability2() now do exactly the same. So drop the wrapper pci_add_capability() of pci_add_capability2(), then replace the pci_add_capability() with pci_add_capability2() everywhere. Cc: pbonz.

[Qemu-devel] [PATCH v4 0/7] Convert to realize and cleanup

2017-06-09 Thread Mao Zhongyi
This series mainly implements the conversions of pci-bridge devices i82801b11, io3130_upstream/downstream and so on to realize(). Naturally part of error messages need to be converted to Error, then propagate to its callers via the argument errp, bonus clean related minor flaw up. In short, the for

[Qemu-devel] [PATCH v4 7/7] pci: Convert shpc_init() to Error

2017-06-09 Thread Mao Zhongyi
In order to propagate error message better, convert shpc_init() to Error also convert the pci_bridge_dev_initfn() to realize. Cc: m...@redhat.com Cc: mar...@redhat.com Cc: arm...@redhat.com Signed-off-by: Mao Zhongyi --- hw/pci-bridge/pci_bridge_dev.c | 21 - hw/pci/shpc.c

[Qemu-devel] [PATCH v4 4/7] pci: Make errp the last parameter of pci_add_capability()

2017-06-09 Thread Mao Zhongyi
Add Error argument for pci_add_capability() to leverage the errp to pass info on errors. This way is helpful for its callers to make a better error handling when moving to 'realize'. Cc: pbonz...@redhat.com Cc: r...@twiddle.net Cc: ehabk...@redhat.com Cc: m...@redhat.com Cc: jasow...@redhat.com Cc

Re: [Qemu-devel] [RFC v2 0/8] VIRTIO-IOMMU device

2017-06-09 Thread Bharat Bhushan
Hi Eric, > -Original Message- > From: Auger Eric [mailto:eric.au...@redhat.com] > Sent: Friday, June 09, 2017 12:14 PM > To: Bharat Bhushan ; > eric.auger@gmail.com; peter.mayd...@linaro.org; > alex.william...@redhat.com; m...@redhat.com; qemu-...@nongnu.org; > qemu-devel@nongnu.org; j

[Qemu-devel] [PATCH v4 1/7] pci: Clean up error checking in pci_add_capability()

2017-06-09 Thread Mao Zhongyi
On success, pci_add_capability2() returns a positive value. On failure, it sets an error and return a negative value. pci_add_capability() laboriously checks this behavior. No other caller does. Drop the checks from pci_add_capability(). Cc: m...@redhat.com Cc: mar...@redhat.com Signed-off-by: Ma

Re: [Qemu-devel] [PATCH] q35/mch: implement extended TSEG sizes

2017-06-09 Thread Paolo Bonzini
On 08/06/2017 21:55, Michael S. Tsirkin wrote: > We don't have room anywhere in PCI config space. Laszlo makes argument > why it's safe for this device based on spec but it's anyone's guess > whether current and future software will follow spec. In short, going > anywhere near the emulated devic

Re: [Qemu-devel] [PATCH 1/2] commit: Fix use after free in completion

2017-06-09 Thread Kevin Wolf
Am 02.06.2017 um 23:12 hat Kevin Wolf geschrieben: > The final bdrv_set_backing_hd() could be working on already freed nodes > because the commit job drops its references (through BlockBackends) to > both overlay_bs and top already a bit earlier. > > One way to trigger the bug is hot unplugging a

[Qemu-devel] [PATCH 1/3] commit: Fix completion with extra reference

2017-06-09 Thread Kevin Wolf
commit_complete() can't assume that after its block_job_completed() the job is actually immediately freed; someone else may still be holding references. In this case, the op blockers on the intermediate nodes make the graph reconfiguration in the completion code fail. Call block_job_remove_all_bdr

[Qemu-devel] [PATCH 3/3] qemu-iotests: Test exiting qemu with running job

2017-06-09 Thread Kevin Wolf
When qemu is exited, all running jobs should be cancelled successfully. This adds a test for this for all types of block jobs that currently exist in qemu. Signed-off-by: Kevin Wolf --- tests/qemu-iotests/185 | 189 + tests/qemu-iotests/185.out |

[Qemu-devel] [PATCH 2/3] qemu-iotests: Allow starting new qemu after cleanup

2017-06-09 Thread Kevin Wolf
After _cleanup_qemu(), test cases should be able to start the next qemu process and call _cleanup_qemu() for that one as well. For this to work cleanly, we need to improve the cleanup so that the second invocation doesn't try to kill the qemu instances from the first invocation a second time (which

[Qemu-devel] [PATCH 0/3] commit: Fix completion with extra reference

2017-06-09 Thread Kevin Wolf
Kevin Wolf (3): commit: Fix completion with extra reference qemu-iotests: Allow starting new qemu after cleanup qemu-iotests: Test exiting qemu with running job block/commit.c | 7 ++ tests/qemu-iotests/185 | 189 + tests/qem

Re: [Qemu-devel] [RFC v2 0/8] VIRTIO-IOMMU device

2017-06-09 Thread Auger Eric
Hi Bharat, On 09/06/2017 13:30, Bharat Bhushan wrote: > Hi Eric, > >> -Original Message- >> From: Auger Eric [mailto:eric.au...@redhat.com] >> Sent: Friday, June 09, 2017 12:14 PM >> To: Bharat Bhushan ; >> eric.auger@gmail.com; peter.mayd...@linaro.org; >> alex.william...@redhat.com;

Re: [Qemu-devel] [PATCH] nbd: Fully initialize client in case of failed negotiation

2017-06-09 Thread Eric Blake
On 05/26/2017 10:04 PM, Eric Blake wrote: > If a non-NBD client connects to qemu-nbd, we would end up with > a SIGSEGV in nbd_cilent_put() because we were trying to > unregister the client's association to the export, even though > we skipped inserting the client into that list. Easy trigger > in

Re: [Qemu-devel] [PATCH] nbd: Fix regression on resiliency to port scan

2017-06-09 Thread Eric Blake
adding qemu-stable in cc On 06/08/2017 05:26 PM, Eric Blake wrote: > Back in qemu 2.5, qemu-nbd was immune to port probes (a transient > server would not quit, regardless of how many probe connections > came and went, until a connection actually negotiated). But we > broke that in commit ee7d7aa

Re: [Qemu-devel] [PATCH v2] spapr: manage hotplugged devices while the VM is not started

2017-06-09 Thread Daniel Henrique Barboza
On 06/09/2017 08:08 AM, Laurent Vivier wrote: For QEMU, a hotlugged device is a device added using the HMP/QMP interface. For SPAPR, a hotplugged device is a device added while the machine is running. In this case QEMU doesn't update internal state but relies on the OS for this part In the cas

Re: [Qemu-devel] [PATCH 1/3] commit: Fix completion with extra reference

2017-06-09 Thread Eric Blake
On 06/09/2017 06:50 AM, Kevin Wolf wrote: > commit_complete() can't assume that after its block_job_completed() the > job is actually immediately freed; someone else may still be holding > references. In this case, the op blockers on the intermediate nodes make > the graph reconfiguration in the co

Re: [Qemu-devel] [PATCH 2/3] qemu-iotests: Allow starting new qemu after cleanup

2017-06-09 Thread Eric Blake
On 06/09/2017 06:50 AM, Kevin Wolf wrote: > After _cleanup_qemu(), test cases should be able to start the next qemu > process and call _cleanup_qemu() for that one as well. For this to work > cleanly, we need to improve the cleanup so that the second invocation > doesn't try to kill the qemu instan

Re: [Qemu-devel] [PATCH 3/3] qemu-iotests: Test exiting qemu with running job

2017-06-09 Thread Eric Blake
On 06/09/2017 06:50 AM, Kevin Wolf wrote: > When qemu is exited, all running jobs should be cancelled successfully. > This adds a test for this for all types of block jobs that currently > exist in qemu. > > Signed-off-by: Kevin Wolf > --- > tests/qemu-iotests/185 | 189 > ++

Re: [Qemu-devel] [RFC v2 0/8] VIRTIO-IOMMU device

2017-06-09 Thread Auger Eric
Hi, On 09/06/2017 13:30, Bharat Bhushan wrote: > Hi Eric, > >> -Original Message- >> From: Auger Eric [mailto:eric.au...@redhat.com] >> Sent: Friday, June 09, 2017 12:14 PM >> To: Bharat Bhushan ; >> eric.auger@gmail.com; peter.mayd...@linaro.org; >> alex.william...@redhat.com; m...@r

Re: [Qemu-devel] unplug_request and migration

2017-06-09 Thread Juan Quintela
David Gibson wrote: > On Fri, Jun 09, 2017 at 11:09:10AM +0200, Igor Mammedov wrote: >> On Fri, 9 Jun 2017 00:41:06 +1000 >> David Gibson wrote: >> >> > Hi Dave & Juan, >> > >> > I'm hoping one of you can answer this. >> > >> > I'm currently grappling with (amongst other things) a pseries mach

Re: [Qemu-devel] [PATCH v20 09/30] block/dirty-bitmap: fix comment for BlockDirtyBitmap.disabled field

2017-06-09 Thread Max Reitz
On 2017-06-02 23:02, John Snow wrote: > > > On 06/02/2017 07:21 AM, Vladimir Sementsov-Ogievskiy wrote: >> Signed-off-by: Vladimir Sementsov-Ogievskiy >> --- >> block/dirty-bitmap.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/block/dirty-bitmap.c b/block/dirty-

Re: [Qemu-devel] [PATCH v3 00/43] qobject/qapi: add uint type

2017-06-09 Thread Markus Armbruster
PATCH 01-41 look ready with minor tweaks. I chatted with Marc-André, and he asked me to apply them myself. You can find the result at https://repo.or.cz/qemu/armbru.git in branch qapi-next. Marc-André, please give it a quick look-over. If it's good, I'll post a pull request later today. PATCH

Re: [Qemu-devel] [PATCH v3 43/43] qobject: move dump_qobject() from block/ to qobject/

2017-06-09 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > - Original Message - >> > >> > The title claims "move dump_qobject() from block/ to qobject/", but >> > that's not what the patch does. It *replaces* dump_qobject() by >> > qobject_to_string(). The former dumps to a callback, the latter to a >> > dyna

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

2017-06-09 Thread Jeff Cody
The following changes since commit 64175afc695c0672876fbbfc31b299c86d562cb4: arm_gicv3: Fix ICC_BPR1 reset value when EL3 not implemented (2017-06-07 17:21:44 +0100) are available in the git repository at: git://github.com/codyprime/qemu-kvm-jtc.git tags/block-pull-request for you to fetch

[Qemu-devel] [PULL 1/1] block/gluster.c: Handle qdict_array_entries() failure

2017-06-09 Thread Jeff Cody
From: Peter Maydell In qemu_gluster_parse_json(), the call to qdict_array_entries() could return a negative error code, which we were ignoring because we assigned the result to an unsigned variable. Fix this by using the 'int' type instead, which matches the return type of qdict_array_entries() a

Re: [Qemu-devel] [PATCH v3 43/43] qobject: move dump_qobject() from block/ to qobject/

2017-06-09 Thread Eric Blake
On 06/09/2017 07:40 AM, Markus Armbruster wrote: > Marc-André Lureau writes: > >> Hi >> >> - Original Message - The title claims "move dump_qobject() from block/ to qobject/", but that's not what the patch does. It *replaces* dump_qobject() by qobject_to_string(). Th

Re: [Qemu-devel] [PATCH v20 10/30] block/dirty-bitmap: add readonly field to BdrvDirtyBitmap

2017-06-09 Thread Max Reitz
On 2017-06-02 13:21, Vladimir Sementsov-Ogievskiy wrote: > It will be needed in following commits for persistent bitmaps. > If bitmap is loaded from read-only storage (and we can't mark it > "in use" in this storage) corresponding BdrvDirtyBitmap should be > read-only. > > Signed-off-by: Vladimir

Re: [Qemu-devel] [PATCH 3/3] qemu-iotests: Test exiting qemu with running job

2017-06-09 Thread Kevin Wolf
Am 09.06.2017 um 14:14 hat Eric Blake geschrieben: > On 06/09/2017 06:50 AM, Kevin Wolf wrote: > > When qemu is exited, all running jobs should be cancelled successfully. > > This adds a test for this for all types of block jobs that currently > > exist in qemu. > > > > Signed-off-by: Kevin Wolf

[Qemu-devel] [PATCH 0/3] VT-d: convert the rest of DPRINTF()s

2017-06-09 Thread Peter Xu
Mainly I am doing the translation and then we can get rid of that. Finally we won't need to recompile for its debugging any more. I did spend some time on considering which DPRINTF to remove, which one to convert to trace_*, also I am more careful this time with the naming, e.g., I named all the e

[Qemu-devel] [PATCH 1/3] intel_iommu: switching the rest DPRINTF to trace

2017-06-09 Thread Peter Xu
We have converted many of the DPRINTF() into traces. This patch does the last 100+ ones. To debug VT-d when error happens, let's try enable: -trace enable="vtd_err*" This should works just like the old GENERAL but of course better, since we don't need to recompile. Similar rules apply to the

[Qemu-devel] [PATCH 2/3] intel_iommu: cleanup vtd_iommu_translate()

2017-06-09 Thread Peter Xu
So even with PT we'll get a log now. Also, remove useless assignments. Signed-off-by: Peter Xu --- hw/i386/intel_iommu.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index c818dd4..f94fc4e 100644 --- a/hw/i386/in

[Qemu-devel] [PATCH 3/3] intel_iommu: cleanup vtd_interrupt_remap_msi()

2017-06-09 Thread Peter Xu
Move the memcpy upper into where needed, then share the trace so that we trace every correct remapping. Signed-off-by: Peter Xu --- hw/i386/intel_iommu.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index f94fc4e..d

Re: [Qemu-devel] [PATCH v3 00/43] qobject/qapi: add uint type

2017-06-09 Thread Marc-André Lureau
Hi - Original Message - > PATCH 01-41 look ready with minor tweaks. I chatted with Marc-André, > and he asked me to apply them myself. You can find the result at > https://repo.or.cz/qemu/armbru.git in branch qapi-next. Marc-André, > please give it a quick look-over. If it's good, I'll

Re: [Qemu-devel] [PATCH] hw/cpu: core.c can be compiled as common object

2017-06-09 Thread Eduardo Habkost
On Fri, Jun 09, 2017 at 12:03:38PM +1000, David Gibson wrote: > On Thu, Jun 08, 2017 at 04:23:34PM +0200, Juan Quintela wrote: > > Thomas Huth wrote: > > > There does not seem to be any target specific code in core.c, so we can > > > put it into "common-obj" instead of "obj" to compile it only onc

Re: [Qemu-devel] [PATCH v3 1/4] net/socket: Drop the odd 'default' case and comment

2017-06-09 Thread Markus Armbruster
Mao Zhongyi writes: > In the net_socket_fd_init(), the 'default' case and comment is odd. > If @fd really was a pty, getsockopt() would fail with ENOTSOCK. If > @fd was a socket, but neither SOCK_DGRAM nor SOCK_STREAM. It should > not be treated as if it was SOCK_STREAM. > > If there is a genuine

Re: [Qemu-devel] [PATCH v20 13/30] block: new bdrv_reopen_bitmaps_rw interface

2017-06-09 Thread Max Reitz
On 2017-06-02 13:21, Vladimir Sementsov-Ogievskiy wrote: > Add format driver handler, which should mark loaded read-only > bitmaps as 'IN_USE' in the image and unset read_only field in > corresponding BdrvDirtyBitmap's. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block.c

[Qemu-devel] [PATCH v2 1/2] target/s390x: specification exceptions are suppressing

2017-06-09 Thread David Hildenbrand
The PSW in the old PSW has to point at the next instruction, as specification exceptions are defined to be "suppressing or completed", but not nullified. Signed-off-by: David Hildenbrand --- target/s390x/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/s390x/he

[Qemu-devel] [PATCH v2 0/2] s390x/cpumodel: wire up cpu type + id for TCG

2017-06-09 Thread David Hildenbrand
Once Thomas' interception handler kvm-unit-test is only, I'll add my stidp test. I played with adding a "wout_m1_64_align", but I am not sure if that is really helpful has we will only have a handful of users. I am working on some more alignment fixes (spx, stap and friends ) and will send them o

[Qemu-devel] [PATCH] tests: check-qom-proplist: fix leak

2017-06-09 Thread Marc-André Lureau
user_creatable_add_opts() returns a reference (the other reference is for the root parent/child link). Leak introduced in commit a1af255f065cc. Signed-off-by: Marc-André Lureau --- tests/check-qom-proplist.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/check-qom-proplist.c b/test

[Qemu-devel] [PATCH v2 2/2] s390x/cpumodel: wire up cpu type + id for TCG

2017-06-09 Thread David Hildenbrand
Let's properly expose the CPU type (machine-type number) via "STORE CPU ID" and "STORE SUBSYSTEM INFORMATION". As TCG emulates basic mode, the CPU identification number has the format "An", whereby A is the CPU address, and n are parts of the CPU serial number (0 for us for now). A specificat

  1   2   3   >