[Qemu-devel] [PATCH v11 02/10] blkverify: set supported write/zero flags

2018-12-18 Thread Anton Nefedov
Signed-off-by: Anton Nefedov Reviewed-by: Alberto Garcia Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/blkverify.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/block/blkverify.c b/block/blkverify.c index 89bf4386e3..bb52596cbb 100644 --- a/block/blkverify

[Qemu-devel] [PATCH v11 04/10] block: introduce BDRV_REQ_ALLOCATE flag

2018-12-18 Thread Anton Nefedov
The flag is supposed to indicate that the region of the disk image has to be sufficiently allocated so it reads as zeroes. The call with the flag set must return -ENOTSUP if allocation cannot be done efficiently. This has to be made sure of by both - the drivers that support the flag - and the

[Qemu-devel] [PATCH v11 06/10] file-posix: reset fallocate-related flags without CONFIG_FALLOCATE*

2018-12-18 Thread Anton Nefedov
these flags currently affect nothing without CONFIG_FALLOCATE*, so it's not a bug. Fixing it makes possible to adjust supported zero flag BDRV_REQ_ALLOCATE regardless of configuration (in the following patch). Signed-off-by: Anton Nefedov --- block/file-posix.c | 8 ++-- 1 file changed, 6 in

[Qemu-devel] [PATCH v11 10/10] iotest 134: test cluster-misaligned encrypted write

2018-12-18 Thread Anton Nefedov
COW (even empty/zero) areas require encryption too Signed-off-by: Anton Nefedov Reviewed-by: Eric Blake Reviewed-by: Max Reitz Reviewed-by: Alberto Garcia --- tests/qemu-iotests/134 | 9 + tests/qemu-iotests/134.out | 10 ++ 2 files changed, 19 insertions(+) diff --git a

[Qemu-devel] [PATCH v11 08/10] block: support BDRV_REQ_ALLOCATE in passthrough drivers

2018-12-18 Thread Anton Nefedov
Support the flag if the underlying BDS supports it Signed-off-by: Anton Nefedov Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia --- block/blkdebug.c | 2 +- block/blkverify.c| 2 +- block/copy-on-read.c | 4 ++-- block/mirror.c | 2 +- block/raw-format.c |

[Qemu-devel] [PATCH v11 09/10] qcow2: skip writing zero buffers to empty COW areas

2018-12-18 Thread Anton Nefedov
If COW areas of the newly allocated clusters are zeroes on the backing image, efficient bdrv_write_zeroes(flags=BDRV_REQ_ALLOCATE) can be used on the whole cluster instead of writing explicit zero buffers later in perform_cow(). iotest 060: write to the discarded cluster does not trigger COW anymo

[Qemu-devel] [PATCH v11 05/10] block: treat BDRV_REQ_ALLOCATE as serialising

2018-12-18 Thread Anton Nefedov
The idea is that ALLOCATE requests may overlap with other requests. Reuse the existing block layer infrastructure for serialising requests. Use the following approach: - mark ALLOCATE also SERIALISING, so subsequent requests to the area wait - ALLOCATE request itself must never wait if another

Re: [Qemu-devel] [QEMU PATCH] hw/i386: Remove deprecated machines pc-0.10 and pc-0.11

2018-12-18 Thread Thomas Huth
On 2018-12-17 23:57, Michael S. Tsirkin wrote: > On Mon, Dec 17, 2018 at 05:35:22PM -0200, Eduardo Habkost wrote: >> On Mon, Dec 17, 2018 at 05:57:37PM +0100, Thomas Huth wrote: >>> They've been deprecated for two releases and nobody complained that they >>> are still required anymore, so it's time

Re: [Qemu-devel] [PATCH v9 2/7] target/ppc: replace __builtin_ffssl() by the equivalent ctz routines

2018-12-18 Thread Cédric Le Goater
On 12/18/18 3:23 AM, David Gibson wrote: > On Mon, Dec 17, 2018 at 11:34:40PM +0100, Cédric Le Goater wrote: >> And remove the intermediate MASK_TO_LSH macro which does not add any value. >> >> This fixes a compile breakage on windows. >> >> Signed-off-by: Cédric Le Goater > > It's an improvement

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

2018-12-18 Thread Zhang Yi
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 mounted with '-o dax'). A description of MAP_SYNC and MAP_SHARED_VALIDATE can be found at https://patchwork.kernel.org/patch

[Qemu-devel] [PATCH V7 2/6] util/mmap-alloc: switch qemu_ram_mmap() to 'flags' parameter

2018-12-18 Thread Zhang Yi
As more flag parameters besides the existing 'shared' are going to be added to qemu_ram_mmap(), let's switch 'shared' to a 'flags' parameter in advance, so as to ease the further additions. Signed-off-by: Haozhong Zhang Signed-off-by: Zhang Yi --- exec.c| 7 --- include

[Qemu-devel] [PATCH V7 4/6] util/mmap-alloc: Switch the RAM_SYNC flags to OnOffAuto

2018-12-18 Thread Zhang Yi
Signed-off-by: Zhang Yi A set of RAM_SYNC_ON_OFF_AUTO{AUTO,ON,OFF} flags are added to qemu_ram_mmap(): - If RAM_SYNC_ON_OFF_AUTO_ON is present, qemu_ram_mmap() will try to pass MAP_SYNC to mmap(). It will then fail if the host OS or the backend file do not support MAP_SYNC, or MAP_SYNC is co

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

2018-12-18 Thread Zhang Yi
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 set of RAM_SYNC flags are added to qemu_ram_mmap(): Signed-off-by: Haozhong

[Qemu-devel] [PATCH V7 1/6] numa: Fixed the memory leak of numa error message

