[Qemu-devel] Question about the userfaultfd write-protect support

2017-09-11 Thread Longpeng (Mike)
Hi Andrea, We've implemented a demo of KVM live memory snapshot based on the userfaultfd write-protect series in your private tree(https://git.kernel.org/pub/scm/linux/kernel/git/andrea/aa.git/log/). We did a little hack on that series to make the demo works. Zhang had discussed with you about th

[Qemu-devel] [RESEND] Question about the userfaultfd write-protect support

2017-09-11 Thread Longpeng (Mike)
(Add Zhanghailiang and Gonglei) Hi Andrea, We've implemented a demo of KVM live memory snapshot based on the userfaultfd write-protect series in your private tree(https://git.kernel.org/pub/scm/linux/kernel/git/andrea/aa.git/log/). We did a little hack on that series to make the demo works. Zha

[Qemu-devel] [PULL] Update OpenBIOS images

2017-09-11 Thread Mark Cave-Ayland
Hi Peter, Here are the first set of OpenBIOS updates for 2.11. Please pull. ATB, Mark. The following changes since commit fcea73709b966a7ded9efa7b106ea50c7fe9025c: Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2017-09-08 16:04:42 +0100) are available in the g

Re: [Qemu-devel] [PATCH for-2.11] hw/misc/ivshmem: Fix ivshmem_recv_msg() to also work on big endian systems

2017-09-11 Thread Cornelia Huck
On Mon, 11 Sep 2017 04:35:08 +0200 Thomas Huth wrote: > On 10.09.2017 05:24, David Gibson wrote: > > On Wed, Aug 30, 2017 at 03:59:07PM +0100, Peter Maydell wrote: > >> On 30 August 2017 at 15:53, Philippe Mathieu-Daudé > >> wrote: > >>> On 08/30/2017 10:39 AM, Thomas Huth wrote: > T

Re: [Qemu-devel] [PATCH for-2.11] tests: Fix broken ivshmem-server-msi/-irq tests

2017-09-11 Thread Cornelia Huck
On Tue, 29 Aug 2017 20:13:36 +0200 Thomas Huth wrote: > Broken with commit b4ba67d9a7025 ("libqos: Change PCI accessors to take > opaque BAR handle") a while ago, but nobody noticed since the tests are > only run in SPEED=slow mode: The msix_pba_bar is not correctly initialized > anymore if bir_p

[Qemu-devel] [PATCH v3 2/4] vhost-user-blk: introduce a new vhost-user-blk host device

2017-09-11 Thread Changpeng Liu
This commit introduces a new vhost-user device for block, it uses a chardev to connect with the backend, same with Qemu virito-blk device, Guest OS still uses the virtio-blk frontend driver. To use it, start Qemu with command line like this: qemu-system-x86_64 \ -chardev socket,id=char0,path=

[Qemu-devel] [PATCH v3 0/4] *** Introduce a new vhost-user-blk host device to Qemu ***

2017-09-11 Thread Changpeng Liu
Although virtio scsi specification was designed as a replacement for virtio_blk, there are still many users using virtio_blk. Qemu 2.9 introduced a new device vhost user scsi which can process I/O in user space for virtio_scsi, this commit introduces a new vhost user block host device, which can su

[Qemu-devel] [PATCH v3 3/4] contrib/libvhost-user: enable virtio config space messages

2017-09-11 Thread Changpeng Liu
Enable VHOST_USER_GET_CONFIG/VHOST_USER_SET_CONFIG/VHOST_USER_SET_CONFIG_FD messages in libvhost-user library, users can implement their own I/O target based on the library. This enable the virtio config space delivered between Qemu host device and the I/O target, also event notifier is added in ca

[Qemu-devel] [PATCH v3 1/4] vhost-user: add new vhost user messages to support virtio config space

2017-09-11 Thread Changpeng Liu
Add VHOST_USER_GET_CONFIG/VHOST_USER_SET_CONFIG messages which can be used for live migration for vhost user devices, also vhost user devices can benefit from the messages to get/set virtio config space from/to the I/O target besides Qemu. For the purpose to support virtio config space change, VHOS

[Qemu-devel] [PATCH v3 4/4] contrib/vhost-user-blk: introduce a vhost-user-blk sample application

2017-09-11 Thread Changpeng Liu
This commit introcudes a vhost-user-blk backend device, it uses UNIX domain socket to communicate with Qemu. The vhost-user-blk sample application should be used with Qemu vhost-user-blk-pci device. To use it, complie with: make vhost-user-blk and start like this: vhost-user-blk -b /dev/sdb -s /p

Re: [Qemu-devel] [RFC PATCH qemu 3/4] memory: Share flat views and dispatch trees between address spaces

2017-09-11 Thread Paolo Bonzini
On 07/09/2017 11:20, Alexey Kardashevskiy wrote: > > /* Accessed via RCU. */ > struct FlatView *current_map; > > int ioeventfd_nb; > struct MemoryRegionIoeventfd *ioeventfds; > -struct AddressSpaceDispatch *dispatch; > -struct AddressSpaceDispatch *next_dispatch; >

Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] ppc: add CPU IRQ state to PPC VMStateDescription

2017-09-11 Thread Greg Kurz
On Sun, 10 Sep 2017 15:37:33 +0100 Mark Cave-Ayland wrote: > Commit a90db15 "target-ppc: Convert ppc cpu savevm to VMStateDescription" > appears to drop the internal CPU IRQ state from the migration stream. Whilst > testing migration on g3beige/mac99 machines, test images would randomly fail > t

