[Qemu-devel] Functional tests (AKA Avocado-based tests)

2018-01-17 Thread Cleber Rosa
TL;DR = This is about how QEMU developers can get started with functional tests that are built on top of the Avocado libraries (and meant to be run with the Avocado test runner). The past The Avocado project[1] has been working, for quite some time now, on a "set of tools and librar

[Qemu-devel] [PATCH v3 0/3] nvdimm: support MAP_SYNC for memory-backend-file

2018-01-17 Thread Haozhong Zhang
v3 is based on Eduardo's machine-next tree. Changes of memory-backend-file are based on my previous patches in that tree. Linux 4.15 introduces a new mmap flag MAP_SYNC, which can be used to guarantee the write persistence to mmap'ed files supporting DAX (e.g., files on ext4/xfs file system mount

[Qemu-devel] [PATCH v3 3/3] hostmem-file: add 'sync' option

2018-01-17 Thread Haozhong Zhang
This option controls whether QEMU mmap(2) the memory backend file with MAP_SYNC flag, which can fully guarantee the guest write persistence to the backend, if MAP_SYNC flag is supported by the host kernel (Linux kernel 4.15 and later) and the backend is a file supporting DAX (e.g., file on ext4/xfs

[Qemu-devel] [PATCH v3 1/3] util/mmap-alloc: support MAP_SYNC in qemu_ram_mmap()

2018-01-17 Thread Haozhong Zhang
When a file supporting DAX is used as vNVDIMM backend, mmap it with MAP_SYNC flag in addition can guarantee the persistence of guest write to the backend file without other QEMU actions (e.g., periodic fsync() by QEMU). A OnOffAuto parameter 'sync' is added to qemu_ram_mmap(): - If sync == ON_OFF

Re: [Qemu-devel] [PATCH qemu v2] RFC: vfio-pci: Allow mmap of MSIX BAR

2018-01-17 Thread Auger Eric
Hi Alexey, On 16/01/18 06:17, Alexey Kardashevskiy wrote: > On 06/01/18 02:29, Alex Williamson wrote: >> On Fri, 5 Jan 2018 10:48:07 +0100 >> Auger Eric wrote: >> >>> Hi Alexey, >>> >>> On 15/12/17 07:29, Alexey Kardashevskiy wrote: This makes use of a new VFIO_REGION_INFO_CAP_MSIX_MAPPABLE

[Qemu-devel] [PATCH v3 2/3] hostmem: add more information in error messages

2018-01-17 Thread Haozhong Zhang
When there are multiple memory backends in use, including the object type name, ID and the property name in the error message can help users to locate the error. Signed-off-by: Haozhong Zhang Suggested-by: "Dr. David Alan Gilbert" --- backends/hostmem-file.c | 9 ++--- backends/hostmem.c

Re: [Qemu-devel] [PATCH v3 5/8] s390-ccw: interactive boot menu for eckd dasd (read stage2 data)

2018-01-17 Thread Thomas Huth
On 15.01.2018 17:44, Collin L. Walling wrote: > Read the stage2 boot loader data block-by-block. We scan the > current block for the string "zIPL" to detect the start of the > boot menu banner. We then load the adjacent blocks (previous > block and next block) to account for the possibility of menu

Re: [Qemu-devel] vhost-pci and virtio-vhost-user

2018-01-17 Thread Wei Wang
On 01/16/2018 01:33 PM, Jason Wang wrote: On 2018年01月15日 18:43, Wei Wang wrote: On 01/15/2018 04:34 PM, Jason Wang wrote: On 2018年01月15日 15:59, Wei Wang wrote: On 01/15/2018 02:56 PM, Jason Wang wrote: On 2018年01月12日 18:18, Stefan Hajnoczi wrote: I just fail understand why we can't

Re: [Qemu-devel] [Qemu-ppc] [QEMU-PPC] [PATCH V3 0/6] target/ppc: Rework spapr_caps

2018-01-17 Thread Andrea Bolognani
On Wed, 2018-01-17 at 10:26 +1100, Alexey Kardashevskiy wrote: > On 17/01/18 09:34, David Gibson wrote: > > On Tue, Jan 16, 2018 at 03:46:20PM +0100, Andrea Bolognani wrote: > > > On Wed, 2018-01-17 at 00:54 +1100, David Gibson wrote: > > > > > Correct me if I'm wrong, but it seems to me like there

Re: [Qemu-devel] [PATCH v3 6/8] s390-ccw: interactive boot menu for eckd dasd (print menu)

2018-01-17 Thread Thomas Huth
On 15.01.2018 17:44, Collin L. Walling wrote: > Prints the menu data starting from the zIPL menu banner. > > Signed-off-by: Collin L. Walling > --- [...] > static void run_eckd_boot_script(block_number_t mbr_block_nr, > diff --git a/pc-bios/s390-ccw/menu.c b/pc-bios/s390-ccw/menu.c > index e15a7

[Qemu-devel] [PATCH] block: add block_set_io_throttle virtio-blk-pci QMP example

2018-01-17 Thread Stefan Hajnoczi
The block_set_io_throttle command can look up BlockBackends by the attached qdev device ID. virtio-blk-pci is a special case because the actual VirtIOBlock device is the "/virtio-backend" child of the PCI adapter device. Add a QMP schema example so clients will know how to use block_set_io_thrott

Re: [Qemu-devel] [qemu-s390x] [PATCH v3 5/8] s390-ccw: interactive boot menu for eckd dasd (read stage2 data)

2018-01-17 Thread Thomas Huth
On 17.01.2018 09:38, Thomas Huth wrote: > On 15.01.2018 17:44, Collin L. Walling wrote: [...] >> +if (find_zipl_boot_menu_banner(&offset)) { >> +/* Load the adjacent blocks to account for the >> + * possibility of menu data spanning multiple blocks. >> +

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2018-01-17 Thread Cédric Le Goater
>>> Also, have we decided how the process of switching between XICS and >>> XIVE will work vs. CAS ? >> >> That's how it is described in the architecture. The current choice is >> to create both XICS and XIVE objects and choose at CAS which one to >> use. It relies today on the capability of the p

Re: [Qemu-devel] [PATCH v2 0/4] linux-user: select CPU type according ELF header values

2018-01-17 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20180116172510.28878-1-laur...@vivier.eu Subject: [Qemu-devel] [PATCH v2 0/4] linux-user: select CPU type according ELF header values === TEST SCRIPT BEGIN === #!/bin/bash

[Qemu-devel] [PATCH 1/3] spapr: drop duplicate variable in spapr_core_plug()

2018-01-17 Thread Greg Kurz
A variable is already defined at the begining of the function to hold a pointer to the CPU core object: sPAPRCPUCore *core = SPAPR_CPU_CORE(OBJECT(dev)); No need to define it again in the pre-2.10 compatibility code snipplet. Signed-off-by: Greg Kurz --- hw/ppc/spapr.c |4 +--- 1 file

[Qemu-devel] [PATCH 3/3] spapr: fix device tree properties when using compatibility mode

2018-01-17 Thread Greg Kurz
Commit 51f84465dd98 changed the compatility mode setting logic: - machine reset only sets compatibility mode for the boot CPU - compatibility mode is set for other CPUs when they are put online by the guest with the "start-cpu" RTAS call This causes a regression for machines started with max-com

[Qemu-devel] [PATCH 2/3] spapr_cpu_core: don't reset CPUs during realization

2018-01-17 Thread Greg Kurz
When QEMU is started, all cold-plugged CPUs are reset twice: first during initialization and then during machine reset. This is sub- optimal. The first reset is only needed for hot-plugged CPUs because the CPU hotplug code doesn't reset them. This patch adds the necessary code to reset hot-plugged

[Qemu-devel] [PATCH 0/3] spapr: fix CPU device tree nodes

2018-01-17 Thread Greg Kurz
When a compatibility mode is requested on the command line, only the boot CPU core is correctly advertised in the device tree. Any other CPU core, either hot-plugged or cold-plugged, appears to be in raw mode with the host PVR. Guest started on a POWER8 host with: -smp cores=2 -machine pserie

Re: [Qemu-devel] [PATCH 0/3 v2] virtio: improve virtio devices initialization time

2018-01-17 Thread Gal Hammer
Hi Ray, On Tue, Jan 16, 2018 at 5:40 PM, Kinsella, Ray wrote: > Hi Gal, > > Brilliant - will test this in the next day or two. > Hopefully this will help resolve the issues I reported last summer. > > http://lists.nongnu.org/archive/html/qemu-devel/2017-07/msg05268.html Thanks for the compliment

Re: [Qemu-devel] [PATCH v5 0/2] qemu-img: Document --force-share / -U

2018-01-17 Thread Kashyap Chamarthy
On Tue, Dec 26, 2017 at 10:52:45AM +0800, Fam Zheng wrote: > v5: Clean up the @table @var section first. [Kevin, Peter] > > Fam Zheng (2): > qemu-img.texi: Clean up parameter list > qemu-img: Document --force-share / -U Reviewed-by: Kashyap Chamarthy This documentation patch should really b

Re: [Qemu-devel] [PATCH V7 3/5] docs: add pvrdma device documentation.

2018-01-17 Thread Marcel Apfelbaum
Hi Michael, On 16/01/2018 4:06, Michael S. Tsirkin wrote: On Sun, Jan 14, 2018 at 11:01:45AM +0200, Marcel Apfelbaum wrote: +5. Limitations +== Limitations are fine but need to cause init failures since users don't poke in the internal documentation. Good point, thanks. +- Th

Re: [Qemu-devel] [PATCH v2 1/8] docker: sort images list displayed by 'make docker'

2018-01-17 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > we can now directly see different version sort consecutively. > > Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée > --- > tests/docker/Makefile.include | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/docker/Mak

Re: [Qemu-devel] [PATCH v2 1/8] docker: sort images list displayed by 'make docker'

2018-01-17 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > we can now directly see different version sort consecutively. > > Signed-off-by: Philippe Mathieu-Daudé I of course meant: Reviewed-by: Alex Bennée > --- > tests/docker/Makefile.include | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

[Qemu-devel] [PATCH V8 1/4] mem: add share parameter to memory-backend-ram

2018-01-17 Thread Marcel Apfelbaum
Currently only file backed memory backend can be created with a "share" flag in order to allow sharing guest RAM with other processes in the host. Add the "share" flag also to RAM Memory Backend in order to allow remapping parts of the guest RAM to different host virtual addresses. This is needed

[Qemu-devel] [PATCH V8 0/4] hw/pvrdma: PVRDMA device implementation

2018-01-17 Thread Marcel Apfelbaum
V7 -> V8: - Addressed Michael S. Tsirkin comments: - fail to init the pvrdma device if target page size is different from the host size, or if the guest RAM is not backed by memory and shared. - Update documentation to include a note on huge memory regions registration and rem

[Qemu-devel] [PATCH V8 2/4] docs: add pvrdma device documentation.

2018-01-17 Thread Marcel Apfelbaum
Signed-off-by: Marcel Apfelbaum Signed-off-by: Yuval Shaia Reviewed-by: Shamir Rabinovitch --- docs/pvrdma.txt | 255 1 file changed, 255 insertions(+) create mode 100644 docs/pvrdma.txt diff --git a/docs/pvrdma.txt b/docs/pvrdma.txt ne

[Qemu-devel] [PATCH V8 4/4] MAINTAINERS: add entry for hw/rdma

2018-01-17 Thread Marcel Apfelbaum
Signed-off-by: Marcel Apfelbaum Signed-off-by: Yuval Shaia --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 4770f105d4..fc4f54eebb 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1984,6 +1984,14 @@ F: block/replication.c F: tests/test-re

Re: [Qemu-devel] [PATCH v3 7/8] s390-ccw: interactive boot menu for eckd dasd (read input)

2018-01-17 Thread Thomas Huth
On 15.01.2018 17:44, Collin L. Walling wrote: > When the boot menu options are present and the guest's > disk has been configured by the zipl tool, then the user > will be presented with an interactive boot menu with > labeled entries. An example of what the menu might look > like: > > zIPL v1.37.

Re: [Qemu-devel] [Qemu-block] [PATCH] block: add block_set_io_throttle virtio-blk-pci QMP example

2018-01-17 Thread Alberto Garcia
On Wed 17 Jan 2018 10:07:00 AM CET, Stefan Hajnoczi wrote: > The block_set_io_throttle command can look up BlockBackends by the > attached qdev device ID. virtio-blk-pci is a special case because the > actual VirtIOBlock device is the "/virtio-backend" child of the PCI > adapter device. > > Add a

Re: [Qemu-devel] [PATCH v3 8/8] s390-ccw: interactive boot menu for scsi

2018-01-17 Thread Thomas Huth
On 15.01.2018 17:44, Collin L. Walling wrote: > Interactive boot menu for scsi. This follows the same procedure > as the interactive menu for eckd dasd. An example follows: > > s390x Enumerated Boot Menu. > > 3 entries detected. Select from index 0 to 2. > > Please choose: > > Signe

Re: [Qemu-devel] [PATCH 0/7] docker: update Ubuntu and Fedora images, deprecate old ones

2018-01-17 Thread Daniel P. Berrange
On Wed, Jan 17, 2018 at 10:26:36AM +0800, Fam Zheng wrote: > > > On 01/12/2018 08:49 PM, Philippe Mathieu-Daudé wrote: > > Hi, > > > > This series is to be clearer about which upstream version we are using. > > > > All "FROM distrib:latest" entries have now been removed and replaced by > > expl

Re: [Qemu-devel] [PATCH] Add ability to provide ifname when using netdev bridge or tap helper

2018-01-17 Thread Daniel P. Berrange
On Tue, Jan 16, 2018 at 03:18:24PM -0800, Shaun Reitan wrote: > This patch replaces the patch I sent yesturday. This one fixes > a bug in my original code as well as corrects a few styling > issues. Hopfully this one comes out correct! Sorry for the > inconvienece. > > When currently using -netd

Re: [Qemu-devel] [PATCH RESEND v1 1/2] i386: Add Intel Processor Trace feature support

2018-01-17 Thread Kang, Luwei
> > > > On Mon, Jan 15, 2018 at 12:04:55 -0200, Eduardo Habkost wrote: > > > > > CCing libvirt developers. > > > > ... > > > > > This case is slightly more problematic, however: the new feature > > > > > is actually migratable (under very controlled circumstances) > > > > > because of patch 2/2, bu

Re: [Qemu-devel] [PATCH] Add ability to provide ifname when using netdev bridge or tap helper

2018-01-17 Thread Paolo Bonzini
On 17/01/2018 11:31, Daniel P. Berrange wrote: > > eg consider the user asks for a tap device called eth1. To the > sysadmin the user's tap device now looks like a physical NIC. > This can be even worse if the host does physical NIC hotplug, > or uses SRIOV. eg consider the host as eth0 -> eth7 f

Re: [Qemu-devel] [PATCH v2] usb-storage: Fix share-rw option parsing

2018-01-17 Thread Darren Kenny
The code changes look good. Reviewed-by: Darren Kenny Thanks, Darren. On Wed, Jan 17, 2018 at 08:52:22AM +0800, Fam Zheng wrote: Because usb-storage creates an internal scsi device, we should propagate options. We already do so for bootindex etc, but failed to take care of share-rw. Fix it

Re: [Qemu-devel] [PATCH v2] file-posix: specify expected filetypes

2018-01-17 Thread Kevin Wolf
Am 15.01.2018 um 23:50 hat John Snow geschrieben: > I don't think there's a legitimate reason to open directories as if > they were files. This prevents QEMU from opening and attempting to probe > a directory inode, which can break in exciting ways. One of those ways > is lseek on ext4/xfs, which w

Re: [Qemu-devel] [PATCH v5 1/9] microblaze: boot.c: Don't try to find NULL pointer

2018-01-17 Thread Edgar E. Iglesias
On Tue, Jan 16, 2018 at 03:22:20PM -0800, Alistair Francis wrote: > Previously if no device tree was passed to microblaze_load_kernel() then > qemu_find_file() would try to find a NULL pointer. To avoid this put a > check around qemu_find_file(). > > Signed-off-by: Alistair Francis > Reported-by:

Re: [Qemu-devel] [PATCH] Add ability to provide ifname when using netdev bridge or tap helper

2018-01-17 Thread Jason Wang
On 2018年01月17日 18:31, Daniel P. Berrange wrote: On Tue, Jan 16, 2018 at 03:18:24PM -0800, Shaun Reitan wrote: This patch replaces the patch I sent yesturday. This one fixes a bug in my original code as well as corrects a few styling issues. Hopfully this one comes out correct! Sorry for the i

Re: [Qemu-devel] [PATCH 0/3 v2] virtio: improve virtio devices initialization time

2018-01-17 Thread Kinsella, Ray
Hi Gal, So the good news is that before I applied your patch I found that initialization time has improved. For 128 virtio-net devices it has gone from 137s the last time I tested it, to 40s today. The bad news is that for 256 virtio-net devices - it now just hangs. However when I apply yo

Re: [Qemu-devel] [PATCH v2 7/8] docker: warn users to use newer fedora25/fedora27 base image

2018-01-17 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > deprecate the generic 'fedora' image, but stay backward incompatible > > Signed-off-by: Philippe Mathieu-Daudé What clashed with this? > --- > tests/docker/Makefile.include| 3 ++- > tests/docker/dockerfiles/fedora.docker | 29 -

Re: [Qemu-devel] [PATCH] Add ability to provide ifname when using netdev bridge or tap helper

2018-01-17 Thread Daniel P. Berrange
On Wed, Jan 17, 2018 at 06:53:30PM +0800, Jason Wang wrote: > > > On 2018年01月17日 18:31, Daniel P. Berrange wrote: > > On Tue, Jan 16, 2018 at 03:18:24PM -0800, Shaun Reitan wrote: > > > This patch replaces the patch I sent yesturday. This one fixes > > > a bug in my original code as well as corre

[Qemu-devel] [PATCH 0/7] Call check and invalidate_cache from coroutine context

2018-01-17 Thread Paolo Bonzini
Check and invalidate_cache share some parts of the implementation with the regular I/O path. This is sometimes complicated because the I/O path wants to use a CoMutex but that is not possible outside coroutine context. By moving things to coroutine context, we can remove special cases. In fact,

Re: [Qemu-devel] [PATCH v2 2/8] docker: do not display deprecated images in 'make docker' help

2018-01-17 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > the 'debian' base image is deprecated since 3e11974988d8 > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée > --- > tests/docker/Makefile.include | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/tests/docker/Makef

[Qemu-devel] [PATCH 2/7] qcow2: make qcow2_co_create2() a coroutine_fn

2018-01-17 Thread Paolo Bonzini
From: Stefan Hajnoczi qcow2_create2() calls qemu_co_mutex_lock(). Only a coroutine_fn may call another coroutine_fn. Rename the function (the block layer API is now called .bdrv_co_create()) and add coroutine_fn. It is always called from coroutine context. Reported-by: Marc-André Lureau Sign

[Qemu-devel] [PATCH 5/7] block: convert bdrv_invalidate_cache callback to coroutine_fn

2018-01-17 Thread Paolo Bonzini
QED's bdrv_invalidate_cache implementation would like to reuse functions that acquire/release the metadata locks. Call it from coroutine context to simplify the logic. Signed-off-by: Paolo Bonzini --- block.c | 41 + block/iscsi.c

[Qemu-devel] [PATCH 3/7] qcow2: make qcow2_do_open a coroutine_fn

2018-01-17 Thread Paolo Bonzini
It is called from qcow2_invalidate_cache in coroutine context (incoming migration runs in a coroutine), so it's cleaner if metadata is always loaded from a coroutine. Signed-off-by: Paolo Bonzini --- block/qcow2.c | 46 +- 1 file changed, 41 insertions

[Qemu-devel] [PATCH 1/7] block: rename .bdrv_create() to .bdrv_co_create()

2018-01-17 Thread Paolo Bonzini
From: Stefan Hajnoczi BlockDriver->bdrv_create() has been called from coroutine context since commit 5b7e1542cfa41a281af9629d31cef03704d976e6 ("block: make bdrv_create adopt coroutine"). Make this explicit by renaming to .bdrv_co_create() and add the coroutine_fn annotation. This makes it obvio

[Qemu-devel] [PATCH 6/7] qcow2: introduce qcow2_write_caches and qcow2_flush_caches

2018-01-17 Thread Paolo Bonzini
Avoid recursively taking s->lock during bdrv_check. Signed-off-by: Paolo Bonzini --- block/qcow2-refcount.c | 28 block/qcow2.c | 20 block/qcow2.h | 2 ++ 3 files changed, 34 insertions(+), 16 deletions(-) diff --git a/block/

[Qemu-devel] [PATCH 4/7] qed: make bdrv_qed_do_open a coroutine_fn

2018-01-17 Thread Paolo Bonzini
It is called from qcow2_invalidate_cache in coroutine context (incoming migration runs in a coroutine), so it's cleaner if metadata is always loaded from a coroutine. Signed-off-by: Paolo Bonzini --- block/qed.c | 40 +--- 1 file changed, 37 insertions(+), 3 d

[Qemu-devel] [PATCH 7/7] block: convert bdrv_check callback to coroutine_fn

2018-01-17 Thread Paolo Bonzini
Suggested-by: Kevin Wolf Signed-off-by: Paolo Bonzini --- block.c | 43 --- block/parallels.c | 17 +++-- block/qcow2.c | 23 +++ block/qed-check.c | 1 + block/qed-table.c

Re: [Qemu-devel] [PATCH v2 4/8] docker: do not use Trusty APT source in Xenial

2018-01-17 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > probably missed in 7fc581c29518 > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée > --- > tests/docker/dockerfiles/ubuntu.docker | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/tests/docker/dockerfiles/ubuntu.docker > b/tests/dock

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2018-01-17 Thread Benjamin Herrenschmidt
On Wed, 2018-01-17 at 10:18 +0100, Cédric Le Goater wrote: > > > > Also, have we decided how the process of switching between XICS and > > > > XIVE will work vs. CAS ? > > > > > > That's how it is described in the architecture. The current choice is > > > to create both XICS and XIVE objects and

Re: [Qemu-devel] [PATCH 0/7] Call check and invalidate_cache from coroutine context

2018-01-17 Thread no-reply
Hi, This series failed docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. Type: series Message-id: 1516186851-23896-1-git-send-email-pbonz...@redhat.com Subject: [Qemu-devel] [PATCH 0/7] Ca

Re: [Qemu-devel] [PATCH V8 0/4] hw/pvrdma: PVRDMA device implementation

2018-01-17 Thread Yuval Shaia
On Wed, Jan 17, 2018 at 02:50:53AM -0800, no-re...@patchew.org wrote: > Hi, > > This series failed build test on ppc host. Please find the details below. > > Subject: [Qemu-devel] [PATCH V8 0/4] hw/pvrdma: PVRDMA device implementation > Type: series > Message-id: 20180117095421.124787-1-mar...@re

[Qemu-devel] [PATCH 3/7] qcow2: make qcow2_do_open a coroutine_fn

2018-01-17 Thread Paolo Bonzini
It is called from qcow2_invalidate_cache in coroutine context (incoming migration runs in a coroutine), so it's cleaner if metadata is always loaded from a coroutine. Signed-off-by: Paolo Bonzini --- block/qcow2.c | 46 +- 1 file changed, 41 insertions

[Qemu-devel] [PATCH 2/7] qcow2: make qcow2_co_create2() a coroutine_fn

2018-01-17 Thread Paolo Bonzini
From: Stefan Hajnoczi qcow2_create2() calls qemu_co_mutex_lock(). Only a coroutine_fn may call another coroutine_fn. Rename the function (the block layer API is now called .bdrv_co_create()) and add coroutine_fn. It is always called from coroutine context. Reported-by: Marc-André Lureau Sign

[Qemu-devel] [PATCH v2 0/7] Call check and invalidate_cache from coroutine context

2018-01-17 Thread Paolo Bonzini
Check and invalidate_cache share some parts of the implementation with the regular I/O path. This is sometimes complicated because the I/O path wants to use a CoMutex but that is not possible outside coroutine context. By moving things to coroutine context, we can remove special cases. In fact,

[Qemu-devel] [PATCH 6/7] qcow2: introduce qcow2_write_caches and qcow2_flush_caches

2018-01-17 Thread Paolo Bonzini
Avoid recursively taking s->lock during bdrv_check. Signed-off-by: Paolo Bonzini --- block/qcow2-refcount.c | 28 block/qcow2.c | 20 block/qcow2.h | 2 ++ 3 files changed, 34 insertions(+), 16 deletions(-) diff --git a/block/

[Qemu-devel] [PATCH 5/7] block: convert bdrv_invalidate_cache callback to coroutine_fn

2018-01-17 Thread Paolo Bonzini
QED's bdrv_invalidate_cache implementation would like to reuse functions that acquire/release the metadata locks. Call it from coroutine context to simplify the logic. Signed-off-by: Paolo Bonzini --- block.c | 41 + block/iscsi.c

[Qemu-devel] [PATCH 7/7] block: convert bdrv_check callback to coroutine_fn

2018-01-17 Thread Paolo Bonzini
Suggested-by: Kevin Wolf Signed-off-by: Paolo Bonzini --- block.c | 43 --- block/parallels.c | 17 +++-- block/qcow2.c | 23 +++ block/qed-check.c | 1 + block/qed-table.c

[Qemu-devel] [PATCH 1/7] block: rename .bdrv_create() to .bdrv_co_create()

2018-01-17 Thread Paolo Bonzini
From: Stefan Hajnoczi BlockDriver->bdrv_create() has been called from coroutine context since commit 5b7e1542cfa41a281af9629d31cef03704d976e6 ("block: make bdrv_create adopt coroutine"). Make this explicit by renaming to .bdrv_co_create() and add the coroutine_fn annotation. This makes it obvio

[Qemu-devel] [PATCH 4/7] qed: make bdrv_qed_do_open a coroutine_fn

2018-01-17 Thread Paolo Bonzini
It is called from qcow2_invalidate_cache in coroutine context (incoming migration runs in a coroutine), so it's cleaner if metadata is always loaded from a coroutine. Signed-off-by: Paolo Bonzini --- block/qed.c | 40 +--- 1 file changed, 37 insertions(+), 3 d

Re: [Qemu-devel] [PATCH v3 1/4] cryptodev: add vhost-user as a new cryptodev backend

2018-01-17 Thread Gonglei (Arei)
> -Original Message- > From: Zhoujian (jay) > Sent: Wednesday, January 17, 2018 1:01 PM > To: Michael S. Tsirkin > Cc: pa...@linux.vnet.ibm.com; Huangweidong (C); xin.z...@intel.com; > qemu-devel@nongnu.org; Gonglei (Arei); roy.fan.zh...@intel.com; > stefa...@redhat.com; pbonz...@redhat.c

Re: [Qemu-devel] [PATCH v1 1/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ

2018-01-17 Thread Juan Quintela
Wei Wang wrote: > The new feature enables the virtio-balloon device to receive the hint of > guest free pages from the free page vq, and clears the corresponding bits > of the free page from the dirty bitmap, so that those free pages are not > transferred by the migration thread. > > Without this

[Qemu-devel] [PATCH] dump-guest-memory.py: fix python 2 support

2018-01-17 Thread Marc-André Lureau
Python GDB support may use Python 2 or 3. Inferior.read_memory() may return a buffer with Python 2 or a memoryview with Python 3 (see also https://sourceware.org/gdb/onlinedocs/gdb/Inferiors-In-Python.html) The elf.add_vmcoreinfo_note() method expect a byte string, but Python 2 buffer doesn't pro

Re: [Qemu-devel] [PATCH v2 4/8] docker: do not use Trusty APT source in Xenial

2018-01-17 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > probably missed in 7fc581c29518 > > Signed-off-by: Philippe Mathieu-Daudé > --- > tests/docker/dockerfiles/ubuntu.docker | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/tests/docker/dockerfiles/ubuntu.docker > b/tests/docker/dockerfiles/ubuntu.docker

Re: [Qemu-devel] [PATCH v2 5/8] docker: warn users to use ubuntu16.04 for the LTS Xenial image

2018-01-17 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > deprecate the generic 'ubuntu' image, but stay backward incompatible > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée > --- > tests/docker/Makefile.include | 3 ++- > tests/docker/dockerfiles/ubuntu.docker | 26 +

Re: [Qemu-devel] [PATCH v2 8/8] docker: fix typo

2018-01-17 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée > --- > tests/docker/Makefile.include | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include > index 950ef51d35..a8

Re: [Qemu-devel] [qemu-s390x] [PATCH v3 4/8] s390-ccw: interactive boot menu for eckd dasd (menu setup)

2018-01-17 Thread Collin L. Walling
On 01/17/2018 01:11 AM, Thomas Huth wrote: On 16.01.2018 20:37, Collin L. Walling wrote: On 01/16/2018 01:23 PM, Thomas Huth wrote: On 15.01.2018 17:44, Collin L. Walling wrote: Reads boot menu flag and timeout values from the iplb and sets the respective fields for the menu. Signed-off-by: C

Re: [Qemu-devel] [PATCH v2 4/8] docker: do not use Trusty APT source in Xenial

2018-01-17 Thread Philippe Mathieu-Daudé
On 01/17/2018 08:54 AM, Alex Bennée wrote: > > Philippe Mathieu-Daudé writes: > >> probably missed in 7fc581c29518 >> >> Signed-off-by: Philippe Mathieu-Daudé >> --- >> tests/docker/dockerfiles/ubuntu.docker | 2 -- >> 1 file changed, 2 deletions(-) >> >> diff --git a/tests/docker/dockerfiles/

Re: [Qemu-devel] [qemu-s390x] [PATCH v3 5/8] s390-ccw: interactive boot menu for eckd dasd (read stage2 data)

2018-01-17 Thread Collin L. Walling
On 01/17/2018 03:38 AM, Thomas Huth wrote: On 15.01.2018 17:44, Collin L. Walling wrote: Read the stage2 boot loader data block-by-block. We scan the current block for the string "zIPL" to detect the start of the boot menu banner. We then load the adjacent blocks (previous block and next block)

Re: [Qemu-devel] [PATCH 05/11] virtio-ccw: convert VirtIOCCWDeviceClass::init -> realize

2018-01-17 Thread Philippe Mathieu-Daudé
On 01/16/2018 01:52 PM, Cornelia Huck wrote: > On Tue, 16 Jan 2018 10:15:49 -0300 > Philippe Mathieu-Daudé wrote: > >> Signed-off-by: Philippe Mathieu-Daudé >> --- >> hw/s390x/virtio-ccw.h | 2 +- >> hw/s390x/virtio-ccw.c | 35 +-- >> 2 files changed, 18 inserti

Re: [Qemu-devel] [PATCH v1 1/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ

2018-01-17 Thread Juan Quintela
Wei Wang wrote: > The new feature enables the virtio-balloon device to receive the hint of > guest free pages from the free page vq, and clears the corresponding bits > of the free page from the dirty bitmap, so that those free pages are not > transferred by the migration thread. > > Without this

Re: [Qemu-devel] [PATCH v2 02/32] qcow2: Add table size field to Qcow2Cache

2018-01-17 Thread Alberto Garcia
On Tue 16 Jan 2018 10:05:08 PM CET, Eric Blake wrote: >> @@ -331,7 +330,7 @@ static int qcow2_cache_do_get(BlockDriverState *bs, >> Qcow2Cache *c, >> trace_qcow2_cache_get(qemu_coroutine_self(), c == s->l2_table_cache, >>offset, read_from_disk); >> >> -if (of

Re: [Qemu-devel] [PATCH v2 0/7] Call check and invalidate_cache from coroutine context

2018-01-17 Thread Kevin Wolf
Am 17.01.2018 um 12:25 hat Paolo Bonzini geschrieben: > Check and invalidate_cache share some parts of the implementation > with the regular I/O path. This is sometimes complicated because the > I/O path wants to use a CoMutex but that is not possible outside coroutine > context. By moving things

Re: [Qemu-devel] [PATCH v2 0/7] Call check and invalidate_cache from coroutine context

2018-01-17 Thread Paolo Bonzini
On 17/01/2018 13:59, Kevin Wolf wrote: > Am 17.01.2018 um 12:25 hat Paolo Bonzini geschrieben: >> Check and invalidate_cache share some parts of the implementation >> with the regular I/O path. This is sometimes complicated because the >> I/O path wants to use a CoMutex but that is not possible ou

[Qemu-devel] [RFC PATCH 1/3] compiler: add QEMU_WARN_NONNULL_ARGS()

2018-01-17 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/compiler.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h index 340e5fdc09..d9b2489391 100644 --- a/include/qemu/compiler.h +++ b/include/qemu/compiler.h @@ -26,6 +26,8 @@ #define QE

[Qemu-devel] [RFC PATCH 3/3] utils: let qemu_find_file() use QEMU_WARN_NONNULL_ARGS()

2018-01-17 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- include/qemu-common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/qemu-common.h b/include/qemu-common.h index 05319b9ddc..337203e7c3 100644 --- a/include/qemu-common.h +++ b/include/qemu-common.h @@ -134,7 +134,7 @@ const c

[Qemu-devel] [RFC PATCH 0/3] add QEMU_WARN_NONNULL_ARGS() macro

2018-01-17 Thread Philippe Mathieu-Daudé
Some old PoC series I remember after reading http://lists.nongnu.org/archive/html/qemu-devel/2018-01/msg03545.html I had few more changes but then I found the code was harder to read so I didn't continue further. Only 2 patches are included as example. This might still be useful in few cases, so

Re: [Qemu-devel] [Qemu-arm] [PATCH v5 1/9] microblaze: boot.c: Don't try to find NULL pointer

2018-01-17 Thread Philippe Mathieu-Daudé
Hi Alistair, Maybe reworded "Don't try to find NULL file" On 01/16/2018 08:22 PM, Alistair Francis wrote: > Previously if no device tree was passed to microblaze_load_kernel() then > qemu_find_file() would try to find a NULL pointer. To avoid this put a > check around qemu_find_file(). > > Signe

[Qemu-devel] [RFC PATCH 2/3] virtio: let virtio_add/clear_feature() use QEMU_WARN_NONNULL_ARGS()

2018-01-17 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- include/hw/virtio/virtio.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index 098bdaaea3..d63be28039 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -292,12 +292,

Re: [Qemu-devel] [qemu-s390x] [PATCH v3 7/8] s390-ccw: interactive boot menu for eckd dasd (read input)

2018-01-17 Thread Collin L. Walling
On 01/17/2018 05:10 AM, Thomas Huth wrote: On 15.01.2018 17:44, Collin L. Walling wrote: When the boot menu options are present and the guest's disk has been configured by the zipl tool, then the user will be presented with an interactive boot menu with labeled entries. An example of what the me

Re: [Qemu-devel] [PATCH for-2.12 0/1] qcow2: Repair unaligned preallocated zero clusters

2018-01-17 Thread Max Reitz
On 2017-11-10 21:37, Max Reitz wrote: > This is a follow-up to patch 2 of my "qcow2: Unaligned zero cluster in > handle_alloc()" series. That patch adds a way to correctly deal with > such clusters, this patch here adds a way to repair them. > > Naturally, this patch is therefore based on that se

Re: [Qemu-devel] [PATCH for-2.12 0/4] blockdev: Mark BD-{remove, insert}-medium stable

2018-01-17 Thread Max Reitz
On 2017-11-10 23:42, Max Reitz wrote: > Berto's "Test I/O limits with removable media" patch proves that > throttling survives a blockdev-remove-medium/blockdev-insert-medium pair > now, so let's mark them stable (because that was the reason they were > considered experimental, see commit > 6e0abc2

Re: [Qemu-devel] [PATCH] Add ability to provide ifname when using netdev bridge or tap helper

2018-01-17 Thread Philippe Mathieu-Daudé
On 01/17/2018 07:39 AM, Paolo Bonzini wrote: > On 17/01/2018 11:31, Daniel P. Berrange wrote: >> >> eg consider the user asks for a tap device called eth1. To the >> sysadmin the user's tap device now looks like a physical NIC. >> This can be even worse if the host does physical NIC hotplug, >> or

Re: [Qemu-devel] [PATCH for-2.12] qemu-iotests: Fix locking issue in 102

2018-01-17 Thread Max Reitz
On 2017-11-29 19:51, Max Reitz wrote: > 102 truncates a qcow2 file (the raw file) on purpose while a VM is > running. However, image locking will usually prevent exactly this. > > The fact that most people have not noticed until now (I suppose you may > have seen sporadic failures, but not taken

Re: [Qemu-devel] [RFC PATCH 1/3] compiler: add QEMU_WARN_NONNULL_ARGS()

2018-01-17 Thread Daniel P. Berrange
On Wed, Jan 17, 2018 at 10:18:19AM -0300, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > include/qemu/compiler.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h > index 340e5fdc09..d9b2489391 100644 > ---

Re: [Qemu-devel] [PATCH v2 0/7] Call check and invalidate_cache from coroutine context

2018-01-17 Thread Kevin Wolf
Am 17.01.2018 um 14:15 hat Paolo Bonzini geschrieben: > On 17/01/2018 13:59, Kevin Wolf wrote: > > Am 17.01.2018 um 12:25 hat Paolo Bonzini geschrieben: > >> Check and invalidate_cache share some parts of the implementation > >> with the regular I/O path. This is sometimes complicated because the

Re: [Qemu-devel] [PATCH v2 3/6] qapi: add nbd-server-remove

2018-01-17 Thread Vladimir Sementsov-Ogievskiy
15.01.2018 20:47, Vladimir Sementsov-Ogievskiy wrote: 15.01.2018 18:09, Eric Blake wrote: On 01/12/2018 03:47 AM, Vladimir Sementsov-Ogievskiy wrote: 09.01.2018 22:52, Eric Blake wrote: On 12/07/2017 09:50 AM, Vladimir Sementsov-Ogievskiy wrote: Add command for export removing. It is needed f

Re: [Qemu-devel] [PATCH 2/7] docker: do not display deprecated images in 'make docker' help

2018-01-17 Thread Philippe Mathieu-Daudé
On 01/16/2018 11:10 PM, Fam Zheng wrote: > On 01/12/2018 08:49 PM, Philippe Mathieu-Daudé wrote: >> the 'debian' base image is deprecated since 3e11974988d8 >> >> Signed-off-by: Philippe Mathieu-Daudé >> --- >>   tests/docker/Makefile.include | 3 ++- >>   1 file changed, 2 insertions(+), 1 deletio

Re: [Qemu-devel] [PATCH 00/17] iotests: Fix iotests for weird formats/options

2018-01-17 Thread Max Reitz
On 2017-11-23 03:08, Max Reitz wrote: > This series fixes the qemu-iotests for qcow, vmdk, qcow2 v2 and qcow2 v3 > with refcount_bits=1. > > Patches 1 and 2 contain real fixes (not urgent, though, so no need to > hurry for 2.11--we can take them into 2.11 if we want to, but there is > no absolute

Re: [Qemu-devel] [PATCH 09/17] iotests: Disable some tests for compat=0.10

2018-01-17 Thread Max Reitz
On 2017-12-09 17:53, Eric Blake wrote: > On 12/08/2017 07:46 PM, John Snow wrote: >> >> >> On 11/22/2017 09:08 PM, Max Reitz wrote: >>> Tests 080, 130, 137, and 176 simply do not work with compat=0.10 for the >>> reasons stated there. >>> >>> 177 is a bit more interesting: Originally, it was actua

Re: [Qemu-devel] [PATCH 3/7] docker: add the Ubuntu Trusty base image

2018-01-17 Thread Philippe Mathieu-Daudé
On 01/16/2018 11:12 PM, Fam Zheng wrote: > On 01/12/2018 08:49 PM, Philippe Mathieu-Daudé wrote: >> based on QEMU v2.10 ubuntu.docker (ca853f0c76e3 and 2346b12fc52d) >> >> Signed-off-by: Philippe Mathieu-Daudé >> --- >>   tests/docker/dockerfiles/ubuntu14.04.docker | 17 + >>   1 fi

Re: [Qemu-devel] [PATCH 0/7] docker: update Ubuntu and Fedora images, deprecate old ones

2018-01-17 Thread Philippe Mathieu-Daudé
On 01/16/2018 11:26 PM, Fam Zheng wrote: > On 01/12/2018 08:49 PM, Philippe Mathieu-Daudé wrote: >> Hi, >> >> This series is to be clearer about which upstream version we are using. >> >> All "FROM distrib:latest" entries have now been removed and replaced by >> explicit "FROM distrib:version" ones

[Qemu-devel] [PATCH v2] iotests: Make 200 run on tmpfs

2018-01-17 Thread Max Reitz
200 currently fails on tmpfs because it sets cache=none. However, without that (and aio=native), the test still works now and it fails before Jeff's series (on fc7dbc119e0852a70dc9fa68bb41a318e49e4cd6). So we can probably remove the aio=native safely, and replace cache=none by cache=$CACHEMODE.

Re: [Qemu-devel] [PATCH 0/7] docker: update Ubuntu and Fedora images, deprecate old ones

2018-01-17 Thread Philippe Mathieu-Daudé
On 01/17/2018 07:25 AM, Daniel P. Berrange wrote: > On Wed, Jan 17, 2018 at 10:26:36AM +0800, Fam Zheng wrote: >> On 01/12/2018 08:49 PM, Philippe Mathieu-Daudé wrote: >>> Hi, >>> >>> This series is to be clearer about which upstream version we are using. >>> >>> All "FROM distrib:latest" entries h

Re: [Qemu-devel] [PATCH 0/7] docker: update Ubuntu and Fedora images, deprecate old ones

2018-01-17 Thread Daniel P. Berrange
On Wed, Jan 17, 2018 at 10:58:21AM -0300, Philippe Mathieu-Daudé wrote: > On 01/17/2018 07:25 AM, Daniel P. Berrange wrote: > > On Wed, Jan 17, 2018 at 10:26:36AM +0800, Fam Zheng wrote: > >> On 01/12/2018 08:49 PM, Philippe Mathieu-Daudé wrote: > >>> Hi, > >>> > >>> This series is to be clearer ab

Re: [Qemu-devel] [PATCH v2] iotests: Make 200 run on tmpfs

2018-01-17 Thread Jeff Cody
On Wed, Jan 17, 2018 at 02:50:15PM +0100, Max Reitz wrote: > 200 currently fails on tmpfs because it sets cache=none. However, > without that (and aio=native), the test still works now and it fails > before Jeff's series (on fc7dbc119e0852a70dc9fa68bb41a318e49e4cd6). So > we can probably remove t

Re: [Qemu-devel] [PATCH v3 3/4] linux-user, m68k: select CPU according to ELF header values

2018-01-17 Thread Richard Henderson
On 01/16/2018 02:22 PM, Laurent Vivier wrote: > M680x0 doesn't support the same set of instructions > as ColdFire, so we can't use "any" CPU type to execute > m68020 instructions. > We select CPU type ("m68040" or "any" for ColdFire) > according to the ELF header. If we can't, we > use by default t

Re: [Qemu-devel] [PATCH 0/7] docker: update Ubuntu and Fedora images, deprecate old ones

2018-01-17 Thread Philippe Mathieu-Daudé
On 01/17/2018 11:04 AM, Daniel P. Berrange wrote: > On Wed, Jan 17, 2018 at 10:58:21AM -0300, Philippe Mathieu-Daudé wrote: >> On 01/17/2018 07:25 AM, Daniel P. Berrange wrote: >>> On Wed, Jan 17, 2018 at 10:26:36AM +0800, Fam Zheng wrote: On 01/12/2018 08:49 PM, Philippe Mathieu-Daudé wrote:

  1   2   3   4   >