Re: [Qemu-devel] [Qemu-arm] [PATCH 02/13] target/arm/arm-semi: Always set some kind of errno for failed calls

2019-09-12 Thread Alex Bennée
Peter Maydell writes: > On Thu, 12 Sep 2019 at 11:42, Alex Bennée wrote: >> >> >> Peter Maydell writes: >> >> > If we fail a semihosting call we should always set the >> > semihosting errno to something; we were failing to do >> > this for some of the "check inputs for sanity" cases. >> > >>

Re: [Qemu-devel] [PATCH] libvhost-user: implement VHOST_USER_PROTOCOL_F_REPLY_ACK

2019-09-12 Thread Stefan Hajnoczi
On Tue, Sep 03, 2019 at 10:25:05PM +0300, Johannes Berg wrote: > From: Johannes Berg > > This is really simple, since we know whether a response is > already requested or not, so we can just send a (successful) > response when there isn't one already. > > Given that, it's not all _that_ useful b

Re: [Qemu-devel] [PATCH v24 00/22] Add RX archtecture support

2019-09-12 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190912060701.4642-1-ys...@users.sourceforge.jp/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PATCH v24 00/22] Add RX archtecture support Message-id: 20190912060701.4642-1-ys...@u

Re: [Qemu-devel] [PATCH] vnc: fix websocket field in events

2019-09-12 Thread Stefan Hajnoczi
On Wed, Sep 04, 2019 at 07:52:50AM +0200, Gerd Hoffmann wrote: > Just need to fill VncClientInfo.websocket in vnc_client_cache_addr(). > > Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1748175 > Signed-off-by: Gerd Hoffmann > --- > ui/vnc.c | 1 + > 1 file changed, 1 insertion(+) Reviewe

Re: [Qemu-devel] [PATCH 2/4] virtiofsd: add --print-capabilities option

2019-09-12 Thread Stefan Hajnoczi
On Wed, Sep 04, 2019 at 04:51:21PM +0100, Stefan Hajnoczi wrote: > On Tue, Sep 03, 2019 at 06:26:44PM +0100, Dr. David Alan Gilbert wrote: > > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > > Add the --print-capabilities option as per vhost-user.rst "Backend > > > programs conventions". Curren

Re: [Qemu-devel] [Qemu-arm] [PATCH 05/13] target/arm/arm-semi: Factor out implementation of SYS_CLOSE

2019-09-12 Thread Alex Bennée
Peter Maydell writes: > Currently for the semihosting calls which take a file descriptor > (SYS_CLOSE, SYS_WRITE, SYS_READ, SYS_ISTTY, SYS_SEEK, SYS_FLEN) > we have effectively two implementations, one for real host files > and one for when we indirect via the gdbstub. We want to add a > third

Re: [Qemu-devel] [PATCH 06/13] target/arm/arm-semi: Factor out implementation of SYS_WRITE

2019-09-12 Thread Alex Bennée
Peter Maydell writes: > Factor out the implementation of SYS_WRITE via the > new function tables. > > The #ifdef around the declaration/initialization of the > local 'env' variable is unfortunate but necessary, because > the softmmu-semi.h version of lock_user implicitly uses 'env', > but the u

Re: [Qemu-devel] [Qemu-arm] [PATCH 07/13] target/arm/arm-semi: Factor out implementation of SYS_READ

2019-09-12 Thread Alex Bennée
Peter Maydell writes: > Factor out the implementation of SYS_READ via the > new function tables. "As for SYS_WRITE we need env for lock_user in system emulation."? > > Signed-off-by: Peter Maydell Either way: Reviewed-by: Alex Bennée > --- > target/arm/arm-semi.c | 57 ++

Re: [Qemu-devel] [Qemu-arm] [PATCH 08/13] target/arm/arm-semi: Factor out implementation of SYS_ISTTY

2019-09-12 Thread Alex Bennée
Peter Maydell writes: > Factor out the implementation of SYS_ISTTY via the new function > tables. > > Signed-off-by: Peter Maydell Reviewed-by: Alex Bennée > --- > target/arm/arm-semi.c | 20 +++- > 1 file changed, 15 insertions(+), 5 deletions(-) > > diff --git a/target/ar

Re: [Qemu-devel] [PATCH 2/3] xen: introduce separate XenWatchList for XenDevice objects

2019-09-12 Thread Anthony PERARD
On Wed, Sep 11, 2019 at 03:36:17PM +0100, Paul Durrant wrote: > This patch uses the XenWatchList abstraction to add a separate watch list > for each device. This is more scalable than walking a single notifier > list for all watches and is also necessary to implement a bug-fix in a > subsequent pat

Re: [Qemu-devel] [PATCH] nbd/server: attach client channel to the export's AioContext

2019-09-12 Thread Kevin Wolf
Am 12.09.2019 um 12:30 hat Sergio Lopez geschrieben: > > Kevin Wolf writes: > > > Am 11.09.2019 um 23:33 hat Eric Blake geschrieben: > >> On 9/11/19 12:21 PM, Eric Blake wrote: > >> > On 9/11/19 11:15 AM, Sergio Lopez wrote: > >> >> On creation, the export's AioContext is set to the same one as

Re: [Qemu-devel] [PATCH 1/3] xen / notify: introduce a new XenWatchList abstraction