Re: [Qemu-devel] [PATCH v2 5/6] io: Ignore websocket PING and PONG frames

2017-09-11 Thread Daniel P. Berrange
On Fri, Sep 08, 2017 at 10:38:00AM -0700, Brandon Carpenter wrote: > Keep pings and gratuitous pongs generated by web browsers from killing > websocket connections. > > Signed-off-by: Brandon Carpenter > --- > io/channel-websock.c | 21 + > 1 file changed, 17 insertions(+), 4

Re: [Qemu-devel] [PATCH v2 6/6] io: Reply to ping frames

2017-09-11 Thread Daniel P. Berrange
On Fri, Sep 08, 2017 at 10:38:01AM -0700, Brandon Carpenter wrote: > Add an immediate ping reply (pong) to the outgoing stream when a ping > is received. Unsolicited pongs are ignored. > > Signed-off-by: Brandon Carpenter > --- > io/channel-websock.c | 50

Re: [Qemu-devel] [PATCH v2 5/6] io: Ignore websocket PING and PONG frames

2017-09-11 Thread Daniel P. Berrange
On Mon, Sep 11, 2017 at 09:38:46AM +0100, Daniel P. Berrange wrote: > On Fri, Sep 08, 2017 at 10:38:00AM -0700, Brandon Carpenter wrote: > > Keep pings and gratuitous pongs generated by web browsers from killing > > websocket connections. > > > > Signed-off-by: Brandon Carpenter > > --- > > io/c

Re: [Qemu-devel] [RFC PATCH qemu 3/4] memory: Share flat views and dispatch trees between address spaces

2017-09-11 Thread Alexey Kardashevskiy
On 11/09/17 17:40, Paolo Bonzini wrote: > On 07/09/2017 11:20, Alexey Kardashevskiy wrote: >> >> /* Accessed via RCU. */ >> struct FlatView *current_map; >> >> int ioeventfd_nb; >> struct MemoryRegionIoeventfd *ioeventfds; >> -struct AddressSpaceDispatch *dispatch; >> -

Re: [Qemu-devel] [PATCH 8/8] tcg/i386: Add vector operations

2017-09-11 Thread Alex Bennée
Richard Henderson writes: > On 09/08/2017 06:10 AM, Alex Bennée wrote: >> Also this commit breaks RISU: >> >> qemu-aarch64 build/aarch64-linux-gnu/risu >> testcases.aarch64/insn_ANDSi_RES8_ANDS_RES_ANDv_ASRV__INC.risu.bin \ >> -t >> testcases.aarch64/insn_ANDSi_RES8_ANDS_RES_ANDv_ASRV_

Re: [Qemu-devel] [PATCH 2/8] target/arm: Use generic vector infrastructure for aa64 add/sub/logic

