Re: [PATCH v2] hw/riscv: virt: Remove the redundant ipi-id property

2022-11-22 Thread Atish Kumar Patra
On Mon, Nov 21, 2022 at 10:11 PM Alistair Francis wrote: > > On Sun, Nov 13, 2022 at 7:52 PM Atish Patra wrote: > > > > The imsic DT binding[1] has changed and no longer require an ipi-id. > > The latest IMSIC driver dynamically allocates ipi id if slow-ipi > > is not defined. > > > > Get rid of

[PATCH v3] hw/riscv: virt: Remove the redundant ipi-id property

2022-11-22 Thread Atish Patra
The imsic DT binding[1] has changed and no longer require an ipi-id. The latest IMSIC driver dynamically allocates ipi id if slow-ipi is not defined. Get rid of the unused dt property which may lead to confusion. [1] https://lore.kernel.org/lkml/2022044207.1478350-5-apa...@ventanamicro.com/

Re: UI layer threading and locking strategy; memory_region_snapshot_and_clear_dirty() races

2022-11-22 Thread Akihiko Odaki
Hi, On 2022/11/22 7:37, Philippe Mathieu-Daudé wrote: Cc'ing more UI/display contributors. On 17/11/22 14:05, Peter Maydell wrote: On Tue, 1 Nov 2022 at 14:17, Peter Maydell wrote: Hi; I'm trying to find out what the UI layer's threading and locking strategy is, at least as far as it

[PATCH for-7.2 1/5] hw/nvme: fix aio cancel in format

2022-11-22 Thread Klaus Jensen
From: Klaus Jensen There are several bugs in the async cancel code for the Format command. Firstly, cancelling a format operation neglects to set iocb->ret as well as clearing the iocb->aiocb after cancelling the underlying aiocb which causes the aio callback to ignore the cancellation. Trivial

Re: [PATCH v3] disas: recognize either or

2022-11-22 Thread Daniel P . Berrangé
On Tue, Nov 22, 2022 at 10:45:59AM +0300, Michael Tokarev wrote: > Historically, capstone varies in requiring either > or include depending on version and the > way how it has been installed. This has already been an issue > before, and will likely become an issue again with capstone > 5.0

[PATCH for-7.2 2/5] hw/nvme: fix aio cancel in flush

2022-11-22 Thread Klaus Jensen
From: Klaus Jensen Make sure that iocb->aiocb is NULL'ed when cancelling. Fix a potential use-after-free by removing the bottom half and enqueuing the completion directly. Fixes: 38f4ac65ac88 ("hw/nvme: reimplement flush to allow cancellation") Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c

[PATCH for-7.2 0/5] hw/nvme: aio cancel fixes

2022-11-22 Thread Klaus Jensen
From: Klaus Jensen A new blktests nvme test unearthed some bad bugs in the asynchronous cancellation handling. Fix this for all commands that implement async_cancel(). The fix is the same for all commands: remove the deferred enqueuing (a bottom half scheduling) of the request completion.

[PATCH for-7.2 5/5] hw/nvme: remove copy bh scheduling

2022-11-22 Thread Klaus Jensen
From: Klaus Jensen Fix a potential use-after-free by removing the bottom half and enqueuing the completion directly. Fixes: 796d20681d9b ("hw/nvme: reimplement the copy command to allow aio cancellation") Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 63

[PATCH for-7.2 4/5] hw/nvme: fix aio cancel in dsm

2022-11-22 Thread Klaus Jensen
From: Klaus Jensen When the DSM operation is cancelled asynchronously, we set iocb->ret to -ECANCELED. However, the callback function only checks the return value of the completed aio, which may have completed succesfully prior to the cancellation and thus the callback ends up continuing the dsm

[PATCH for-7.2 3/5] hw/nvme: fix aio cancel in zone reset

2022-11-22 Thread Klaus Jensen
From: Klaus Jensen If the zone reset operation is cancelled but the block unmap operation completes normally, the callback will continue resetting the next zone since it neglects to check iocb->ret which will have been set to -ECANCELED. Make sure that this is checked and bail out if an error is

Re: [PATCH v3 2/2] migration: check magic value for deciding the mapping of channels

2022-11-22 Thread Daniel P . Berrangé
On Sat, Nov 19, 2022 at 09:36:15AM +, manish.mishra wrote: > Current logic assumes that channel connections on the destination side are > always established in the same order as the source and the first one will > always be the main channel followed by the multifid or post-copy > preemption

Re: [PATCH v4 11/11] block/dirty-bitmap: convert coroutine-only functions to generated_co_wrapper_simple

2022-11-22 Thread Kevin Wolf
Am 16.11.2022 um 13:22 hat Emanuele Giuseppe Esposito geschrieben: > bdrv_can_store_new_dirty_bitmap and bdrv_remove_persistent_dirty_bitmap > check if they are running in a coroutine, directly calling the > coroutine callback if it's the case. > Except that no coroutine calls such functions,

Re: [PATCH] hw/arm/boot: set initrd parameters to 64bit in fdt

2022-11-22 Thread Peter Maydell
On Wed, 16 Nov 2022 at 13:14, Peter Maydell wrote: > > On Wed, 16 Nov 2022 at 06:11, Schspa Shi wrote: > > Yes, I think we should accept this patch, because it will not affect > > 32-bit devices, and provides support for 64-bit devices to put initrd > > above 4GB. > > Yes, I agree. However since

Re: [PATCH] cleanup: Tweak and re-run return_directly.cocci