2019-09-12 Thread Paul Durrant
> -Original Message- > From: Anthony PERARD > Sent: 12 September 2019 11:17 > To: Paul Durrant > Cc: qemu-devel@nongnu.org; xen-de...@lists.xenproject.org; Stefano Stabellini > > Subject: Re: [PATCH 1/3] xen / notify: introduce a new XenWatchList > abstraction > > On Wed, Sep 11, 2019

Re: [Qemu-devel] QEMU as ISS (Instruction Set Simulator)

2019-09-12 Thread Alex Bennée
Libo Zhou writes: > Alex Bennée writes: > > >> The gdbstub should allow you do full introspection and adding >> additional registers is fairly easy, see mips_cpu_gdb_read_register function >> in target/mips/gdbstub.c. > > > > Hi Alex and Aleksandar, > > > Now I can connect gdb to qemu success

Re: [Qemu-devel] [Qemu-arm] [PATCH 04/13] target/arm/arm-semi: clean up TaskState* usage in non-user-only code

2019-09-12 Thread Alex Bennée
Peter Maydell writes: > The semihosting code has to build for both user-only and softmmu; > for user-only it needs access to the TaskState struct that holds > per-thread information. For softmmu we don't need it. > > Currently the softmmu set_swi_errno() takes a CPUARMState *, > which it doesn'

Re: [Qemu-devel] [PATCH 09/13] target/arm/arm-semi: Factor out implementation of SYS_SEEK

2019-09-12 Thread Alex Bennée
Peter Maydell writes: > Factor out the implementation of SYS_SEEK via the new function > tables. > > Signed-off-by: Peter Maydell Reviewed-by: Alex Bennée > --- > target/arm/arm-semi.c | 32 +++- > 1 file changed, 23 insertions(+), 9 deletions(-) > > diff --git

Re: [Qemu-devel] [Qemu-arm] [PATCH 10/13] target/arm/arm-semi: Factor out implementation of SYS_FLEN

2019-09-12 Thread Alex Bennée
Peter Maydell writes: > Factor out the implementation of SYS_FLEN via the new > function tables. > > Signed-off-by: Peter Maydell Reviewed-by: Alex Bennée > --- > target/arm/arm-semi.c | 31 +-- > 1 file changed, 21 insertions(+), 10 deletions(-) > > diff --git

Re: [Qemu-devel] [Bug 1842787] Re: Writes permanently hang with very heavy I/O on virtio-scsi - worse on virtio-blk

2019-09-12 Thread Stefan Hajnoczi
On Thu, Sep 05, 2019 at 03:42:03AM -, James Harvey wrote: > ** Description changed: > > Up to date Arch Linux on host and guest. linux 5.2.11. QEMU 4.1.0. > Full command line at bottom. > > Host gives QEMU two thin LVM volumes. The first is the root filesystem, > and the second i

Re: [Qemu-devel] [Qemu-arm] [PATCH 04/13] target/arm/arm-semi: clean up TaskState* usage in non-user-only code

2019-09-12 Thread Peter Maydell
On Thu, 12 Sep 2019 at 12:44, Alex Bennée wrote: > Why not pass cs to set_swi_errno and deal with all the differences in > the helper? Mmm, that might be better. I think I was going for not changing the existing use of TaskState in the code paths that use it. thanks -- PMM

Re: [Qemu-devel] [Qemu-arm] [PATCH 11/13] target/arm/arm-semi: Implement support for semihosting feature detection

2019-09-12 Thread Alex Bennée
Peter Maydell writes: > Version 2.0 of the semihosting specification added support for > allowing a guest to detect whether the implementation supported > particular features. This works by the guest opening a magic > file ":semihosting-features", which contains a fixed set of > data with some

Re: [Qemu-devel] [PATCH] memory: fetch pmem size in get_file_size()

2019-09-12 Thread Paolo Bonzini
On 12/09/19 12:25, Stefan Hajnoczi wrote: > On Fri, Aug 30, 2019 at 03:44:45PM -0300, Eduardo Habkost wrote: >> On Fri, Aug 30, 2019 at 10:30:56AM +0100, Stefan Hajnoczi wrote: >>> Neither stat(2) nor lseek(2) report the size of Linux devdax pmem >>> character device nodes. Commit 314aec4a6e068449

Re: [Qemu-devel] [PATCH 12/13] target/arm/arm-semi: Implement SH_EXT_STDOUT_STDERR extension

2019-09-12 Thread Alex Bennée
Peter Maydell writes: > SH_EXT_STDOUT_STDERR is a v2.0 semihosting extension: the guest > can open ":tt" with a file mode requesting append access in > order to open stderr, in addition to the existing "open for > read for stdin or write for stdout". Implement this and > report it via the :semi

Re: [Qemu-devel] Subject: Re: [PATCH] hw/block/nvme

2019-09-12 Thread Stefan Hajnoczi
On Tue, Sep 10, 2019 at 11:23:50PM +0300, Toe Dev wrote: > Hey, > While reviewing I noticed maybe we need to update the spec revision. > In: nvme_class_init(...) > > current code pc->revision=2 > change to: pc->revision=3 > However not really important I think.. Just for consistency. > When I don

Re: [Qemu-devel] [Qemu-arm] [PATCH 13/13] target/arm/arm-semi: Implement SH_EXT_EXIT_EXTENDED extension