2017-09-11 Thread Alex Bennée
Richard Henderson writes: > On 09/07/2017 09:58 AM, Alex Bennée wrote: >>> +switch (size + 4 * is_u) { >> >> Hmm I find this switch a little too magical. I mean I can see that the >> encoding abuses size for the final opcode when I look at the manual but >> it reads badly. >> >>> +case 0

Re: [Qemu-devel] [Qemu-block] [PATCH 09/10] scsi: add multipath support to qemu-pr-helper

2017-09-11 Thread Paolo Bonzini
On 30/08/2017 18:37, Stefan Hajnoczi wrote: > > The case statements asssume sz has a certain minimum value. I didn't > see a check anywhere that guarantees this. It may be easier to hide the > client's sz value and instead use sizeof(client->data). The caller can > worry about sz. Makes sense.

Re: [Qemu-devel] [PATCH v10 5/6] fsdev: QMP interface for throttling

2017-09-11 Thread Pradeep Jagadeesh
On 9/8/2017 2:34 PM, Markus Armbruster wrote: Pradeep Jagadeesh writes: On 9/8/2017 12:02 PM, Markus Armbruster wrote: Pradeep Jagadeesh writes: [...] diff --git a/qmp.c b/qmp.c index b86201e..eed91e5 100644 --- a/qmp.c +++ b/qmp.c @@ -130,6 +130,20 @@ void qmp_cpu_add(int64_t id, Error **

Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] ppc: add CPU IRQ state to PPC VMStateDescription

2017-09-11 Thread Dr. David Alan Gilbert
* Greg Kurz (gr...@kaod.org) wrote: > On Sun, 10 Sep 2017 15:37:33 +0100 > Mark Cave-Ayland wrote: > > > Commit a90db15 "target-ppc: Convert ppc cpu savevm to VMStateDescription" > > appears to drop the internal CPU IRQ state from the migration stream. Whilst > > testing migration on g3beige/mac9

Re: [Qemu-devel] [PATCH 1/4] s390x/css: drop data-check in interpretation

2017-09-11 Thread Cornelia Huck
On Fri, 8 Sep 2017 17:24:43 +0200 Halil Pasic wrote: > The architecture says that channel-data check is indicating that > an uncorrected storage (memory) error has been detected in regard > to the data residing in main storage (memory) that is currently > used for an I/O operation. The described

Re: [Qemu-devel] [RFC PATCH qemu 3/4] memory: Share flat views and dispatch trees between address spaces

2017-09-11 Thread Paolo Bonzini
On 11/09/2017 11:06, Alexey Kardashevskiy wrote: > On 11/09/17 17:40, Paolo Bonzini wrote: >> On 07/09/2017 11:20, Alexey Kardashevskiy wrote: >>> >>> /* Accessed via RCU. */ >>> struct FlatView *current_map; >>> >>> int ioeventfd_nb; >>> struct MemoryRegionIoeventfd *ioeve

Re: [Qemu-devel] [PATCH 2/4] s390x/css: fix NULL handling for CCW addresses

2017-09-11 Thread Cornelia Huck
On Fri, 8 Sep 2017 17:24:44 +0200 Halil Pasic wrote: > Back then in the time of df1fe5bb49 ("s390: Virtual channel subsystem > support.", 2013-01-24) -EIO used to map to a channel-program check (via > the default label of the switch statement). Then 2dc95b4cac > ("s390x/3270: 3270 data stream h

Re: [Qemu-devel] [PATCH 3/4] s390x/css: remove dubious error handling branch

2017-09-11 Thread Cornelia Huck
On Fri, 8 Sep 2017 17:24:45 +0200 Halil Pasic wrote: s/dubious/unused/ > The case in question actually never happens. Let us get rid of the dead > code. I had tried to be complete in my initial implementation. With the current implementation, it can never happen, yes. We can easily resurrect i

Re: [Qemu-devel] [PATCH v2 0/4] i386/kvm: advertise Hyper-V frequency MSRs

2017-09-11 Thread Paolo Bonzini
On 07/08/2017 10:56, Ladi Prosek wrote: > This is the QEMU part of the changes required for nested Hyper-V to read > timestamps with RDTSC + TSC page. Without exposing the frequency MSRs, > Windows with the Hyper-V role enabled use the much slower > HV_X64_MSR_TIME_REF_COUNT (0x4020) RDMSR to r

Re: [Qemu-devel] [PATCH v1 0/2] Remove libqemustub.a in order to improve error

2017-09-11 Thread Paolo Bonzini
On 18/08/2017 20:47, Alistair Francis wrote: > As discussed with Paolo and Markus let's combine libqemustub.a into > libqemuutil.a to avoid circular dependencies. > > Alistair Francis (2): > Makefile: Remove libqemustub.a > Convert remaining single line fprintf() to warn_report() > > Makefil

Re: [Qemu-devel] [PATCH 4/4] s390x/css: fix incorrect length indication

2017-09-11 Thread Cornelia Huck
On Fri, 8 Sep 2017 17:24:46 +0200 Halil Pasic wrote: > We report incorrect length via SCSW program check instead of incorrect > length check (SCWS word 2 bit 10 instead of bit 9). Since we have there > is no fitting errno for incorrect length, and since I don't like what we > do with the errno's

Re: [Qemu-devel] [PULL 0/1] M68k for 2.11 patches

2017-09-11 Thread Peter Maydell
On 10 September 2017 at 17:18, Laurent Vivier wrote: > The following changes since commit fcea73709b966a7ded9efa7b106ea50c7fe9025c: > > Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging > (2017-09-08 16:04:42 +0100) > > are available in the git repository at: > > git:/

[Qemu-devel] [Bug 1716028] Re: qemu 2.10 locks images with no feature flag

2017-09-11 Thread ChristianEhrhardt
Added a qemu task, this seems to be a use case affected by the file locking. In particular a (formerly working) case for multipath tests that use the same image files multiple times intentionally. So far the workaround is to set file.locking=off for all these, which might be just the right thing

[Qemu-devel] [Bug 1716028] Re: qemu 2.10 locks images with no feature flag

2017-09-11 Thread ChristianEhrhardt
Thanks Ryan for filing this bug, as I said in IRC all the file locking is rather new and I think this is for upstream qemu to address. Might just be a missed use case for them as well. I'll be adding an upstream qemu task to get their attention. @Rayn - It would be nice if - from the multipath te

[Qemu-devel] [PATCH 0/2] spapr_pci: some more cleanup

2017-09-11 Thread Greg Kurz
--- Greg Kurz (2): spapr_pci: convert sprintf() to g_strdup_printf() spapr_pci: don't create 64-bit MMIO window if we don't need to hw/ppc/spapr_pci.c | 37 +++-- 1 file changed, 23 insertions(+), 14 deletions(-)

[Qemu-devel] [PATCH 1/2] spapr_pci: convert sprintf() to g_strdup_printf()

2017-09-11 Thread Greg Kurz
In order to follow a QEMU common practice. Signed-off-by: Greg Kurz --- hw/ppc/spapr_pci.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index 75cd9392233e..7d84b9766ed2 100644 --- a/hw/ppc/spapr_pci.c +++ b/h

[Qemu-devel] [PATCH 2/2] spapr_pci: don't create 64-bit MMIO window if we don't need to

2017-09-11 Thread Greg Kurz
When running a pseries-2.2 or older machine type, we get the following lines in info mtree: address-space: memory ... - (prio 0, i/o): alias pci@8002000.mmio64-alias @p...@8002000.mmio - address-space: cpu-memory .

Re: [Qemu-devel] [PATCH 0/2] spapr_pci: some more cleanup

2017-09-11 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PATCH 0/2] spapr_pci: some more cleanup Message-id: 150512483616.8642.15831240906912354238.st...@bahia.lan Type: series === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 tot

Re: [Qemu-devel] [PATCH v3 08/21] s390x: move sclp_service_call() to sclp.h

2017-09-11 Thread Paolo Bonzini
On 10/09/2017 00:07, Eduardo Habkost wrote: > On Fri, Sep 08, 2017 at 02:46:36PM +0200, David Hildenbrand wrote: >> On 08.09.2017 06:21, Thomas Huth wrote: >>> On 07.09.2017 22:13, David Hildenbrand wrote: Implemented in sclp.c, so let's move it to the right include file. Fix up one inclu

Re: [Qemu-devel] [PATCH] MAINTAINERS: update email, add missing test entry for megasas

2017-09-11 Thread Paolo Bonzini
On 10/09/2017 19:15, Philippe Mathieu-Daudé wrote: > and update maintainer email address > > Signed-off-by: Philippe Mathieu-Daudé > --- > Hannes Reinecke replied: > I'm currently on vacation with no internet access, but will be happy to > answer your mail once I'm back at work on Sep, 12th. >

Re: [Qemu-devel] [PATCH] tcg: move atomic_template.h to accel/tcg/

2017-09-11 Thread Paolo Bonzini
On 07/09/2017 11:30, Thomas Huth wrote: > On 13.07.2017 13:35, Paolo Bonzini wrote: >> On 12/07/2017 07:52, Thomas Huth wrote: >>> On 11.07.2017 20:55, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- same as Thomas previous patch. this file had no entry in MA

Re: [Qemu-devel] [PATCH 2/3] iotests: use -ccw on s390x for 051

2017-09-11 Thread Lukáš Doktor
Dne 8.9.2017 v 17:55 Thomas Huth napsal(a): > On 08.09.2017 13:54, Kevin Wolf wrote: >> Am 08.09.2017 um 13:24 hat Cornelia Huck geschrieben: >>> On Fri, 8 Sep 2017 13:04:25 +0200 >>> Kevin Wolf wrote: >>> Am 05.09.2017 um 17:16 hat Cornelia Huck geschrieben: > The default cpu model on s3

Re: [Qemu-devel] [RFC PATCH] osdep.h: Prohibit disabling assert() in supported builds

2017-09-11 Thread Paolo Bonzini
On 06/09/2017 07:26, Thomas Huth wrote: > You asked for opinions, so here's mine: I agree with you, please do > *not* add a new QEMU-specific construct here. assert() should be a > well-known C construct that every programmer should have understood. You > also need it for other projects. If you hav

Re: [Qemu-devel] [RFC v2 0/8] monitor: allow per-monitor thread

2017-09-11 Thread Peter Xu
On Fri, Sep 08, 2017 at 01:49:41PM +0200, Markus Armbruster wrote: > "Dr. David Alan Gilbert" writes: > > > * Markus Armbruster (arm...@redhat.com) wrote: > >> "Dr. David Alan Gilbert" writes: > >> > >> > * Markus Armbruster (arm...@redhat.com) wrote: > >> >> "Daniel P. Berrange" writes: > >>

Re: [Qemu-devel] [PATCH] memory: Rename queue to mrqueue (memory region queue)

2017-09-11 Thread Paolo Bonzini
On 03/09/2017 18:33, Kamil Rytarowski wrote: > SunOS declares struct queue in . > > This fixes build on SmartOS (Joyent). > > Patch cherry-picked from pkgsrc by jperkin (Joyent). > > Signed-off-by: Kamil Rytarowski > --- > memory.c | 22 +++--- > 1 file changed, 11 insertions(+

[Qemu-devel] [PATCH] s390: set DHCP client architecure id for netboot

2017-09-11 Thread Viktor Mihajlovski
Setting the client architecture DHCP option to 0x001f (s390 Basic) [1] allows the DHCP server to return a s390-specific bootfile if wanted. DHCP servers not configured for the option (or not yet recognizing the option value) will continue to work as they have done before. [1] https://www.iana.org/

Re: [Qemu-devel] [RFC v2 0/8] monitor: allow per-monitor thread

2017-09-11 Thread Peter Xu
On Mon, Sep 11, 2017 at 06:32:03PM +0800, Peter Xu wrote: [...] > I think this OOB solution should work for us, though I'm still trying > to digest this whole thing. Thanks Markus for this design, much > appreciated. Meanwhile, sorry to have troubled you on this. I really > didn't mean to! > >

Re: [Qemu-devel] [RFC PATCH] osdep.h: Prohibit disabling assert() in supported builds

2017-09-11 Thread Peter Maydell
On 11 September 2017 at 11:30, Paolo Bonzini wrote: > On 06/09/2017 07:26, Thomas Huth wrote: >> You asked for opinions, so here's mine: I agree with you, please do >> *not* add a new QEMU-specific construct here. assert() should be a >> well-known C construct that every programmer should have und

Re: [Qemu-devel] [RFC v2 0/8] monitor: allow per-monitor thread

2017-09-11 Thread Daniel P. Berrange
On Fri, Sep 08, 2017 at 01:49:41PM +0200, Markus Armbruster wrote: > > I also see the other problem as keeping the management level > > understanding of which commands are asynchronous; Dan's suggestion is > > that command where the management layer specifies which commands it > > expects to be asy

Re: [Qemu-devel] [PATCH v6 04/12] tests: Add vm test lib

2017-09-11 Thread Alex Bennée
Fam Zheng writes: > On Fri, 09/08 16:22, Alex Bennée wrote: >> >> Fam Zheng writes: >> >> > This is the common code to implement a "VM test" to >> > >> > 1) Download and initialize a pre-defined VM that has necessary >> > dependencies to build QEMU and SSH access. >> > >> > 2) Archive $SR