2018-12-18 Thread Zhang Yi
object_get_canonical_path_component() returns a string which must be freed using g_free(). Signed-off-by: Zhang Yi Reviewed-by: Pankaj gupta Reviewed-by: Igor Mammedov --- numa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/numa.c b/numa.c index 50ec016..3875e1e 100644 --- a/numa.c +++

[Qemu-devel] [PATCH V7 6/6] hostmem-file: add 'sync' option

2018-12-18 Thread Zhang Yi
This option controls whether QEMU mmap(2) the memory backend file with MAP_SYNC flag, which could consistent filesystem metadata for each guest write, 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 file

[Qemu-devel] [PATCH V7 5/6] hostmem: add more information in error messages

2018-12-18 Thread Zhang Yi
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 Signed-off-by: Zhang Yi --- backends/hostmem-file.c | 6 -- backends/hostmem.c | 8 +--- 2

[Qemu-devel] Regression test with --disable options (was: qapi: add conditions to REPLICATION type/commands on the schema)

2018-12-18 Thread Thomas Huth
On 2018-12-17 20:18, Markus Armbruster wrote: > Thomas Huth writes: > >> On 2018-12-13 19:43, Markus Armbruster wrote: >>> From: Marc-André Lureau >>> >>> Add #if defined(CONFIG_REPLICATION) in generated code, and adjust the >>> code accordingly. >>> >>> Made conditional: >>> >>> * xen-set-repli

Re: [Qemu-devel] [PATCH v3 6/7] iotests: allow pretty-print for qmp_log

2018-12-18 Thread Vladimir Sementsov-Ogievskiy
17.12.2018 22:21, John Snow wrote: > > > On 12/17/18 11:37 AM, Vladimir Sementsov-Ogievskiy wrote: >> 17.12.2018 17:26, Vladimir Sementsov-Ogievskiy wrote: >>> 15.12.2018 2:15, John Snow wrote: If iotests have lines exceeding >998 characters long, git doesn't want to send it plaintext t

Re: [Qemu-devel] [PATCH v3 7/7] iotests: add iotest 236 for testing bitmap merge

2018-12-18 Thread Vladimir Sementsov-Ogievskiy
18.12.2018 0:32, John Snow wrote: > > > On 12/17/18 10:48 AM, Vladimir Sementsov-Ogievskiy wrote: >> 15.12.2018 2:15, John Snow wrote: >>> New interface, new smoke test. >>> --- >>>tests/qemu-iotests/236 | 124 +++ >>>tests/qemu-iotests/236.out | 200 +++

Re: [Qemu-devel] [PATCH v3 2/2] hw: vmmouse: Use link instead of pointer property

2018-12-18 Thread Li Qiang
Markus Armbruster 于2018年12月18日周二 下午3:10写道: > Philippe Mathieu-Daudé writes: > > > On 12/17/18 8:01 PM, Markus Armbruster wrote: > >> Philippe Mathieu-Daudé writes: > >> > >>> Hi Li, > >>> > >>> On 11/29/18 5:52 AM, Li Qiang wrote: > According to qdev-properties.h, properties of pointer typ

Re: [Qemu-devel] [PATCH] blk: postpone request execution on a context protected with "drained section"

2018-12-18 Thread Denis Plotnikov
ping ping On 14.12.2018 14:54, Denis Plotnikov wrote: > > > On 13.12.2018 15:20, Kevin Wolf wrote: >> Am 13.12.2018 um 12:07 hat Denis Plotnikov geschrieben: >>> On 12.12.2018 15:24, Kevin Wolf wrote: Am 11.12.2018 um 17:55 hat Denis Plotnikov geschrieben: >> Why involve the AioContext

Re: [Qemu-devel] [PATCH V7 0/6] nvdimm: support MAP_SYNC for memory-backend-file

2018-12-18 Thread Stefan Hajnoczi
On Tue, Dec 18, 2018 at 04:16:44PM +0800, Zhang Yi wrote: > 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 mounted with '-o dax'). > > A description of MAP_SYNC and MAP_SH

Re: [Qemu-devel] [PATCH v3 7/7] iotests: add iotest 236 for testing bitmap merge

2018-12-18 Thread Vladimir Sementsov-Ogievskiy
15.12.2018 2:15, John Snow wrote: > New interface, new smoke test. don't forget to add s-o-b here and in previous patch :) Feel, that I do too much nitpicking. Actually test is good and works for me, so, with at least qemu_img_pipe -> qemu_img or qemu_img_create and added newline at the end of g

Re: [Qemu-devel] [Qemu-ppc] [PATCH] spapr: Add H-Call H_HOME_NODE_ASSOCIATIVITY

2018-12-18 Thread Greg Kurz
On Tue, 18 Dec 2018 08:50:00 +0100 Laurent Vivier wrote: > On 18/12/2018 05:29, David Gibson wrote: > > On Mon, Dec 17, 2018 at 03:00:55PM +0100, Laurent Vivier wrote: > >> H_HOME_NODE_ASSOCIATIVITY H-Call returns the associativity domain > >> designation associated with the identifier input pa

Re: [Qemu-devel] [PATCH v13 0/6] Add support for TPM Physical Presence interface

2018-12-18 Thread Marc-André Lureau
Hi Michael, On Tue, Dec 18, 2018 at 5:42 AM Michael S. Tsirkin wrote: > > On Thu, Dec 13, 2018 at 02:26:42AM +0400, Marc-André Lureau wrote: > > Hi, > > > > The following patches implement the TPM Physical Presence Interface > > that allows a user to set a command via ACPI (sysfs entry in Linux)

Re: [Qemu-devel] [PATCH v3 1/2] intel-iommu: differentiate host address width from IOVA address width.