2019-09-12 Thread Alex Bennée
Peter Maydell writes: > SH_EXT_EXIT_EXTENDED is a v2.0 semihosting extension: it > indicates that the implementation supports the SYS_EXIT_EXTENDED > function. This function allows both A64 and A32/T32 guests to > exit with a specified exit status, unlike the older SYS_EXIT > function which onl

Re: [Qemu-devel] [Qemu-arm] [PATCH 12/13] target/arm/arm-semi: Implement SH_EXT_STDOUT_STDERR extension

2019-09-12 Thread Peter Maydell
On Thu, 12 Sep 2019 at 13:05, Alex Bennée wrote: > > > Peter Maydell writes: > > +/* > > + * We implement SH_EXT_STDOUT_STDERR, so: > > + * open for read == stdin > > + * open for write == stdout > > + * open for append == stderr > >

Re: [Qemu-devel] [PATCH v2] docs/nvdimm: add example on persistent backend setup

2019-09-12 Thread Stefan Hajnoczi
On Thu, Aug 01, 2019 at 08:40:53AM +0800, Wei Yang wrote: > Persistent backend setup requires some knowledge about nvdimm and ndctl > tool. Some users report they may struggle to gather these knowledge and > have difficulty to setup it properly. > > Here we provide two examples for persistent back

[Qemu-devel] [PATCH v2 0/3] xen: fix a potential crash in xen-bus

2019-09-12 Thread Paul Durrant
This series fixes a potential segfault caused by NotifierList corruption in xen-bus. The first two patches lay the groundwork and the third actually fixes the problem. Paul Durrant (3): xen / notify: introduce a new XenWatchList abstraction xen: introduce separate XenWatchList for XenDevice ob

[Qemu-devel] [PATCH v2 1/3] xen / notify: introduce a new XenWatchList abstraction

2019-09-12 Thread Paul Durrant
Xenstore watch call-backs are already abstracted away from XenBus using the XenWatch data structure but the associated NotifierList manipulation and file handle registration is still open coded in various xen_bus_...() functions. This patch creates a new XenWatchList data structure to allow these i

[Qemu-devel] [PATCH 0/2] ati: fix ati_cursor_define bug.

2019-09-12 Thread Gerd Hoffmann
Gerd Hoffmann (2): vga: move access helpers to separate include file ati: use vga_read_byte in ati_cursor_define hw/display/vga-access.h | 49 hw/display/vga-helpers.h | 26 - hw/display/ati.c | 11 + hw/display/

[Qemu-devel] [PATCH 1/2] vga: move access helpers to separate include file

2019-09-12 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/display/vga-access.h | 49 hw/display/vga-helpers.h | 26 - hw/display/vga.c | 1 + 3 files changed, 50 insertions(+), 26 deletions(-) create mode 100644 hw/display/vga-access.h diff --git

[Qemu-devel] [PATCH v2 2/3] xen: introduce separate XenWatchList for XenDevice objects

2019-09-12 Thread Paul Durrant
This patch uses the XenWatchList abstraction to add a separate watch list for each device. This is more scalable than walking a single notifier list for all watches and is also necessary to implement a bug-fix in a subsequent patch. Signed-off-by: Paul Durrant Reviewed-by: Anthony Perard --- Cc:

[Qemu-devel] [PATCH v2 3/3] xen: perform XenDevice clean-up in XenBus watch handler

2019-09-12 Thread Paul Durrant
Cleaning up offine XenDevice objects directly in xen_device_backend_changed() is dangerous as xen_device_unrealize() will modify the watch list that is being walked. Even the QLIST_FOREACH_SAFE() used in notifier_list_notify() is insufficient as *two* notifiers (for the frontend and backend watches

[Qemu-devel] [PATCH 2/2] ati: use vga_read_byte in ati_cursor_define

2019-09-12 Thread Gerd Hoffmann
This makes sure reads are confined to vga video memory. Reported-by: xu hang Signed-off-by: Gerd Hoffmann --- hw/display/ati.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/display/ati.c b/hw/display/ati.c index 8f940eee221a..6d77c40b8287 100644 --- a/hw/dis

Re: [Qemu-devel] [RFC] docs: vhost-user: add in-band kick/call messages

2019-09-12 Thread Stefan Hajnoczi
On Wed, Sep 11, 2019 at 05:36:32PM +0200, Johannes Berg wrote: > On Wed, 2019-09-11 at 17:31 +0200, Stefan Hajnoczi wrote: > > > > +``VHOST_USER_VQ_CALL`` > > > > "call" should be "kick". "kick" is the driver->device request > > submission notification and "call" is the device->driver request >

[Qemu-devel] [PATCH v3 3/6] vmstate: replace DeviceState with VMStateIf

2019-09-12 Thread Marc-André Lureau
Replace DeviceState dependency with VMStateIf on vmstate API. Signed-off-by: Marc-André Lureau --- docs/devel/migration.rst | 2 +- hw/block/onenand.c | 2 +- hw/core/qdev.c | 7 --- hw/ide/cmd646.c | 2 +- hw/ide/isa.c | 2 +- hw

[Qemu-devel] [PATCH v3 2/6] vmstate: add qom interface to get id

2019-09-12 Thread Marc-André Lureau
Add an interface to get the instance id, instead of depending on Device and qdev_get_dev_path(). Signed-off-by: Marc-André Lureau --- hw/core/Makefile.objs| 1 + hw/core/qdev.c | 14 ++ hw/core/vmstate-if.c | 23 +++ include/hw/vmsta

[Qemu-devel] [PATCH v3 6/6] Add dbus-vmstate object

2019-09-12 Thread Marc-André Lureau
When instanciated, this object will connect to the given D-Bus bus. During migration, it will take the data from org.qemu.VMState1 instances. See documentation for further details. Signed-off-by: Marc-André Lureau --- MAINTAINERS | 6 + backends/Makefile.objs| 4 +

[Qemu-devel] [PATCH v3 4/6] tests: add qtest_expect_exit_status()

2019-09-12 Thread Marc-André Lureau
Modify the behaviour of qtest_quit() to check against the expected exit status value. The default remains 0. Signed-off-by: Marc-André Lureau --- tests/libqtest.c | 41 ++--- tests/libqtest.h | 9 + 2 files changed, 31 insertions(+), 19 deletions(-)

Re: [Qemu-devel] [PATCH v2 5/5] migration: Missing rcu_read_unlock

2019-09-12 Thread Paolo Bonzini
On 11/09/19 21:06, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Error path missing an unlock. > > Signed-off-by: Dr. David Alan Gilbert > --- > migration/ram.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/migration/ram.c b/migration/ram.c > index 1bb82a

[Qemu-devel] [PATCH v3 0/6] Add dbus-vmstate

2019-09-12 Thread Marc-André Lureau
Hi, With external processes or helpers participating to the VM support, it becomes necessary to handle their migration. Various options exist to transfer their state: 1) as the VM memory, RAM or devices (we could say that's how vhost-user devices can be handled today, they are expected to re

Re: [Qemu-devel] [PATCH 2/4] virtiofsd: add --print-capabilities option

2019-09-12 Thread Marc-André Lureau
Hi On Tue, Aug 27, 2019 at 1:55 PM Stefan Hajnoczi wrote: > > Add the --print-capabilities option as per vhost-user.rst "Backend > programs conventions". Currently there are no advertised features. > > Signed-off-by: Stefan Hajnoczi Reviewed-by: Marc-André Lureau > --- > docs/interop/vhost-

[Qemu-devel] [PATCH v3 1/6] migration: fix vmdesc leak on vmstate_save() error

2019-09-12 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- migration/qjson.h | 2 ++ migration/savevm.c | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/migration/qjson.h b/migration/qjson.h index 41664f2d71..1786bb5864 100644 --- a/migration/qjson.h +++ b/migration/qjson.h @@ -24,4 +24,6 @@ vo

[Qemu-devel] [Bug 1843151] Re: Regression: QEMU 4.1.0 qxl and KMS resoluiton only 4x10

2019-09-12 Thread James Harvey
Sorry, my #8 was really long. All builds I've done were in clean chroots, so starting from scratch with just git source, with no interference from other builds. Also later in #8, I show that --disable-glusterfs doesn't work because some part of the build looks for the .so that was never built. L

[Qemu-devel] [PATCH v3 5/6] docs: start a document to describe D-Bus usage

2019-09-12 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- docs/interop/dbus.rst | 73 ++ docs/interop/index.rst | 1 + 2 files changed, 74 insertions(+) create mode 100644 docs/interop/dbus.rst diff --git a/docs/interop/dbus.rst b/docs/interop/dbus.rst new file mode 100644

Re: [Qemu-devel] [PATCH 2/6] exec.c: remove an unnecessary assert on PHYS_MAP_NODE_NIL in phys_map_node_alloc()

2019-09-12 Thread Paolo Bonzini
On 12/09/19 04:51, Wei Yang wrote: > On Fri, Aug 23, 2019 at 09:07:50AM +0800, Wei Yang wrote: >> On Thu, Aug 22, 2019 at 12:24:32PM +0200, Paolo Bonzini wrote: >>> On 21/03/19 09:25, Wei Yang wrote: PHYS_MAP_NODE_NIL is assigned to PhysPageEntry.ptr in case this is not a leaf entry, whil

Re: [Qemu-devel] [PATCH v2 1/5] rcu: Add automatically released rcu_read_lock variant

2019-09-12 Thread Paolo Bonzini
On 11/09/19 21:06, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > RCU_READ_LOCK_AUTO takes the rcu_read_lock and then uses glib's > g_auto infrastructure (and thus whatever the compiler's hooks are) to > release it on all exits of the block. > > Signed-off-by: Dr. David

Re: [Qemu-devel] [PULL 15/36] memory: fix race between TCG and accesses to dirty bitmap

2019-09-12 Thread Paolo Bonzini
On 26/08/19 14:19, dovgaluk wrote: > This patch breaks the execution recording. > While vCPU tries to lock replay mutex in main while loop, > vga causes dirty memory sync and do_run_on_cpu call. > This call waits for vCPU to process the work queue. IIUC there is a deadlock because VGA (from the I/

Re: [Qemu-devel] [PATCH 0/3] proper locking on bitmap add/remove paths

2019-09-12 Thread Vladimir Sementsov-Ogievskiy
12.09.2019 0:46, John Snow wrote: > > > On 9/11/19 10:09 AM, Vladimir Sementsov-Ogievskiy wrote: >> 10.09.2019 23:37, no-re...@patchew.org wrote: >>> Patchew URL: >>> https://patchew.org/QEMU/20190910162724.79574-1-vsement...@virtuozzo.com/ >>> >>> >>> >>> Hi, >>> >>> This series failed the dock

[Qemu-devel] [PATCH v2] ppc: Add support for 'mffscrn', 'mffscrni' instructions

2019-09-12 Thread Paul A. Clarke
From: "Paul A. Clarke" ISA 3.0B added a set of Floating-Point Status and Control Register (FPSCR) instructions: mffsce, mffscdrn, mffscdrni, mffscrn, mffscrni, mffsl. This patch adds support for 'mffscrn' and 'mffscrni' instructions. 'mffscrn' and 'mffscrni' are similar to 'mffsl', except they d

[Qemu-devel] [PATCH] ppc: Add support for 'mffsce' instruction

2019-09-12 Thread Paul A. Clarke
From: "Paul A. Clarke" ISA 3.0B added a set of Floating-Point Status and Control Register (FPSCR) instructions: mffsce, mffscdrn, mffscdrni, mffscrn, mffscrni, mffsl. This patch adds support for 'mffsce' instruction. 'mffsce' is identical to 'mffs', except that it also clears the exception enabl

[Qemu-devel] [Bug 1843711] [NEW] qemu-xhci device should detect if libusb host supports streams

2019-09-12 Thread Anisse Astier
Public bug reported: When using USB passthrough with the qemu-xhci (and nec-usb-xhci), streams are enabled by default, but if the host xHCI controller doesn't support them, it will trigger hard-to-debug UAS guest errors. This should be possible to detect since the kernel returns ENOSYS (errno 38)

[Qemu-devel] [PATCH] hw/*/Makefile.objs: Move many .o files to common-objs