Re: [Qemu-devel] [PATCH] s390: set DHCP client architecure id for netboot

2017-09-11 Thread Christian Borntraeger
On 09/11/2017 12:33 PM, Viktor Mihajlovski wrote: > Setting the client architecture DHCP option to 0x001f (s390 Basic) [1] > allows the DHCP server to return a s390-specific bootfile if wanted. > DHCP servers not configured for the option (or not yet recognizing the > option value) will continue to

Re: [Qemu-devel] [PATCH 3/4] ppc: add CPU access_type into the migration stream

2017-09-11 Thread David Gibson
On Sun, Sep 10, 2017 at 03:37:34PM +0100, Mark Cave-Ayland wrote: > This is referenced in cpu_ppc_handle_mmu_fault() and so should be included > in the migration stream. That is not, on its own, sufficient reason. > Note: the vmstate_ppc version number has already been bumped by the previous > pa

Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] ppc: add CPU IRQ state to PPC VMStateDescription

2017-09-11 Thread David Gibson
On Mon, Sep 11, 2017 at 10:30:33AM +0100, Dr. David Alan Gilbert wrote: > * Greg Kurz (gr...@kaod.org) wrote: > > On Sun, 10 Sep 2017 15:37:33 +0100 > > Mark Cave-Ayland wrote: > > > > > Commit a90db15 "target-ppc: Convert ppc cpu savevm to VMStateDescription" > > > appears to drop the internal C

