[PATCH] hw/nvme: fix mmio read

2021-07-12 Thread Klaus Jensen
From: Klaus Jensen The new PMR test unearthed a long-standing issue with MMIO reads on big-endian hosts. Fix by using the ldn_he_p helper instead of memcpy. Cc: Gollu Appalanaidu Reported-by: Peter Maydell Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 14 +++--- 1 file changed,

Re: [RFC PATCH 1/2] hw/nvme: add mi device

2021-07-12 Thread Christoph Hellwig
On Mon, Jul 12, 2021 at 12:03:27PM +0100, Stefan Hajnoczi wrote: > Why did you decide to implement -device nvme-mi as a device on > TYPE_NVME_BUS? If the NVMe spec somehow requires this then I'm surprised > that there's no NVMe bus interface (callbacks). It seems like this could > just as easily

Re: [PATCH 07/10] iotests/297: return error code from run_linters()

2021-07-12 Thread John Snow
On Tue, Jul 6, 2021 at 5:49 AM Vladimir Sementsov-Ogievskiy < vsement...@virtuozzo.com> wrote: > 25.06.2021 21:20, John Snow wrote: > > This turns run_linters() into a bit of a hybrid test; returning non-zero > > on failed execution while also printing diffable information. This is > > done for

[PATCH 01/11] nbd/server: Remove unused variable

2021-07-12 Thread Richard Henderson
>From clang-13: nbd/server.c:976:22: error: variable 'bitmaps' set but not used \ [-Werror,-Wunused-but-set-variable] Cc: qemu-block@nongnu.org Cc: Eric Blake Cc: Vladimir Sementsov-Ogievskiy Signed-off-by: Richard Henderson --- nbd/server.c | 4 1 file changed, 4 deletions(-) diff

[PATCH 00/11] Fixes for clang-13 plus tcg/ppc

2021-07-12 Thread Richard Henderson
The goal here was to address Brad's report for clang vs ppc32. Somewhere in between here and there I forgot about the ppc32 part, needed a newer clang for gcc135, accidentally built master instead of the clang-12 release branch, fixed a bunch of buggy looking things, and only then remembered I

Re: [RFC PATCH 1/2] hw/nvme: add mi device

2021-07-12 Thread Stefan Hajnoczi
On Fri, Jul 09, 2021 at 07:25:45PM +0530, Padmakar Kalghatgi wrote: > The enclosed patch contains the implementation of certain > commands of nvme-mi specification.The MI commands are useful > to manage/configure/monitor the device.Eventhough the MI commands > can be sent via the inband NVMe-MI

[PULL 6/6] trace, lttng: require .pc files

2021-07-12 Thread Stefan Hajnoczi
From: Paolo Bonzini The next version of lttng-libs will not require liburcu at run time anymore. Therefore, it is expected that distros will not include the urcubp libraries anymore when installing lttng-ust-devel. To avoid future problems, just require pkg-config to detect lttng-ust. The .pc

Re: [PULL 0/6] hw/nvme patches

2021-07-12 Thread Klaus Jensen
On Jul 12 15:51, Peter Maydell wrote: > On Sun, 11 Jul 2021 at 21:27, Klaus Jensen wrote: > > > > From: Klaus Jensen > > > > Hi Pater, > > > > The following changes since commit 9516034d05a8c71ef157a59f525e4c4f7ed79827: > > > > Merge remote-tracking branch

[PULL 4/6] trace/simple: pass iter to st_write_event_mapping

2021-07-12 Thread Stefan Hajnoczi
From: Gerd Hoffmann Pass an iter to st_write_event_mapping, so the function can interate different things depending on how we initialize the iter. Signed-off-by: Gerd Hoffmann Reviewed-by: Stefan Hajnoczi Message-id: 20210601132414.432430-5-kra...@redhat.com Signed-off-by: Stefan Hajnoczi

[PULL 5/6] trace/simple: add st_init_group

2021-07-12 Thread Stefan Hajnoczi
From: Gerd Hoffmann Add helper function and call it for each trace event group added. Makes sure that events added at module load time are initialized properly. Signed-off-by: Gerd Hoffmann Reviewed-by: Stefan Hajnoczi Message-id: 20210601132414.432430-6-kra...@redhat.com Signed-off-by:

[PULL 3/6] trace: add trace_event_iter_init_group