2019-09-12 Thread Thomas Huth
We have many files that apparently do not depend on the target CPU configuration, i.e. which can be put into common-obj-y instead of obj-y. This way, the code can be shared for example between qemu-system-arm and qemu-system-aarch64, or the various big and little endian variants like qemu-system-sh

Re: [Qemu-devel] [PATCH] hw/arm/raspi: avoid reparenting the sd card during qbus tree reset

2019-09-12 Thread Damien Hedde
On 9/6/19 12:36 PM, Peter Maydell wrote: > On Wed, 4 Sep 2019 at 17:23, Damien Hedde wrote: >> >> In the raspi machine, the sd card can be on several sd bus (in reality >> there is one bus but several controllers). It is initially created in >> the "sd-bus" child in the gpio peripheral. Then is

Re: [Qemu-devel] Valgrind confused by queue macros

2019-09-12 Thread Andrey Shinkevich
On 12/09/2019 02:15, John Snow wrote: > > > On 9/10/19 9:27 AM, Mark Syms wrote: >> Hi, >> >> While trying to track down an issue in using qemu 4.1 with some development >> features we needed/wanted to run valgrind on it to find a memory error. >> Unfortunately the form of the queue macros se

[Qemu-devel] [PULL 04/22] iotests: Test reverse sub-cluster qcow2 writes