Re: [Qemu-devel] [PATCH for-2.11] tests: Fix broken ivshmem-server-msi/-irq tests

2017-09-11 Thread David Gibson
On Mon, Sep 11, 2017 at 09:32:07AM +0200, Cornelia Huck wrote: > On Tue, 29 Aug 2017 20:13:36 +0200 > Thomas Huth wrote: > > > Broken with commit b4ba67d9a7025 ("libqos: Change PCI accessors to take > > opaque BAR handle") a while ago, but nobody noticed since the tests are > > only run in SPEED=

Re: [Qemu-devel] [PATCH] x86/acpi: build SRAT when memory hotplug is enabled

2017-09-11 Thread Igor Mammedov
On Tue, 5 Sep 2017 09:17:06 +0800 Dou Liyang wrote: > Hi Eduardo, > > At 09/04/2017 09:08 PM, Eduardo Habkost wrote: > [...] > >> In my opinion, this may also add the hotpluggable memory, and see the > >> following commemts. > >> > >> /* > >> * Entry is required for Windows to enable me

[Qemu-devel] [PATCH] hmp: fix "dump-quest-memory" segfault (ppc)

2017-09-11 Thread Laurent Vivier
Commit fd5d23babf (hmp: fix "dump-quest-memory" segfault) fixes the problem for i386, do the same for ppc. Running QEMU with qemu-system-ppc64 -M none -nographic -m 256 and executing dump-guest-memory /dev/null 0 8192 results in segfault Fix by checking if we have CPU. Signed-off-by: Lau

Re: [Qemu-devel] [PATCH 0/2] spapr_pci: some more cleanup

2017-09-11 Thread Greg Kurz
On Mon, 11 Sep 2017 03:17:45 -0700 (PDT) no-re...@patchew.org wrote: > Hi, > > This series seems to have some coding style problems. See output below for > more information: > > Subject: [Qemu-devel] [PATCH 0/2] spapr_pci: some more cleanup > Message-id: 150512483616.8642.15831240906912354238.st

Re: [Qemu-devel] [PATCH] hmp: fix "dump-quest-memory" segfault (ppc)

2017-09-11 Thread Daniel P. Berrange
On Mon, Sep 11, 2017 at 01:00:37PM +0200, Laurent Vivier wrote: > Commit fd5d23babf (hmp: fix "dump-quest-memory" segfault) > fixes the problem for i386, do the same for ppc. What about all the other targets QEMU supports ? Have you checked if they are similarly affected, as we don't want to wait

[Qemu-devel] [PATCH v3 00/50] Hi,

2017-09-11 Thread Marc-André Lureau
In order to clean-up some hacks in qapi (having to unregister commands at runtime), I proposed a "[PATCH v5 02/20] qapi.py: add a simple #ifdef condition" (see http://lists.gnu.org/archive/html/qemu-devel/2016-08/msg03106.html). However, we decided to drop that patch from the series and solve th

[Qemu-devel] [PATCH v3 02/50] qapi: generate a literal qobject for introspection

2017-09-11 Thread Marc-André Lureau
Replace the generated json string with a literal qobject. The later is easier to deal with, at run time as well as compile time: adding #if conditionals will be easier than in a json string. Signed-off-by: Marc-André Lureau --- scripts/qapi-introspect.py | 83 ++--

[Qemu-devel] [PATCH v3 06/50] qapi: pass 'if' condition into QAPISchemaEntity objects

2017-09-11 Thread Marc-André Lureau
Built-in objects remain unconditional. Explicitly defined objects use the condition specified in the schema. Implicitly defined objects inherit their condition from their users. For most of them, there is exactly one user, so the condition to use is obvious. The exception is the wrapper types g

[Qemu-devel] [PATCH v3 01/50] qlit: add qobject_from_qlit()

2017-09-11 Thread Marc-André Lureau
Instanciate a QObject* form a literal QLitObject. Signed-off-by: Marc-André Lureau --- include/qapi/qmp/qlit.h | 2 ++ qobject/qlit.c | 36 tests/check-qlit.c | 26 ++ 3 files changed, 64 insertions(+) diff --git a/incl

[Qemu-devel] [PATCH v3 03/50] qapi2texi: minor python code simplification

2017-09-11 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- scripts/qapi2texi.py | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/qapi2texi.py b/scripts/qapi2texi.py index a317526e51..73cfb01727 100755 --- a/scripts/qapi2texi.py +++ b/scripts/qapi2texi.py @@ -136,10 +136,9 @@ def texi_

[Qemu-devel] [PATCH v3 05/50] qapi: add tests for invalid 'if'

2017-09-11 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- tests/Makefile.include | 3 +++ tests/qapi-schema/bad-if-empty-list.err | 1 + tests/qapi-schema/bad-if-empty-list.exit | 1 + tests/qapi-schema/bad-if-empty-list.json | 3 +++ tests/qapi-schema/bad-if-empty-list.out | 0 tests/qapi-schema/

[Qemu-devel] [PATCH v3 10/50] qapi-introspect: modify to_qlit() to append ', ' on level > 0

2017-09-11 Thread Marc-André Lureau
The following patch is going to break list entries with #if/#endif, so they should have the trailing ',' as suffix. Signed-off-by: Marc-André Lureau --- scripts/qapi-introspect.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/qapi-introspect.py b/scripts/qapi-int

[Qemu-devel] [PATCH v3 04/50] qapi: add 'if' to top-level expressions

2017-09-11 Thread Marc-André Lureau
Accept 'if' key in top-level elements, accepted as string or list of string type. The following patches will modify the test visitor to check the value is correctly saved, and generate #if/#endif code (as a single #if/endif line or a series for a list). Example of 'if' key: { 'struct': 'TestIfStru

[Qemu-devel] [PATCH v3 09/50] qapi: add #if/#endif helpers

2017-09-11 Thread Marc-André Lureau
Add helpers to wrap generated code with #if/#endif lines. Add a function decorator that will be used to wrap visitor methods. The decorator will check if code was generated before adding #if/#endif lines. Used in the following patches. Signed-off-by: Marc-André Lureau --- scripts/qapi.py | 55 +

[Qemu-devel] [PATCH v3 07/50] qapi: add 'ifcond' to visitor methods

2017-09-11 Thread Marc-André Lureau
Modify the test visitor to check correct passing of values. Signed-off-by: Marc-André Lureau --- scripts/qapi.py| 31 +-- scripts/qapi-commands.py | 2 +- scripts/qapi-event.py | 2 +- scripts/qapi-introspect.py

[Qemu-devel] [PATCH v3 11/50] qapi-introspect: modify to_qlit() to generate #if code

2017-09-11 Thread Marc-André Lureau
The generator now accepts (obj, condition) tuples to wrap generated QLit objects for 'obj' with #if/#endif conditions. Signed-off-by: Marc-André Lureau --- scripts/qapi-introspect.py | 7 +++ 1 file changed, 7 insertions(+) diff --git a/scripts/qapi-introspect.py b/scripts/qapi-introspect.p

[Qemu-devel] [PATCH v3 12/50] qapi-introspect: add preprocessor conditions to generated QLit

2017-09-11 Thread Marc-André Lureau
Add 'ifcond' condition to top-level QLit objects. to_qlit() handles the (obj, ifcond) tuples in previous patch. Signed-off-by: Marc-André Lureau --- scripts/qapi-introspect.py | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/scripts/qapi-introspect.py b/

[Qemu-devel] [PATCH v3 22/50] tests: add some enum members tests

2017-09-11 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- tests/Makefile.include | 3 +++ tests/qapi-schema/enum-dict-member-invalid.err | 1 + tests/qapi-schema/enum-dict-member-invalid.exit | 1 + tests/qapi-schema/enum-dict-member-invalid.json | 2 ++ tests/qapi-schema/enum-dict-membe

[Qemu-devel] [PATCH v3 08/50] qapi: mcgen() shouldn't indent # lines

2017-09-11 Thread Marc-André Lureau
Skip preprocessor lines when adding indentation, since that would likely result in invalid code. Signed-off-by: Marc-André Lureau --- scripts/qapi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qapi.py b/scripts/qapi.py index f2b5a7e131..2a8e60e975 100644 --- a/sc

[Qemu-devel] [PATCH v3 17/50] qapi: do not define enumeration value explicitely

2017-09-11 Thread Marc-André Lureau
The C standard has the initial value at 0 and the subsequent values incremented by 1. No need to set this explicitely. This will prevent from artificial "gaps" when compiling out some enum values and having unnecessarily large MAX values & enums arrays. Signed-off-by: Marc-André Lureau --- scri

[Qemu-devel] [PATCH v3 15/50] qapi-types: refactor variants handling

2017-09-11 Thread Marc-André Lureau
Generate variants objects outside gen_object(). This will allow to easily wrap gen_object() with ifcond_decorator in the following patch. Signed-off-by: Marc-André Lureau --- scripts/qapi-types.py | 37 +++-- 1 file changed, 23 insertions(+), 14 deletions(-) diff

[Qemu-devel] [PATCH v3 32/50] qapi2texi: add 'If:' section to generated documentation

2017-09-11 Thread Marc-André Lureau
The documentation is generated only once, and doesn't know C pre-conditions. Add 'If:' sections for top-level entities. Signed-off-by: Marc-André Lureau --- scripts/qapi2texi.py | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/scripts/qapi2texi.py b/

[Qemu-devel] [PATCH v3 13/50] qapi-commands: add #if conditions to commands

2017-09-11 Thread Marc-André Lureau
Wrap generated code with #if/#endif using the ifcond_decorator. Signed-off-by: Marc-André Lureau --- scripts/qapi-commands.py | 2 ++ tests/test-qmp-commands.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py index 669a

[Qemu-devel] [PATCH v3 21/50] qapi: add #if conditions on generated enum members

2017-09-11 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- scripts/qapi.py | 4 1 file changed, 4 insertions(+) diff --git a/scripts/qapi.py b/scripts/qapi.py index 1535de9ce7..df2a304e8f 100644 --- a/scripts/qapi.py +++ b/scripts/qapi.py @@ -1989,11 +1989,13 @@ const QEnumLookup %(c_name)s_lookup = { ''',

[Qemu-devel] [PATCH v3 34/50] qapi2texi: add 'If:' condition to struct members

2017-09-11 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- scripts/qapi2texi.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/qapi2texi.py b/scripts/qapi2texi.py index 7327245a60..bb819856ef 100755 --- a/scripts/qapi2texi.py +++ b/scripts/qapi2texi.py @@ -138,9 +138,10 @@ def texi_membe

[Qemu-devel] [PATCH v3 18/50] qapi: change enum visitor to take QAPISchemaMember

2017-09-11 Thread Marc-André Lureau
This will allow to add and access more properties associated with enum values/members, like the associated 'if' condition. We may want to have a specialized type QAPISchemaEnumMember, for now this will do. Suggested-by: Markus Armbruster Signed-off-by: Marc-André Lureau --- scripts/qapi.py

[Qemu-devel] [PATCH v3 14/50] qapi-event: add #if conditions to events

2017-09-11 Thread Marc-André Lureau
Wrap generated code with #if/#endif using the ifcond_decorator. Signed-off-by: Marc-André Lureau --- scripts/qapi-event.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/qapi-event.py b/scripts/qapi-event.py index dda496e824..bef301dfe9 100644 --- a/scripts/qapi-event.py +++ b/scr

[Qemu-devel] [PATCH v3 28/50] qapi: add 'if' to alternate variant

2017-09-11 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- scripts/qapi.py | 9 - tests/qapi-schema/qapi-schema-test.json | 6 +- tests/qapi-schema/qapi-schema-test.out | 8 +++- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/scripts/qapi.py b/scripts/qapi.py i

[Qemu-devel] [PATCH v3 38/50] qapi: add conditions to REPLICATION type/commands on the schema

2017-09-11 Thread Marc-André Lureau
Add #if defined(CONFIG_REPLICATION) in generated code, and adjust the code accordingly. Made conditional: * xen-set-replication, query-xen-replication-status, xen-colo-do-checkpoint Before the patch, we first register the commands unconditionally in generated code (requires a stub), then c

[Qemu-devel] [PATCH v3 20/50] qapi-event: add 'if' condition to generated enum

2017-09-11 Thread Marc-André Lureau
Add condition to QAPIEvent enum members based on the event 'if'. Signed-off-by: Marc-André Lureau --- scripts/qapi-event.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qapi-event.py b/scripts/qapi-event.py index 38f4264817..60c6f7030d 100644 --- a/scripts/qapi-eve

[Qemu-devel] [PATCH v3 16/50] qapi-types: add #if conditions to types & visitors

2017-09-11 Thread Marc-André Lureau
Types & visitors are coupled and must be handled together to avoid temporary build regression. Wrap generated types/visitor code with #if/#endif using the ifcond_decorator & helpers. Signed-off-by: Marc-André Lureau --- scripts/qapi-types.py | 18 ++ scripts/qapi-visit.py | 5 +

[Qemu-devel] [PATCH v3 39/50] qapi-commands: don't initialize command list in qmp_init_marshall()

2017-09-11 Thread Marc-André Lureau
This will let the caller add several list of commands. Signed-off-by: Marc-André Lureau --- scripts/qapi-commands.py | 2 -- monitor.c | 1 + qga/main.c| 1 + tests/test-qmp-commands.c | 1 + 4 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/

[Qemu-devel] [PATCH v3 23/50] qapi: add 'if' to struct members and implicit objects members

2017-09-11 Thread Marc-André Lureau
check_type() will now accept a DICT { 'type': TYPENAME, 'if': ... } instead of a TYPENAME. This is the case in various situations where implicit object types are allowed such as commands/events arguments and return type, base and branches of union & alternate. Signed-off-by: Marc-André Lureau ---

[Qemu-devel] [PATCH v3 43/50] build-sys: move qmp-introspect per target

2017-09-11 Thread Marc-André Lureau
The following patches are going to introduce per-target #ifdef, and but the introspection data is generated only once, and must thus be built with the target. Drop "do_test_visitor_in_qmp_introspect(&&qmp_schema_qlit)" since it is no longer in a common object, and covered by "query-qmp-schema test

[Qemu-devel] [PATCH v3 44/50] build-sys: add a target schema

2017-09-11 Thread Marc-André Lureau
This schema is going to contain target-specific commands/events & types, that can be conditionnally guarded with poisoned defines. To filter it out by default, set the unit name to 'target'. And new rules to compile this unit generated files per-target. Use the "-u all" options for the introspect

[Qemu-devel] [PATCH v3 19/50] qapi: add 'if' to enum members

2017-09-11 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- scripts/qapi.py | 39 - tests/Makefile.include | 1 - tests/qapi-schema/enum-dict-member.err | 1 - tests/qapi-schema/enum-dict-member.exit | 1 - tests/qapi-schema/enum-dict-member.j

[Qemu-devel] [PATCH v3 26/50] qapi: add 'if' on union variants

2017-09-11 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- scripts/qapi.py | 15 ++- tests/qapi-schema/qapi-schema-test.json | 7 ++- tests/qapi-schema/qapi-schema-test.out | 8 tests/qapi-schema/test-qapi.py | 5 - 4 files changed, 28 insertions(+), 7

[Qemu-devel] [PATCH v3 47/50] target.json: add a note about query-cpu* not being s390x-specific

2017-09-11 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- qapi/target.json | 6 ++ 1 file changed, 6 insertions(+) diff --git a/qapi/target.json b/qapi/target.json index 3b73a9202f..12002b54d5 100644 --- a/qapi/target.json +++ b/qapi/target.json @@ -77,6 +77,9 @@ # an unknown cpu definition name, unkno

[Qemu-devel] [PATCH v3 50/50] qapi: make query-cpu-definitions depend on specific targets

2017-09-11 Thread Marc-André Lureau
It depends on TARGET_PPC || TARGET_ARM || TARGET_I386 || TARGET_S390X. Signed-off-by: Marc-André Lureau --- qapi-schema.json| 11 --- qapi/target.json| 12 include/sysemu/arch_init.h | 1 - monitor.c | 22 -- qm

[Qemu-devel] [PATCH v3 24/50] qapi: add some struct member tests

2017-09-11 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- tests/Makefile.include| 2 ++ tests/qapi-schema/struct-if-invalid.err | 1 + tests/qapi-schema/struct-if-invalid.exit | 1 + tests/qapi-schema/struct-if-invalid.json | 3 +++ tests/qapi-schema/struct-if-invalid.out | 0 tests/qap

[Qemu-devel] [PATCH v3 49/50] qapi: make query-cpu-model-expansion depend on s390 or x86

2017-09-11 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- qapi-schema.json | 38 - qapi/target.json | 39 ++ include/sysemu/arch_init.h | 3 --- monitor.c | 3 --- qmp

[Qemu-devel] [PATCH v3 33/50] qapi2texi: add 'If:' condition to enum values

2017-09-11 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- scripts/qapi2texi.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/qapi2texi.py b/scripts/qapi2texi.py index 150e7045d2..7327245a60 100755 --- a/scripts/qapi2texi.py +++ b/scripts/qapi2texi.py @@ -130,7 +130,9 @@ def texi_body(

[Qemu-devel] [PATCH v3 25/50] qapi: add #if conditions to generated struct members

2017-09-11 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- scripts/qapi-introspect.py | 2 ++ scripts/qapi-types.py | 2 ++ scripts/qapi-visit.py | 2 ++ 3 files changed, 6 insertions(+) diff --git a/scripts/qapi-introspect.py b/scripts/qapi-introspect.py index 32a58cf879..0e43e470bb 100644 --- a/scripts/qa

[Qemu-devel] [Bug 1716028] Re: qemu 2.10 locks images with no feature flag

2017-09-11 Thread Kevin Wolf
The correct way to query whether file locking is supported is 'query- qmp-schema', which will expose the 'locking' option for the 'file' branch of the 'blockdev-add' command then. As a first comment, in your setup, completely disabling file locking is probably a too big hammer. It is preferable to

[Qemu-devel] [PATCH v3 48/50] qapi: make query-gic-capabilities depend on TARGET_ARM

2017-09-11 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- qapi-schema.json | 43 --- qapi/target.json | 45 + monitor.c| 11 --- target/arm/monitor.c | 2 +- 4 files changed, 46 insertions(+), 55 deletions

[Qemu-devel] [PATCH v3 37/50] qapi: add conditions to SPICE type/commands/events on the schema

2017-09-11 Thread Marc-André Lureau
Add #if defined(CONFIG_SPICE) in generated code, and adjust the qmp/hmp code accordingly. Signed-off-by: Marc-André Lureau --- qapi/char.json | 10 ++ qapi/ui.json | 30 -- monitor.c | 3 --- qmp.c | 16 4 files changed, 26 in

[Qemu-devel] [PATCH v3 27/50] qapi: add #if conditions to generated variants

2017-09-11 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- scripts/qapi-introspect.py | 3 ++- scripts/qapi-types.py | 2 ++ scripts/qapi-visit.py | 4 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/qapi-introspect.py b/scripts/qapi-introspect.py index 0e43e470bb..ef2d5577db 10064

Re: [Qemu-devel] [PATCH] hmp: fix "dump-quest-memory" segfault (ppc)

2017-09-11 Thread Laurent Vivier
On 11/09/2017 13:06, Daniel P. Berrange wrote: > On Mon, Sep 11, 2017 at 01:00:37PM +0200, Laurent Vivier wrote: >> Commit fd5d23babf (hmp: fix "dump-quest-memory" segfault) >> fixes the problem for i386, do the same for ppc. > > What about all the other targets QEMU supports ? Have you checked i

Re: [Qemu-devel] [RFC v2 26/32] vhost: Add VHOST_USER_POSTCOPY_END message

2017-09-11 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Thu, Aug 24, 2017 at 08:27:24PM +0100, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > This message is sent just before the end of postcopy to get the > > client to stop using userfault since we wont respond to any more > >

[Qemu-devel] [PATCH v3 30/50] qapi: add #if conditions to generated alternate variants

2017-09-11 Thread Marc-André Lureau
Mostly covered by previous patches already. Signed-off-by: Marc-André Lureau --- scripts/qapi-introspect.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qapi-introspect.py b/scripts/qapi-introspect.py index ef2d5577db..d6194ff702 100644 --- a/scripts/qapi-introspec

  1   2   3   4   5   >