2018-12-18 Thread Yu Zhang
On Mon, Dec 17, 2018 at 02:17:40PM +0100, Igor Mammedov wrote: > On Wed, 12 Dec 2018 21:05:38 +0800 > Yu Zhang wrote: > > > Currently, vIOMMU is using the value of IOVA address width, instead of > > the host address width(HAW) to calculate the number of reserved bits in > > data structures such a

Re: [Qemu-devel] [PATCH qemu v3] ppc/spapr: Receive and store device tree blob from SLOF

2018-12-18 Thread Greg Kurz
On Tue, 18 Dec 2018 18:54:33 +1100 Alexey Kardashevskiy wrote: > On 18/12/2018 15:30, Alexey Kardashevskiy wrote: > > > > > > On 18/12/2018 14:49, David Gibson wrote: > >> On Tue, Dec 18, 2018 at 02:04:54PM +1100, Alexey Kardashevskiy wrote: > >>> > >>> > >>> On 18/12/2018 13:09, David Gibs

Re: [Qemu-devel] [PATCH v9 2/7] target/ppc: replace __builtin_ffssl() by the equivalent ctz routines

2018-12-18 Thread David Gibson
On Tue, Dec 18, 2018 at 09:07:47AM +0100, Cédric Le Goater wrote: > On 12/18/18 3:23 AM, David Gibson wrote: > > On Mon, Dec 17, 2018 at 11:34:40PM +0100, Cédric Le Goater wrote: > >> And remove the intermediate MASK_TO_LSH macro which does not add any value. > >> > >> This fixes a compile breakage

Re: [Qemu-devel] [PATCH 00/34] tcg, target/ppc vector improvements

2018-12-18 Thread Mark Cave-Ayland
On 18/12/2018 06:38, Richard Henderson wrote: > This implements some of the things that I talked about with Mark > this morning / yesterday. In particular: > > (0) Implement expanders for nand, nor, eqv logical operations. > > (1) Implement saturating arithmetic for the tcg backend. > > Wh

Re: [Qemu-devel] [PATCH v3 2/2] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-12-18 Thread Yu Zhang
On Mon, Dec 17, 2018 at 02:29:02PM +0100, Igor Mammedov wrote: > On Wed, 12 Dec 2018 21:05:39 +0800 > Yu Zhang wrote: > > > A 5-level paging capable VM may choose to use 57-bit IOVA address width. > > E.g. guest applications may prefer to use its VA as IOVA when performing > > VFIO map/unmap oper

Re: [Qemu-devel] [PATCH v3] s390x/pci: add common function measurement block

2018-12-18 Thread Cornelia Huck
On Fri, 14 Dec 2018 17:53:42 +0100 Pierre Morel wrote: > From: Yi Min Zhao > > Common function measurement block is used to report zPCI internal > counters of successful pcilg/stg/stb and rpcit instructions to > a memory location provided by the program. > > This patch introduces a new ZpciFmb

[Qemu-devel] [PATCH v2 for-4.0 0/7] vhost-user-blk: Add support for backend reconnecting

2018-12-18 Thread elohimes
From: Xie Yongji This patchset is aimed at supporting qemu to reconnect vhost-user-blk backend after vhost-user-blk backend crash or restart. The patch 1 adds a "disconnected" option to init the chardev socket in disconnected state. The patch 2 introduces two new messages VHOST_USER_GET_SHM_SIZ

Re: [Qemu-devel] [Qemu-ppc] [PATCH] spapr: Add H-Call H_HOME_NODE_ASSOCIATIVITY

2018-12-18 Thread Laurent Vivier
On 18/12/2018 10:23, Greg Kurz wrote: > On Tue, 18 Dec 2018 08:50:00 +0100 > Laurent Vivier wrote: > >> On 18/12/2018 05:29, David Gibson wrote: >>> On Mon, Dec 17, 2018 at 03:00:55PM +0100, Laurent Vivier wrote: H_HOME_NODE_ASSOCIATIVITY H-Call returns the associativity domain design

[Qemu-devel] [PATCH v2 for-4.0 2/7] vhost-user: Support providing shared memory to backend

2018-12-18 Thread elohimes
From: Xie Yongji This patch introduces two new messages VHOST_USER_GET_SHM_SIZE and VHOST_USER_SET_SHM_FD to support providing shared memory to backend. Firstly, qemu uses VHOST_USER_GET_SHM_SIZE to get the required size of shared memory from backend. Then, qemu allocates memory and sends them b

[Qemu-devel] [PATCH v2 for-4.0 4/7] libvhost-user: Support recording inflight I/O in shared memory

2018-12-18 Thread elohimes
From: Xie Yongji This patch adds support for VHOST_USER_GET_SHM_SIZE and VHOST_USER_SET_SHM_FD message to get shared memory from qemu. Then we maintain a "bitmap" of all descriptors in the shared memory for each queue to record inflight I/O. Signed-off-by: Xie Yongji Signed-off-by: Zhang Yu --

[Qemu-devel] [PATCH v2 for-4.0 1/7] chardev: Add disconnected option for chardev socket

2018-12-18 Thread elohimes
From: Xie Yongji New option "disconnected" is added to init the chardev socket in disconnected state. Then we can use qemu_chr_fe_wait_connected() to connect when necessary. Now it would be used for unix domain socket of vhost-user-blk device to support reconnect. Suggested-by: Yury Kotov Signe

[Qemu-devel] [PATCH v2 for-4.0 7/7] contrib/vhost-user-blk: enable inflight I/O recording

2018-12-18 Thread elohimes
From: Xie Yongji This patch enables inflight I/O recording for vhost-user-blk backend so that we could restart it safely. Signed-off-by: Xie Yongji Signed-off-by: Zhang Yu --- contrib/vhost-user-blk/vhost-user-blk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib

Re: [Qemu-devel] [PATCH v3 2/2] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-12-18 Thread Yu Zhang
On Tue, Dec 18, 2018 at 05:47:14PM +0800, Yu Zhang wrote: > On Mon, Dec 17, 2018 at 02:29:02PM +0100, Igor Mammedov wrote: > > On Wed, 12 Dec 2018 21:05:39 +0800 > > Yu Zhang wrote: > > > > > A 5-level paging capable VM may choose to use 57-bit IOVA address width. > > > E.g. guest applications ma

[Qemu-devel] [PATCH v2 for-4.0 3/7] libvhost-user: Introduce vu_queue_map_desc()

2018-12-18 Thread elohimes
From: Xie Yongji Introduce vu_queue_map_desc() which should be independent with vu_queue_pop(); Signed-off-by: Xie Yongji Signed-off-by: Zhang Yu Reviewed-by: Marc-André Lureau --- contrib/libvhost-user/libvhost-user.c | 88 --- 1 file changed, 51 insertions(+), 37 de

[Qemu-devel] [PATCH v2 for-4.0 5/7] vhost-user-blk: Add support to provide shared memory to backend

2018-12-18 Thread elohimes
From: Xie Yongji This patch add supports for vhost-user-blk device to provide shared memory to backend. Signed-off-by: Xie Yongji Signed-off-by: Zhang Yu --- hw/block/vhost-user-blk.c | 26 ++ include/hw/virtio/vhost-user-blk.h | 1 + 2 files changed, 27 inse

[Qemu-devel] [PATCH v2 for-4.0 6/7] vhost-user-blk: Add support to reconnect backend

2018-12-18 Thread elohimes
From: Xie Yongji Since we now support the message VHOST_USER_GET_SHM_SIZE and VHOST_USER_SET_SHM_FD. The backend is able to restart safely because it can record inflight I/O in shared memory. This patch allows qemu to reconnect the backend after connection closed. Signed-off-by: Xie Yongji Sign

[Qemu-devel] [PULL 1/7] qapi: Turn ShutdownCause into QAPI enum

2018-12-18 Thread Markus Armbruster
From: Dominik Csapak Needed so the patch after next can add ShutdownCause to QMP events SHUTDOWN and RESET. Signed-off-by: Dominik Csapak Message-Id: <20181205110131.23049-2-d.csa...@proxmox.com> Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- include/sysemu/sysemu.h | 20

[Qemu-devel] [PULL 5/7] qga: update guest-suspend-ram and guest-suspend-hybrid descriptions

2018-12-18 Thread Markus Armbruster
From: Daniel Henrique Barboza This patch updates the descriptions of 'guest-suspend-ram' and 'guest-suspend-hybrid' to mention that both commands relies now on the proper support for wake up from suspend, retrieved by the 'wakeup-suspend-support' attribute of the 'query-current-machine' QMP comma

[Qemu-devel] [PULL 2/7] qmp: Add reason to SHUTDOWN and RESET events

2018-12-18 Thread Markus Armbruster
From: Dominik Csapak This makes it possible to determine what the exact reason was for a RESET or a SHUTDOWN. A management layer might need the specific reason of those events to determine which cleanups or other actions it needs to do. This patch also updates the iotests to the new expected out

Re: [Qemu-devel] Regression test with --disable options

2018-12-18 Thread Markus Armbruster
Thomas Huth writes: > This is the second time in 2 months that compilation with > --disable-replication broke. So instead of relying on reviews here, I > think we should catch this with Patchew / some docker based compilation > test instead that configures the build process with everything disabl

[Qemu-devel] [PULL 4/7] qmp: query-current-machine with wakeup-suspend-support

2018-12-18 Thread Markus Armbruster
From: Daniel Henrique Barboza When issuing the qmp/hmp 'system_wakeup' command, what happens in a nutshell is: - qmp_system_wakeup_request set runstate to RUNNING, sets a wakeup_reason and notify the event - in the main_loop, all vcpus are paused, a system reset is issued, all subscribers of wak

[Qemu-devel] [PULL 7/7] qapi: fix flat union on uncovered branches conditionals

2018-12-18 Thread Markus Armbruster
From: Marc-André Lureau Default branches variant should use the member conditional. This fixes compilation with --disable-replication. Fixes: 335d10cd8e2c3bb6067804b095aaf6371fc1983e Signed-off-by: Marc-André Lureau Message-Id: <20181217204046.14861-1-marcandre.lur...@redhat.com> Reviewed-by:

Re: [Qemu-devel] [PATCH] qapi: fix flat union on uncovered branches conditionals

2018-12-18 Thread Markus Armbruster
Marc-André Lureau writes: > Default branches variant should use the member conditional. > > This fixes compilation with --disable-replication. > > Fixes: 335d10cd8e2c3bb6067804b095aaf6371fc1983e > > Signed-off-by: Marc-André Lureau Queued, thanks!

[Qemu-devel] [PULL 3/7] qmp: Split ShutdownCause host-qmp into quit and system-reset

2018-12-18 Thread Markus Armbruster
From: Dominik Csapak It is interesting to know whether the shutdown cause was 'quit' or 'reset', especially when using "--no-reboot". In that case, a management layer can now determine if the guest wanted a reboot or shutdown, and can act accordingly. Changes the output of the reason in the iote

Re: [Qemu-devel] sheepdog build warning

2018-12-18 Thread Philippe Mathieu-Daudé
Hi Michael, On 12/18/18 5:16 AM, Michael S. Tsirkin wrote: > On Mon, Dec 17, 2018 at 11:03:11PM -0500, Michael S. Tsirkin wrote: >> mingw32 build on fedora fails with this warning: >> >> /scm/qemu/block/sheepdog.c: In function 'find_vdi_name': >> /scm/qemu/block/sheepdog.c:1239:5: error: 'strncpy'