2021-07-12 Thread Stefan Hajnoczi
From: Gerd Hoffmann This allows to interate over an event group. Signed-off-by: Gerd Hoffmann Reviewed-by: Stefan Hajnoczi Message-id: 20210601132414.432430-4-kra...@redhat.com Signed-off-by: Stefan Hajnoczi --- trace/control.h | 13 + trace/control.c | 19 --- 2

[PULL 2/6] trace: iter init tweaks

2021-07-12 Thread Stefan Hajnoczi
From: Gerd Hoffmann Rename trace_event_iter_init() to trace_event_iter_init_pattern(), add trace_event_iter_init_all() for interating over all events. Signed-off-by: Gerd Hoffmann Reviewed-by: Stefan Hajnoczi Message-id: 20210601132414.432430-3-kra...@redhat.com Signed-off-by: Stefan Hajnoczi

[PULL 1/6] qemu-trace-stap: changing SYSTEMTAP_TAPSET considered harmful.

2021-07-12 Thread Stefan Hajnoczi
From: Gerd Hoffmann Setting SYSTEMTAP_TAPSET to some value other than /usr/share/systemtap/tapsets results in systemtap not finding the standard tapset library any more, which in turn breaks tracing because pid() and other standard systemtap functions are not available any more. So using

[PULL 0/6] Tracing patches

2021-07-12 Thread Stefan Hajnoczi
The following changes since commit bd38ae26cea0d1d6a97f930248df149204c210a2: Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20210710' into staging (2021-07-12 11:02:39 +0100) are available in the Git repository at: https://gitlab.com/stefanha/qemu.git

Re: [PATCH] block: Add option to use driver whitelist even in tools

2021-07-12 Thread Daniel P . Berrangé
On Mon, Jul 12, 2021 at 10:18:30AM +0200, Kevin Wolf wrote: > Am 09.07.2021 um 19:45 hat Eric Blake geschrieben: > > On Fri, Jul 09, 2021 at 06:41:41PM +0200, Kevin Wolf wrote: > > > Currently, the block driver whitelists are only applied for the system > > > emulator. All other binaries still

Re: [PATCH] block: Add option to use driver whitelist even in tools

2021-07-12 Thread Eric Blake
On Mon, Jul 12, 2021 at 10:18:30AM +0200, Kevin Wolf wrote: > > Is it feasible that someone would want two separate lists: one for > > qemu (which runs run efficiently) and another for tools (which ones do > > we support at all)? As written, your patch offers no chance to > > distinguish between

Re: [PULL 0/6] hw/nvme patches

2021-07-12 Thread Peter Maydell
On Sun, 11 Jul 2021 at 21:27, Klaus Jensen wrote: > > From: Klaus Jensen > > Hi Pater, > > The following changes since commit 9516034d05a8c71ef157a59f525e4c4f7ed79827: > > Merge remote-tracking branch 'remotes/cminyard/tags/for-qemu-6.1-2' into > staging (2021-07-11 14:32:49 +0100) > > are

[PATCH v5 5/5] replication: Remove workaround

2021-07-12 Thread Lukas Straub
Remove the workaround introduced in commit 6ecbc6c52672db5c13805735ca02784879ce8285 "replication: Avoid blk_make_empty() on read-only child". It is not needed anymore since s->hidden_disk is guaranteed to be writable when secondary_do_checkpoint() runs. Because replication_start(),

[PATCH v5 0/5] replication: Bugfix and properly attach children

2021-07-12 Thread Lukas Straub
Hello Everyone, A while ago Kevin noticed that the replication driver doesn't properly attach the children it wants to use. Instead, it directly copies the BdrvChilds from it's backing file, which is wrong. Ths Patchset fixes the problem, fixes a potential crash in replication_co_writev due to

[PATCH v5 3/5] replication: Properly attach children

2021-07-12 Thread Lukas Straub
The replication driver needs access to the children block-nodes of it's child so it can issue bdrv_make_empty() and bdrv_co_pwritev() to manage the replication. However, it does this by directly copying the BdrvChilds, which is wrong. Fix this by properly attaching the block-nodes with

[PATCH v5 1/5] replication: Remove s->active_disk

2021-07-12 Thread Lukas Straub
s->active_disk is bs->file. Remove it and use local variables instead. Signed-off-by: Lukas Straub Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/replication.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/block/replication.c

[PATCH v5 4/5] replication: Assert that children are writable