2019-09-12 Thread Kevin Wolf
From: Max Reitz This exercises the regression introduced in commit 50ba5b2d994853b38fed10e0841b119da0f8b8e5. On my machine, it has close to a 50 % false-negative rate, but that should still be sufficient to test the fix. Signed-off-by: Max Reitz Reviewed-by: Stefano Garzarella Reviewed-by: Jo

[Qemu-devel] [PULL 10/22] iotests: Restrict nbd Python tests to nbd

2019-09-12 Thread Kevin Wolf
From: Max Reitz We have two Python unittest-style tests that test NBD. As such, they should specify supported_protocols=['nbd'] so they are skipped when the user wants to test some other protocol. Furthermore, we should restrict their choice of formats to 'raw'. The idea of a protocol/format c

[Qemu-devel] [PULL 01/22] qcow2: Fix the calculation of the maximum L2 cache size

2019-09-12 Thread Kevin Wolf
From: Alberto Garcia The size of the qcow2 L2 cache defaults to 32 MB, which can be easily larger than the maximum amount of L2 metadata that the image can have. For example: with 64 KB clusters the user would need a qcow2 image with a virtual size of 256 GB in order to have 32 MB of L2 metadata.

[Qemu-devel] [PULL 03/22] block/file-posix: Reduce xfsctl() use

2019-09-12 Thread Kevin Wolf
From: Max Reitz This patch removes xfs_write_zeroes() and xfs_discard(). Both functions have been added just before the same feature was present through fallocate(): - fallocate() has supported PUNCH_HOLE for XFS since Linux 2.6.38 (March 2011); xfs_discard() was added in December 2010. - fa

[Qemu-devel] [PULL 08/22] iotests: Add supported protocols to execute_test()

2019-09-12 Thread Kevin Wolf
From: Max Reitz Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- tests/qemu-iotests/iotests.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 84438e837c..b26271187c 100644 --- a/tests/qemu-iotests

[Qemu-devel] [PULL 00/22] Block layer patches

2019-09-12 Thread Kevin Wolf
The following changes since commit 89ea03a7dc83ca36b670ba7f787802791fcb04b1: Merge remote-tracking branch 'remotes/huth-gitlab/tags/m68k-pull-2019-09-07' into staging (2019-09-09 09:48:34 +0100) are available in the Git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for y

[Qemu-devel] [PULL 15/22] iotests: exclude killed processes from running under Valgrind

2019-09-12 Thread Kevin Wolf
From: Andrey Shinkevich The Valgrind tool fails to manage its termination in multi-threaded processes when they raise the signal SIGKILL. The bug has been reported to the Valgrind maintainers and was registered as the bug #409141: https://bugs.kde.org/show_bug.cgi?id=409141 Let's exclude suc