[Qemu-devel] [PULL 0/7] QAPI patches for 2018-12-18

2018-12-18 Thread Markus Armbruster
The following changes since commit f163448536e5f7ae8905b14547eab37a41a75f6c: Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20181216' into staging (2018-12-17 13:04:25 +) are available in the Git repository at: git://repo.or.cz/qemu/armbru.git tags/pull-qapi-2018-12-18 for you

[Qemu-devel] [PULL 6/7] qmp hmp: Make system_wakeup check wake-up support and run state

2018-12-18 Thread Markus Armbruster
From: Daniel Henrique Barboza The qmp/hmp command 'system_wakeup' is simply a direct call to 'qemu_system_wakeup_request' from vl.c. This function verifies if runstate is SUSPENDED and if the wake up reason is valid before proceeding. However, no error or warning is thrown if any of those pre-req

Re: [Qemu-devel] [PATCH] qapi: fix flat union on uncovered branches conditionals

2018-12-18 Thread Thomas Huth
On 2018-12-17 21:40, Marc-André Lureau wrote: > Default branches variant should use the member conditional. > > This fixes compilation with --disable-replication. > > Fixes: 335d10cd8e2c3bb6067804b095aaf6371fc1983e > > Signed-off-by: Marc-André Lureau > --- > scripts/qapi/common.py | 2 +- > 1

Re: [Qemu-devel] [RFC 1/2] util: Implement debug-threads for macOS

2018-12-18 Thread Daniel P . Berrangé
On Mon, Dec 17, 2018 at 11:26:01PM +0300, Roman Bolshakov wrote: > macOS provides pthread_setname_np that doesn't have thread id argument. > > Signed-off-by: Roman Bolshakov > --- > configure| 32 ++-- > qemu-options.hx | 4 ++-- > util/qemu-

Re: [Qemu-devel] [RFC 2/2] qemu-thread: Don't block SEGV, ILL and FPE

2018-12-18 Thread Daniel P . Berrangé
On Mon, Dec 17, 2018 at 11:26:02PM +0300, Roman Bolshakov wrote: > If any of these signals happen on macOS, they are not delivered to other > threads and signalfd_compat receives nothing. Indeed, POSIX reference > and sigprocmask(2) note that an attempt to block the signals results in > undefined b

Re: [Qemu-devel] sheepdog build warning

2018-12-18 Thread Daniel P . Berrangé
On Mon, Dec 17, 2018 at 11:16:05PM -0500, Michael S. Tsirkin wrote: > On Mon, Dec 17, 2018 at 11:03:11PM -0500, Michael S. Tsirkin wrote: > > mingw32 build on fedora fails with this warning: > > > > /scm/qemu/block/sheepdog.c: In function 'find_vdi_name': > > /scm/qemu/block/sheepdog.c:1239:5: err

Re: [Qemu-devel] [PATCH v2 1/5] disas: nanoMIPS: Fix preamble text

2018-12-18 Thread Stefan Markovic
On 17.12.18. 18:10, Aleksandar Markovic wrote: > From: Aleksandar Markovic > > Fix several mistakes in preambles of nanomips disassembler source > files. > > Signed-off-by: Aleksandar Markovic > --- > disas/nanomips.cpp | 7 --- > disas/nanomips.h | 7 --- > 2 files changed, 8 inse

Re: [Qemu-devel] [Qemu-ppc] [PATCH] spapr: Add H-Call H_HOME_NODE_ASSOCIATIVITY

2018-12-18 Thread Greg Kurz
On Tue, 18 Dec 2018 11:00:01 +0100 Laurent Vivier wrote: > On 18/12/2018 10:23, Greg Kurz wrote: > > On Tue, 18 Dec 2018 08:50:00 +0100 > > Laurent Vivier wrote: > > > >> On 18/12/2018 05:29, David Gibson wrote: > >>> On Mon, Dec 17, 2018 at 03:00:55PM +0100, Laurent Vivier wrote: > >>>

[Qemu-devel] [PATCH v2 3/3] migration: Replace strncpy() by strpadcpy(pad='\0')

2018-12-18 Thread Philippe Mathieu-Daudé
GCC 8 added a -Wstringop-truncation warning: The -Wstringop-truncation warning added in GCC 8.0 via r254630 for bug 81117 is specifically intended to highlight likely unintended uses of the strncpy function that truncate the terminating NUL character from the source string. This new warni

Re: [Qemu-devel] [Qemu-ppc] [PATCH] spapr: Add H-Call H_HOME_NODE_ASSOCIATIVITY

2018-12-18 Thread Laurent Vivier
On 18/12/2018 11:50, Greg Kurz wrote: > On Tue, 18 Dec 2018 11:00:01 +0100 > Laurent Vivier wrote: > >> On 18/12/2018 10:23, Greg Kurz wrote: >>> On Tue, 18 Dec 2018 08:50:00 +0100 ... >>> Also, even if linux only seems to call this with 0x1, this is a >>> limitation from a LoPAPR standpoint. Not

Re: [Qemu-devel] Monitor and serial output window broken with SDL2

2018-12-18 Thread Mark Cave-Ayland
On 17/12/2018 14:56, BALATON Zoltan wrote: > I still have this problem after updating everything on my machine, latest > QEMU and > SDL 2.0.9 so it's not likely to be a bug in some external component. If I > just start > qemu-system-ppc (compiled with --disable-gtk) and try to open monitor conso

Re: [Qemu-devel] [PATCH-for-4.0 v2 2/2] hw/arm/virt-acpi-build: IORT Update for revision D