2021-07-12 Thread Lukas Straub
Assert that the children are writable where it's needed. While there is no test-case for the BLOCK_REPLICATION_FAILOVER_FAILED state, this at least ensures that s->secondary_disk is always writable in case replication might go into that state. Signed-off-by: Lukas Straub --- block/replication.c

[PATCH v5 2/5] replication: Reduce usage of s->hidden_disk and s->secondary_disk

2021-07-12 Thread Lukas Straub
In preparation for the next patch, initialize s->hidden_disk and s->secondary_disk later and replace access to them with local variables in the places where they aren't initialized yet. Signed-off-by: Lukas Straub Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/replication.c | 45

Re: [PATCH v3 4/4] replication: Remove workaround

2021-07-12 Thread Lukas Straub
On Mon, 12 Jul 2021 13:06:19 +0300 Vladimir Sementsov-Ogievskiy wrote: > 11.07.2021 23:33, Lukas Straub wrote: > > On Fri, 9 Jul 2021 10:49:23 +0300 > > Vladimir Sementsov-Ogievskiy wrote: > > > >> 07.07.2021 21:15, Lukas Straub wrote: > >>> Remove the workaround introduced in commit > >>>

[PATCH v6 6/6] hmp: add virtio commands

2021-07-12 Thread Jonah Palmer
From: Laurent Vivier This patch implements HMP version of the virtio QMP commands Signed-off-by: Laurent Vivier Signed-off-by: Jonah Palmer --- docs/system/monitor.rst | 2 + hmp-commands-virtio.hx | 162 ++ hmp-commands.hx | 10 +++

[PATCH v6 5/6] qmp: add QMP command x-debug-virtio-queue-element

2021-07-12 Thread Jonah Palmer
From: Laurent Vivier This new command shows the information of a VirtQueue element. Signed-off-by: Laurent Vivier Signed-off-by: Jonah Palmer --- hw/virtio/virtio-stub.c | 9 hw/virtio/virtio.c | 135 qapi/virtio.json| 94

[PATCH v6 4/6] qmp: add QMP command x-debug-virtio-queue-status

2021-07-12 Thread Jonah Palmer
From: Laurent Vivier This new command shows internal status of a VirtQueue. (vrings and indexes). Signed-off-by: Laurent Vivier Signed-off-by: Jonah Palmer --- hw/virtio/virtio-stub.c | 6 +++ hw/virtio/virtio.c | 37 ++ qapi/virtio.json| 102

[PATCH v6 0/6] hmp, qmp: Add some commands to introspect virtio devices

