[PATCH 7/7] vhost-vdpa: backend feature should set only once

2022-03-29 Thread Si-Wei Liu
The vhost_vdpa_one_time_request() branch in vhost_vdpa_set_backend_cap() incorrectly sends down iotls on vhost_dev with non-zero index. This may end up with multiple VHOST_SET_BACKEND_FEATURES ioctl calls sent down on the vhost-vdpa fd that is shared between all these vhost_dev's. To fix it, send

[PATCH 1/7] virtio-net: align ctrl_vq index for non-mq guest for vhost_vdpa

2022-03-29 Thread Si-Wei Liu
With MQ enabled vdpa device and non-MQ supporting guest e.g. booting vdpa with mq=on over OVMF of single vqp, below assert failure is seen: ../hw/virtio/vhost-vdpa.c:560: vhost_vdpa_get_vq_index: Assertion `idx >= dev->vq_index && idx < dev->vq_index + dev->nvqs' failed. 0 0x7f8ce3ff3387 in

Re: [PATCH v2 1/1] target/riscv: misa to ISA string conversion fix

2022-03-29 Thread Frédéric Pétrot
Le 30/03/2022 à 04:08, Tsukasa OI a écrit : On 2022/03/30 1:29, Frédéric Pétrot wrote: Hello, Le 28/03/2022 à 15:11, Tsukasa OI a écrit : Some bits in RISC-V `misa' CSR should not be reflected in the ISA string.  For instance, `S' and `U' (represents existence of supervisor and user mode, resp

[PATCH 3/7] virtio-net: Only enable userland vq if using tap backend

2022-03-29 Thread Si-Wei Liu
From: Eugenio Pérez Qemu falls back on userland handlers even if vhost-user and vhost-vdpa cases. These assumes a tap device can handle the packets. If a vdpa device fail to start, it can trigger a sigsegv because of that. Do not resort on them unless actually possible. Signed-off-by: Eugenio P

[PATCH 2/7] virtio-net: Fix indentation

2022-03-29 Thread Si-Wei Liu
From: Eugenio Pérez Signed-off-by: Eugenio Pérez --- hw/net/virtio-net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 484b215..ffaf481 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -3523,7 +3523,7 @@ static v

[PATCH 4/7] virtio: don't read pending event on host notifier if disabled

2022-03-29 Thread Si-Wei Liu
Previous commit prevents vhost-user and vhost-vdpa from using userland vq handler via disable_ioeventfd_handler. The same needs to be done for host notifier cleanup too, as the virtio_queue_host_notifier_read handler still tends to read pending event left behind on ioeventfd and attempts to handle

[PATCH 5/7] vhost-vdpa: fix improper cleanup in net_init_vhost_vdpa

2022-03-29 Thread Si-Wei Liu
... such that no memory leaks on dangling net clients in case of error. Signed-off-by: Si-Wei Liu --- net/vhost-vdpa.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index 1e9fe47..df1e69e 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-v

[PATCH 6/7] vhost-net: fix improper cleanup in vhost_net_start

2022-03-29 Thread Si-Wei Liu
vhost_net_start() missed a corresponding stop_one() upon error from vhost_set_vring_enable(). While at it, make the error handling for err_start more robust. No real issue was found due to this though. Signed-off-by: Si-Wei Liu --- hw/net/vhost_net.c | 4 +++- 1 file changed, 3 insertions(+), 1

Re: [PATCH] target/riscv: Exit current TB after an sfence.vma

2022-03-29 Thread Idan Horowitz
On Wed, 30 Mar 2022 at 02:16, Atish Patra wrote: > > This is in for-next on Alistair's tree and fails to boot the kernel > with the following error (found -d in_asm mode). > Reverting the patch solves the issue. > > > IN: > Priv: 1; Virt: 0 > 0x80201040: 18051073

[PATCH 0/7] vhost-vdpa multiqueue fixes

2022-03-29 Thread Si-Wei Liu
Hi, This patch series attempt to fix a few issues in vhost-vdpa multiqueue functionality. Patch #1 is the formal submission for RFC patch in: https://lore.kernel.org/qemu-devel/c3e931ee-1a1b-9c2f-2f59-cb4395c23...@oracle.com/ Patch #2 and #3 were taken from a previous patchset posted on qemu-d

Re: [PATCH v3 1/2] Replacing CONFIG_VNC_PNG with CONFIG_PNG

2022-03-29 Thread Kshitij Suri
On 30/03/22 2:39 am, Paolo Bonzini wrote: On 3/29/22 15:42, Kshitij Suri wrote: Libpng is only detected if VNC is enabled currently. This patch adds a generalised png option in the meson build which is aimed to replace use of CONFIG_VNC_PNG with CONFIG_PNG. Signed-off-by: Kshitij Suri Rev

[PATCH v4 0/2] Option to take screenshot with screendump as PNG

2022-03-29 Thread Kshitij Suri
This patch series aims to add PNG support using libpng to screendump method. Currently screendump only supports PPM format, which is uncompressed and not standardised. PATCH 1 phases out CONFIG_VNC_PNG parameter and replaces it with CONFIG_PNG which detects libpng support. PATCH 2 contains core l

[PATCH v4 2/2] Added parameter to take screenshot with screendump as PNG

2022-03-29 Thread Kshitij Suri
Currently screendump only supports PPM format, which is un-compressed and not standard. Added a "format" parameter to qemu monitor screendump capabilites to support PNG image capture using libpng. The param was added in QAPI schema of screendump present in ui.json along with png_save() function whi

Re: [PATCH] target/riscv: Exit current TB after an sfence.vma

2022-03-29 Thread Alistair Francis
On Wed, Mar 16, 2022 at 9:42 AM Alistair Francis wrote: > > On Wed, Mar 16, 2022 at 5:26 AM Idan Horowitz wrote: > > > > If the pages which control the translation of the currently executing > > instructions are changed, and then the TLB is flushed using sfence.vma > > we have to exit the current

[PATCH v4 1/2] Replacing CONFIG_VNC_PNG with CONFIG_PNG

2022-03-29 Thread Kshitij Suri
Libpng is only detected if VNC is enabled currently. This patch adds a generalised png option in the meson build which is aimed to replace use of CONFIG_VNC_PNG with CONFIG_PNG. Signed-off-by: Kshitij Suri Reviewed-by: Daniel P. Berrangé --- diff to v3: - Added condition to check for libpng o

Re: [PATCH v2 1/1] target/riscv: misa to ISA string conversion fix

2022-03-29 Thread Alistair Francis
On Mon, Mar 28, 2022 at 11:11 PM Tsukasa OI wrote: > > Some bits in RISC-V `misa' CSR should not be reflected in the ISA > string. For instance, `S' and `U' (represents existence of supervisor > and user mode, respectively) in `misa' CSR must not be copied since > neither `S' nor `U' are valid si

[ANNOUNCE] QEMU 7.0.0-rc2 is now available

2022-03-29 Thread Michael Roth
Hello, On behalf of the QEMU Team, I'd like to announce the availability of the third release candidate for the QEMU 7.0 release. This release is meant for testing purposes and should not be used in a production environment. http://download.qemu-project.org/qemu-7.0.0-rc2.tar.xz http://downlo

[RESEND PATCH] target/riscv: fix start byte for vmvr.v when vstart != 0

2022-03-29 Thread Weiwei Li
The spec for vmvr.v says: 'the instructions operate as if EEW=SEW, EMUL = NREG, effective length evl= EMUL * VLEN/SEW.' So the start byte for vstart != 0 should take sew into account Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/vector_helper.c | 8 +--- 1 file cha

[PATCH] target/riscv: fix start byte for vmvr.v when vstart != 0

2022-03-29 Thread Weiwei Li
The spec for vmvr.v says: 'the instructions operate as if EEW=SEW, EMUL = NREG, effective length evl= EMUL * VLEN/SEW.' So the start byte for vstart != 0 should take sew into account Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/vector_helper.c | 8 +--- 1 file cha

Re: [PATCH v2 1/1] target/riscv: misa to ISA string conversion fix

2022-03-29 Thread Tsukasa OI
On 2022/03/30 1:29, Frédéric Pétrot wrote: > Hello, > > Le 28/03/2022 à 15:11, Tsukasa OI a écrit : >> Some bits in RISC-V `misa' CSR should not be reflected in the ISA >> string.  For instance, `S' and `U' (represents existence of supervisor >> and user mode, respectively) in `misa' CSR must not