[Qemu-devel] [PULL 02/22] job: drop job_drain

2019-09-12 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy In job_finish_sync job_enter should be enough for a job to make some progress and draining is a wrong tool for it. So use job_enter directly here and drop job_drain with all related staff not used more. Suggested-by: Kevin Wolf Signed-off-by: Vladimir Sementso

[Qemu-devel] [PULL 11/22] iotests: Test blockdev-create for vpc

2019-09-12 Thread Kevin Wolf
From: Max Reitz Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- tests/qemu-iotests/266 | 153 + tests/qemu-iotests/266.out | 137 + tests/qemu-iotests/group | 1 + 3 files changed, 291 insertions(+) create mode

[Qemu-devel] [PULL 06/22] file-posix: Fix has_write_zeroes after NO_FALLBACK

2019-09-12 Thread Kevin Wolf
If QEMU_AIO_NO_FALLBACK is given, we always return failure and don't even try to use the BLKZEROOUT ioctl. In this failure case, we shouldn't disable has_write_zeroes because we didn't learn anything about the ioctl. The next request might not set QEMU_AIO_NO_FALLBACK and we can still use the ioctl

[Qemu-devel] [PULL 05/22] pr-manager: Fix invalid g_free() crash bug

2019-09-12 Thread Kevin Wolf
From: Markus Armbruster pr_manager_worker() passes its @opaque argument to g_free(). Wrong; it points to pr_manager_worker()'s automatic @data. Broken when commit 2f3a7ab39be converted @data from heap- to stack-allocated. Fix by deleting the g_free(). Fixes: 2f3a7ab39bec4ba8022dc4d42ea641165b

[Qemu-devel] [PULL 18/22] iotests: extended timeout under Valgrind

2019-09-12 Thread Kevin Wolf
From: Andrey Shinkevich As the iotests run longer under the Valgrind, the QEMU_COMM_TIMEOUT is to be increased in the test cases 028, 183 and 192 when running under the Valgrind. Suggested-by: Roman Kagan Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by:

[Qemu-devel] [PULL 16/22] iotests: Add casenotrun report to bash tests

2019-09-12 Thread Kevin Wolf
From: Andrey Shinkevich The new function _casenotrun() is to be invoked if a test case cannot be run for some reason. The user will be notified by a message passed to the function. It is the caller's responsibility to make skipped a particular test. Suggested-by: Kevin Wolf Signed-off-by: Andre

[Qemu-devel] [PULL 09/22] iotests: Restrict file Python tests to file

2019-09-12 Thread Kevin Wolf
From: Max Reitz Most of our Python unittest-style tests only support the file protocol. You can run them with any other protocol, but the test will simply ignore your choice and use file anyway. We should let them signal that they require the file protocol so they are skipped when you want to te

[Qemu-devel] [PULL 07/22] vpc: Return 0 from vpc_co_create() on success

2019-09-12 Thread Kevin Wolf
From: Max Reitz blockdev_create_run() directly uses .bdrv_co_create()'s return value as the job's return value. Jobs must return 0 on success, not just any nonnegative value. Therefore, using blockdev-create for VPC images may currently fail as the vpc driver may return a positive integer. Bec

[Qemu-devel] [PULL 21/22] block/create: Do not abort if a block driver is not available

2019-09-12 Thread Kevin Wolf
From: Philippe Mathieu-Daudé The 'blockdev-create' QMP command was introduced as experimental feature in commit b0292b851b8, using the assert() debug call. It got promoted to 'stable' command in 3fb588a0f2c, but the assert call was not removed. Some block drivers are optional, and bdrv_find_form

[Qemu-devel] [PULL 17/22] iotests: Valgrind fails with nonexistent directory

2019-09-12 Thread Kevin Wolf
From: Andrey Shinkevich The Valgrind uses the exported variable TMPDIR and fails if the directory does not exist. Let us exclude such a test case from being run under the Valgrind and notify the user of it. Suggested-by: Kevin Wolf Signed-off-by: Andrey Shinkevich Reviewed-by: John Snow Signe

[Qemu-devel] [PULL 12/22] iotests: skip 232 when run tests as root

2019-09-12 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy chmod a-w don't help under root, so skip the test in such case. Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Kevin Wolf --- tests/qemu-iotests/232 | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tests/qemu-iotests/232 b/tests/qemu-iot

[Qemu-devel] [PULL 22/22] qcow2: Stop overwriting compressed clusters one by one

2019-09-12 Thread Kevin Wolf
From: Alberto Garcia handle_alloc() tries to find as many contiguous clusters that need copy-on-write as possible in order to allocate all of them at the same time. However, compressed clusters are only overwritten one by one, so let's say that we have an image with 1024 consecutive compressed c

[Qemu-devel] [PULL 02/12] migration: cleanup check on ops in savevm.handlers iterations

2019-09-12 Thread Dr. David Alan Gilbert (git)
From: Wei Yang During migration, there are several places to iterate on savevm.handlers. And on each iteration, we need to check its ops and related callbacks before invoke it. Generally, ops is the first element to check, and it is only necessary to check it once. This patch clean all the rela

[Qemu-devel] [PULL 20/22] qemu-io: Don't leak pattern file in error path