2021-07-12 Thread Jonah Palmer
This series introduces new QMP/HMP commands to dump the status of a virtio device at different levels. [Jonah: Rebasing previous patchset from March for Qemu 6.1 (here: https://lore.kernel.org/qemu-devel/1616084984-11263-1-git-send-email-jonah.pal...@oracle.com/) from Laurent's original qmp/hmp

[PATCH v6 1/6] qmp: add QMP command x-debug-query-virtio

2021-07-12 Thread Jonah Palmer
From: Laurent Vivier This new command lists all the instances of VirtIODevice with their path and virtio type. Signed-off-by: Laurent Vivier Reviewed-by: Eric Blake Signed-off-by: Jonah Palmer --- hw/virtio/meson.build | 2 ++ hw/virtio/virtio-stub.c| 14 +

[PATCH v6 3/6] qmp: decode feature bits in virtio-status

2021-07-12 Thread Jonah Palmer
From: Laurent Vivier Display feature names instead of a features bitmap for host, guest, and backend. Decode features according to device type, transport features are on the first line. Undecoded bits (if any) are stored in a separate field. Signed-off-by: Laurent Vivier Signed-off-by: Jonah

[PATCH v6 2/6] qmp: add QMP command x-debug-virtio-status

2021-07-12 Thread Jonah Palmer
From: Laurent Vivier This new command shows the status of a VirtIODevice (features, endianness and number of virtqueues) Next patch will improve output by decoding feature bits. Signed-off-by: Laurent Vivier Signed-off-by: Jonah Palmer --- hw/virtio/virtio-stub.c | 5

Re: [PATCH v3 4/4] replication: Remove workaround

2021-07-12 Thread Vladimir Sementsov-Ogievskiy
11.07.2021 23:33, Lukas Straub wrote: On Fri, 9 Jul 2021 10:49:23 +0300 Vladimir Sementsov-Ogievskiy wrote: 07.07.2021 21:15, Lukas Straub wrote: Remove the workaround introduced in commit 6ecbc6c52672db5c13805735ca02784879ce8285 "replication: Avoid blk_make_empty() on read-only child". It

Re: [RFC PATCH 3/6] job: minor changes to simplify locking

2021-07-12 Thread Emanuele Giuseppe Esposito
On 08/07/2021 12:55, Stefan Hajnoczi wrote: On Wed, Jul 07, 2021 at 06:58:10PM +0200, Emanuele Giuseppe Esposito wrote: @@ -406,15 +410,18 @@ void *job_create(const char *job_id, const JobDriver *driver, JobTxn *txn, error_setg(errp, "Invalid job ID '%s'", job_id);

Re: [RFC PATCH 5/6] job: use global job_mutex to protect struct Job

2021-07-12 Thread Emanuele Giuseppe Esposito
On 08/07/2021 14:56, Stefan Hajnoczi wrote: On Wed, Jul 07, 2021 at 06:58:12PM +0200, Emanuele Giuseppe Esposito wrote: This lock is going to replace most of the AioContext locks in the job and blockjob, so that a Job can run in an arbitrary AioContext. Signed-off-by: Emanuele Giuseppe

Re: [RFC PATCH 4/6] job.h: categorize job fields

2021-07-12 Thread Emanuele Giuseppe Esposito
On 08/07/2021 13:02, Stefan Hajnoczi wrote: On Wed, Jul 07, 2021 at 06:58:11PM +0200, Emanuele Giuseppe Esposito wrote: -/** AioContext to run the job coroutine in */ +/** + * AioContext to run the job coroutine in. + * Atomic. + */ AioContext *aio_context; This

Re: [RFC PATCH 0/6] job: replace AioContext lock with job_mutex

2021-07-12 Thread Emanuele Giuseppe Esposito
On 08/07/2021 15:09, Stefan Hajnoczi wrote: On Wed, Jul 07, 2021 at 06:58:07PM +0200, Emanuele Giuseppe Esposito wrote: This is a continuation on the work to reduce (and possibly get rid of) the usage of AioContext lock, by introducing smaller granularity locks to keep the thread safety.

Re: [RFC PATCH 2/6] job: _locked functions and public job_lock/unlock for next patch

2021-07-12 Thread Emanuele Giuseppe Esposito
On 08/07/2021 12:50, Stefan Hajnoczi wrote: On Wed, Jul 07, 2021 at 06:58:09PM +0200, Emanuele Giuseppe Esposito wrote: diff --git a/job.c b/job.c index 872bbebb01..96fb8e9730 100644 --- a/job.c +++ b/job.c @@ -32,6 +32,10 @@ #include "trace/trace-root.h" #include

Re: [RFC PATCH 0/6] job: replace AioContext lock with job_mutex

2021-07-12 Thread Emanuele Giuseppe Esposito
On 08/07/2021 15:04, Stefan Hajnoczi wrote: On Thu, Jul 08, 2021 at 01:32:12PM +0200, Paolo Bonzini wrote: On 08/07/21 12:36, Stefan Hajnoczi wrote: What is very clear from this patch is that it is strictly related to the brdv_* and lower level calls, because they also internally check or

Re: [PATCH] block: Add option to use driver whitelist even in tools

2021-07-12 Thread Kevin Wolf
Am 09.07.2021 um 19:45 hat Eric Blake geschrieben: > On Fri, Jul 09, 2021 at 06:41:41PM +0200, Kevin Wolf wrote: > > Currently, the block driver whitelists are only applied for the system > > emulator. All other binaries still give unrestricted access to all block > > drivers. There are use cases

Re: [PATCH v2 3/6] block: Clarify that @bytes is no limit on *pnum

2021-07-12 Thread Max Reitz
On 28.06.21 21:10, Eric Blake wrote: +++ b/include/block/block_int.h @@ -347,6 +347,11 @@ struct BlockDriver {    * clamped to bdrv_getlength() and aligned to request_alignment,    * as well as non-NULL pnum, map, and file; in turn, the driver    * must return an error or set pnum

Re: [PATCH v2 2/6] block: block-status cache for data regions

2021-07-12 Thread Max Reitz
On 06.07.21 19:04, Kevin Wolf wrote: Am 23.06.2021 um 17:01 hat Max Reitz geschrieben: As we have attempted before (https://lists.gnu.org/archive/html/qemu-devel/2019-01/msg06451.html, "file-posix: Cache lseek result for data regions";