Re: [PATCH 3/4] python/qmp-shell: relicense as LGPLv2+

2022-03-29 Thread Eduardo Habkost
Hi! On Fri, 25 Mar 2022 at 16:04, John Snow wrote: > > qmp-shell is presently licensed as GPLv2 (only). I intend to include > this tool as an add-on to an LGPLv2+ library package hosted on > PyPI.org. I've selected LGPLv2+ to maximize compatibility with other > licenses while retaining a copyleft

Re: [PATCH v2 1/1] hw/ppc: free env->tb_env in spapr_unrealize_vcpu()

2022-03-29 Thread David Gibson
On Tue, Mar 29, 2022 at 09:45:45AM -0300, Daniel Henrique Barboza wrote: > The timebase is allocated during spapr_realize_vcpu() and it's not > freed. This results in memory leaks when doing vcpu unplugs: > > ==636935== > ==636935== 144 (96 direct, 48 indirect) bytes in 1 blocks are definitely los

[PATCH for-7.0?] tcg/aarch64: Use 'ull' suffix to force 64-bit constant

2022-03-29 Thread Richard Henderson
Typo used only 'ul' suffix, which is still 32-bits for windows host. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/947 Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.c.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tcg/aarch64/tcg-target.c.inc

Re: [PATCH] target/riscv: Exit current TB after an sfence.vma

2022-03-29 Thread Atish Patra
On Wed, Mar 16, 2022 at 10:23 AM wrote: > > Here is a test case for this patch. I used to submit this bug on > https://bugs.launchpad.net/qemu/+bug/1906516 > > sfence.vma will flush the tlb, so after this instruction, the translation > block should be end. > The following code will only work in

Re: [PATCH v8 04/46] hw/cxl/device: Introduce a CXL device (8.2.8)