2022-11-22 Thread Markus Armbruster
Peter Maydell writes: > On Tue, 22 Nov 2022 at 08:58, Markus Armbruster wrote: >> I don't think complete detailed review is necessary or even sensible. >> >> Review should start with the Coccinelle script: >> >> // replace 'R = X; return R;' with 'return X;' >> @@ >> identifier VAR;

Re: [PATCH v4 05/11] block-coroutine-wrapper.py: default to main loop aiocontext if function does not have a BlockDriverState parameter

2022-11-22 Thread Kevin Wolf
Am 21.11.2022 um 16:52 hat Emanuele Giuseppe Esposito geschrieben: > Am 21/11/2022 um 16:30 schrieb Kevin Wolf: > > Am 16.11.2022 um 13:22 hat Emanuele Giuseppe Esposito geschrieben: > >> Basically BdrvPollCo->bs is only used by bdrv_poll_co(), and the > >> functions that it uses are both using

Re: [PATCH v3 1/2] io: Add support for MSG_PEEK for socket channel

2022-11-22 Thread Daniel P . Berrangé
On Sat, Nov 19, 2022 at 09:36:14AM +, manish.mishra wrote: > MSG_PEEK reads from the peek of channel, The data is treated as > unread and the next read shall still return this data. This > support is currently added only for socket class. Extra parameter > 'flags' is added to io_readv calls to

Re: [PATCH for-8.0 v3 32/45] tcg: Introduce tcg_out_addi_ptr

2022-11-22 Thread Daniel Henrique Barboza
On 11/11/22 04:40, Richard Henderson wrote: Implement the function for arm, i386, and s390x, which will use it. Add stubs for all other backends. Signed-off-by: Richard Henderson --- For ppc and common code bits: Reviewed-by: Daniel Henrique Barboza tcg/tcg.c

Re: [PATCH v3 04/13] docs/devel: add a maintainers section to development process

2022-11-22 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > On 17/11/22 18:25, Alex Bennée wrote: >> We don't currently have a clear place in the documentation to describe >> the roles and responsibilities of a maintainer. Lets create one so we >> can. I've moved a few small bits out of other files to try and keep >>

Re: [PATCH v3 1/2] io: Add support for MSG_PEEK for socket channel

2022-11-22 Thread Daniel P . Berrangé
On Tue, Nov 22, 2022 at 03:10:53PM +0530, manish.mishra wrote: > > On 22/11/22 2:59 pm, Daniel P. Berrangé wrote: > > On Tue, Nov 22, 2022 at 02:38:53PM +0530, manish.mishra wrote: > > > On 22/11/22 2:30 pm, Daniel P. Berrangé wrote: > > > > On Sat, Nov 19, 2022 at 09:36:14AM +, manish.mishra

Re: [PATCH for-8.0 v3 15/45] tcg: Introduce TCGCallReturnKind and TCGCallArgumentKind

2022-11-22 Thread Philippe Mathieu-Daudé
On 11/11/22 08:40, Richard Henderson wrote: Prepare to replace a bunch of separate ifdefs with a consistent way to describe the abi of a function call. Nitpicking, s/abi/ABI/ like in patch 40 "Fill in the parameters for the host ABI for Int128". Signed-off-by: Richard Henderson ---

Re: [PATCH v2 2/3] hw/mips/malta: Set PIIX4 IRQ routes in embedded bootloader

2022-11-22 Thread BALATON Zoltan
Hello, On Mon, 21 Nov 2022, Bernhard Beschow wrote: Am 21. November 2022 22:43:50 UTC schrieb "Philippe Mathieu-Daudé" : On 21/11/22 16:34, Bernhard Beschow wrote: Am 27. Oktober 2022 20:47:19 UTC schrieb "Philippe Mathieu-Daudé" : Linux kernel expects the northbridge & southbridge

Re: [PATCH v4 08/11] block: distinguish between bdrv_create running in coroutine and not

2022-11-22 Thread Kevin Wolf
Am 16.11.2022 um 13:22 hat Emanuele Giuseppe Esposito geschrieben: > Call two different functions depending on whether bdrv_create > is in coroutine or not, following the same pattern as > generated_co_wrapper functions. > > This allows to also call the coroutine function directly, > without

Re: [PATCH maybe-7.2 1/3] hw/i2c: only schedule pending master when bus is idle

2022-11-22 Thread Klaus Jensen
On Nov 17 14:40, Cédric Le Goater wrote: > On 11/17/22 12:58, Klaus Jensen wrote: > > On Nov 17 09:01, Cédric Le Goater wrote: > > > On 11/17/22 08:37, Klaus Jensen wrote: > > > > On Nov 17 07:56, Cédric Le Goater wrote: > > > > > On 11/17/22 07:40, Klaus Jensen wrote: > > > > > > On Nov 16 16:58,

Re: [PATCH v4 09/11] block: bdrv_create_file is a coroutine_fn

2022-11-22 Thread Emanuele Giuseppe Esposito
Am 22/11/2022 um 09:58 schrieb Kevin Wolf: > Am 16.11.2022 um 13:22 hat Emanuele Giuseppe Esposito geschrieben: >> It is always called in coroutine_fn callbacks, therefore >> it can directly call bdrv_co_create(). >> >> Signed-off-by: Emanuele Giuseppe Esposito >> --- >> block.c

Re: [PATCH v11 04/11] s390x/cpu topology: reporting the CPU topology to the guest