2018-12-18 Thread Auger Eric
Hi Drew, On 12/17/18 7:25 PM, Andrew Jones wrote: > On Mon, Dec 17, 2018 at 05:49:02PM +0100, Auger Eric wrote: >> Hi Drew, >> >> On 12/17/18 5:27 PM, Andrew Jones wrote: >>> On Thu, Dec 06, 2018 at 06:07:33PM +0100, Eric Auger wrote: Let's update the structs according to revision D of the IO

[Qemu-devel] [PATCH v2 2/3] block/sheepdog: Replace strncpy() by strpadcpy(pad='\0')

2018-12-18 Thread Philippe Mathieu-Daudé
GCC 8 added a -Wstringop-truncation warning: The -Wstringop-truncation warning added in GCC 8.0 via r254630 for bug 81117 is specifically intended to highlight likely unintended uses of the strncpy function that truncate the terminating NUL character from the source string. This new warni

Re: [Qemu-devel] [PULL v3 08/15] tests/fp: add fp-bench

2018-12-18 Thread Alex Bennée
Emilio G. Cota writes: > On Mon, Dec 17, 2018 at 10:56:43 +, Alex Bennée wrote: >> From: "Emilio G. Cota" >> +static void update_random_ops(int n_ops, enum precision prec) >> +{ >> +int i; >> + >> +for (i = 0; i < n_ops; i++) { >> +uint64_t r = random_ops[i]; >> + >> +

[Qemu-devel] [PATCH v2 0/3] Fix strncpy() warnings for GCC8 new -Wstringop-truncation

2018-12-18 Thread Philippe Mathieu-Daudé
GCC 8 new warning prevents builds to success since quite some time. First report on the mailing list is in July 2018: https://lists.gnu.org/archive/html/qemu-devel/2018-07/msg03723.html Various intents has been sent to fix this: - Incorrectly using g_strlcpy() https://lists.gnu.org/archive/html/

[Qemu-devel] [PATCH v2 1/3] hw/acpi: Replace strncpy() by strpadcpy(pad='\0')

2018-12-18 Thread Philippe Mathieu-Daudé
From: Marc-André Lureau GCC 8 added a -Wstringop-truncation warning: The -Wstringop-truncation warning added in GCC 8.0 via r254630 for bug 81117 is specifically intended to highlight likely unintended uses of the strncpy function that truncate the terminating NUL character from the sour

Re: [Qemu-devel] Monitor and serial output window broken with SDL2

2018-12-18 Thread Daniel P . Berrangé
On Mon, Dec 17, 2018 at 10:57:14PM +0100, BALATON Zoltan wrote: > On Mon, 17 Dec 2018, Daniel P. Berrangé wrote: > > On Mon, Dec 17, 2018 at 03:56:49PM +0100, BALATON Zoltan wrote: > > > On Wed, 21 Mar 2018, BALATON Zoltan wrote: > > > > On Wed, 21 Mar 2018, Gerd Hoffmann wrote: > > > > > > while t

Re: [Qemu-devel] [PATCH v2 1/3] hw/acpi: Replace strncpy() by strpadcpy(pad='\0')

2018-12-18 Thread Philippe Mathieu-Daudé
On 12/18/18 12:03 PM, Philippe Mathieu-Daudé wrote: > From: Marc-André Lureau > > GCC 8 added a -Wstringop-truncation warning: > > The -Wstringop-truncation warning added in GCC 8.0 via r254630 for > bug 81117 is specifically intended to highlight likely unintended > uses of the strncpy fu

Re: [Qemu-devel] Monitor and serial output window broken with SDL2

2018-12-18 Thread Daniel P . Berrangé
On Tue, Dec 18, 2018 at 10:54:06AM +, Mark Cave-Ayland wrote: > On 17/12/2018 14:56, BALATON Zoltan wrote: > > > I still have this problem after updating everything on my machine, latest > > QEMU and > > SDL 2.0.9 so it's not likely to be a bug in some external component. If I > > just start

[Qemu-devel] [PATCH v8 01/20] replay: add missing fix for internal function

2018-12-18 Thread Pavel Dovgalyuk
From: pbonz...@redhat.com This is a fix which was missed by patch 74c0b816adfc6aa1b01b4426fdf385e32e35cbac, which added current_step parameter to the replay_advance_current_step function. Signed-off-by: Pavel Dovgalyuk --- replay/replay-internal.c |2 +- 1 file changed, 1 insertion(+), 1 d

[Qemu-devel] [PATCH v8 00/20] Fixing record/replay and adding reverse debugging

2018-12-18 Thread Pavel Dovgalyuk
GDB remote protocol supports reverse debugging of the targets. It includes 'reverse step' and 'reverse continue' operations. The first one finds the previous step of the execution, and the second one is intended to stop at the last breakpoint that would happen when the program is executed normally.

[Qemu-devel] [PATCH v8 04/20] replay: update docs for record/replay with block devices

2018-12-18 Thread Pavel Dovgalyuk
This patch updates the description of the command lines for using record/replay with attached block devices. Signed-off-by: Pavel Dovgalyuk --- docs/replay.txt | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/replay.txt b/docs/replay.txt index 3497585..2c2c

[Qemu-devel] [PATCH v8 05/20] replay: don't drain/flush bdrv queue while RR is working

2018-12-18 Thread Pavel Dovgalyuk
In record/replay mode bdrv queue is controlled by replay mechanism. It does not allow saving or loading the snapshots when bdrv queue is not empty. Stopping the VM is not blocked by nonempty queue, but flushing the queue is still impossible there, because it may cause deadlocks in replay mode. This

[Qemu-devel] [PATCH v8 02/20] block: implement bdrv_snapshot_goto for blkreplay

2018-12-18 Thread Pavel Dovgalyuk
From: Pavel Dovgalyuk This patch enables making snapshots with blkreplay used in block devices. This function is required to make bdrv_snapshot_goto without calling .bdrv_open which is not implemented. Signed-off-by: Pavel Dovgalyuk --- block/blkreplay.c |8 1 file changed, 8 inse

[Qemu-devel] [PATCH v8 03/20] replay: disable default snapshot for record/replay

2018-12-18 Thread Pavel Dovgalyuk
From: Pavel Dovgalyuk This patch disables setting '-snapshot' option on by default in record/replay mode. This is needed for creating vmstates in record and replay modes. Signed-off-by: Pavel Dovgalyuk --- vl.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/vl

[Qemu-devel] [PATCH v8 10/20] replay: introduce info hmp/qmp command

2018-12-18 Thread Pavel Dovgalyuk
This patch introduces 'info replay' monitor command and corresponding qmp request. These commands request the current record/replay mode, replay log file name, and the execution step (number or recorded/replayed instructions). User may use step number for replay_seek/replay_break commands and for c

[Qemu-devel] [PATCH v8 08/20] migration: introduce icount field for snapshots

2018-12-18 Thread Pavel Dovgalyuk
Saving icount as a parameters of the snapshot allows navigation between them in the execution replay scenario. This information can be used for finding a specific snapshot for rewinding the recorded execution to the specific moment of the time. E.g., 'reverse step' action needs to load the nearest

[Qemu-devel] [PATCH v8 18/20] replay: add BH oneshot event for block layer

2018-12-18 Thread Pavel Dovgalyuk
Replay is capable of recording normal BH events, but sometimes there are single use callbacks scheduled with aio_bh_schedule_oneshot function. This patch enables recording and replaying such callbacks. Block layer uses these events for calling the completion function. Replaying these calls makes th

[Qemu-devel] [PATCH v8 12/20] replay: implement replay-seek command to proceed to the desired step

2018-12-18 Thread Pavel Dovgalyuk
This patch adds hmp/qmp commands replay_seek/replay-seek that proceed the execution to the specified step. The commands automatically loads nearest snapshot and replay the execution to find the desired step. Signed-off-by: Pavel Dovgalyuk -- v2: - renamed replay_seek qmp command into replay-se

[Qemu-devel] [PATCH v8 06/20] replay: finish record/replay before closing the disks

2018-12-18 Thread Pavel Dovgalyuk
After recent updates block devices cannot be closed on qemu exit. This happens due to the block request polling when replay is not finished. Therefore now we stop execution recording before closing the block devices. Signed-off-by: Pavel Dovgalyuk --- replay/replay.c |2 ++ vl.c|

[Qemu-devel] [PATCH v8 11/20] replay: introduce breakpoint at the specified step

2018-12-18 Thread Pavel Dovgalyuk
This patch introduces replay_break, replay_delete_break qmp and hmp commands. These commands allow stopping at the specified instruction. It may be useful for debugging when there are some known events that should be investigated. replay_break command has one argument - number of instructions execu

[Qemu-devel] [PATCH v8 07/20] qcow2: introduce icount field for snapshots

2018-12-18 Thread Pavel Dovgalyuk
This patch introduces the icount field for saving within the snapshot. It is required for navigation between the snapshots in record/replay mode. Signed-off-by: Pavel Dovgalyuk Acked-by: Kevin Wolf -- v2: - documented format changes in docs/interop/qcow2.txt (suggested by Eric Blake) ---

[Qemu-devel] [PATCH v8 20/20] replay: document development rules

2018-12-18 Thread Pavel Dovgalyuk
This patch introduces docs/devel/replay.txt which describes the rules that should be followed to make virtual devices usable in record/replay mode. Signed-off-by: Pavel Dovgalyuk --- docs/devel/replay.txt | 45 + 1 file changed, 45 insertions(+) cre

[Qemu-devel] [PATCH v8 13/20] replay: refine replay-time module

2018-12-18 Thread Pavel Dovgalyuk
This patch removes refactoring artifacts from the replay/replay-time.c Signed-off-by: Pavel Dovgalyuk --- replay/replay-time.c | 32 +--- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/replay/replay-time.c b/replay/replay-time.c index 0df1693..89860

[Qemu-devel] [PATCH v8 15/20] gdbstub: add reverse step support in replay mode

2018-12-18 Thread Pavel Dovgalyuk
GDB remote protocol supports two reverse debugging commands: reverse step and reverse continue. This patch adds support of the first one to the gdbstub. Reverse step is intended to step one instruction in the backwards direction. This is not possible in regular execution. But replayed execution is

[Qemu-devel] [PATCH v8 14/20] replay: flush rr queue before loading the vmstate

2018-12-18 Thread Pavel Dovgalyuk
Non-empty record/replay queue prevents saving and loading the VM state, because it includes pending bottom halves and block coroutines. But when the new VM state is loaded, we don't have to preserve the consistency of the current state anymore. Therefore this patch just flushes the queue allowing t

[Qemu-devel] [PATCH v8 09/20] replay: provide and accessor for rr filename

2018-12-18 Thread Pavel Dovgalyuk
This patch adds an accessor function for the name of the record/replay log file. Adding an accessor instead of making variable global, prevents accidental modification of this variable by other modules. Signed-off-by: Pavel Dovgalyuk --- include/sysemu/replay.h |2 ++ replay/replay.c

[Qemu-devel] [PATCH v8 16/20] gdbstub: add reverse continue support in replay mode

2018-12-18 Thread Pavel Dovgalyuk
This patch adds support of the reverse continue operation for gdbstub. Reverse continue finds the last breakpoint that would happen in normal execution from the beginning to the current moment. Implementation of the reverse continue replays the execution twice: to find the breakpoints that were hit

[Qemu-devel] [PATCH v8 17/20] replay: describe reverse debugging in docs/replay.txt

2018-12-18 Thread Pavel Dovgalyuk
This patch updates the documentation and describes usage of the reverse debugging in QEMU+GDB. Signed-off-by: Pavel Dovgalyuk --- docs/replay.txt | 33 + 1 file changed, 33 insertions(+) diff --git a/docs/replay.txt b/docs/replay.txt index 2c2c5f6..8447fdd 1006

[Qemu-devel] [PATCH v8 19/20] replay: init rtc after enabling the replay

2018-12-18 Thread Pavel Dovgalyuk
This patch postpones the call of 'configure_rtc' function. This call uses host clock to configure the rtc, but host clock access should be recorded when using icount record/replay mode. Therefore now rtc is configured after switching record/replay mode on. Signed-off-by: Pavel Dovgalyuk --- vl.c

Re: [Qemu-devel] [PATCH 2/3] mac_newworld: enable access to EDID data for the VGA device

2018-12-18 Thread Programmingkid
> On 12/12/2018 13:38, Gerd Hoffmann wrote: > >> On Wed, Dec 12, 2018 at 08:54:37AM +, Mark Cave-Ayland wrote: >>> On 12/12/2018 08:32, Gerd Hoffmann wrote: >>> On Fri, Dec 07, 2018 at 04:08:05PM +, Mark Cave-Ayland wrote: > This is in preparation for some upcoming QEMU NDRV dr

[Qemu-devel] [PATCH] tests: Move qdict-test-data.txt to tests/data/qobject/

2018-12-18 Thread Philippe Mathieu-Daudé
Move qdict-test-data.txt to the tests/data/qobject/ subdirectory, and remove the unnecessary symlinking. (See 4b2ff65a1f3 for similar test-data cleanup). Suggested-by: Markus Armbruster Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 1 + configur

[Qemu-devel] [Bug 1806196] Re: qed leaked clusters

2018-12-18 Thread Stefan Hajnoczi
Thanks for reporting this. QED is not widely used and its features have been incorporated into qcow2, QEMU's native image format. Since there is no development effort behind QED it is unlikely that this bug will be addressed. Patches are always welcome though! -- You received this bug notifica

Re: [Qemu-devel] [PATCH] pcie: set link state inactive/active after hot unplug/plug

2018-12-18 Thread Marcel Apfelbaum
On 12/18/18 4:18 AM, Michael S. Tsirkin wrote: On Wed, Dec 05, 2018 at 08:23:35AM +0200, Marcel Apfelbaum wrote: On 12/3/18 9:05 AM, Zheng Xiang wrote: When VM boots from the latest version of linux kernel, after hot-unpluging virtio-blk disks which are hotplugged into pcie-root-port, the V

Re: [Qemu-devel] [PATCH v2 3/5] disas: nanoMIPS: Fix a function misnomer

2018-12-18 Thread Stefan Markovic
On 17.12.18. 18:10, Aleksandar Markovic wrote: > From: Aleksandar Markovic > > Fix wrong name of a function. The convention in this file is that > names of extraction functions should reflect bit patterns they are > extracting. > > Signed-off-by: Aleksandar Markovic > --- > disas/nanomips.cpp

[Qemu-devel] [Bug 1803872] Re: [PATCH v2 3/3] migration: Replace strncpy() by strpadcpy(pad='\0')

2018-12-18 Thread elmarco
On Tue, Dec 18, 2018 at 3:09 PM Philippe Mathieu-Daudé wrote: > > GCC 8 added a -Wstringop-truncation warning: > > The -Wstringop-truncation warning added in GCC 8.0 via r254630 for > bug 81117 is specifically intended to highlight likely unintended > uses of the strncpy function that trunca

Re: [Qemu-devel] [PATCH v2 03/22] maint: Allow for EXAMPLES in texi2pod

2018-12-18 Thread Vladimir Sementsov-Ogievskiy
15.12.2018 16:53, Eric Blake wrote: > The next commit will add an EXAMPLES section to qemu-nbd.8; > for that to work, we need to recognize EXAMPLES in texi2pod, > and we need to make all man pages be regenerated since the > output of texi2pod can be different. > > Signed-off-by: Eric Blake > > -

Re: [Qemu-devel] [PATCH v2 5/5] disas: nanoMIPS: Name some function in a more descriptive way

2018-12-18 Thread Stefan Markovic
On 17.12.18. 18:10, Aleksandar Markovic wrote: > From: Aleksandar Markovic > > Rename some functions that have names hard to understand. > > Signed-off-by: Aleksandar Markovic > --- > disas/nanomips.cpp | 112 ++--- > disas/nanomips.h | 32 ++

Re: [Qemu-devel] [PATCH V7 3/6] util/mmap-alloc: support MAP_SYNC in qemu_ram_mmap()

2018-12-18 Thread Michael S. Tsirkin
On Tue, Dec 18, 2018 at 04:17:12PM +0800, Zhang Yi wrote: > 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 set of

Re: [Qemu-devel] [PATCH v3 11/16] virtio: split virtio blk bits rom virtio-pci

2018-12-18 Thread Stefan Hajnoczi
On Thu, Dec 13, 2018 at 10:00:52PM +0100, Juan Quintela wrote: > Reviewed-by: Thomas Huth > Reviewed-by: Laurent Vivier > Signed-off-by: Juan Quintela > --- > hw/virtio/Makefile.objs| 1 + > hw/virtio/virtio-blk-pci.c | 97 ++ > hw/virtio/virtio-pci.c

  1   2   3   4   5   >