2022-03-29 Thread Davidlohr Bueso
On Tue, 29 Mar 2022, Adam Manzanares wrote: +typedef struct cxl_device_state { +MemoryRegion device_registers; + +/* mmio for device capabilities array - 8.2.8.2 */ +MemoryRegion device; +MemoryRegion caps; + +/* mmio for the mailbox registers 8.2.8.4 */ +MemoryRegion mail

Re: [PULL 0/2] Build bugfixes for QEMU 7.0, 2022-03-29

2022-03-29 Thread Peter Maydell
On Tue, 29 Mar 2022 at 15:03, Paolo Bonzini wrote: > > The following changes since commit f345abe36527a8b575482bb5a0616f43952bf1f4: > > Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging > (2022-03-25 10:14:47 +) > > are available in the Git repository at: > > https:

Re: [PATCH v3 1/2] Replacing CONFIG_VNC_PNG with CONFIG_PNG

2022-03-29 Thread Paolo Bonzini
On 3/29/22 15:42, Kshitij Suri wrote: Libpng is only detected if VNC is enabled currently. This patch adds a generalised png option in the meson build which is aimed to replace use of CONFIG_VNC_PNG with CONFIG_PNG. Signed-off-by: Kshitij Suri Reviewed-by: Daniel P. Berrangé --- meson.build

[PATCH v4 34/45] block/export: add blk_by_export_id()

2022-03-29 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/export/export.c | 18 ++ include/sysemu/block-backend.h | 1 + 2 files changed, 19 insertions(+) diff --git a/block/export/export.c b/block/export/export.c index 6d3b9964c8..613b5bc1d5 100644 --- a/block/export/expor

[PATCH v4 36/45] block: bdrv_replace_child_bs(): move to external transaction

2022-03-29 Thread Vladimir Sementsov-Ogievskiy
We'll need this functionality as part of external transaction, so make the whole function to be transaction action. For this we need to introduce a transaction action helper: bdrv_drained(), which calls bdrv_drained_begin() and postpone bdrv_drained_end() to .clean() phase. Signed-off-by: Vladimir

[PATCH v4 33/45] block-backend: blk_root(): drop const specifier on return type

2022-03-29 Thread Vladimir Sementsov-Ogievskiy
We'll need get non-const child pointer for graph modifications in further commits. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/block-backend.c | 2 +- include/sysemu/block-backend.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/block/block-backend.c b/

[PATCH v4 31/45] qapi: block: add blockdev-add transaction action

2022-03-29 Thread Vladimir Sementsov-Ogievskiy
Use new flag to avoid permission updates where possible during blockdev_add, so that a bunch of add/del (and soon, new 'replace') command may be done before actual permission update to avoid intermediate permission conflicts. Signed-off-by: Vladimir Sementsov-Ogievskiy --- blockdev.c

[PATCH v4 30/45] block: bdrv_insert_node(): use BDRV_O_NOPERM

2022-03-29 Thread Vladimir Sementsov-Ogievskiy
Further bdrv_replace_node will refresh permissions anyway, so we can avoid intermediate permission conflicts. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block.c b/block.c index a3bc28cf32..d4d0adc6c8 100644 ---

[PATCH v4 26/45] blockdev: transaction: refactor handling transaction properties

2022-03-29 Thread Vladimir Sementsov-Ogievskiy
Only backup supports GROUPED mode. Make this logic more clear. And avoid passing extra thing to each action. Signed-off-by: Vladimir Sementsov-Ogievskiy --- blockdev.c | 88 -- 1 file changed, 19 insertions(+), 69 deletions(-) diff --git a/blo

Re: [PULL 0/4] Block patches for 7.0-rc2

2022-03-29 Thread Peter Maydell
On Tue, 29 Mar 2022 at 15:58, Hanna Reitz wrote: > > The following changes since commit 44064550d98a680e2ff55fdd783ac19d850ac8ca: > > Merge tag 'darwin-20220329' of https://github.com/philmd/qemu into staging > (2022-03-29 15:17:53 +0100) > > are available in the

[PATCH v4 25/45] blockdev: qmp_transaction: refactor loop to classic for

2022-03-29 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- blockdev.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/blockdev.c b/blockdev.c index 8afd769bc4..6c08ee4401 100644 --- a/blockdev.c +++ b/blockdev.c @@ -2361,7 +2361,7 @@ void qmp_transaction(TransactionActionList *a

[PATCH v4 37/45] qapi: add x-blockdev-replace command

2022-03-29 Thread Vladimir Sementsov-Ogievskiy
Add a command that can replace bs in following BdrvChild structures: - qdev blk root child - block-export blk root child - any child BlockDriverState selected by child-name Signed-off-by: Vladimir Sementsov-Ogievskiy --- blockdev.c | 65 ++

[PATCH v4 35/45] block: make bdrv_find_child() function public

2022-03-29 Thread Vladimir Sementsov-Ogievskiy
To be reused soon. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 13 + blockdev.c| 14 -- include/block/block_int.h | 1 + 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/block.c b/block.c index d4d0adc6c8..6

[PATCH v4 32/45] iotests: add blockdev-add-transaction

2022-03-29 Thread Vladimir Sementsov-Ogievskiy
Add a test for transaction support of blockdev-add. Test is format-agnostic, so limit it to qcow2 to avoid extra test runs. Signed-off-by: Vladimir Sementsov-Ogievskiy --- .../tests/blockdev-add-transaction| 52 +++ .../tests/blockdev-add-transaction.out| 6

[PATCH v4 28/45] qapi: block: add blockdev-del transaction action

2022-03-29 Thread Vladimir Sementsov-Ogievskiy
Support blockdev-del in a transaction. The tricky thing is how we update permissions: not after every blockdev-del operation, but after group of such operations. Soon we'll support blockdev-add and new blockdev-replace in the same manner, and we'll be able to do a wide range of block-graph modifyi

[PATCH v4 21/45] block: add bdrv_try_set_aio_context_tran transaction action

2022-03-29 Thread Vladimir Sementsov-Ogievskiy
To be used in further commit. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 48 1 file changed, 48 insertions(+) diff --git a/block.c b/block.c index 288141328e..22c5010c4d 100644 --- a/block.c +++ b/block.c @@ -2810,6 +2810,54 @@ sta

[PATCH v4 19/45] block: refactor bdrv_list_refresh_perms to allow any list of nodes

2022-03-29 Thread Vladimir Sementsov-Ogievskiy
We are going to increase usage of collecting nodes in a list to then update, and calling bdrv_topological_dfs() each time is not convenient, and not correct as we are going to interleave graph modifying with filling the node list. So, let's switch to a function that takes any list of nodes, adds a

[PATCH v4 29/45] block: introduce BDRV_O_NOPERM flag

2022-03-29 Thread Vladimir Sementsov-Ogievskiy
Now copy-before-write filter has weak permission model: when it has no parents, it share write permission on source. Otherwise we just can't blockdev-add it, when existing user of source has write permission. The situation is bad, it means that copy-before-write filter doesn't guarantee that all w

[PATCH v4 27/45] blockdev: qmp_transaction: drop extra generic layer

2022-03-29 Thread Vladimir Sementsov-Ogievskiy
Let's simplify things: First, actions generally don't need and access to common BlkActionState structure. The only exclusion are backup actions that need block_job_txn. Next, for transaction actions of Transaction API is more native to allocated state structure in the action itself. So, do the f

[PATCH v4 16/45] block: drop bdrv_detach_child()

2022-03-29 Thread Vladimir Sementsov-Ogievskiy
The only caller is bdrv_root_unref_child(), let's just do the logic directly in it. It simplifies further convertion of bdrv_root_unref_child() to transaction action. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 45 +++-- 1 file changed, 19 in

[PATCH v4 24/45] blockdev: transactions: rename some things

2022-03-29 Thread Vladimir Sementsov-Ogievskiy
Look at qmp_transaction(): dev_list is not obvious name for list of actions. Let's look at qapi spec, this argument is "actions". Let's follow the common practice of using same argument names in qapi scheme and code. To be honest, rename props to properties for same reason. Next, we have to renam

[PATCH v4 22/45] block: implemet bdrv_unref_tran()

2022-03-29 Thread Vladimir Sementsov-Ogievskiy
Now nodes are removed during block-graph update transactions now? Look at bdrv_replace_child_tran: bdrv_unref() is simply postponed to commit phase. What is the problem with it? We want to make copy-before-write permissions strict: it should unshare write always, not only when it has at least one

[PATCH v4 14/45] block/snapshot: drop indirection around bdrv_snapshot_fallback_ptr

2022-03-29 Thread Vladimir Sementsov-Ogievskiy
Now the indirection is not actually used, we can safely reduce it to simple pointer. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/snapshot.c | 39 +-- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/block/snapshot.c b/block/snapshot.c

[PATCH v4 38/45] qapi: add x-blockdev-replace transaction action

2022-03-29 Thread Vladimir Sementsov-Ogievskiy
Support blockdev-replace in a transaction. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 4 ++-- blockdev.c| 29 - include/block/block.h | 2 ++ qapi/transaction.json | 15 ++- 4 files changed, 42 insertions(+), 8 de

[PATCH v4 23/45] blockdev: refactor transaction to use Transaction API

2022-03-29 Thread Vladimir Sementsov-Ogievskiy
We are going to add more block-graph modifying transaction actions, and block-graph modifying functions are already based on Transaction API. Next, we'll need to separately update permissions after several graph-modifying actions, and this would be simple with help of Transaction API. So, now let

[PATCH v4 20/45] block: make permission update functions public

2022-03-29 Thread Vladimir Sementsov-Ogievskiy
We'll need them in further commits in blockdev.c for new transaction block-graph modifying API. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 7 +++ include/block/block.h | 4 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/block.c b/block.c inde

[PATCH v4 12/45] Revert "block: Pass BdrvChild ** to replace_child_noperm"

2022-03-29 Thread Vladimir Sementsov-Ogievskiy
That's a preparation to previously reverted "block: Let replace_child_noperm free children". Drop it too, we don't need it for a new approach. This reverts commit be64bbb0149748f3999c49b13976aafb8330ea86. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 23 +++ 1 fi

[PATCH v4 10/45] Revert "block: Let replace_child_tran keep indirect pointer"

2022-03-29 Thread Vladimir Sementsov-Ogievskiy
That's a preparation to previously reverted "block: Let replace_child_noperm free children". Drop it too, we don't need it for a new approach. This reverts commit 82b54cf51656bf3cd5ed1ac549e8a1085a0e3290. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 83 +++--

[PATCH v4 15/45] block: refactor bdrv_remove_file_or_backing_child to bdrv_remove_child

2022-03-29 Thread Vladimir Sementsov-Ogievskiy
Now the function can remove any child, so give it more common name. Drop assertions and drop bs argument which becomes unused. Function would be reused in a further commit. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 22 -- 1 file changed, 8 insertions(+), 14 de

[PATCH v4 18/45] block: bdrv_refresh_perms(): allow external tran

2022-03-29 Thread Vladimir Sementsov-Ogievskiy
Allow passing external Transaction pointer, stop creating extra Transaction objects. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 31 --- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/block.c b/block.c index 8c34de936c..f2b70b81cf 100644

[PATCH v4 11/45] Revert "block: Restructure remove_file_or_backing_child()"

2022-03-29 Thread Vladimir Sementsov-Ogievskiy
That's a preparation to previously reverted "block: Let replace_child_noperm free children". Drop it too, we don't need it for a new approach. This reverts commit 562bda8bb41879eeda0bd484dd3d55134579b28e. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 21 + 1 file

[PATCH v4 07/45] block: document connection between child roles and bs->backing/bs->file

2022-03-29 Thread Vladimir Sementsov-Ogievskiy
Make the informal rules formal. In further commit we'll add corresponding assertions. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block.h | 42 ++ 1 file changed, 42 insertions(+) diff --git a/include/block/block.h b/include/block/block.

[PATCH v4 17/45] block: drop bdrv_remove_filter_or_cow_child

2022-03-29 Thread Vladimir Sementsov-Ogievskiy
Drop this simple wrapper used only in one place. We have too many graph modifying functions even without it. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 15 +-- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/block.c b/block.c index 378841a546..8c34de936c

[PATCH v4 09/45] Revert "block: Let replace_child_noperm free children"

2022-03-29 Thread Vladimir Sementsov-Ogievskiy
We are going to reimplement this behavior (clear bs->file / bs->backing pointers automatically when child->bs is cleared) in a nicer way. This reverts commit b0a9f6fed3d80de610dcd04a7e66f9f30a04174f. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 102 +

[PATCH v4 05/45] tests-bdrv-drain: bdrv_replace_test driver: declare supports_backing

2022-03-29 Thread Vladimir Sementsov-Ogievskiy
We do add COW child to the node. In future we are going to forbid adding COW child to the node that doesn't support backing. So, fix it here now. Don't worry about setting bs->backing itself: it further commit we'll update the block-layer to automatically set/unset this field in generic code. Si

[PATCH v4 03/45] block/blklogwrites: don't care to remove bs->file child on failure

2022-03-29 Thread Vladimir Sementsov-Ogievskiy
We don't need to remove bs->file, generic layer takes care of it. No other driver cares to remove bs->file on failure by hand. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/blklogwrites.c | 4 1 file changed, 4 deletions(-) diff --git a/block/blklogwrites.c b/block/blklogwrites.c i

[PATCH v4 13/45] block: Manipulate bs->file / bs->backing pointers in .attach/.detach

2022-03-29 Thread Vladimir Sementsov-Ogievskiy
bs->file and bs->backing are a kind of duplication of part of bs->children. But very useful diplication, so let's not drop them at all:) We should manage bs->file and bs->backing in same place, where we manage bs->children, to keep them in sync. Moreover, generic io paths are unprepared to BdrvCh

[PATCH v4 08/45] block/snapshot: stress that we fallback to primary child

2022-03-29 Thread Vladimir Sementsov-Ogievskiy
Actually what we chose is a primary child. Let's stress it in the code. We are going to drop indirect pointer logic here in future. Actually this commit simplifies the future work: we drop use of indirection in the assertion now. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/snapshot.c

[PATCH v4 04/45] test-bdrv-graph-mod: update test_parallel_perm_update test case

2022-03-29 Thread Vladimir Sementsov-Ogievskiy
test_parallel_perm_update() does two things that we are going to restrict in the near future: 1. It updates bs->file field by hand. bs->file will be managed automatically by generic code (together with bs->children list). Let's better refactor our "tricky" bds to have own state where one

[PATCH v4 06/45] test-bdrv-graph-mod: fix filters to be filters

2022-03-29 Thread Vladimir Sementsov-Ogievskiy
bdrv_pass_through is used as filter, even all node variables has corresponding names. We want to append it, so it should be backing-child-based filter like mirror_top. So, in test_update_perm_tree, first child should be DATA, as we don't want filters with two filtered children. bdrv_exclusive_writ

[PATCH v4 01/45] block: BlockDriver: add .filtered_child_is_backing field

2022-03-29 Thread Vladimir Sementsov-Ogievskiy
Unfortunately not all filters use .file child as filtered child. Two exclusions are mirror_top and commit_top. Happily they both are private filters. Bad thing is that this inconsistency is observable through qmp commands query-block / query-named-block-nodes. So, could we just change mirror_top an

[PATCH v4 00/45] Transactional block-graph modifying API

2022-03-29 Thread Vladimir Sementsov-Ogievskiy
Hi all! That's a big series, which unites some of my previous ones, and completes them with necessary additions to finally implement block-graph modifying API. The series is called "v4" as it inherits "[PATCH v3 00/11] blockdev-replace" (among other things). After this series, we have blockdev-ad

[PATCH v4 02/45] block: introduce bdrv_open_file_child() helper

2022-03-29 Thread Vladimir Sementsov-Ogievskiy
Almost all drivers call bdrv_open_child() similarly. Let's create a helper for this. The only not updated driver that call bdrv_open_child() to set bs->file is raw-format, as it sometimes want to have filtered child but don't set drv->is_filter to true. Possibly we should implement drv->is_filter

Re: Call for GSoC and Outreachy project ideas for summer 2022

2022-03-29 Thread Stefan Hajnoczi
On Wed, 16 Mar 2022 at 13:36, Alexander Graf wrote: > Petre literally pointed me to the fact that the project did not end up > on the wiki page a few hours ago. I added it and augmented the bits > above. Please let me know if you see anything else missing! :) Thanks for posting it! Stefan

Re: [PATCH 3/3] target/arm: Determine final stage 2 output PA space based on original IPA

2022-03-29 Thread Idan Horowitz
On Tue, 29 Mar 2022 at 22:09, Richard Henderson wrote: > > I believe I follow: because the walk uses walkstate.address.paddress.paspace, > the ipa > input parameter is unchanged, and it is ipa that is passed to > AArch64.S2NextWalkStateLast() to form the output address. > Indeed, I initially fou

Re: [PATCH 2/4] virtio-ccw: move vhost_ccw_scsi to a separate file

2022-03-29 Thread Eric Farman
On Mon, 2022-03-28 at 16:30 +0200, Paolo Bonzini wrote: > Remove unecessary use of #ifdef CONFIG_VHOST_SCSI, instead just use a > separate file and a separate rule in meson.build. > > Signed-off-by: Paolo Bonzini > --- > hw/s390x/meson.build | 1 + > hw/s390x/vhost-scsi-ccw.c | 64 >

Re: [PATCH v7 12/17] vfio-user: IOMMU support for remote device

2022-03-29 Thread Jag Raman
> On Mar 29, 2022, at 10:48 AM, Stefan Hajnoczi wrote: > > On Tue, Mar 29, 2022 at 02:12:40PM +, Jag Raman wrote: >>> On Mar 29, 2022, at 8:35 AM, Stefan Hajnoczi wrote: >>> On Fri, Mar 25, 2022 at 03:19:41PM -0400, Jagannathan Raman wrote: +void remote_iommu_del_device(PCIDevice *pci

[PATCH v7] target/riscv: Add isa extenstion strings to the device tree

2022-03-29 Thread Atish Patra
The Linux kernel parses the ISA extensions from "riscv,isa" DT property. It used to parse only the single letter base extensions until now. A generic ISA extension parsing framework was proposed[1] recently that can parse multi-letter ISA extensions as well. Generate the extended ISA string by app

Re: [PATCH v21 9/9] tests: Add dirty page rate limit test

2022-03-29 Thread Peter Xu
On Wed, Mar 16, 2022 at 09:07:21PM +0800, huang...@chinatelecom.cn wrote: > From: Hyman Huang(黄勇) > > Add dirty page rate limit test if kernel support dirty ring, > create a standalone file to implement the test case. > > The following qmp commands are covered by this test case: > "calc-dirty-ra

Re: [PULL 0/2] Build bugfixes for QEMU 7.0, 2022-03-29

2022-03-29 Thread Peter Maydell
On Tue, 29 Mar 2022 at 15:03, Paolo Bonzini wrote: > > The following changes since commit f345abe36527a8b575482bb5a0616f43952bf1f4: > > Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging > (2022-03-25 10:14:47 +) > > are available in the Git repository at: > > https:

Re: [PATCH v5 11/13] KVM: Zap existing KVM mappings when pages changed in the private fd

2022-03-29 Thread Sean Christopherson
On Thu, Mar 10, 2022, Chao Peng wrote: > diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c > index 67349421eae3..52319f49d58a 100644 > --- a/virt/kvm/kvm_main.c > +++ b/virt/kvm/kvm_main.c > @@ -841,8 +841,43 @@ static int kvm_init_mmu_notifier(struct kvm *kvm) > #endif /* CONFIG_MMU_NOTIFIER

Re: [PATCH v5 12/13] KVM: Expose KVM_MEM_PRIVATE

2022-03-29 Thread Sean Christopherson
On Thu, Mar 10, 2022, Chao Peng wrote: > KVM_MEM_PRIVATE is not exposed by default but architecture code can turn > on it by implementing kvm_arch_private_memory_supported(). > > Signed-off-by: Yu Zhang > Signed-off-by: Chao Peng > --- > include/linux/kvm_host.h | 1 + > virt/kvm/kvm_main.c

Re: [PATCH 3/3] target/arm: Determine final stage 2 output PA space based on original IPA

2022-03-29 Thread Richard Henderson
On 3/27/22 03:34, Idan Horowitz wrote: As per the AArch64.S2Walk() psuedo-code in the ARMv8 ARM, the final decision as to the output address's PA space based on the SA/SW/NSA/NSA bits needs to take the input IPA's PA space into account, and not the PA space of the result of the stage 2 walk itsel

Re: [PATCH v6 15/19] vfio-user: handle device interrupts

2022-03-29 Thread Jag Raman
> On Mar 29, 2022, at 10:24 AM, Stefan Hajnoczi wrote: > > On Sat, Mar 26, 2022 at 11:47:36PM +, Jag Raman wrote: >> >> >>> On Mar 7, 2022, at 5:24 AM, Stefan Hajnoczi wrote: >>> >>> On Thu, Feb 17, 2022 at 02:49:02AM -0500, Jagannathan Raman wrote: Forward remote device's interrup

Re: [PATCH v5 10/13] KVM: Register private memslot to memory backing store

2022-03-29 Thread Sean Christopherson
On Thu, Mar 10, 2022, Chao Peng wrote: > Add 'notifier' to memslot to make it a memfile_notifier node and then > register it to memory backing store via memfile_register_notifier() when > memslot gets created. When memslot is deleted, do the reverse with > memfile_unregister_notifier(). Note each K

Re: [PATCH v21 8/9] migration-test: Export migration-test util funtions

2022-03-29 Thread Peter Xu
On Wed, Mar 16, 2022 at 09:07:20PM +0800, huang...@chinatelecom.cn wrote: > +void wait_for_serial(const char *tmpfs, const char *side) Passing over tmpfs over and over (even if it's mostly a constant) doesn't sound appealing to me.. I hope there's still a way that we could avoid doing that when s

Re: [PATCH v5 02/13] mm: Introduce memfile_notifier

2022-03-29 Thread Sean Christopherson
On Thu, Mar 10, 2022, Chao Peng wrote: > diff --git a/mm/Makefile b/mm/Makefile > index 70d4309c9ce3..f628256dce0d 100644 > +void memfile_notifier_invalidate(struct memfile_notifier_list *list, > + pgoff_t start, pgoff_t end) > +{ > + struct memfile_notifier *notifi

Re: [PATCH v8 04/46] hw/cxl/device: Introduce a CXL device (8.2.8)

2022-03-29 Thread Adam Manzanares
On Fri, Mar 18, 2022 at 03:05:53PM +, Jonathan Cameron wrote: > From: Ben Widawsky > > A CXL device is a type of CXL component. Conceptually, a CXL device > would be a leaf node in a CXL topology. From an emulation perspective, > CXL devices are the most complex and so the actual implementati

Re: [PATCH] tests/qtest: failover: fix infinite loop

2022-03-29 Thread Peter Maydell
On Tue, 29 Mar 2022 at 13:43, Laurent Vivier wrote: > > If the migration is over before we cancel it, we are > waiting in a loop a state that never comes because the state > is already "completed". > > To avoid an infinite loop, skip the test if the migration > is "completed" before we were able t

Re: [PATCH V7 10/29] machine: memfd-alloc option

2022-03-29 Thread Steven Sistare
On 3/11/2022 4:42 AM, Igor Mammedov wrote: > On Thu, 10 Mar 2022 13:18:35 -0500 > Steven Sistare wrote: > >> On 3/10/2022 12:28 PM, Steven Sistare wrote: >>> On 3/10/2022 11:00 AM, Igor Mammedov wrote: On Thu, 10 Mar 2022 10:36:08 -0500 Steven Sistare wrote: > On 3/8/2022

Re: [PATCH v2 1/1] hw/ppc: free env->tb_env in spapr_unrealize_vcpu()

2022-03-29 Thread Cédric Le Goater
On 3/29/22 14:45, Daniel Henrique Barboza wrote: The timebase is allocated during spapr_realize_vcpu() and it's not freed. This results in memory leaks when doing vcpu unplugs: ==636935== ==636935== 144 (96 direct, 48 indirect) bytes in 1 blocks are definitely lost in loss record 6 ,461 of 8,13

Re: [PATCH 4/5] intc/exynos4210_gic: fix format-overflow warning

2022-03-29 Thread Peter Maydell
On Tue, 29 Mar 2022 at 18:08, Philippe Mathieu-Daudé wrote: > > On 28/3/22 11:15, Peter Maydell wrote: > > On Mon, 28 Mar 2022 at 09:48, wrote: > >> > >> From: Marc-André Lureau > >> > >> Signed-off-by: Marc-André Lureau > >> --- > >> hw/intc/exynos4210_gic.c | 9 +++-- > >> 1 file chang

Re: [PATCH 4/5] intc/exynos4210_gic: fix format-overflow warning

2022-03-29 Thread Philippe Mathieu-Daudé
On 28/3/22 11:15, Peter Maydell wrote: On Mon, 28 Mar 2022 at 09:48, wrote: From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- hw/intc/exynos4210_gic.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/intc/exynos4210_gic.c b/hw/intc/exynos4210_gic

Re: [PULL 0/4] Darwin patches for 2022-03-29

2022-03-29 Thread Philippe Mathieu-Daudé
6' of https://github.com/legoater/qemu into staging (2022-03-28 10:16:33 +0100) are available in the Git repository at:    https://github.com/philmd/qemu.git tags/darwin-20220329 for you to fetch changes up to a4fd374364d4e23e0861273aaf7ff2ebddd57a17:    ui/console: Check console before e

Re: [PATCH v5 00/13] KVM: mm: fd-based approach for supporting KVM guest private memory

2022-03-29 Thread Quentin Perret
On Monday 28 Mar 2022 at 18:58:35 (+), Sean Christopherson wrote: > On Mon, Mar 28, 2022, Quentin Perret wrote: > > Hi Sean, > > > > Thanks for the reply, this helps a lot. > > > > On Monday 28 Mar 2022 at 17:13:10 (+), Sean Christopherson wrote: > > > On Thu, Mar 24, 2022, Quentin Perret

Re: iotest40 problem

2022-03-29 Thread Li Zhang
Update what I observed. It seems that aqmp is not stable when running test cases. So I revert the patches as the following, iotest40/41 test cases work well. commit 76cd358671e6b8e7c435ec65b1c44200254514a9 Author: John Snow Date: Tue Oct 26 13:56:12 2021 -0400 python, iotests: replac

Re: [PATCH] target/sh4: Remove old README.sh4 file

2022-03-29 Thread Richard Henderson
On 3/29/22 09:19, Thomas Huth wrote: This file didn't have any non-trivial update since it was initially added in 2006, and looking at the content, it seems incredibly outdated, saying e.g. "The sh4 target is not ready at all yet for integration in qemu" or "A sh4 user-mode has also somewhat star

Re: [PATCH 3/4] python/qmp-shell: relicense as LGPLv2+

2022-03-29 Thread Luiz Capitulino
On Fri, Mar 25, 2022 at 4:04 PM John Snow wrote: > qmp-shell is presently licensed as GPLv2 (only). I intend to include > this tool as an add-on to an LGPLv2+ library package hosted on > PyPI.org. I've selected LGPLv2+ to maximize compatibility with other > licenses while retaining a copyleft lic

Re: [PATCH 2/3] target/arm: Take VSTCR.SW, VTCR.NSW into account in final stage 2 walk

2022-03-29 Thread Richard Henderson
On 3/27/22 03:34, Idan Horowitz wrote: As per the AArch64.SS2InitialTTWState() psuedo-code in the ARMv8 ARM the initial PA space used for stage 2 table walks is assigned based on the SW and NSW bits of the VSTCR and VTCR registers. This was already implemented for the recursive stage 2 page table

Re: "Future directions" vs. "TODO" in doc comments (was: [PATCH 01/14] qapi: BlockExportRemoveMode: move comments to TODO)

2022-03-29 Thread John Snow
On Mon, Mar 28, 2022 at 3:46 AM Markus Armbruster wrote: > > Victor Toso writes: > > > Hi, > > > > On Fri, Mar 25, 2022 at 11:11:23AM -0400, John Snow wrote: > >> On Fri, Mar 25, 2022, 8:33 AM Markus Armbruster wrote: > > [...] > > >> > Doc comments embed user documentation in the source code.

Re: [PATCH v2 1/1] target/riscv: misa to ISA string conversion fix

2022-03-29 Thread Frédéric Pétrot
Hello, Le 28/03/2022 à 15:11, Tsukasa OI a écrit : Some bits in RISC-V `misa' CSR should not be reflected in the ISA string. For instance, `S' and `U' (represents existence of supervisor and user mode, respectively) in `misa' CSR must not be copied since neither `S' nor `U' are valid single-let

Re: [PATCH] schemas: add missing vim modeline

2022-03-29 Thread John Snow
On Fri, Mar 25, 2022 at 6:16 PM Victor Toso wrote: > > This is the last qapi schema that is missing the modeline. > Fixes 7e7237cd2b "schemas: add missing vim modeline" > > Signed-off-by: Victor Toso > --- > qapi/pragma.json | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/qapi/pragma

Re: [PATCH v3 00/14] Fix some qapi examples and a TODO section

2022-03-29 Thread John Snow
On Tue, Mar 29, 2022 at 12:00 PM Markus Armbruster wrote: > > Victor Toso writes: > > > Hi, > > > > I've being using the examples as unit tests and found a few that > > doesn't work out-of-the-box, might be inteded in order to be less > > verbose in the qapi documentation but nevertheless I'm sen

Re: [PATCH 3/4] python/qmp-shell: relicense as LGPLv2+

2022-03-29 Thread John Snow
On Tue, Mar 29, 2022 at 7:08 AM Fam Zheng wrote: > > On 2022-03-25 16:04, John Snow wrote: > > qmp-shell is presently licensed as GPLv2 (only). I intend to include > > this tool as an add-on to an LGPLv2+ library package hosted on > > PyPI.org. I've selected LGPLv2+ to maximize compatibility with

Re: [PATCH 4/4] python/aqmp-tui: relicense as LGPLv2+

2022-03-29 Thread John Snow
On Sat, Mar 26, 2022 at 11:28 AM Niteesh G. S. wrote: > > Hii John, > > On Sat, Mar 26, 2022 at 1:34 AM John Snow wrote: >> >> aqmp-tui, the async QMP text user interface tool, is presently licensed >> as GPLv2+. I intend to include this tool as an add-on to an LGPLv2+ >> library package hosted o

Re: [PATCH v3 00/14] Fix some qapi examples and a TODO section

2022-03-29 Thread Markus Armbruster
Victor Toso writes: > Hi, > > I've being using the examples as unit tests and found a few that > doesn't work out-of-the-box, might be inteded in order to be less > verbose in the qapi documentation but nevertheless I'm sending this > out in case you want to cherry-pick them. Lovely doc fixes.

  1   2   3   >