2019-09-12 Thread Kevin Wolf
qemu_io_alloc_from_file() needs to close the pattern file even if some error occurred. Setting f = NULL in the success path and checking it for NULL in the error path isn't strictly necessary at this point, but let's do it anyway in case someone later adds a 'goto error' after closing the file. C

[Qemu-devel] [PULL 13/22] block/nfs: add support for nfs_umount

2019-09-12 Thread Kevin Wolf
From: Peter Lieven libnfs recently added support for unmounting. Add support in Qemu too. Signed-off-by: Peter Lieven Signed-off-by: Kevin Wolf --- block/nfs.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/block/nfs.c b/block/nfs.c index 0ec50953e4..9d30963fd8 100644

[Qemu-devel] [PULL 05/12] qemu-file: Rework old qemu_fflush comment

2019-09-12 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Commit 11808bb removed the non-iovec based write support, the comment hung on. Signed-off-by: Dr. David Alan Gilbert Message-Id: <20190823103946.7388-1-dgilb...@redhat.com> Reviewed-by: Daniel P. Berrangé Reviewed-by: Stefano Garzarella Reviewed-by: Juan Quintel

[Qemu-devel] R: issue related to boot aix 7.1 when I try to use qemu ppc64

2019-09-12 Thread Muolo Vincenzo (S.I.)
Hi David Thanks also for for answer Now I try to install the qemu (4.1) into DEB Server ( qemu_4.1-1+b1_ppc64.deb ) however I had the following error : apt install /home/vmuolo/qemu_4.1-1+b1_ppc64.deb dpkg: error in processing the archive /home/vmuolo/qemu_4.1-1+b1_ppc64.deb (--unpack):

[Qemu-devel] [PULL 00/12] migration queue

2019-09-12 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit 89ea03a7dc83ca36b670ba7f787802791fcb04b1: Merge remote-tracking branch 'remotes/huth-gitlab/tags/m68k-pull-2019-09-07' into staging (2019-09-09 09:48:34 +0100) are available in the Git repository at: git://github.com/dagrh/

[Qemu-devel] [PULL 14/22] iotests: allow Valgrind checking all QEMU processes

2019-09-12 Thread Kevin Wolf
From: Andrey Shinkevich With the '-valgrind' option, let all the QEMU processes be run under the Valgrind tool. The Valgrind own parameters may be set with its environment variable VALGRIND_OPTS, e.g. $ VALGRIND_OPTS="--leak-check=yes" ./check -valgrind or they may be listed in the Valgrind chec

[Qemu-devel] [PULL 07/12] tests/libqtest: Allow setting expected exit status

2019-09-12 Thread Dr. David Alan Gilbert (git)
From: Yury Kotov Add qtest_set_expected_status function to set expected exit status of child process. By default expected exit status is 0. Signed-off-by: Yury Kotov Message-Id: <20190903162246.18524-3-yury-ko...@yandex-team.ru> Acked-by: Thomas Huth Reviewed-by: Dr. David Alan Gilbert Signed

[Qemu-devel] [PULL 06/12] migration: Add validate-uuid capability

2019-09-12 Thread Dr. David Alan Gilbert (git)
From: Yury Kotov This capability realizes simple source validation by UUID. It's useful for live migration between hosts. Signed-off-by: Yury Kotov Message-Id: <20190903162246.18524-2-yury-ko...@yandex-team.ru> Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Dr. David Alan Gilbert --- mig

[Qemu-devel] [PULL 01/12] migration: multifd_send_thread always post p->sem_sync when error happen

2019-09-12 Thread Dr. David Alan Gilbert (git)
From: Ivan Ren When encounter error, multifd_send_thread should always notify who pay attention to it before exit. Otherwise it may block migration_thread at multifd_send_sync_main forever. Error as follow: --- (gdb) bt

[Qemu-devel] [PATCH 0/4] mirror: Do not dereference invalid pointers

2019-09-12 Thread Max Reitz
Hi, The fix (patch 1) is pretty straightforward; patch 2 (which I need for the test) may not be. The biggest problem with patch 2 is that you can use it to uncover where our permission handling is broken. For example, devising the test case (patch 4) was very difficult because I kept running int

[Qemu-devel] [PULL 19/22] iotests: extend sleeping time under Valgrind

2019-09-12 Thread Kevin Wolf
From: Andrey Shinkevich To synchronize the time when QEMU is running longer under the Valgrind, increase the sleeping time in the test 247. Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow Signed-off-by: Kevin Wolf --- tests/qemu-iotests/247

[Qemu-devel] [PATCH 1/4] mirror: Do not dereference invalid pointers

