Re: [Qemu-devel] [PATCH v3 0/6] virtio-blk: add DISCARD and WRITE_ZEROES features

2019-02-08 Thread Stefano Garzarella
On Fri, Feb 08, 2019 at 02:06:18PM +0800, Stefan Hajnoczi wrote: > On Wed, Feb 06, 2019 at 12:27:23PM +0100, Stefano Garzarella wrote: > > This series adds the support of DISCARD and WRITE_ZEROES commands > > and extends the virtio-blk-test to test WRITE_ZEROES command when > > the feature is enabl

Re: [Qemu-devel] [PATCH] block: skip initializer BDS on recursive aio context attachment/detachment

2019-02-08 Thread Denis Plotnikov
ping ping! On 24.01.2019 10:48, Denis Plotnikov wrote: > When there is a Backup Block Job running and shutdown command is sent to > a guest, the guest crushes due to assert(!bs->walking_aio_notifiers). > > Call stack: > > 0 __GI_raise > 1 __GI_abort > 2 __assert_fail_base > 3 __GI___assert_f

Re: [Qemu-devel] [PATCH 3/3] char-socket: Lock tcp_chr_disconnect() and socket_reconnect_timeout()

2019-02-08 Thread Alberto Garcia
On Thu 07 Feb 2019 03:26:49 PM CET, Daniel P. Berrangé wrote: >> @@ -457,11 +469,12 @@ static void tcp_chr_disconnect(Chardev *chr) >> } >> update_disconnected_filename(s); >> if (emit_close) { >> -qemu_chr_be_event(chr, CHR_EVENT_CLOSED); >> +qemu_idle_add(tcp_chr_be

Re: [Qemu-devel] Maintainers, please git-am -m

2019-02-08 Thread Cornelia Huck
On Fri, 08 Feb 2019 08:30:11 +0100 Markus Armbruster wrote: > Short story: please add > > [am] > messageid = true > > to your .gitconfig. > > Long story. git-am can add a Message-id: tag. Looks like this: > > commit 335dbb5de1e98c4dc73590349f17bb2a4d72596c > Author:

Re: [Qemu-devel] [PATCH 3/3] char-socket: Lock tcp_chr_disconnect() and socket_reconnect_timeout()

2019-02-08 Thread Alberto Garcia
On Thu 07 Feb 2019 03:26:49 PM CET, Daniel P. Berrangé wrote: >> @@ -457,11 +469,12 @@ static void tcp_chr_disconnect(Chardev *chr) >> } >> update_disconnected_filename(s); >> if (emit_close) { >> -qemu_chr_be_event(chr, CHR_EVENT_CLOSED); >> +qemu_idle_add(tcp_chr_be

Re: [Qemu-devel] [regression] Clock jump on VM migration

2019-02-08 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@redhat.com) wrote: > On Thu, Feb 07, 2019 at 05:33:25PM -0500, Neil Skrypuch wrote: > > Thanks for your email! > > Please post your QEMU command-line. > > > The clock jump numbers above are from NTP, but you can see that they are > > quite > > close to the amount of

Re: [Qemu-devel] [PATCH v2 02/20] Acceptance tests: show avocado test execution by default

2019-02-08 Thread Cornelia Huck
On Thu, 7 Feb 2019 13:32:54 -0500 Cleber Rosa wrote: > On 2/7/19 5:25 AM, Cornelia Huck wrote: > > On Wed, 6 Feb 2019 12:36:23 -0500 > > Cleber Rosa wrote: > > > >> On 2/6/19 12:20 PM, Cornelia Huck wrote: > >>> So, to summarize: > >>> - add 'make check-acceptance-quick' that excludes tests

Re: [Qemu-devel] [PATCH v2 05/20] Acceptance tests: introduce arch parameter and attribute

2019-02-08 Thread Cornelia Huck
On Thu, 7 Feb 2019 13:22:10 -0500 Cleber Rosa wrote: > On 2/7/19 1:02 PM, Cleber Rosa wrote: > > > > > > On 2/6/19 10:40 AM, Cornelia Huck wrote: > >> On Fri, 1 Feb 2019 19:55:55 -0500 > >> Cleber Rosa wrote: > >> > >>> It's useful to define the architecture that should be used in > >>> s

Re: [Qemu-devel] [PATCH v2 0/9] Dealing with Null devices in usb_ep_get()

2019-02-08 Thread Gerd Hoffmann
On Wed, Feb 06, 2019 at 01:36:47PM +, Liam Merwick wrote: > This series is in response to feedback from Gerd Hoffman (below) on > <1548859022-3969-1-git-send-email-liam.merw...@oracle.com> > > Instead of checking if usb_ep_get() returns NULL, ensure it never is passed > a NULL device. Added

Re: [Qemu-devel] Maintainers, please git-am -m

2019-02-08 Thread Gerd Hoffmann
Hi, > >with without > > 65 2 Gerd Hoffmann Oops. Two slipped through:( > I'd like to, but I can't. I'm still using git 1.8 and the -m parameter > is not supported there yet. rhel-7 software collection has newer git (2.9) available. HTH, Gerd

Re: [Qemu-devel] Maintainers, please git-am -m

2019-02-08 Thread Gerd Hoffmann
On Fri, Feb 08, 2019 at 09:57:20AM +0100, Cornelia Huck wrote: > On Fri, 08 Feb 2019 08:30:11 +0100 > Markus Armbruster wrote: > > > Short story: please add > > > > [am] > > messageid = true > > > > to your .gitconfig. > > > > Long story. git-am can add a Message-id: tag. Loo

Re: [Qemu-devel] [PATCH] tcg: Diagnose referenced labels that have not been emitted

2019-02-08 Thread Philippe Mathieu-Daudé
Hi Richard, On 2/8/19 4:55 AM, Richard Henderson wrote: > Currently, a jump to a label that is not defined anywhere will > be emitted not be relocated. This results in a jump to a random > jump target. With tcg debugging, print a diagnostic to the -d op > file and abort. > > This could help deb

Re: [Qemu-devel] [PATCH v4 3/3] Add "boot_linux" acceptance test for x86_64 and pc machine type

2019-02-08 Thread Cornelia Huck
On Thu, 7 Feb 2019 13:00:12 -0500 Cleber Rosa wrote: > diff --git a/tests/acceptance/boot_linux.py b/tests/acceptance/boot_linux.py > new file mode 100644 > index 00..927fac2959 > --- /dev/null > +++ b/tests/acceptance/boot_linux.py > @@ -0,0 +1,51 @@ > +# Functional test that boots a c

Re: [Qemu-devel] [PULLv4 00/32] More work towards libslirp

2019-02-08 Thread Peter Maydell
On Thu, 7 Feb 2019 at 14:03, Samuel Thibault wrote: > > The following changes since commit 713acc316ddca119fe168e72846f1d2dd0548430: > > Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20190206' into > staging (2019-02-07 11:46:40 +) > > are available in the Git repository at: > >

Re: [Qemu-devel] [PATCH v6 39/73] i386: convert to cpu_interrupt_request

2019-02-08 Thread Alex Bennée
Emilio G. Cota writes: > Reviewed-by: Richard Henderson > Signed-off-by: Emilio G. Cota > --- > target/i386/cpu.c| 2 +- > target/i386/helper.c | 4 ++-- > target/i386/svm_helper.c | 4 ++-- > 3 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/target/i386/cpu.c b/t

Re: [Qemu-devel] [PATCH] block: skip initializer BDS on recursive aio context attachment/detachment

2019-02-08 Thread Kevin Wolf
Am 24.01.2019 um 08:48 hat Denis Plotnikov geschrieben: > When there is a Backup Block Job running and shutdown command is sent to > a guest, the guest crushes due to assert(!bs->walking_aio_notifiers). > > Call stack: > > 0 __GI_raise > 1 __GI_abort > 2 __assert_fail_base > 3 __GI___assert_f

Re: [Qemu-devel] [PATCH v2 05/12] Add vhost-user-backend

2019-02-08 Thread Marc-André Lureau
Hi On Thu, Feb 7, 2019 at 8:27 PM Michael S. Tsirkin wrote: > > On Thu, Feb 07, 2019 at 07:29:20PM +0100, Marc-André Lureau wrote: > > Hi > > > > On Thu, Feb 7, 2019 at 6:36 PM Michael S. Tsirkin wrote: > > > > > > On Thu, Feb 07, 2019 at 05:54:42PM +0100, Marc-André Lureau wrote: > > > > Create

Re: [Qemu-devel] [Qemu-ppc] [PATCH] spapr_pci: Fix interrupt leak in rtas_ibm_change_msi() error path

2019-02-08 Thread Greg Kurz
On Fri, 8 Feb 2019 10:06:47 +1100 David Gibson wrote: > On Thu, Feb 07, 2019 at 06:28:37PM +0100, Greg Kurz wrote: > > Now that IRQ allocation has been split in two (first allocate IRQ numbers, > > then claim them), if the claiming fails, we must release the IRQs. > > > > Fixes: 4fe75a8ccd80 "sp

Re: [Qemu-devel] [libvirt] [PATCH v3 16/17] qmp: Deprecate query-events in favor of query-qmp-schema

2019-02-08 Thread Peter Krempa
On Thu, Feb 07, 2019 at 14:46:41 +0100, Markus Armbruster wrote: > Peter Krempa writes: > > > On Wed, Feb 06, 2019 at 12:42:05 -0600, Eric Blake wrote: > >> Adding libvirt in cc > >> > >> On 2/6/19 12:17 PM, Markus Armbruster wrote: > >> > query-events doesn't reflect compile-time configuration.

Re: [Qemu-devel] [PATCH v6 40/73] i386/kvm: convert to cpu_interrupt_request

2019-02-08 Thread Alex Bennée
Emilio G. Cota writes: > Reviewed-by: Richard Henderson > Signed-off-by: Emilio G. Cota > --- > target/i386/kvm.c | 54 +++ > 1 file changed, 31 insertions(+), 23 deletions(-) > > diff --git a/target/i386/kvm.c b/target/i386/kvm.c > index ca2629f0f

Re: [Qemu-devel] [PATCH v6 41/73] i386/hax-all: convert to cpu_interrupt_request

2019-02-08 Thread Alex Bennée
Emilio G. Cota writes: > Reviewed-by: Richard Henderson > Signed-off-by: Emilio G. Cota Reviewed-by: Alex Bennée > --- > target/i386/hax-all.c | 30 +- > 1 file changed, 17 insertions(+), 13 deletions(-) > > diff --git a/target/i386/hax-all.c b/target/i386/hax-

Re: [Qemu-devel] [PATCH v6 60/73] cpu: convert to interrupt_request

2019-02-08 Thread Alex Bennée
Emilio G. Cota writes: > This finishes the conversion to interrupt_request. > > Signed-off-by: Emilio G. Cota Reviewed-by: Alex Bennée > --- > qom/cpu.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/qom/cpu.c b/qom/cpu.c > index 00add81a7f..f2695be9b2 100644

Re: [Qemu-devel] [PATCH v6 61/73] cpu: call .cpu_has_work with the CPU lock held

2019-02-08 Thread Alex Bennée
Emilio G. Cota writes: > Reviewed-by: Richard Henderson > Signed-off-by: Emilio G. Cota Reviewed-by: Alex Bennée > --- > include/qom/cpu.h | 12 ++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > > diff --git a/include/qom/cpu.h b/include/qom/cpu.h > index 4a87c1fef7..96a5d

[Qemu-devel] [PATCH v3 05/13] vhost-user: wrap some read/write with retry handling

2019-02-08 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- hw/virtio/vhost-user.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index a0e8a81857..b2e1175c1e 100644 --- a/hw/virtio/vhost-user.c ++

[Qemu-devel] [PATCH v3 02/13] vhost-user: define conventions for vhost-user backends

2019-02-08 Thread Marc-André Lureau
As discussed during "[PATCH v4 00/29] vhost-user for input & GPU" review, let's define a common set of backend conventions to help with management layer implementation, and interoperability. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- MAINTAINERS | 1

[Qemu-devel] [PATCH v3 00/13] vhost-user-backend & vhost-user-input

2019-02-08 Thread Marc-André Lureau
Hi, This series is based on previously discussed "[PATCH v4 00/29] vhost-user for input & GPU" and "vhost-user: define conventions for vhost-user backends" work. The GPU part is left off for now. This series introduces a "vhost-user-backend": an helper object to be used by vhost-user devices to e

[Qemu-devel] [PATCH v3 01/13] libvhost-user: fix clang enum-conversion warning

2019-02-08 Thread Marc-André Lureau
Now that the VhostUserMsg.request field is used for both master & slave requests, since commit d84599f56c820d8c1ac9928a76500dcdfbbf194d: contrib/libvhost-user/libvhost-user.c:953:20: error: implicit conversion from enumeration type 'enum VhostUserSlaveRequest' to different enumeration type 'Vhos

[Qemu-devel] [PATCH v3 03/13] vhost-user: simplify vhost_user_init/vhost_user_cleanup

2019-02-08 Thread Marc-André Lureau
Take a VhostUserState* that can be pre-allocated, and initialize it with the associated chardev. Signed-off-by: Marc-André Lureau Reviewed-by: Tiwei Bie --- include/hw/virtio/vhost-user-blk.h | 2 +- include/hw/virtio/vhost-user-scsi.h | 2 +- include/hw/virtio/vhost-user.h | 2 +- bac

[Qemu-devel] [PATCH v3 08/13] vhost-user: add vhost_user_input_get_config()

2019-02-08 Thread Marc-André Lureau
Ask vhost user input backend the list of virtio_input_config. Signed-off-by: Marc-André Lureau Reviewed-by: Gerd Hoffmann --- contrib/libvhost-user/libvhost-user.h | 1 + include/hw/virtio/vhost-backend.h | 4 ++ hw/virtio/vhost-user.c| 60 +++ docs

[Qemu-devel] [PATCH v3 04/13] libvhost-user: exit by default on VHOST_USER_NONE

2019-02-08 Thread Marc-André Lureau
Since commit 2566378d6d13bf4d28c7770bdbda5f7682594bbe, libvhost-user no longer panics on disconnect (rc == 0), and instead silently ignores an invalid VHOST_USER_NONE message. Without extra work from the API user, this will simply busy-loop on HUP events. The obvious thing to do is to exit(0) inst

[Qemu-devel] [PATCH v3 10/13] libvhost-user: add vu_queue_unpop()

2019-02-08 Thread Marc-André Lureau
vhost-user-input will make use of this function to undo some queue pop in case the virtio queue does not have enough room. Signed-off-by: Marc-André Lureau --- contrib/libvhost-user/libvhost-user.h | 14 ++ contrib/libvhost-user/libvhost-user.c | 16 2 files changed,

[Qemu-devel] [PATCH v3 07/13] vhost-user: split vhost_user_read()

2019-02-08 Thread Marc-André Lureau
Split vhost_user_read(), so only header can be read with vhost_user_read_header(). Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- hw/virtio/vhost-user.c | 27 +++ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/hw/virtio/vhost-user.c

[Qemu-devel] [PATCH v3 09/13] libvhost-user-glib: export vug_source_new()

2019-02-08 Thread Marc-André Lureau
Simplify the creation of FD sources for other users. This is just convenience to avoid duplicating similar code elsewhere. Signed-off-by: Marc-André Lureau --- contrib/libvhost-user/libvhost-user-glib.h | 3 +++ contrib/libvhost-user/libvhost-user-glib.c | 11 ++- 2 files changed, 9 ins

[Qemu-devel] [PATCH v3 06/13] Add vhost-user-backend

2019-02-08 Thread Marc-André Lureau
Create a vhost-user-backend object that holds a connection to a vhost-user backend and can be referenced from virtio devices that support it. See later patches for input & gpu usage. Signed-off-by: Marc-André Lureau --- include/sysemu/vhost-user-backend.h | 60 backends/vhost-user.c

[Qemu-devel] [PATCH v3 11/13] Add vhost-user-input-pci

2019-02-08 Thread Marc-André Lureau
Add a new virtio-input device, which connects to a vhost-user backend. vhost-user-input is similar to virtio-input-host, it is wrapped by vhost-user-input-pci. Instead of reading configuration directly from an input device / evdev, it reads it over vhost-user protocol with INPUT_GET_CONFIG message

[Qemu-devel] [PATCH v3 13/13] RFC: add explicit can_migrate to vhost_user_backend_dev_init()

2019-02-08 Thread Marc-André Lureau
In general, there is not much support for migrating a vhost-user slave process. Many virtio devices however implement vmsd, and the vhost-user instances (as child objects) may be migrated. Since there is no other support at this point, the slave is assumed to be state less (outside of VM state), o

[Qemu-devel] [PATCH v3 12/13] contrib: add vhost-user-input

2019-02-08 Thread Marc-André Lureau
Add a vhost-user input backend example, based on virtio-input-host device. It takes an evdev path as argument, and can be associated with a vhost-user-input device via a UNIX socket: $ vhost-user-input -p /dev/input/eventX -s /tmp/vui.sock $ qemu ... -chardev socket,id=vuic,path=/tmp/vui.sock -

Re: [Qemu-devel] [PATCH v6 69/73] cpu: rename all_cpu_threads_idle to qemu_tcg_rr_all_cpu_threads_idle

2019-02-08 Thread Alex Bennée
Emilio G. Cota writes: > This function is only called from TCG rr mode, so add > a prefix to mark this as well as an assertion. > > Signed-off-by: Emilio G. Cota Reviewed-by: Alex Bennée > --- > cpus.c | 10 ++ > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/cpus

Re: [Qemu-devel] [PATCH v6 62/73] cpu: introduce cpu_has_work_with_iothread_lock

2019-02-08 Thread Alex Bennée
Emilio G. Cota writes: > It will gain some users soon. > > Suggested-by: Paolo Bonzini > Reviewed-by: Richard Henderson > Signed-off-by: Emilio G. Cota > --- > include/qom/cpu.h | 36 +--- > 1 file changed, 33 insertions(+), 3 deletions(-) > > diff --git a/in

Re: [Qemu-devel] [PULL 00/18] Chardev patches

2019-02-08 Thread Peter Maydell
On Thu, 7 Feb 2019 at 16:06, Marc-André Lureau wrote: > > The following changes since commit 632351e0e1a861f2eaf709b053c53f96a1225825: > > Merge remote-tracking branch 'remotes/elmarco/tags/dump-pull-request' into > staging (2019-02-07 14:20:46 +) > > are available in the Git repository at:

Re: [Qemu-devel] [Qemu-ppc] [PATCH] spapr_pci: Fix interrupt leak in rtas_ibm_change_msi() error path

2019-02-08 Thread David Gibson
On Fri, Feb 08, 2019 at 12:15:03PM +0100, Greg Kurz wrote: > On Fri, 8 Feb 2019 10:06:47 +1100 > David Gibson wrote: > > > On Thu, Feb 07, 2019 at 06:28:37PM +0100, Greg Kurz wrote: > > > Now that IRQ allocation has been split in two (first allocate IRQ numbers, > > > then claim them), if the cla

Re: [Qemu-devel] [Qemu-block] [PATCH v5 1/6] Stream block job involves copy-on-read filter driver

2019-02-08 Thread Alberto Garcia
On Sun 30 Dec 2018 09:09:12 PM CET, Andrey Shinkevich wrote: > +static BlockDriverState *child_file_bs(BlockDriverState *bs) > +{ > +return bs->file ? bs->file->bs : NULL; > +} In addition to Vladimir's comments, I wonder if it's useful to put this in block_int.h (together with backing_bs()).

Re: [Qemu-devel] [PATCH] sdl2: drop qemu_input_event_send_key_qcode call

2019-02-08 Thread BALATON Zoltan
On Fri, 8 Feb 2019, Gerd Hoffmann wrote: qkbd_state_key_event() does that for us. Fixes: 07333e1ca3 kbd-state: use state tracker for sdl2 Reported-by: BALATON Zoltan Signed-off-by: Gerd Hoffmann Fixes my problem. Tested-by: BALATON Zoltan Thank you, BALATON Zoltan --- ui/sdl2-input.c |

Re: [Qemu-devel] [PATCH 2/2] test: replace gtester with a TAP driver

2019-02-08 Thread Kevin Wolf
Am 06.12.2018 um 22:50 hat Paolo Bonzini geschrieben: > gtester is deprecated by upstream glib (see for example the announcement > at https://blog.gtk.org/2018/07/11/news-from-glib-2-58/) and it does > not support tests that call g_test_skip in some glib stable releases. > > glib suggests instead

Re: [Qemu-devel] [Qemu-ppc] [PATCH] spapr_pci: Fix interrupt leak in rtas_ibm_change_msi() error path

2019-02-08 Thread Greg Kurz
On Fri, 8 Feb 2019 22:33:36 +1100 David Gibson wrote: > On Fri, Feb 08, 2019 at 12:15:03PM +0100, Greg Kurz wrote: > > On Fri, 8 Feb 2019 10:06:47 +1100 > > David Gibson wrote: > > > > > On Thu, Feb 07, 2019 at 06:28:37PM +0100, Greg Kurz wrote: > > > > Now that IRQ allocation has been spli

Re: [Qemu-devel] [Qemu-block] [PATCH RFC 1/1] Stream block job involves copy-on-read filter

2019-02-08 Thread Alberto Garcia
On Wed 23 Jan 2019 12:54:24 PM CET, Andrey Shinkevich wrote: > +static BlockDriverState *insert_filter(BlockDriverState *bs, Error **errp) > +{ > +BlockDriverState *cor_filter_bs; > +Error *local_err = NULL; > + > +cor_filter_bs = create_filter_node(bs, errp); > +if (cor_filter_bs =

Re: [Qemu-devel] [PATCH RISU 0/2] Do not enable --sve by default

2019-02-08 Thread Peter Maydell
On Wed, 6 Feb 2019 at 10:14, Richard Henderson wrote: > > In the process of noticing what the problem was, > add fp regs to the aarch64 smoke test. > > Applied to risu master, thanks. -- PMM

[Qemu-devel] [PATCH] configure: Make -Waddress-of-packed-member warnings be errors

2019-02-08 Thread Peter Maydell
We have now managed to eradicate all the places in the codebase that triggered clang's -Waddress-of-packed-member warning. Remove the compiler flag that exempted it from our usual -Werror policy. This will prevent any new problematic code being added in future. Signed-off-by: Peter Maydell --- c

Re: [Qemu-devel] [PATCH] configure: Make -Waddress-of-packed-member warnings be errors

2019-02-08 Thread Thomas Huth
On 2019-02-08 14:21, Peter Maydell wrote: > We have now managed to eradicate all the places in the codebase > that triggered clang's -Waddress-of-packed-member warning. Remove > the compiler flag that exempted it from our usual -Werror policy. > This will prevent any new problematic code being adde

Re: [Qemu-devel] [PATCH 2/2] test: replace gtester with a TAP driver

2019-02-08 Thread Paolo Bonzini
On 08/02/19 13:48, Kevin Wolf wrote: > I just wanted to work on a unit test and found that a simple 'make > check-tests/test-bdrv-drain' (which used to build and run the test with > a single command) doesn't work any more. > > git bisect points to this commit. What's wrong with "tests/test-bdrv-d

Re: [Qemu-devel] [PATCH 3/3] char-socket: Lock tcp_chr_disconnect() and socket_reconnect_timeout()

2019-02-08 Thread Paolo Bonzini
On 08/02/19 10:34, Alberto Garcia wrote: >> and also works with the vhostuser reconnect device, then we are >> probably ok. > How do I test this? QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 \ QTEST_VHOST_USER_FIXME=1 \ tests/vhost-user-test Paolo

[Qemu-devel] [PATCH v4 1/6] virtio-blk: add acct_failed param to virtio_blk_handle_rw_error()

2019-02-08 Thread Stefano Garzarella
We add acct_failed param in order to use virtio_blk_handle_rw_error() also when is not required to call block_acct_failed(). (eg. a discard operation is failed) Reviewed-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella --- hw/block/virtio-blk.c | 10 ++-

[Qemu-devel] [PATCH v4 0/6] virtio-blk: add DISCARD and WRITE_ZEROES features

2019-02-08 Thread Stefano Garzarella
This series adds the support of DISCARD and WRITE_ZEROES commands and extends the virtio-blk-test to test WRITE_ZEROES command when the feature is enabled. v4: - fixed error with mingw compiler in patch 4 gcc and clang want %lu, but mingw wants %llu for BDRV_REQUEST_MAX_SECTORS. Since is less

[Qemu-devel] [PATCH v4 3/6] virtio-blk: add "discard" and "write-zeroes" properties

2019-02-08 Thread Stefano Garzarella
In order to avoid migration issues, we enable DISCARD and WRITE_ZEROES features only for machine type >= 4.0 As discussed with Michael S. Tsirkin and Stefan Hajnoczi on the list [1], DISCARD operation should not have security implications (eg. page cache attacks), so we can enable it by default.

[Qemu-devel] [PATCH v4 2/6] virtio-blk: add host_features field in VirtIOBlock

2019-02-08 Thread Stefano Garzarella
Since configurable features for virtio-blk are growing, this patch adds host_features field in the struct VirtIOBlock. (as in virtio-net) In this way, we can avoid to add new fields for new properties and we can directly set VIRTIO_BLK_F* flags in the host_features. We update "config-wce" and "scs

[Qemu-devel] [PATCH v4 4/6] virtio-blk: add DISCARD and WRITE_ZEROES features

2019-02-08 Thread Stefano Garzarella
This patch adds the support of DISCARD and WRITE_ZEROES commands, that have been introduced in the virtio-blk protocol to have better performance when using SSD backend. We support only one segment per request since multiple segments are not widely used and there are no userspace APIs that allow a

[Qemu-devel] [PATCH v4 5/6] tests/virtio-blk: change assert on data_size in virtio_blk_request()

2019-02-08 Thread Stefano Garzarella
The size of data in the virtio_blk_request must be a multiple of 512 bytes for IN and OUT requests, or a multiple of the size of struct virtio_blk_discard_write_zeroes for DISCARD and WRITE_ZEROES requests. Reviewed-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi Reviewed-by: Thomas Huth Si

[Qemu-devel] [PATCH v4 6/6] tests/virtio-blk: add test for WRITE_ZEROES command

2019-02-08 Thread Stefano Garzarella
If the WRITE_ZEROES feature is enabled, we check this command in the test_basic(). Reviewed-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi Acked-by: Thomas Huth Signed-off-by: Stefano Garzarella --- tests/virtio-blk-test.c | 60 + 1 file changed, 6

Re: [Qemu-devel] [PULL 43/47] target/arm: fix AArch64 virtual address space size

2019-02-08 Thread Laurent Vivier
On 01/02/2019 17:06, Peter Maydell wrote: > From: Remi Denis-Courmont > > Since QEMU does not support the ARMv8.2-LVA, Large Virtual Address, > extension (yet), the VA address space is 48-bits plus a sign bit. User > mode can only handle the positive half of the address space, so that > makes a l

[Qemu-devel] [RFC PATCH] coroutines: generate wrapper code

2019-02-08 Thread Vladimir Sementsov-Ogievskiy
Hi all! We have a very frequent pattern of wrapping a coroutine_fn function to be called from non-coroutine context: - create structure to pack parameters - create function to call original function taking parameters from struct - create wrapper, which in case of non-coroutine context w

Re: [Qemu-devel] [RFC PATCH] coroutines: generate wrapper code

2019-02-08 Thread Vladimir Sementsov-Ogievskiy
attached generated file -- Best regards, Vladimir /* * File is generated by scripts/coroutine-wrapper.py */ #include "qemu/osdep.h" #include "block/block_int.h" /* * Wrappers for bdrv_co_check */ typedef struct bdrv_co_check__ArgumentsPack { BlockDriverState *bs; BdrvCheckResult

[Qemu-devel] [PATCH] virtio-blk: cleanup using VirtIOBlock *s and VirtIODevice *vdev

2019-02-08 Thread Stefano Garzarella
In several part we still using req->dev or VIRTIO_DEVICE(req->dev) when we have already defined s and vdev pointers: VirtIOBlock *s = req->dev; VirtIODevice *vdev = VIRTIO_DEVICE(s); Signed-off-by: Stefano Garzarella --- hw/block/virtio-blk.c | 22 +- 1 file changed,

Re: [Qemu-devel] [PATCH v6 70/73] cpu: protect CPU state with cpu->lock instead of the BQL

2019-02-08 Thread Alex Bennée
Emilio G. Cota writes: > Use the per-CPU locks to protect the CPUs' state, instead of > using the BQL. These locks are uncontended (they are mostly > acquired by the corresponding vCPU thread), so acquiring them > is cheaper than acquiring the BQL, which particularly in > MTTCG can be contended

Re: [Qemu-devel] [PATCH] virtio-blk: cleanup using VirtIOBlock *s and VirtIODevice *vdev

2019-02-08 Thread Liam Merwick
On 08/02/2019 14:23, Stefano Garzarella wrote: In several part we still using req->dev or VIRTIO_DEVICE(req->dev) when we have already defined s and vdev pointers: VirtIOBlock *s = req->dev; VirtIODevice *vdev = VIRTIO_DEVICE(s); Signed-off-by: Stefano Garzarella Reviewed-by: Liam M

Re: [Qemu-devel] [PATCH v6 71/73] cpus-common: release BQL earlier in run_on_cpu

2019-02-08 Thread Alex Bennée
Emilio G. Cota writes: > After completing the conversion to per-CPU locks, there is no need > to release the BQL after having called cpu_kick. > > Reviewed-by: Richard Henderson > Signed-off-by: Emilio G. Cota Reviewed-by: Alex Bennée > --- > cpus-common.c | 20 +--- > 1 f

Re: [Qemu-devel] [PATCH v6 72/73] cpu: add async_run_on_cpu_no_bql

2019-02-08 Thread Alex Bennée
Emilio G. Cota writes: > Some async jobs do not need the BQL. > > Reviewed-by: Richard Henderson > Signed-off-by: Emilio G. Cota > --- > include/qom/cpu.h | 14 ++ > cpus-common.c | 39 ++- > 2 files changed, 48 insertions(+), 5 deletions(-

Re: [Qemu-devel] [PATCH 3/3] char-socket: Lock tcp_chr_disconnect() and socket_reconnect_timeout()

2019-02-08 Thread Alberto Garcia
On Fri 08 Feb 2019 02:46:27 PM CET, Paolo Bonzini wrote: > On 08/02/19 10:34, Alberto Garcia wrote: >>> and also works with the vhostuser reconnect device, then we are >>> probably ok. >> How do I test this? > > QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 \ > QTEST_VHOST_USER_FIXME=1 \ >

[Qemu-devel] [PATCH v14 2/3] qcow2: Add list of bitmaps to ImageInfoSpecificQCow2

2019-02-08 Thread Andrey Shinkevich
In the 'Format specific information' section of the 'qemu-img info' command output, the supplemental information about existing QCOW2 bitmaps will be shown, such as a bitmap name, flags and granularity: image: /vz/vmprivate/VM1/harddisk.hdd file format: qcow2 virtual size: 64G (68719476736 bytes)

[Qemu-devel] [PATCH v14 1/3] bdrv_query_image_info Error parameter added

2019-02-08 Thread Andrey Shinkevich
Inform a user in case qcow2_get_specific_info fails to obtain QCOW2 image specific information. This patch is preliminary to the one "qcow2: Add list of bitmaps to ImageInfoSpecificQCow2". Signed-off-by: Andrey Shinkevich Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewe

[Qemu-devel] [PATCH v14 3/3] qcow2: list of bitmaps new test 242

2019-02-08 Thread Andrey Shinkevich
A new test file 242 added to the qemu-iotests set. It checks the format of qcow2 specific information for the new added section that lists details of bitmaps. Signed-off-by: Andrey Shinkevich --- tests/qemu-iotests/242 | 103 tests/qemu-iotests/242.out | 165

[Qemu-devel] [PATCH v14 0/3] qcow2: Add list of bitmaps to ImageInfoSpecificQCow2

2019-02-08 Thread Andrey Shinkevich
v14: The test 242 was amended to be safer against changes in the bitmap allocation algorithm because the bitmap directory is reallocated on VM shutdown. Unfortunately, an empty line at the end of the benchmark file 242.out persists. The version #13 was discussed in email thread with the message ID:

Re: [Qemu-devel] [PATCH] configure: Make -Waddress-of-packed-member warnings be errors

2019-02-08 Thread Philippe Mathieu-Daudé
On 2/8/19 2:21 PM, Peter Maydell wrote: > We have now managed to eradicate all the places in the codebase > that triggered clang's -Waddress-of-packed-member warning. Remove > the compiler flag that exempted it from our usual -Werror policy. > This will prevent any new problematic code being added

Re: [Qemu-devel] [PATCH v14 0/3] qcow2: Add list of bitmaps to ImageInfoSpecificQCow2

2019-02-08 Thread Eric Blake
On 2/8/19 9:06 AM, Andrey Shinkevich wrote: > v14: > The test 242 was amended to be safer against changes in the bitmap allocation > algorithm because the bitmap directory is reallocated on VM shutdown. > Unfortunately, an empty line at the end of the benchmark file 242.out > persists. Easy solut

Re: [Qemu-devel] [PATCH v3 11/13] Add vhost-user-input-pci

2019-02-08 Thread Michael S. Tsirkin
On Fri, Feb 08, 2019 at 12:23:55PM +0100, Marc-André Lureau wrote: > Add a new virtio-input device, which connects to a vhost-user > backend. > > vhost-user-input is similar to virtio-input-host, it is wrapped by > vhost-user-input-pci. Instead of reading configuration directly from > an input dev

Re: [Qemu-devel] [Qemu-block] [PATCH RFC 1/1] Stream block job involves copy-on-read filter

2019-02-08 Thread Andrey Shinkevich
On 08/02/2019 16:13, Alberto Garcia wrote: > On Wed 23 Jan 2019 12:54:24 PM CET, Andrey Shinkevich wrote: >> +static BlockDriverState *insert_filter(BlockDriverState *bs, Error **errp) >> +{ >> +BlockDriverState *cor_filter_bs; >> +Error *local_err = NULL; >> + >> +cor_filter_bs = cre

Re: [Qemu-devel] [PATCH v14 0/3] qcow2: Add list of bitmaps to ImageInfoSpecificQCow2

2019-02-08 Thread Andrey Shinkevich
On 08/02/2019 18:25, Eric Blake wrote: > On 2/8/19 9:06 AM, Andrey Shinkevich wrote: >> v14: >> The test 242 was amended to be safer against changes in the bitmap allocation >> algorithm because the bitmap directory is reallocated on VM shutdown. >> Unfortunately, an empty line at the end of the

[Qemu-devel] [PATCH] qcow2: Assert that L2 table offsets fit in the L1 table

2019-02-08 Thread Alberto Garcia
L1 table entries have a field to store the offset of an L2 table. The rest of the bits of the entry are currently reserved except from bit 63, which stores the COPIED flag. The offset is always taken from the entry using L1E_OFFSET_MASK to ensure that we only use the bits that belong to that field

Re: [Qemu-devel] [PATCH v14 3/3] qcow2: list of bitmaps new test 242

2019-02-08 Thread Eric Blake
On 2/8/19 9:06 AM, Andrey Shinkevich wrote: > A new test file 242 added to the qemu-iotests set. It checks > the format of qcow2 specific information for the new added > section that lists details of bitmaps. > > Signed-off-by: Andrey Shinkevich > --- > tests/qemu-iotests/242 | 103 +

Re: [Qemu-devel] [PATCH v14 0/3] qcow2: Add list of bitmaps to ImageInfoSpecificQCow2

2019-02-08 Thread Vladimir Sementsov-Ogievskiy
08.02.2019 18:25, Eric Blake wrote: > On 2/8/19 9:06 AM, Andrey Shinkevich wrote: >> v14: >> The test 242 was amended to be safer against changes in the bitmap allocation >> algorithm because the bitmap directory is reallocated on VM shutdown. >> Unfortunately, an empty line at the end of the bench

Re: [Qemu-devel] [PATCH v4 0/6] virtio-blk: add DISCARD and WRITE_ZEROES features

2019-02-08 Thread Pankaj Gupta
> > This series adds the support of DISCARD and WRITE_ZEROES commands > and extends the virtio-blk-test to test WRITE_ZEROES command when > the feature is enabled. > > v4: > - fixed error with mingw compiler in patch 4 > gcc and clang want %lu, but mingw wants %llu for BDRV_REQUEST_MAX_SECTOR

Re: [Qemu-devel] [PATCH] qcow2: Assert that L2 table offsets fit in the L1 table

2019-02-08 Thread Eric Blake
On 2/8/19 9:44 AM, Alberto Garcia wrote: > L1 table entries have a field to store the offset of an L2 table. > The rest of the bits of the entry are currently reserved except from > bit 63, which stores the COPIED flag. > > The offset is always taken from the entry using L1E_OFFSET_MASK to > ensur

Re: [Qemu-devel] [PATCH qemu 0/3] spapr_pci, vfio: NVIDIA V100 + P9 passthrough

2019-02-08 Thread Alex Williamson
On Fri, 8 Feb 2019 16:28:50 +1100 David Gibson wrote: > On Thu, Feb 07, 2019 at 08:26:20PM -0700, Alex Williamson wrote: > > On Fri, 8 Feb 2019 13:29:37 +1100 > > Alexey Kardashevskiy wrote: > > > > > On 08/02/2019 02:18, Alex Williamson wrote: > > > > On Thu, 7 Feb 2019 15:43:18 +1100 > >

Re: [Qemu-devel] [PATCH v14 0/3] qcow2: Add list of bitmaps to ImageInfoSpecificQCow2

2019-02-08 Thread Eric Blake
On 2/8/19 9:37 AM, Andrey Shinkevich wrote: > > > On 08/02/2019 18:25, Eric Blake wrote: >> On 2/8/19 9:06 AM, Andrey Shinkevich wrote: >>> v14: >>> The test 242 was amended to be safer against changes in the bitmap >>> allocation >>> algorithm because the bitmap directory is reallocated on VM s

Re: [Qemu-devel] [PATCH v6 73/73] cputlb: queue async flush jobs without the BQL

2019-02-08 Thread Alex Bennée
Emilio G. Cota writes: > This yields sizable scalability improvements, as the below results show. > > Host: Two Intel E5-2683 v3 14-core CPUs at 2.00 GHz (Haswell) > > Workload: Ubuntu 18.04 ppc64 compiling the linux kernel with > "make -j N", where N is the number of cores in the guest. I can

Re: [Qemu-devel] [PATCH 2/2] test: replace gtester with a TAP driver

2019-02-08 Thread Kevin Wolf
Am 08.02.2019 um 14:46 hat Paolo Bonzini geschrieben: > On 08/02/19 13:48, Kevin Wolf wrote: > > I just wanted to work on a unit test and found that a simple 'make > > check-tests/test-bdrv-drain' (which used to build and run the test with > > a single command) doesn't work any more. > > > > git b

Re: [Qemu-devel] [qemu-s390x] [PATCH 01/15] s390 vfio-ccw: Add bootindex property and IPLB data

2019-02-08 Thread Jason J. Herne
On 2/6/19 6:30 AM, Thomas Huth wrote: On 2019-01-29 14:29, Jason J. Herne wrote: Add bootindex property and iplb data for vfio-ccw devices. This allows us to forward boot information into the bios for vfio-ccw devices. Signed-off-by: Jason J. Herne Acked-by: Halil Pasic --- hw/s390x/ipl.c

Re: [Qemu-devel] Maintainers, please git-am -m

2019-02-08 Thread Philippe Mathieu-Daudé
On 2/8/19 8:30 AM, Markus Armbruster wrote: > Short story: please add > > [am] > messageid = true > > to your .gitconfig. > > Long story. git-am can add a Message-id: tag. Looks like this: > > commit 335dbb5de1e98c4dc73590349f17bb2a4d72596c > Author: Thomas Huth >

Re: [Qemu-devel] [PATCH 01/15] s390 vfio-ccw: Add bootindex property and IPLB data

2019-02-08 Thread Jason J. Herne
On 1/30/19 5:21 PM, Farhan Ali wrote: ... diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c index 21f64ad..a993f65 100644 --- a/hw/s390x/ipl.c +++ b/hw/s390x/ipl.c @@ -19,6 +19,7 @@   #include "hw/loader.h"   #include "hw/boards.h"   #include "hw/s390x/virtio-ccw.h" +#include "hw/s390x/vfio-ccw.h"   #

Re: [Qemu-devel] sparc: crash when using initrd > 5M

2019-02-08 Thread Mark Cave-Ayland
On 06/02/2019 19:38, Corentin Labbe wrote: > On Wed, Feb 06, 2019 at 07:37:29AM +, Mark Cave-Ayland wrote: >> On 06/02/2019 07:28, Corentin Labbe wrote: >> > Hello > > Sorry even with the patch I still hit the issue. > > I have added some debug and at least qemu set initrd_

Re: [Qemu-devel] [PATCH v14 0/3] qcow2: Add list of bitmaps to ImageInfoSpecificQCow2

2019-02-08 Thread Andrey Shinkevich
On 08/02/2019 18:53, Eric Blake wrote: > On 2/8/19 9:37 AM, Andrey Shinkevich wrote: >> >> >> On 08/02/2019 18:25, Eric Blake wrote: >>> On 2/8/19 9:06 AM, Andrey Shinkevich wrote: v14: The test 242 was amended to be safer against changes in the bitmap allocation algorithm be

Re: [Qemu-devel] [PATCH qemu 0/3] spapr_pci, vfio: NVIDIA V100 + P9 passthrough

2019-02-08 Thread Daniel Henrique Barboza
On 2/8/19 1:52 PM, Alex Williamson wrote: Hm. If the GPU memory is really separate from main RAM, which it sounds like, I don't think it makes sense to account it against the same locked memory limit as regular RAM. That's true, if the user owns the device and the device provides the memory

Re: [Qemu-devel] [PATCH v14 0/3] qcow2: Add list of bitmaps to ImageInfoSpecificQCow2

2019-02-08 Thread Andrey Shinkevich
On 08/02/2019 18:53, Eric Blake wrote: > On 2/8/19 9:37 AM, Andrey Shinkevich wrote: >> >> >> On 08/02/2019 18:25, Eric Blake wrote: >>> On 2/8/19 9:06 AM, Andrey Shinkevich wrote: v14: The test 242 was amended to be safer against changes in the bitmap allocation algorithm be

Re: [Qemu-devel] [PATCH] tcg: Diagnose referenced labels that have not been emitted

2019-02-08 Thread Richard Henderson
On 2/8/19 2:41 AM, Philippe Mathieu-Daudé wrote: > Not related to this patch content, but I'm wondering why, TCGLabels > never get freed? They are allocated with tcg_malloc, which is a pool allocator. The entire pool is freed after each TB is compiled. r~

Re: [Qemu-devel] [PATCH] tcg: Diagnose referenced labels that have not been emitted

2019-02-08 Thread Philippe Mathieu-Daudé
On 2/8/19 5:52 PM, Richard Henderson wrote: > On 2/8/19 2:41 AM, Philippe Mathieu-Daudé wrote: >> Not related to this patch content, but I'm wondering why, TCGLabels >> never get freed? > > They are allocated with tcg_malloc, which is a pool allocator. The entire > pool > is freed after each TB

Re: [Qemu-devel] Maintainers, please git-am -m

2019-02-08 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 2/8/19 8:30 AM, Markus Armbruster wrote: >> Short story: please add >> >> [am] >> messageid = true >> >> to your .gitconfig. >> >> Long story. git-am can add a Message-id: tag. Looks like this: >> >> commit 335dbb5de1e98c4dc73590349f17

Re: [Qemu-devel] [PATCH 13/17] target/arm: Set PSTATE.TCO on exception entry

2019-02-08 Thread Richard Henderson
On 2/7/19 9:44 AM, Peter Maydell wrote: > On Mon, 14 Jan 2019 at 01:12, Richard Henderson > wrote: >> >> R0085 specifies that exception handlers begin with tag checks overridden. >> >> Signed-off-by: Richard Henderson >> --- >> target/arm/helper.c | 2 +- >> 1 file changed, 1 insertion(+), 1 del

Re: [Qemu-devel] [PATCH 2/2] test: replace gtester with a TAP driver

2019-02-08 Thread Paolo Bonzini
On 08/02/19 17:00, Kevin Wolf wrote: > Am 08.02.2019 um 14:46 hat Paolo Bonzini geschrieben: >> On 08/02/19 13:48, Kevin Wolf wrote: >>> I just wanted to work on a unit test and found that a simple 'make >>> check-tests/test-bdrv-drain' (which used to build and run the test with >>> a single comman

Re: [Qemu-devel] Maintainers, please git-am -m

2019-02-08 Thread Paolo Bonzini
On 08/02/19 17:07, Philippe Mathieu-Daudé wrote: > And yet this isn't a pull request but a simple patch, so the Message-Id > might not be very relevant there. Yes, I agree that Message-Id is not that relevant if you're taking a patch from someone else and then reposting it. But it's a relatively

[Qemu-devel] [PATCH] mac_newworld: change default NIC to sungem for mac99 machine

2019-02-08 Thread Mark Cave-Ayland
This model brings out-of-the-box networking for all of Linux, MacOS 9 and OS X without requiring the installation of additional drivers. Signed-off-by: Mark Cave-Ayland --- hw/ppc/mac_newworld.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/ma

Re: [Qemu-devel] [PATCH qemu v2] hmp: Print if memory section is registered with an accelerator

2019-02-08 Thread Paolo Bonzini
On 07/02/19 12:49, Dr. David Alan Gilbert wrote: > //#define DEBUG_UNASSIGNED > @@ -2924,6 +2926,8 @@ struct FlatViewInfo { > int counter; > bool dispatch_tree; > bool owner; > +AccelClass *ac; > +const char *ac_name; > }; > > static void mtree_print_flatview(gpointer ke

  1   2   3   >