2022-11-22 Thread Pierre Morel
On 11/21/22 15:13, Cédric Le Goater wrote: +static char *s390_top_set_level2(S390Topology *topo, char *p) +{ +    int i, origin; + +    for (i = 0; i < topo->nr_sockets; i++) { +    if (!topo->socket[i].active_count) { +    continue; +    } +    p = fill_container(p, 1,

Re: [PATCH v3 1/2] io: Add support for MSG_PEEK for socket channel

2022-11-22 Thread Daniel P . Berrangé
On Tue, Nov 22, 2022 at 02:38:53PM +0530, manish.mishra wrote: > > On 22/11/22 2:30 pm, Daniel P. Berrangé wrote: > > On Sat, Nov 19, 2022 at 09:36:14AM +, manish.mishra wrote: > > > MSG_PEEK reads from the peek of channel, The data is treated as > > > unread and the next read shall still

Re: [PATCH v3 1/2] io: Add support for MSG_PEEK for socket channel

2022-11-22 Thread Daniel P . Berrangé
On Tue, Nov 22, 2022 at 03:43:55PM +0530, manish.mishra wrote: > > On 22/11/22 3:23 pm, Daniel P. Berrangé wrote: > > On Tue, Nov 22, 2022 at 03:10:53PM +0530, manish.mishra wrote: > > > On 22/11/22 2:59 pm, Daniel P. Berrangé wrote: > > > > On Tue, Nov 22, 2022 at 02:38:53PM +0530, manish.mishra

Re: [PATCH] hw/loongarch: Add default stdout uart in fdt

2022-11-22 Thread gaos...@loongson.cn
在 2022/11/15 19:49, Xiaojuan Yang 写道: Add "chosen" subnode into LoongArch fdt, and set it's "stdout-path" prop to uart node. Signed-off-by: Xiaojuan Yang --- hw/loongarch/virt.c | 2 ++ 1 file changed, 2 insertions(+) Reviewed-by: Song Gao Thanks. Song Gao diff --git

Re: [PATCH] hw/loongarch: Replace the value of uart info with macro

2022-11-22 Thread gaos...@loongson.cn
在 2022/11/15 19:50, Xiaojuan Yang 写道: Using macro to replace the value of uart info such as addr, size in acpi_build method. Signed-off-by: Xiaojuan Yang --- hw/loongarch/acpi-build.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Song Gao Thanks. Song Gao diff

Re: [PATCH for-8.0 v3 12/45] tcg: Allocate TCGTemp pairs in host memory order

2022-11-22 Thread Philippe Mathieu-Daudé
On 11/11/22 08:40, Richard Henderson wrote: Allocate the first of a pair at the lower address, and the second of a pair at the higher address. This will make it easier to find the beginning of the larger memory block. Signed-off-by: Richard Henderson --- tcg/tcg-internal.h | 4 ++--

[PULL v2 11/11] gitlab: integrate coverage report

2022-11-22 Thread Alex Bennée
This should hopefully give is nice coverage information about what our tests (or at least the subset we are running) have hit. Ideally we would want a way to trigger coverage on tests likely to be affected by the current commit. Signed-off-by: Alex Bennée Acked-by: Stefan Hajnoczi Message-Id:

[PULL v2 for 7.2-rc2 00/11] testing and doc updates

2022-11-22 Thread Alex Bennée
The following changes since commit 6d71357a3b651ec9db126e4862b77e13165427f5: rtl8139: honor large send MSS value (2022-11-21 09:28:43 -0500) are available in the Git repository at: https://gitlab.com/stsquad/qemu.git tags/pull-misc-for-7.2-221122-1 for you to fetch changes up to

[PULL v2 08/11] tests/avocado: Raise timeout for boot_linux.py:BootLinuxPPC64.test_pseries_tcg

2022-11-22 Thread Alex Bennée
From: Peter Maydell On my machine, a debug build of QEMU takes about 260 seconds to complete this test, so with the current timeout value of 180 seconds it always times out. Double the timeout value to 360 so the test definitely has enough time to complete. Signed-off-by: Peter Maydell

[PULL v2 01/11] Run docker probe only if docker or podman are available

2022-11-22 Thread Alex Bennée
From: Stefan Weil The docker probe uses "sudo -n" which can cause an e-mail with a security warning each time when configure is run. Therefore run docker probe only if either docker or podman are available. That avoids the problematic "sudo -n" on build environments which have neither docker

[PULL v2 05/11] docs/devel: make language a little less code centric

2022-11-22 Thread Alex Bennée
We welcome all sorts of patches. Signed-off-by: Alex Bennée Reviewed-by: Stefan Hajnoczi Reviewed-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20221117172532.538149-6-alex.ben...@linaro.org> diff --git a/docs/devel/submitting-a-patch.rst

Re: [PATCH v3 1/2] io: Add support for MSG_PEEK for socket channel

2022-11-22 Thread manish.mishra
On 22/11/22 3:23 pm, Daniel P. Berrangé wrote: On Tue, Nov 22, 2022 at 03:10:53PM +0530, manish.mishra wrote: On 22/11/22 2:59 pm, Daniel P. Berrangé wrote: On Tue, Nov 22, 2022 at 02:38:53PM +0530, manish.mishra wrote: On 22/11/22 2:30 pm, Daniel P. Berrangé wrote: On Sat, Nov 19, 2022 at

[PULL 4/8] tests: acpi: x86: update expected DSDT after moving PRQx fields in _SB scope

2022-11-22 Thread Michael S. Tsirkin
From: Igor Mammedov Expected DSDT changes, pc: -Field (P40C, ByteAcc, NoLock, Preserve) +Scope (\_SB) { -PRQ0, 8, -PRQ1, 8, -PRQ2, 8, -PRQ3, 8

[PULL 2/8] tests: acpi: whitelist DSDT before moving PRQx to _SB scope

2022-11-22 Thread Michael S. Tsirkin
From: Igor Mammedov Signed-off-by: Igor Mammedov Message-Id: <20221121153613.3972225-2-imamm...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test-allowed-diff.h | 36 + 1 file changed, 36 insertions(+) diff

[PULL 5/8] MAINTAINERS: add mst to list of biosbits maintainers

2022-11-22 Thread Michael S. Tsirkin
From: Ani Sinha Adding Michael's name to the list of bios bits maintainers so that all changes and fixes into biosbits framework can go through his tree and he is notified. Suggested-by: Michael S. Tsirkin Signed-off-by: Ani Sinha Message-Id: <2022151138.36988-1-...@anisinha.ca>

[PULL 3/8] acpi: x86: move RPQx field back to _SB scope

2022-11-22 Thread Michael S. Tsirkin
From: Igor Mammedov Commit 47a373faa6b2 (acpi: pc/q35: drop ad-hoc PCI-ISA bridge AML routines and let bus ennumeration generate AML) moved ISA bridge AML generation to respective devices and was using aml_alias() to provide PRQx fields in _SB. scope. However, it turned out that SeaBIOS was not

[PULL 7/8] acpi/tests/avocado/bits: keep the work directory when BITS_DEBUG is set in env

2022-11-22 Thread Michael S. Tsirkin
From: Ani Sinha Debugging bits issue often involves running the QEMU command line manually outside of the avocado environment with the generated ISO. Hence, its inconvenient if the iso gets cleaned up after the test has finished. This change makes sure that the work directory is kept after the

[PULL 0/8] pc,virtio: regression, test fixes

2022-11-22 Thread Michael S. Tsirkin
The following changes since commit 2c8311241d1f7377bb4ff76064b1d1fe15166413: Update VERSION for v7.2.0-rc1 (2022-11-15 18:56:38 -0500) are available in the Git repository at: https://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream for you to fetch changes up to

[PULL for 7.2-rc2 1/3] hw/loongarch: Add default stdout uart in fdt

2022-11-22 Thread Song Gao
From: Xiaojuan Yang Add "chosen" subnode into LoongArch fdt, and set it's "stdout-path" prop to uart node. Signed-off-by: Xiaojuan Yang Reviewed-by: Song Gao Message-Id: <20221115114923.3372414-1-yangxiaoj...@loongson.cn> Signed-off-by: Song Gao --- hw/loongarch/virt.c | 2 ++ 1 file

[PULL for 7.2-rc2 0/3] loongarch for 7.2-rc2 patches

2022-11-22 Thread Song Gao
The following changes since commit 6d71357a3b651ec9db126e4862b77e13165427f5: rtl8139: honor large send MSS value (2022-11-21 09:28:43 -0500) are available in the Git repository at: https://gitlab.com/gaosong/qemu.git tags/pull-loongarch-20221122 for you to fetch changes up

[PULL for 7.2-rc2 2/3] hw/loongarch: Fix setprop_sized method in fdt rtc node.

2022-11-22 Thread Song Gao
From: Xiaojuan Yang Fix setprop_sized method in fdt rtc node. Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson Reviewed-by: Song Gao Message-Id: <20221116040300.3459818-1-yangxiaoj...@loongson.cn> Signed-off-by: Song Gao --- hw/loongarch/virt.c | 2 +- 1 file changed, 1

[PULL for 7.2-rc2 3/3] hw/loongarch: Replace the value of uart info with macro

2022-11-22 Thread Song Gao
From: Xiaojuan Yang Using macro to replace the value of uart info such as addr, size in acpi_build method. Signed-off-by: Xiaojuan Yang Reviewed-by: Song Gao Message-Id: <20221115115008.3372489-1-yangxiaoj...@loongson.cn> Signed-off-by: Song Gao --- hw/loongarch/acpi-build.c | 3 ++- 1 file

Re: [PATCH for-8.0 v3 34/45] tcg: Introduce tcg_target_call_oarg_reg

2022-11-22 Thread Daniel Henrique Barboza
On 11/11/22 04:40, Richard Henderson wrote: Replace the flat array tcg_target_call_oarg_regs[] with a function call including the TCGCallReturnKind. Signed-off-by: Richard Henderson --- For ppc and common code bits: Reviewed-by: Daniel Henrique Barboza tcg/tcg.c

Re: [PATCH v2 1/3] arm: move KVM breakpoints helpers

2022-11-22 Thread Alex Bennée
francesco.cag...@gmail.com writes: > From: Francesco Cagnin > > These helpers will be also used for HVF. Aside from reformatting a > couple of comments for 'checkpatch.pl' and updating meson to compile > 'hyp_gdbstub.c', this is just code motion. > > Signed-off-by: Francesco Cagnin Acked-by:

[PULL 1/8] vhost: mask VIRTIO_F_RING_RESET for vhost and vhost-user devices

2022-11-22 Thread Michael S. Tsirkin
From: Stefano Garzarella Commit 69e1c14aa2 ("virtio: core: vq reset feature negotation support") enabled VIRTIO_F_RING_RESET by default for all virtio devices. This feature is not currently emulated by QEMU, so for vhost and vhost-user devices we need to make sure it is supported by the

[PULL 6/8] tests/avocado: configure acpi-bits to use avocado timeout

2022-11-22 Thread Michael S. Tsirkin
From: John Snow Instead of using a hardcoded timeout, just rely on Avocado's built-in test case timeout. This helps avoid timeout issues on machines where 60 seconds is not sufficient. Signed-off-by: John Snow Message-Id: <20221115212759.3095751-1-js...@redhat.com> Reviewed-by: Michael S.

[PULL 8/8] virtio: disable error for out of spec queue-enable

2022-11-22 Thread Michael S. Tsirkin
Virtio 1.0 is pretty clear that features have to be negotiated before enabling VQs. Unfortunately Seabios ignored this ever since gaining 1.0 support (UEFI is ok). Comment the error out for now, and add a TODO. Fixes: 3c37f8b8d1 ("virtio: introduce virtio_queue_enable()") Cc: "Kangjie Xu"

Re: [PATCH] tests/avocado: using several workers while testing

2022-11-22 Thread bakulinm
Version of patch that uses sh script to parse MAKEFLAGS and set --nrunner-max-parallel-tasks accordingly. As already mentioned, works with Make 4.2 or newer, otherwise only single thread or all cores can be used. diff --git a/tests/Makefile.include b/tests/Makefile.include index

Re: [PATCH] cleanup: Tweak and re-run return_directly.cocci

2022-11-22 Thread Peter Maydell
On Tue, 22 Nov 2022 at 08:58, Markus Armbruster wrote: > I don't think complete detailed review is necessary or even sensible. > > Review should start with the Coccinelle script: > > // replace 'R = X; return R;' with 'return X;' > @@ > identifier VAR; > expression E; > type

Re: [PATCH v3 1/2] io: Add support for MSG_PEEK for socket channel

2022-11-22 Thread manish.mishra
On 22/11/22 2:30 pm, Daniel P. Berrangé wrote: On Sat, Nov 19, 2022 at 09:36:14AM +, manish.mishra wrote: MSG_PEEK reads from the peek of channel, The data is treated as unread and the next read shall still return this data. This support is currently added only for socket class. Extra

Re: [PATCH v2 2/7] multifd: modifying 'migrate' qmp command to add multifd socket on particular src and dest pair

2022-11-22 Thread Daniel P . Berrangé
On Mon, Nov 21, 2022 at 01:26:55PM +0100, Juan Quintela wrote: > Markus Armbruster wrote: > > Het Gala writes: > > > > Hi > > # Example: > # > -# -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } } > +# -> { "execute": "migrate", > +#

Re: [PATCH v3 1/2] io: Add support for MSG_PEEK for socket channel

2022-11-22 Thread manish.mishra
On 22/11/22 2:59 pm, Daniel P. Berrangé wrote: On Tue, Nov 22, 2022 at 02:38:53PM +0530, manish.mishra wrote: On 22/11/22 2:30 pm, Daniel P. Berrangé wrote: On Sat, Nov 19, 2022 at 09:36:14AM +, manish.mishra wrote: MSG_PEEK reads from the peek of channel, The data is treated as unread

Re: [PATCH for-8.0 v3 40/45] tcg: Add TCG_TARGET_CALL_{RET,ARG}_I128

2022-11-22 Thread Daniel Henrique Barboza
On 11/11/22 04:40, Richard Henderson wrote: Fill in the parameters for the host ABI for Int128 for those backends which require no extra modification. Signed-off-by: Richard Henderson --- Reviewed-by: Daniel Henrique Barboza tcg/aarch64/tcg-target.h | 2 ++ tcg/arm/tcg-target.h

[PULL v2 04/11] docs/devel: add a maintainers section to development process

2022-11-22 Thread Alex Bennée
We don't currently have a clear place in the documentation to describe the roles and responsibilities of a maintainer. Lets create one so we can. I've moved a few small bits out of other files to try and keep everything in one place. Signed-off-by: Alex Bennée Reviewed-by: Stefan Hajnoczi

[PULL v2 06/11] docs/devel: simplify the minimal checklist

2022-11-22 Thread Alex Bennée
The bullet points are quite long and contain process tips. Move those bits of the bullet to the relevant sections and link to them. Use a table for nicer formatting of the checklist. Signed-off-by: Alex Bennée Reviewed-by: Stefan Hajnoczi Reviewed-by: Paolo Bonzini Reviewed-by: Philippe

Re: [PATCH v9 3/8] KVM: Add KVM_EXIT_MEMORY_FAULT exit

2022-11-22 Thread Chao Peng
On Fri, Nov 18, 2022 at 03:59:12PM +, Sean Christopherson wrote: > On Fri, Nov 18, 2022, Alex Benn?e wrote: > > > > Chao Peng writes: > > > > > On Thu, Nov 17, 2022 at 03:08:17PM +, Alex Benn?e wrote: > > >> >> I think this should be explicit rather than implied by the absence of > > >>

Re: [PATCH for-8.0 v3 14/45] tcg: Introduce tcg_type_size

2022-11-22 Thread Philippe Mathieu-Daudé
On 11/11/22 08:40, Richard Henderson wrote: Add a helper function for computing the size of a type. Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 16 tcg/tcg.c | 26 -- 2 files changed, 28 insertions(+), 14 deletions(-) diff

[for-8.0 v2 07/11] cryptodev-builtin: Detect akcipher capability

2022-11-22 Thread zhenwei pi
Rather than exposing akcipher service/RSA algorithm to virtio crypto device unconditionally, detect akcipher capability from akcipher crypto framework. This avoids unsuccessful requests. Signed-off-by: zhenwei pi --- backends/cryptodev-builtin.c | 18 +++--- 1 file changed, 15

[for-8.0 v2 11/11] MAINTAINERS: add myself as the maintainer for cryptodev

2022-11-22 Thread zhenwei pi
Signed-off-by: zhenwei pi --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 3f698cb0e9..d1814f87ef 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2827,6 +2827,7 @@ T: git https://gitlab.com/ehabkost/qemu.git machine-next Cryptodev Backends M:

[for-8.0 v2 01/11] cryptodev: Introduce cryptodev.json

2022-11-22 Thread zhenwei pi
Introduce QCryptodevBackendType in cryptodev.json, also apply this to related codes. Then we can drop 'enum CryptoDevBackendOptionsType'. Signed-off-by: zhenwei pi --- MAINTAINERS | 1 + backends/cryptodev-builtin.c| 2 +- backends/cryptodev-lkcf.c | 2 +-

[for-8.0 v2 06/11] cryptodev: Support statistics

2022-11-22 Thread zhenwei pi
Introduce cryptodev statistics in QAPI, and record OPS/Bandwidth for each crypto device. Example of this feature: virsh qemu-monitor-command vm '{"execute": "query-cryptodev"}' | jq { "return": [ { "service": [ "akcipher", "mac", "hash", "cipher"

[for-8.0 v2 05/11] cryptodev: Introduce 'query-cryptodev' QMP command

2022-11-22 Thread zhenwei pi
Now we have a QMP command to query crypto devices: virsh qemu-monitor-command vm '{"execute": "query-cryptodev"}' | jq { "return": [ { "service": [ "akcipher", "mac", "hash", "cipher" ], "id": "cryptodev1", "client": [ {

Re: [PATCH] cleanup: Tweak and re-run return_directly.cocci

2022-11-22 Thread Philippe Mathieu-Daudé
On 21/11/22 17:42, Max Filippov wrote: On Mon, Nov 21, 2022 at 6:01 AM Markus Armbruster wrote: .../xtensa/core-dsp3400/xtensa-modules.c.inc | 136 +- target/xtensa/core-lx106/xtensa-modules.c.inc | 16 +-- These files are generated and were imported from xtensa

Re: [RFC PATCH 1/1] Dirty quota-based throttling of vcpus

2022-11-22 Thread Shivam Kumar
On 21/11/22 5:05 pm, Philippe Mathieu-Daudé wrote: Hi, On 20/11/22 23:54, Shivam Kumar wrote: + +void dirty_quota_migration_start(void) +{ +    if (!kvm_state->dirty_quota_supported) { You are accessing an accelerator-specific variable in an accelerator-agnostic file, this doesn't sound

Re: [PATCH] target/arm: build smbios 19 table

2022-11-22 Thread Mihai Carabas
La 22.11.2022 15:40, Peter Maydell a scris: On Mon, 21 Nov 2022 at 11:43, Peter Maydell wrote: On Mon, 21 Nov 2022 at 11:24, Mihai Carabas wrote: La 21.11.2022 13:02, Peter Maydell a scris: On Sun, 20 Nov 2022 at 17:53, Mihai Carabas wrote: La 18.11.2022 21:11, Peter Maydell a scris: On

[PATCH] target/arm: align exposed ID registers with Linux

2022-11-22 Thread Zhuojia Shen
In CPUID registers exposed to userspace, some registers were missing and some fields were not exposed. This patch aligns exposed ID registers and their fields with what Linux exposes currently. Specifically, the following new ID registers/fields are exposed to userspace: ID_AA64PFR1_EL1.BT:

[PATCH v2 0/2] cleanup: Tweak and re-run return_directly.cocci

2022-11-22 Thread Markus Armbruster
Markus Armbruster (2): cleanup: Tweak and re-run return_directly.cocci block/vmdk: Simplify vmdk_co_create() to return directly scripts/coccinelle/return_directly.cocci | 5 +-- include/hw/pci/pci.h | 7 +-- target/avr/cpu.h | 4 +- block/vmdk.c

Re: [PATCH v2 2/2] block/vmdk: Simplify vmdk_co_create() to return directly

2022-11-22 Thread Peter Maydell
On Tue, 22 Nov 2022 at 13:51, Markus Armbruster wrote: > > Cc: Fam Zheng > Cc: Kevin Wolf > Cc: Hanna Reitz > Cc: qemu-bl...@nongnu.org > Signed-off-by: Markus Armbruster > --- > block/vmdk.c | 28 +++- > 1 file changed, 11 insertions(+), 17 deletions(-) >

[for-8.0 v2 02/11] cryptodev: Remove 'name' & 'model' fields

2022-11-22 Thread zhenwei pi
We have already used qapi to generate crypto device types, this allows to convert type to a string 'model', so the 'model' field is not needed. And the 'name' field is not used by any backend driver, drop it. Signed-off-by: zhenwei pi --- backends/cryptodev-builtin.c| 3 +--

[for-8.0 v2 04/11] cryptodev: Introduce server type in QAPI

2022-11-22 Thread zhenwei pi
Introduce cryptodev service type in cryptodev.json, then apply this to related codes. Now we can remove VIRTIO_CRYPTO_SERVICE_xxx dependence from QEMU cryptodev. Signed-off-by: zhenwei pi --- backends/cryptodev-builtin.c| 8 backends/cryptodev-lkcf.c | 2 +-

Re: [PATCH v3 1/2] io: Add support for MSG_PEEK for socket channel

2022-11-22 Thread Peter Xu
On Tue, Nov 22, 2022 at 02:38:53PM +0530, manish.mishra wrote: > > On 22/11/22 2:30 pm, Daniel P. Berrangé wrote: > > On Sat, Nov 19, 2022 at 09:36:14AM +, manish.mishra wrote: > > > MSG_PEEK reads from the peek of channel, The data is treated as > > > unread and the next read shall still

Re: [PATCH v3 1/2] io: Add support for MSG_PEEK for socket channel

2022-11-22 Thread manish.mishra
On 22/11/22 8:19 pm, Daniel P. Berrangé wrote: On Tue, Nov 22, 2022 at 09:41:01AM -0500, Peter Xu wrote: On Tue, Nov 22, 2022 at 02:38:53PM +0530, manish.mishra wrote: On 22/11/22 2:30 pm, Daniel P. Berrangé wrote: On Sat, Nov 19, 2022 at 09:36:14AM +, manish.mishra wrote: MSG_PEEK

[PATCH] target/riscv: Dump sstatus CSR in riscv_cpu_dump_state()

2022-11-22 Thread Bin Meng
sstatus register dump is currently missing in riscv_cpu_dump_state(). Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1332 Signed-off-by: Bin Meng --- target/riscv/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index

Re: [PATCH] vhost-vdpa: skip TPM CRB memory section

2022-11-22 Thread Eric Auger
Hi Marc-André, On 11/22/22 15:53, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > 851d6d1a0f ("vfio/common: remove spurious tpm-crb-cmd misalignment > warning") removed the warning on vfio_listener_region_add() path. > > An error is reported for vhost-vdpa case: > qemu-kvm:

Re: [PATCH v2] target/arm: Use signed quantity to represent VMSAv8-64 translation level

2022-11-22 Thread Peter Maydell
On Tue, 22 Nov 2022 at 15:55, Ard Biesheuvel wrote: > > The LPA2 extension implements 52-bit virtual addressing for 4k and 16k > translation granules, and for the former, this means an additional level > of translation is needed. This means we start counting at -1 instead of > 0 when doing a

[PATCH v2 1/2] cleanup: Tweak and re-run return_directly.cocci

2022-11-22 Thread Markus Armbruster
Tweak the semantic patch to drop redundant parenthesis around the return expression. Coccinelle drops a comment in hw/rdma/vmw/pvrdma_cmd.c; restored manually. Coccinelle messes up vmdk_co_create(), not sure why. Change dropped, will be done manually in the next commit. Line breaks in

Re: [RFC 1/7] migration: Remove res_compatible parameter

2022-11-22 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > It was only used for RAM, and in that case, it means that this amount > of data was sent for memory. Just delete the field in all callers. > > Signed-off-by: Juan Quintela > --- > include/migration/register.h | 20 ++-- >

[for-8.0 v2 00/11] Refactor cryptodev

2022-11-22 Thread zhenwei pi
v1 -> v2: - fix coding style and use 'g_strjoin()' instead of 'char services[128]' (suggested by Dr. David Alan Gilbert) - wrapper function 'cryptodev_backend_account' to record statistics, and allocate sym_stat/asym_stat in cryptodev base class. see patch: 'cryptodev: Support statistics'. -

Re: [PATCH] cleanup: Tweak and re-run return_directly.cocci

2022-11-22 Thread Philippe Mathieu-Daudé
On 22/11/22 09:58, Markus Armbruster wrote: Thomas Huth writes: On 21/11/2022 17.32, Markus Armbruster wrote: Philippe Mathieu-Daudé writes: On 21/11/22 15:36, Peter Maydell wrote: On Mon, 21 Nov 2022 at 14:03, Markus Armbruster wrote: Tweak the semantic patch to drop redundant

Re: [PATCH v2 2/2] block/vmdk: Simplify vmdk_co_create() to return directly

2022-11-22 Thread Philippe Mathieu-Daudé
On 22/11/22 14:49, Markus Armbruster wrote: Cc: Fam Zheng Cc: Kevin Wolf Cc: Hanna Reitz Cc: qemu-bl...@nongnu.org Signed-off-by: Markus Armbruster --- block/vmdk.c | 28 +++- 1 file changed, 11 insertions(+), 17 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH] cleanup: Tweak and re-run return_directly.cocci

2022-11-22 Thread Peter Maydell
On Tue, 22 Nov 2022 at 15:04, Philippe Mathieu-Daudé wrote: > > On 21/11/22 17:42, Max Filippov wrote: > > On Mon, Nov 21, 2022 at 6:01 AM Markus Armbruster wrote: > >> .../xtensa/core-dsp3400/xtensa-modules.c.inc | 136 +- > >> target/xtensa/core-lx106/xtensa-modules.c.inc |

Re: [PATCH] multifd: Updated QAPI format for 'migrate' qemu monitor command

2022-11-22 Thread manish.mishra
On 22/11/22 2:53 pm, Daniel P. Berrangé wrote: On Mon, Nov 21, 2022 at 01:40:27PM +0100, Juan Quintela wrote: Het Gala wrote: To prevent double data encoding of uris, instead of passing transport mechanisms, host address and port all together in form of a single string and writing different

Re: Plugin Memory Callback Debugging

2022-11-22 Thread Aaron Lindsay via
On Nov 21 18:22, Richard Henderson wrote: > On 11/21/22 13:51, Alex Bennée wrote: > > > > Aaron Lindsay writes: > > > > > On Nov 15 22:36, Alex Bennée wrote: > > > > Aaron Lindsay writes: > > > > > I believe the code *should* always reset `cpu->plugin_mem_cbs` to > > > > > NULL at the > > > >

Re: [PATCH] target/arm: build smbios 19 table

2022-11-22 Thread Peter Maydell
On Mon, 21 Nov 2022 at 11:43, Peter Maydell wrote: > > On Mon, 21 Nov 2022 at 11:24, Mihai Carabas wrote: > > > > La 21.11.2022 13:02, Peter Maydell a scris: > > > On Sun, 20 Nov 2022 at 17:53, Mihai Carabas > > > wrote: > > >> La 18.11.2022 21:11, Peter Maydell a scris: > > >>> On Fri, 18 Nov

Re: [PATCH] cleanup: Tweak and re-run return_directly.cocci

2022-11-22 Thread Peter Maydell
On Tue, 22 Nov 2022 at 13:27, Markus Armbruster wrote: > > Peter Maydell writes: > > The obvious answer is "you might have got your manual tweaking > > wrong". A purely mechanised patch I can review by looking at > > the script and maybe eyeballing a few instances of the change; > > a change

[for-8.0 v2 10/11] cryptodev: support QoS

2022-11-22 Thread zhenwei pi
Add 'throttle-bps' and 'throttle-ops' limitation to set QoS. The two arguments work with both QEMU command line and QMP command. Example of QEMU command line: -object cryptodev-backend-builtin,id=cryptodev1,throttle-bps=1600,\ throttle-ops=100 Example of QMP command: virsh qemu-monitor-command

Re: [PATCH v2 1/2] cleanup: Tweak and re-run return_directly.cocci

2022-11-22 Thread BALATON Zoltan
On Tue, 22 Nov 2022, Markus Armbruster wrote: Tweak the semantic patch to drop redundant parenthesis around the return expression. Coccinelle drops a comment in hw/rdma/vmw/pvrdma_cmd.c; restored manually. Coccinelle messes up vmdk_co_create(), not sure why. Change dropped, will be done

[for-8.0 v2 08/11] hmp: add cryptodev info command

2022-11-22 Thread zhenwei pi
Example of this command: # virsh qemu-monitor-command vm --hmp info cryptodev cryptodev1: service=[akcipher|mac|hash|cipher] queue 0: type=builtin cryptodev0: service=[akcipher] queue 0: type=lkcf Signed-off-by: zhenwei pi --- hmp-commands-info.hx | 14 ++

[for-8.0 v2 03/11] cryptodev: Introduce cryptodev alg type in QAPI

2022-11-22 Thread zhenwei pi
Introduce cryptodev alg type in cryptodev.json, then apply this to related codes, and drop 'enum CryptoDevBackendAlgType'. There are two options: 1, { 'enum': 'QCryptodevBackendAlgType', 'prefix': 'CRYPTODEV_BACKEND_ALG', 'data': ['sym', 'asym']} Then we can keep 'CRYPTODEV_BACKEND_ALG_SYM'

[for-8.0 v2 09/11] cryptodev: Use CryptoDevBackendOpInfo for operation

2022-11-22 Thread zhenwei pi
Move queue_index, CryptoDevCompletionFunc and opaque into struct CryptoDevBackendOpInfo, then cryptodev_backend_crypto_operation() needs an argument CryptoDevBackendOpInfo *op_info only. And remove VirtIOCryptoReq from cryptodev. Signed-off-by: zhenwei pi --- backends/cryptodev-builtin.c | 9

Re: [PATCH for-8.0 1/2] target/arm: Use tcg_gen_atomic_cmpxchg_i128 for STXP

2022-11-22 Thread Peter Maydell
On Sat, 12 Nov 2022 at 04:26, Richard Henderson wrote: > > Signed-off-by: Richard Henderson > --- > target/arm/helper-a64.h| 6 --- > target/arm/helper-a64.c| 104 - > target/arm/translate-a64.c | 60 - > 3 files changed, 35

Re: [PATCH for-8.0 2/2] target/arm: Use tcg_gen_atomic_cmpxchg_i128 for CASP

2022-11-22 Thread Peter Maydell
On Sat, 12 Nov 2022 at 04:26, Richard Henderson wrote: > > Signed-off-by: Richard Henderson > --- > target/arm/helper-a64.h| 2 -- > target/arm/helper-a64.c| 43 --- > target/arm/translate-a64.c | 61 +++--- > 3 files changed, 18

Re: [PATCH for-8.0 0/2] target/arm: Use tcg_gen_atomic_cmpxchg_i128

2022-11-22 Thread Peter Maydell
On Sat, 12 Nov 2022 at 04:27, Richard Henderson wrote: > > Use the new common function and avoid rolling our own helper(s). > > r~ > > Based-on: 2022074101.2069454-1-richard.hender...@linaro.org > ("tcg: Support for Int128 with helpers") > > > Richard Henderson (2): > target/arm: Use

Re: [PATCH for-8.0 07/29] accel/tcg: Honor atomicity of loads

2022-11-22 Thread Peter Maydell
On Fri, 18 Nov 2022 at 09:50, Richard Henderson wrote: > > Create ldst_atomicity.c.inc. > > Not required for user-only code loads, because we've ensured that > the page is read-only before beginning to translate code. > > Signed-off-by: Richard Henderson > +/** > + * required_atomicity: > + * >

Re: [PATCH] target/arm: added cortex-a55 CPU support for qemu-virt

2022-11-22 Thread Peter Maydell
On Mon, 21 Nov 2022 at 15:08, Timofey Kutergin wrote: > > cortex-a55 is one of newer armv8.2+ CPUs supporting native > Privileged Access Never (PAN) feature. Using this CPU > provides access to this feature without using fictitious "max" > CPU. > > Signed-off-by: Timofey Kutergin

Re: [PATCH v3 1/2] io: Add support for MSG_PEEK for socket channel

2022-11-22 Thread Daniel P . Berrangé
On Tue, Nov 22, 2022 at 09:41:01AM -0500, Peter Xu wrote: > On Tue, Nov 22, 2022 at 02:38:53PM +0530, manish.mishra wrote: > > > > On 22/11/22 2:30 pm, Daniel P. Berrangé wrote: > > > On Sat, Nov 19, 2022 at 09:36:14AM +, manish.mishra wrote: > > > > MSG_PEEK reads from the peek of channel,

  1   2   3   >