2019-09-12 Thread Max Reitz
mirror_exit_common() may be called twice (if it is called from mirror_prepare() and fails, it will be called from mirror_abort() again). In such a case, many of the pointers in the MirrorBlockJob object will already be freed. This can be seen most reliably for s->target, which is set to NULL (and

[Qemu-devel] [PULL 10/12] migration/qemu-file: remove check on writev_buffer in qemu_put_compression_data

2019-09-12 Thread Dr. David Alan Gilbert (git)
From: Wei Yang The check of writev_buffer is in qemu_fflush, which means it is not harmful if it is NULL. And removing it will make the code consistent since all other add_to_iovec() is called without the check. Signed-off-by: Wei Yang Reviewed-by: Dr. David Alan Gilbert Message-Id: <20190911

[Qemu-devel] [PULL 03/12] hw/net/vmxnet3: Fix leftover unregister_savevm

2019-09-12 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Commit 78dd48df3 reworked vmxnet3's live migration but left a straggling unregister_savevm call. Remove it, although it doesn't seem to have any bad effect. Signed-off-by: Dr. David Alan Gilbert Message-Id: <20190822111218.12079-1-dgilb...@redhat.com> Reviewed-by

[Qemu-devel] [PATCH 2/4] blkdebug: Allow taking/unsharing permissions

2019-09-12 Thread Max Reitz
Sometimes it is useful to be able to add a node to the block graph that takes or unshare a certain set of permissions for debugging purposes. This patch adds this capability to blkdebug. (Note that you cannot make blkdebug release or share permissions that it needs to take or cannot share, because

[Qemu-devel] [PATCH 4/4] iotests: Add test for failing mirror complete

2019-09-12 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/041 | 44 ++ tests/qemu-iotests/041.out | 4 ++-- 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/041 b/tests/qemu-iotests/041 index 8568426311..84bc6d6581 100755 --- a/test

[Qemu-devel] [PULL 12/12] migration: fix one typo in comment of function migration_total_bytes()

2019-09-12 Thread Dr. David Alan Gilbert (git)
From: Wei Yang Signed-off-by: Wei Yang Message-Id: <20190912024957.11780-1-richardw.y...@linux.intel.com> Reviewed-by: Juan Quintela Signed-off-by: Dr. David Alan Gilbert --- migration/migration.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/migration.c b/migr

[Qemu-devel] [PULL 04/12] migration: register_savevm_live doesn't need dev

2019-09-12 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Commit 78dd48df3 removed the last caller of register_savevm_live for an instantiable device (rather than a single system wide device); so trim out the parameter. Signed-off-by: Dr. David Alan Gilbert Message-Id: <20190822115433.12070-1-dgilb...@redhat.com> Reviewe

[Qemu-devel] [PATCH 3/4] iotests: Add @error to wait_until_completed

2019-09-12 Thread Max Reitz
Callers can use this new parameter to expect failure during the completion process. Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py ind

Re: [Qemu-devel] [PATCH] hw/*/Makefile.objs: Move many .o files to common-objs

2019-09-12 Thread Paolo Bonzini
On 12/09/19 15:10, Thomas Huth wrote: > We have many files that apparently do not depend on the target CPU > configuration, i.e. which can be put into common-obj-y instead of > obj-y. This way, the code can be shared for example between > qemu-system-arm and qemu-system-aarch64, or the various big

[Qemu-devel] [PATCH] target/m68k/fpu_helper.c: rename the access arguments

2019-09-12 Thread KONRAD Frederic
The "access" arguments clash with a macro under Windows with MinGW: CC m68k-softmmu/target/m68k/fpu_helper.o target/m68k/fpu_helper.c: In function 'fmovem_predec': target/m68k/fpu_helper.c:405:56: error: macro "access" passed 4 arguments, but takes just 2 size = access(

Re: [Qemu-devel] [PATCH v3 0/6] Add dbus-vmstate

2019-09-12 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190912122514.22504-1-marcandre.lur...@redhat.com/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT

[Qemu-devel] [PATCH v2] memory: inline and optimize devend_memop

2019-09-12 Thread Paolo Bonzini
devend_memop can rely on the fact that the result is always either 0 or MO_BSWAP, corresponding respectively to host endianness and the opposite. Native (target) endianness in turn can be either the host endianness, in which case MO_BSWAP is only returned for host-opposite endianness, or the oppos

Re: [Qemu-devel] R: issue related to boot aix 7.1 when I try to use qemu ppc64

2019-09-12 Thread Peter Maydell
On Thu, 12 Sep 2019 at 15:09, Muolo Vincenzo (S.I.) wrote: > > Hi David Thanks also for for answer > > Now I try to install the qemu (4.1) into DEB Server ( > qemu_4.1-1+b1_ppc64.deb ) however I had the following error : > > apt install /home/vmuolo/qemu_4.1-1+b1_ppc64.deb > dpkg: error in pr

[Qemu-devel] [PULL 09/12] migration: Fix postcopy bw for recovery

2019-09-12 Thread Dr. David Alan Gilbert (git)
From: Peter Xu We've got max-postcopy-bandwidth parameter but it's not applied correctly after a postcopy recovery so the recovered migration stream will still eat the whole net bandwidth. Fix that up. Reported-by: Xiaohui Li Signed-off-by: Peter Xu Message-Id: <20190906130103.20961-1-pet...@

Re: [Qemu-devel] [PATCH v2 05/17] RISC-V: add vector extension load and store instructions

2019-09-12 Thread Richard Henderson
> +static bool vector_lmul_check_reg(CPURISCVState *env, uint32_t lmul, > +uint32_t reg, bool widen) > +{ > +int legal = widen ? (lmul * 2) : lmul; > + > +if ((lmul != 1 && lmul != 2 && lmul != 4 && lmul != 8) || > +(lmul == 8 && widen)) { > +helper_raise_exception(

[Qemu-devel] [PULL 08/12] tests/migration: Add a test for validate-uuid capability

2019-09-12 Thread Dr. David Alan Gilbert (git)
From: Yury Kotov Signed-off-by: Yury Kotov Message-Id: <20190903162246.18524-4-yury-ko...@yandex-team.ru> Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Dr. David Alan Gilbert --- tests/migration-test.c | 140 - 1 file changed, 110 insertions(+), 30

<    1   2   3   4   >