Re: [PATCH 2/2] softmmu/physmem: fix dirty memory bitmap memleak

2022-03-31 Thread Peter Xu
On Thu, Mar 31, 2022 at 07:14:12PM +0300, Andrey Ryabinin wrote: > > > On 3/30/22 22:25, Peter Xu wrote: > > On Fri, Mar 25, 2022 at 06:40:13PM +0300, Andrey Ryabinin wrote: > >> The sequence of ram_block_add()/qemu_ram_free()/ram_block_add() > >> function calls leads to leaking some memory. >

[PATCH v22 2/8] cpus: Introduce cpu_list_generation_id

2022-03-31 Thread huangy81
From: Hyman Huang(黄勇) Introduce cpu_list_generation_id to track cpu list generation so that cpu hotplug/unplug can be detected during measurement of dirty page rate. cpu_list_generation_id could be used to detect changes of cpu list, which is prepared for dirty page rate measurement.

[PATCH v22 7/8] softmmu/dirtylimit: Implement dirty page rate limit

2022-03-31 Thread huangy81
From: Hyman Huang(黄勇) Implement dirtyrate calculation periodically basing on dirty-ring and throttle virtual CPU until it reachs the quota dirty page rate given by user. Introduce qmp commands "set-vcpu-dirty-limit", "cancel-vcpu-dirty-limit", "query-vcpu-dirty-limit" to enable, disable, query

[PATCH v22 5/8] accel/kvm/kvm-all: Introduce kvm_dirty_ring_size function

2022-03-31 Thread huangy81
From: Hyman Huang(黄勇) Introduce kvm_dirty_ring_size util function to help calculate dirty ring ful time. Signed-off-by: Hyman Huang(黄勇) Acked-by: Peter Xu --- accel/kvm/kvm-all.c| 5 + accel/stubs/kvm-stub.c | 6 ++ include/sysemu/kvm.h | 2 ++ 3 files changed, 13 insertions(+)

[RFC PATCH v4 00/20] Net Control VQ support with asid in vDPA SVQ

2022-03-31 Thread Eugenio Pérez
Control virtqueue is used by networking device for accepting various commands from the driver. It's a must to support multiqueue and other configurations. Shadow VirtQueue (SVQ) already makes possible migration of virtqueue states, effectively intercepting them so qemu can track what regions of

Re: [PULL 22/33] spapr: Implement Open Firmware client interface

2022-03-31 Thread Peter Maydell
On Fri, 9 Jul 2021 at 06:17, David Gibson wrote: > > From: Alexey Kardashevskiy > > The PAPR platform describes an OS environment that's presented by > a combination of a hypervisor and firmware. The features it specifies > require collaboration between the firmware and the hypervisor. Hi; the

[RFC PATCH v4 15/20] vhost: Add vhost_svq_inject

2022-03-31 Thread Eugenio Pérez
This allows qemu to inject packets to the device without guest's notice. This will be use to inject net CVQ messages to restore status in the destination Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-shadow-virtqueue.h | 5 + hw/virtio/vhost-shadow-virtqueue.c | 179

[RFC PATCH v4 18/20] vhost: Update kernel headers

2022-03-31 Thread Eugenio Pérez
Signed-off-by: Eugenio Pérez --- include/standard-headers/linux/vhost_types.h | 11 - linux-headers/linux/vhost.h | 25 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/include/standard-headers/linux/vhost_types.h

[RFC PATCH v4 20/20] vdpa: Add x-cvq-svq

2022-03-31 Thread Eugenio Pérez
This isolates shadow cvq in its own group. Signed-off-by: Eugenio Pérez --- qapi/net.json| 8 ++- net/vhost-vdpa.c | 179 +++ 2 files changed, 171 insertions(+), 16 deletions(-) diff --git a/qapi/net.json b/qapi/net.json index

Re: [PATCH v4 10/11] tests/tcg/s390x: Tests for Vector Enhancements Facility 2

2022-03-31 Thread David Miller
Sorry, Didn't notice this, as it was on v4 patch emails. I assume since there is no other follow up after a week, CI jobs are not being updated and I should change samples to use .insn. I will try to get this out tomorrow. Thanks, - David Miller On Wed, Mar 23, 2022 at 1:13 PM Thomas Huth

Re: [PATCH] vhost-vdpa: fix typo in a comment

2022-03-31 Thread Laurent Vivier
Le 28/03/2022 à 17:20, Stefano Garzarella a écrit : Replace vpda with vdpa. Signed-off-by: Stefano Garzarella --- hw/virtio/vhost-vdpa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index c5ed7a3779..8adf7c0b92 100644

Re: [PATCH v2 2/9] aspeed/smc: Add AST1030 support

2022-03-31 Thread Cédric Le Goater
Hello Jamin, On 3/31/22 10:15, Jamin Lin wrote: From: Steven Lee AST1030 spi controller's address decoding unit is 1MB that is identical to ast2600, but fmc address decoding unit is 512kb. Introduce seg_to_reg and reg_to_seg handlers for ast1030 fmc controller. In addition, add ast1030 fmc,

Re: [PATCH 2/2] softmmu/physmem: fix dirty memory bitmap memleak

2022-03-31 Thread David Hildenbrand
On 31.03.22 14:27, Peter Xu wrote: > On Thu, Mar 31, 2022 at 10:37:39AM +0200, David Hildenbrand wrote: >> On 25.03.22 16:40, Andrey Ryabinin wrote: >>> The sequence of ram_block_add()/qemu_ram_free()/ram_block_add() >>> function calls leads to leaking some memory. >>> >>> ram_block_add() calls

[RFC PATCH 3/4] hw/i2c: add slave mode for aspeed_i2c

2022-03-31 Thread Klaus Jensen
From: Klaus Jensen Add slave mode functionality for the Aspeed I2C controller. This is implemented by creating an Aspeed I2C Slave device that attaches to the bus. This i2c slave device only implements the asynchronous version of i2c_send() and the event callback. Signed-off-by: Klaus Jensen

Re: [PATCH v2 2/4] target/ppc: init 'lpcr' in kvmppc_enable_cap_large_decr()

2022-03-31 Thread Daniel Henrique Barboza
On 3/30/22 22:25, David Gibson wrote: On Wed, Mar 30, 2022 at 09:17:15PM -0300, Daniel Henrique Barboza wrote: 'lpcr' is used as an input of kvm_get_one_reg(). Valgrind doesn't understand that and it returns warnings as such for this function: ==55240== Thread 1: ==55240== Conditional jump

Re: [PULL 19/35] ppc/pnv: Add models for POWER9 PHB4 PCIe Host bridge

2022-03-31 Thread Peter Maydell
On Mon, 3 Feb 2020 at 06:11, David Gibson wrote: > > From: Benjamin Herrenschmidt > > These changes introduces models for the PCIe Host Bridge (PHB4) of the > POWER9 processor. It includes the PowerBus logic interface (PBCQ), > IOMMU support, a single PCIe Gen.4 Root Complex, and support for MSI

[RFC PATCH v4 02/20] util: Return void on iova_tree_remove

2022-03-31 Thread Eugenio Pérez
It always returns IOVA_OK so nobody uses it. Signed-off-by: Eugenio Pérez --- include/qemu/iova-tree.h | 4 +--- util/iova-tree.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/include/qemu/iova-tree.h b/include/qemu/iova-tree.h index c938fb0793..16bbfdf5f8

[RFC PATCH v4 14/20] vdpa: Add map/unmap operation callback to SVQ

2022-03-31 Thread Eugenio Pérez
Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-shadow-virtqueue.h | 21 +++-- hw/virtio/vhost-shadow-virtqueue.c | 8 +++- hw/virtio/vhost-vdpa.c | 20 +++- 3 files changed, 45 insertions(+), 4 deletions(-) diff --git

Re: [PATCH 03/10] target/ppc: Implemented vector divide instructions

2022-03-31 Thread Lucas Mateus Martins Araujo e Castro
On 30/03/2022 18:06, Richard Henderson wrote: On 3/30/22 14:25, Lucas Mateus Castro(alqotel) wrote: +#define TRANS_VDIV_VMOD(FLAGS, NAME, VECE, FNI4_FUNC, FNI8_FUNC)    \ +static bool trans_##NAME(DisasContext *ctx, arg_VX *a)  \ +{ \ +    static const GVecGen3 op[2] =

[PATCH v2] 9p: move P9_XATTR_SIZE_MAX from 9p.h to 9p.c

2022-03-31 Thread Will Cohen
The patch set adding 9p functionality to darwin introduced an issue where limits.h, which defines XATTR_SIZE_MAX, is included in 9p.c, though the referenced constant is needed in 9p.h. This commit fixes that issue by moving the definition of P9_XATTR_SIZE_MAX, which uses XATTR_SIZE_MAX, to also be

Re: [PATCH v22 8/8] tests: Add dirty page rate limit test

2022-03-31 Thread Peter Xu
On Fri, Apr 01, 2022 at 01:49:24AM +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: >

Re: [PATCH v2 2/4] target/ppc: init 'lpcr' in kvmppc_enable_cap_large_decr()

2022-03-31 Thread Daniel Henrique Barboza
On 3/31/22 14:36, Richard Henderson wrote: On 3/31/22 11:17, Daniel Henrique Barboza wrote: Hmm... this is seeming a bit like whack-a-mole.  Could we instead use one of the valgrind hinting mechanisms to inform it that kvm_get_one_reg() writes the variable at *target? I didn't find a way

Re: who's maintaining amd_iommu.c these days?

2022-03-31 Thread Peter Xu
On Thu, Mar 31, 2022 at 05:01:52PM +0100, Peter Maydell wrote: > Coverity points out some problems with hw/i386/amd_iommu.c's event > logging code -- specifically, CID 1487115 1487116 1487190 1487200 > 1487232 1487258 are all the same basic problem, which is that various > functions declare a

[PATCH v1 1/9] qapi: fix example of netdev_add command

2022-03-31 Thread Victor Toso
Example output has the optional member @dnssearch as string type. It should be an array of strings instead. Fix it. For reference, see NetdevUserOptions. Signed-off-by: Victor Toso --- qapi/net.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/net.json

[PATCH v1 8/9] qapi: fix example of query-cpus-fast command

2022-03-31 Thread Victor Toso
Example output contains member @arch that was removed in 445a5b4087 "machine: remove 'arch' field from 'query-cpus-fast' QMP command". Fix it. Signed-off-by: Victor Toso --- qapi/machine.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/qapi/machine.json b/qapi/machine.json index

[PATCH v1 9/9] qapi: fix example of query-memdev command

2022-03-31 Thread Victor Toso
Example output is missing mandatory argument @share for the return JSON object. Add it. Signed-off-by: Victor Toso --- qapi/machine.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qapi/machine.json b/qapi/machine.json index 968f912989..d25a481ce4 100644 --- a/qapi/machine.json +++

[PATCH v1 3/9] qapi: fix example of query-named-block-nodes command

2022-03-31 Thread Victor Toso
Example output is missing mandatory member @detect_zeroes. Fix it. Signed-off-by: Victor Toso --- qapi/block-core.json | 1 + 1 file changed, 1 insertion(+) diff --git a/qapi/block-core.json b/qapi/block-core.json index 4a7a6940a3..beeb91952a 100644 --- a/qapi/block-core.json +++

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

2022-03-31 Thread Laurent Vivier
Le 29/03/2022 à 17:19, Thomas Huth a écrit : 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

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

2022-03-31 Thread Andy Lutomirski
On Wed, Mar 30, 2022, at 10:58 AM, Sean Christopherson wrote: > On Wed, Mar 30, 2022, Quentin Perret wrote: >> On Wednesday 30 Mar 2022 at 09:58:27 (+0100), Steven Price wrote: >> > On 29/03/2022 18:01, Quentin Perret wrote: >> > > Is implicit sharing a thing? E.g., if a guest makes a memory

who's maintaining amd_iommu.c these days?

2022-03-31 Thread Peter Maydell
Coverity points out some problems with hw/i386/amd_iommu.c's event logging code -- specifically, CID 1487115 1487116 1487190 1487200 1487232 1487258 are all the same basic problem, which is that various functions declare a local "uint64_t evt[4]", populate only some bits of it and then write it to

Re: [RFC PATCH 0/5] Removal of AioContext lock, bs->parents and ->children: proof of concept

2022-03-31 Thread Paolo Bonzini
On 3/31/22 15:51, Emanuele Giuseppe Esposito wrote: bdrv_graph_list_wrlock <-> start_exclusive bdrv_graph_list_wrunlock <-> end_exclusive bdrv_graph_list_rdlock <-> cpu_exec_start bdrv_graph_list_rdunlock <-> cpu_exec_end This wouldn't protect the list but the whole graph, i.e. the parents

[RFC PATCH 0/4] hw/i2c: i2c slave mode support

2022-03-31 Thread Klaus Jensen
From: Klaus Jensen Hi all, This RFC series adds I2C "slave mode" support for the Aspeed I2C controller as well as the necessary infrastructure in the i2c core to support this. Background ~~ We are working on an emulated NVM Express Management Interface[1] for testing and validation

[RFC PATCH 4/4] hw/misc: add a toy i2c echo device

2022-03-31 Thread Klaus Jensen
From: Klaus Jensen Add an example i2c device that can master the bus. The device will echo whatever it is sent to the device identified by the first byte received. Signed-off-by: Klaus Jensen --- hw/misc/i2c-echo.c | 144 + 1 file changed, 144

Re: [PATCH for-7.0] target/arm: Don't use DISAS_NORETURN in STXP !HAVE_CMPXCHG128 codegen

2022-03-31 Thread Richard Henderson
On 3/31/22 09:08, Peter Maydell wrote: In gen_store_exclusive(), if the host does not have a cmpxchg128 primitive then we generate bad code for STXP for storing two 64-bit values. We generate a call to the exit_atomic helper, which never returns, and set is_jmp to DISAS_NORETURN. However, this

Re: [PATCH v2 2/4] target/ppc: init 'lpcr' in kvmppc_enable_cap_large_decr()

2022-03-31 Thread Richard Henderson
On 3/31/22 11:17, Daniel Henrique Barboza wrote: Hmm... this is seeming a bit like whack-a-mole.  Could we instead use one of the valgrind hinting mechanisms to inform it that kvm_get_one_reg() writes the variable at *target? I didn't find a way of doing that looking in the memcheck helpers

[PATCH v22 0/8] support dirty restraint on vCPU

2022-03-31 Thread huangy81
From: Hyman Huang(黄勇) This is v22 of dirtylimit series. The following is the history of the patchset, since v22 kind of different from the original version, i made abstracts of changelog: RFC and v1: https://lore.kernel.org/qemu-devel/cover.1637214721.git.huang...@chinatelecom.cn/ v2:

[PATCH v22 1/8] accel/kvm/kvm-all: Refactor per-vcpu dirty ring reaping

2022-03-31 Thread huangy81
From: Hyman Huang(黄勇) Add a non-required argument 'CPUState' to kvm_dirty_ring_reap so that it can cover single vcpu dirty-ring-reaping scenario. Signed-off-by: Hyman Huang(黄勇) Reviewed-by: Peter Xu --- accel/kvm/kvm-all.c | 23 +-- 1 file changed, 13 insertions(+), 10

[PATCH v22 3/8] migration/dirtyrate: Refactor dirty page rate calculation

2022-03-31 Thread huangy81
From: Hyman Huang(黄勇) abstract out dirty log change logic into function global_dirty_log_change. abstract out dirty page rate calculation logic via dirty-ring into function vcpu_calculate_dirtyrate. abstract out mathematical dirty page rate calculation into do_calculate_dirtyrate, decouple it

[RFC PATCH v4 13/20] vhost: Add vhost_iova_tree_find

2022-03-31 Thread Eugenio Pérez
Just a simple wrapper so we can find DMAMap entries based on iova Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-iova-tree.h | 2 ++ hw/virtio/vhost-iova-tree.c | 14 ++ 2 files changed, 16 insertions(+) diff --git a/hw/virtio/vhost-iova-tree.h b/hw/virtio/vhost-iova-tree.h

[RFC PATCH v4 07/20] virtio-net: Expose ctrl virtqueue logic

2022-03-31 Thread Eugenio Pérez
This allows external vhost-net devices to modify the state of the VirtIO device model once vhost-vdpa device has acknowledge the control commands. Signed-off-by: Eugenio Pérez --- include/hw/virtio/virtio-net.h | 3 ++ hw/net/virtio-net.c| 82 -- 2

[RFC PATCH v4 06/20] virtio-net: use g_memdup2() instead of unsafe g_memdup()

2022-03-31 Thread Eugenio Pérez
Fixing that literal checkpatch.pl because it will complain when we modify the file 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 1067e72b39..da05516a99 100644 ---

[RFC PATCH v4 08/20] vdpa: Extract get geatures part from vhost_vdpa_get_max_queue_pairs

2022-03-31 Thread Eugenio Pérez
To know the device features is also needed for CVQ SVQ. Extract from vhost_vdpa_get_max_queue_pairs so we can reuse it. Report errno in case of failure getting them while we're at it. Signed-off-by: Eugenio Pérez --- net/vhost-vdpa.c | 30 -- 1 file changed, 20

Re: [PATCH 2/2] softmmu/physmem: fix dirty memory bitmap memleak

2022-03-31 Thread Andrey Ryabinin
On 3/30/22 22:25, Peter Xu wrote: > On Fri, Mar 25, 2022 at 06:40:13PM +0300, Andrey Ryabinin wrote: >> The sequence of ram_block_add()/qemu_ram_free()/ram_block_add() >> function calls leads to leaking some memory. >> >> ram_block_add() calls dirty_memory_extend() to allocate bitmap blocks >>

Re: [RFC PATCH v2 0/5] Port PPC64/PowerNV MMU tests to QEMU

2022-03-31 Thread Leandro Lupori
On 3/31/22 12:47, Cédric Le Goater wrote: Hello Leandro, I think we should start looking at semihosting like Richard proposed and for it, rework the QEMU attn implementation or may be use a special form of scv. It should not change too much the tests, only exit and output which would remove

[RFC PATCH 1/4] hw/i2c: support multiple masters

2022-03-31 Thread Klaus Jensen
From: Klaus Jensen Allow slaves to master the bus by registering a bottom halve. If the bus is busy, the bottom halve is queued up. When a slave has succesfully mastered the bus, the bottom halve is scheduled. Signed-off-by: Klaus Jensen --- hw/i2c/core.c| 34

[PULL 0/1] Last minute tcg/aarch64 fix for 7.0

2022-03-31 Thread Richard Henderson
The following changes since commit cace6c6f3aca7b88afc42995f90bbefb37a0ed57: Merge tag 'pull-qapi-2022-03-31' of git://repo.or.cz/qemu/armbru into staging (2022-03-31 11:56:52 +0100) are available in the Git repository at: https://gitlab.com/rth7680/qemu.git tags/pull-tcg-20220331 for you

[RFC PATCH v4 05/20] vdpa: Fix index calculus at vhost_vdpa_svqs_start

2022-03-31 Thread Eugenio Pérez
Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-vdpa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index c5ed7a3779..9eeac8fa8e 100644 --- a/hw/virtio/vhost-vdpa.c +++ b/hw/virtio/vhost-vdpa.c @@ -1016,7 +1016,7 @@ static

[RFC PATCH v4 11/20] vhost: Add custom used buffer callback

2022-03-31 Thread Eugenio Pérez
The callback allows SVQ users to know the VirtQueue requests and responses. QEMU can use this to synchronize virtio device model state, allowing to migrate it with minimum changes to the migration code. In the case of networking, this will be used to inspect control virtqueue messages.

[RFC PATCH v4 10/20] vhost: Add SVQElement

2022-03-31 Thread Eugenio Pérez
This allows SVQ to add metadata to the different queue elements Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-shadow-virtqueue.h | 8 -- hw/virtio/vhost-shadow-virtqueue.c | 42 -- 2 files changed, 29 insertions(+), 21 deletions(-) diff --git

[RFC PATCH v4 12/20] vdpa: control virtqueue support on shadow virtqueue

2022-03-31 Thread Eugenio Pérez
Introduce the control virtqueue support for vDPA shadow virtqueue. This is needed for advanced networking features like multiqueue. To demonstrate command handling, VIRTIO_NET_F_CTROL_MACADDR is implemented. If vDPA device is started with SVQ support and virtio-net driver changes MAC, virtio-net

[RFC PATCH v4 17/20] vdpa: Add vhost_vdpa_start_control_svq

2022-03-31 Thread Eugenio Pérez
This will send CVQ commands in the destination machine, seting up everything o there is no guest-visible change. Signed-off-by: Eugenio Pérez --- net/vhost-vdpa.c | 63 1 file changed, 63 insertions(+) diff --git a/net/vhost-vdpa.c

[PATCH v1 0/9] Fix some qapi examples

2022-03-31 Thread Victor Toso
Hi, I did another iteration of adding the examples in the qapi documentation as unit tests in another project and found a few that could be updated. Feel free to cherry-pick them. Happy to rework it if needed. Victor Toso (9): qapi: fix example of netdev_add command qapi: fix examples:

[PATCH v1 5/9] qapi: fix example of query-vnc command

2022-03-31 Thread Victor Toso
The return value is missing the mandatory member @websocket. Fix it. Signed-off-by: Victor Toso --- qapi/ui.json | 1 + 1 file changed, 1 insertion(+) diff --git a/qapi/ui.json b/qapi/ui.json index c039b8b3cb..13a8bb82aa 100644 --- a/qapi/ui.json +++ b/qapi/ui.json @@ -658,6 +658,7 @@ #

[PATCH v1 6/9] qapi: fix example of query-colo-status command

2022-03-31 Thread Victor Toso
The example output is missing the mandatory member @last-mode in the return value. Fix it. Signed-off-by: Victor Toso --- qapi/migration.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/migration.json b/qapi/migration.json index 092a63354b..f74777608a 100644 ---

[PATCH v1 4/9] qapi: fix example of query-spice command

2022-03-31 Thread Victor Toso
Example output is missing mandatory members @migrated and @mouse-mode. Fix it. Signed-off-by: Victor Toso --- qapi/ui.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qapi/ui.json b/qapi/ui.json index a810ed680c..c039b8b3cb 100644 --- a/qapi/ui.json +++ b/qapi/ui.json @@ -324,8

Re: [PATCH 1/5] trace: fix compilation with lttng-ust >= 2.13

2022-03-31 Thread Stefan Hajnoczi
On Thu, Mar 31, 2022 at 07:45:48PM +0400, Marc-André Lureau wrote: > Hi > > On Wed, Mar 30, 2022 at 4:06 PM Stefan Hajnoczi wrote: > > > > On Mon, Mar 28, 2022 at 12:47:13PM +0400, marcandre.lur...@redhat.com wrote: > > > From: Marc-André Lureau > > > > > > On Fedora 36, with lttng-ust 2.13.1,

Re: [PATCH] linux-user/sh4/termbits: Silence warning about TIOCSER_TEMT double definition

2022-03-31 Thread Laurent Vivier
Le 30/03/2022 à 15:43, Thomas Huth a écrit : Seen while compiling on Alpine: In file included from ../linux-user/strace.c:17: In file included from ../linux-user/qemu.h:11: In file included from ../linux-user/syscall_defs.h:1247: ../linux-user/sh4/termbits.h:276:10: warning:

[PULL 1/1] tcg/aarch64: Use 'ull' suffix to force 64-bit constant

2022-03-31 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 Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.c.inc | 4 ++-- 1 file changed, 2

Re: [PATCH] [PATCH RFC v1] Implements the Backend Program conventions for vhost-user-scsi

2022-03-31 Thread Stefan Hajnoczi
On Thu, Mar 31, 2022 at 12:55:36AM -0500, Sakshi Kaushik wrote: > Signed-off-by: Sakshi Kaushik > --- > docs/interop/vhost-user.json | 31 +++ > docs/interop/vhost-user.rst | 17 + > 2 files changed, 48 insertions(+) Hi Sakshi, Thanks for looking

Re: [PATCH] linux-user/sh4/termbits: Silence warning about TIOCSER_TEMT double definition

2022-03-31 Thread Richard Henderson
On 3/31/22 10:22, Laurent Vivier wrote: Le 30/03/2022 à 15:43, Thomas Huth a écrit : Seen while compiling on Alpine:   In file included from ../linux-user/strace.c:17:   In file included from ../linux-user/qemu.h:11:   In file included from ../linux-user/syscall_defs.h:1247:  

[PATCH v22 6/8] softmmu/dirtylimit: Implement virtual CPU throttle

2022-03-31 Thread huangy81
From: Hyman Huang(黄勇) Setup a negative feedback system when vCPU thread handling KVM_EXIT_DIRTY_RING_FULL exit by introducing throttle_us_per_full field in struct CPUState. Sleep throttle_us_per_full microseconds to throttle vCPU if dirtylimit is in service. Signed-off-by: Hyman Huang(黄勇)

[PATCH v22 4/8] softmmu/dirtylimit: Implement vCPU dirtyrate calculation periodically

2022-03-31 Thread huangy81
From: Hyman Huang(黄勇) Introduce the third method GLOBAL_DIRTY_LIMIT of dirty tracking for calculate dirtyrate periodly for dirty page rate limit. Add dirtylimit.c to implement dirtyrate calculation periodly, which will be used for dirty page rate limit. Add dirtylimit.h to export util

[RFC PATCH v4 09/20] virtio: Make virtqueue_alloc_element non-static

2022-03-31 Thread Eugenio Pérez
So SVQ can allocate elements using it Signed-off-by: Eugenio Pérez --- include/hw/virtio/virtio.h | 1 + hw/virtio/virtio.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index b31c4507f5..1e85833897 100644

[PATCH] vhost: Fix bad return of descriptors to SVQ

2022-03-31 Thread Eugenio Pérez
Only the first one of them were properly enqueued back. Fixes: 100890f7ca ("vhost: Shadow virtqueue buffers forwarding") Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-shadow-virtqueue.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git

[RFC PATCH v4 16/20] vdpa: add NetClientState->start() callback

2022-03-31 Thread Eugenio Pérez
It allows to inject custom code on device success start, right before release lock. Signed-off-by: Eugenio Pérez --- include/net/net.h | 2 ++ hw/net/vhost_net.c | 4 2 files changed, 6 insertions(+) diff --git a/include/net/net.h b/include/net/net.h index 523136c7ac..2fc3002ab4 100644

[PATCH] util: Return void on iova_tree_remove

2022-03-31 Thread Eugenio Pérez
It always returns IOVA_OK so nobody uses it. Signed-off-by: Eugenio Pérez --- include/qemu/iova-tree.h | 4 +--- util/iova-tree.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/include/qemu/iova-tree.h b/include/qemu/iova-tree.h index c938fb0793..16bbfdf5f8

[PATCH v1 7/9] qapi: fix example of trace-event-get-state command

2022-03-31 Thread Victor Toso
The example output is missing the mandatory member @vcpu. Fix it. Signed-off-by: Victor Toso --- qapi/trace.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/trace.json b/qapi/trace.json index 119509f565..6c6982a587 100644 --- a/qapi/trace.json +++ b/qapi/trace.json

Re: [PATCH] linux-user/sh4/termbits: Silence warning about TIOCSER_TEMT double definition

2022-03-31 Thread Laurent Vivier
Le 30/03/2022 à 15:43, Thomas Huth a écrit : Seen while compiling on Alpine: In file included from ../linux-user/strace.c:17: In file included from ../linux-user/qemu.h:11: In file included from ../linux-user/syscall_defs.h:1247: ../linux-user/sh4/termbits.h:276:10: warning:

Re: [PATCH] tests/lcitool: Do not use a hard-coded /usr/bin/python3 as python interpreter

2022-03-31 Thread Laurent Vivier
Le 29/03/2022 à 08:39, Thomas Huth a écrit : When running "make lcitool-refresh", this currently uses the hard-coded /usr/bin/python3 from the script's shebang line for running Python. That's bad, since neither /usr/bin/python3 is guaranteed to exist, nor does it honor the python interpreter

Re: [PATCH v2 05/17] iotests/040: Fix TestCommitWithFilters test

2022-03-31 Thread John Snow
On Thu, Mar 24, 2022 at 9:33 PM Eric Blake wrote: > > On Thu, Mar 24, 2022 at 02:30:06PM -0400, John Snow wrote: > > Without this change, asserting that qemu_io always returns 0 causes this > > test to fail in a way we happened not to be catching previously: > > > >

[RFC PATCH 2/4] hw/i2c: add async send

2022-03-31 Thread Klaus Jensen
From: Klaus Jensen Add an asynchronous version of of i2c_send that requires an explicit acknowledgement on the bus. Signed-off-by: Klaus Jensen --- hw/i2c/core.c| 23 +++ include/hw/i2c/i2c.h | 5 + 2 files changed, 28 insertions(+) diff --git a/hw/i2c/core.c

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

2022-03-31 Thread Hyman
在 2022/3/30 3:54, 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

Re: [PATCH 2/2] softmmu/physmem: fix dirty memory bitmap memleak

2022-03-31 Thread Peter Xu
On Fri, Mar 25, 2022 at 06:40:13PM +0300, Andrey Ryabinin wrote: > The sequence of ram_block_add()/qemu_ram_free()/ram_block_add() > function calls leads to leaking some memory. > > ram_block_add() calls dirty_memory_extend() to allocate bitmap blocks > for new memory. These blocks only grow but

use of uninitialized variable involving visit_type_uint32() and friends

2022-03-31 Thread Peter Maydell
Coverity warns about use of uninitialized data in what seems to be a common pattern of use of visit_type_uint32() and similar functions. Here's an example from target/arm/cpu64.c: static void cpu_max_set_sve_max_vq(Object *obj, Visitor *v, const char *name, void

[PATCH v22 8/8] tests: Add dirty page rate limit test

2022-03-31 Thread huangy81
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-rate", "query-dirty-rate", "set-vcpu-dirty-limit", "cancel-vcpu-dirty-limit" and

Re: [PATCH] 9p: move limits.h include from 9p.c to 9p.h

2022-03-31 Thread Will Cohen
On Thu, Mar 31, 2022 at 11:34 AM Christian Schoenebeck < qemu_...@crudebyte.com> wrote: > On Donnerstag, 31. März 2022 15:19:24 CEST Will Cohen wrote: > > On Thu, Mar 31, 2022 at 7:07 AM Christian Schoenebeck < > > > > qemu_...@crudebyte.com> wrote: > > > On Donnerstag, 31. März 2022 10:03:35

Re: [PULL 06/29] softfloat: Move compare_floats to softfloat-parts.c.inc

2022-03-31 Thread Richard Henderson
On 3/31/22 04:46, Peter Maydell wrote: +static int parts64_compare(FloatParts64 *a, FloatParts64 *b, + float_status *s, bool q); +static int parts128_compare(FloatParts128 *a, FloatParts128 *b, +float_status *s, bool q); Here we define

[RFC PATCH v4 01/20] vhost: Fix bad return of descriptors

2022-03-31 Thread Eugenio Pérez
Only the first one of them were properly enqueued back. Fixes: 100890f7ca ("vhost: Shadow virtqueue buffers forwarding") Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-shadow-virtqueue.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git

[RFC PATCH v4 04/20] vhost: move descriptor translation to vhost_svq_vring_write_descs

2022-03-31 Thread Eugenio Pérez
It's done for both in and out descriptors so it's better placed here. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-shadow-virtqueue.c | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/hw/virtio/vhost-shadow-virtqueue.c

[RFC PATCH v4 03/20] vdpa: Add x-svq to NetdevVhostVDPAOptions

2022-03-31 Thread Eugenio Pérez
Finally offering the possibility to enable SVQ from the command line. Signed-off-by: Eugenio Pérez --- qapi/net.json| 9 - net/vhost-vdpa.c | 48 2 files changed, 48 insertions(+), 9 deletions(-) diff --git a/qapi/net.json

[RFC PATCH v4 19/20] vdpa: Add asid attribute to vdpa device

2022-03-31 Thread Eugenio Pérez
We can configure ASID per group, but we still use asid 0 for every vdpa device. Multiple asid support for cvq will be introduced in next patches. Signed-off-by: Eugenio Pérez --- include/hw/virtio/vhost-vdpa.h | 3 +++ hw/virtio/vhost-vdpa.c | 47 --

Re: [PULL 06/29] softfloat: Move compare_floats to softfloat-parts.c.inc

2022-03-31 Thread Peter Maydell
On Thu, 31 Mar 2022 at 18:54, Richard Henderson wrote: > > On 3/31/22 04:46, Peter Maydell wrote: > > FWIW, the Coverity issues are CID 1487134, 1487139, 1487151, 1487184, > > where for some reason it thinks that floatx80_compare() and > > floatx80_compare_quiet() can return 3 and thus that there

[PATCH] virtio-net: use g_memdup2() instead of unsafe g_memdup()

2022-03-31 Thread Eugenio Pérez
Fixing that literal checkpatch.pl because it will complain when we modify the file Signed-off-by: Eugenio Pérez --- hw/net/virtio-net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 1067e72b39..e4748a7e6c 100644 ---

Re: [PATCH] util: Return void on iova_tree_remove

2022-03-31 Thread Peter Xu
On Thu, Mar 31, 2022 at 08:17:12PM +0200, Eugenio Pérez wrote: > It always returns IOVA_OK so nobody uses it. > > Signed-off-by: Eugenio Pérez Reviewed-by: Peter Xu -- Peter Xu

[PATCH v1 2/9] qapi: fix examples: replay-break and replay-seek

2022-03-31 Thread Victor Toso
Both examples outputs are using @data member for the arguments. This is wrong. The expected member for the QMP is @arguments. Fix it. Signed-off-by: Victor Toso --- qapi/replay.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qapi/replay.json b/qapi/replay.json index

[PATCH v4 2/3] aspeed/hace: Support AST2600 HACE

2022-03-31 Thread Steven Lee
The aspeed ast2600 accumulative mode is described in datasheet ast2600v10.pdf section 25.6.4: 1. Allocating and initiating accumulative hash digest write buffer with initial state. * Since QEMU crypto/hash api doesn't provide the API to set initial state of hash library, and the

[PATCH v4 0/3] aspeed/hace: Support AST2600 HACE

2022-03-31 Thread Steven Lee
This patch series implements ast2600 hace engine with accumulative mode and unit test against to it. Verified with following models - AST2600 with OpenBmc VERSION_ID=2.12.0-dev-660-g4c7b3e692-dirty - check hash verification in uboot and check whether qemu crashed during openbmc web gui

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

2022-03-31 Thread Eugenio Perez Martin
On Thu, Mar 31, 2022 at 1:03 AM Si-Wei Liu wrote: > > > > On 3/30/2022 12:01 PM, Eugenio Perez Martin wrote: > > On Wed, Mar 30, 2022 at 8:33 AM Si-Wei Liu wrote: > >> The vhost_vdpa_one_time_request() branch in > >> vhost_vdpa_set_backend_cap() incorrectly sends down > >> iotls on vhost_dev

[PATCH v2 1/9] aspeed/adc: Add AST1030 support

2022-03-31 Thread Jamin Lin
From: Steven Lee Per ast1030_v7.pdf, AST1030 ADC engine is identical to AST2600's ADC. Signed-off-by: Troy Lee Signed-off-by: Jamin Lin Signed-off-by: Steven Lee Reviewed-by: Cédric Le Goater --- hw/adc/aspeed_adc.c | 16 include/hw/adc/aspeed_adc.h | 1 + 2 files

Re: [PATCH 2/2] softmmu/physmem: fix dirty memory bitmap memleak

2022-03-31 Thread David Hildenbrand
On 25.03.22 16:40, Andrey Ryabinin wrote: > The sequence of ram_block_add()/qemu_ram_free()/ram_block_add() > function calls leads to leaking some memory. > > ram_block_add() calls dirty_memory_extend() to allocate bitmap blocks > for new memory. These blocks only grow but never shrink. So the >

[PATCH 3/3] i386: firmware parsing and sev setup for -bios loaded firmware

2022-03-31 Thread Gerd Hoffmann
Don't register firmware as rom, not needed (see comment). Add x86_firmware_configure() call for proper sev initialization. Signed-off-by: Gerd Hoffmann Tested-by: Xiaoyao Li --- hw/i386/x86.c | 25 +++-- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git

[PATCH v2 9/9] test/avocado/machine_aspeed.py: Add ast1030 test case

2022-03-31 Thread Jamin Lin
Add test case to test "ast1030-evb" machine with zephyr os Signed-off-by: Troy Lee Signed-off-by: Jamin Lin Signed-off-by: Steven Lee Reviewed-by: Cédric Le Goater --- tests/avocado/machine_aspeed.py | 36 + 1 file changed, 36 insertions(+) create mode 100644

Re: [PATCH] MAINTAINERS: change Fred Konrad's email address

2022-03-31 Thread Peter Maydell
On Wed, 30 Mar 2022 at 13:31, Frederic Konrad wrote: > > frederic.kon...@adacore.com and kon...@adacore.com will stop working starting > 2022-04-01. > > Use my personal email instead. > > Signed-off-by: Frederic Konrad I'll take this via target-arm.next since I'm putting a pullreq together at

Re: [PATCH 0/2] virtio: Add vhost-user-gpio device's support

2022-03-31 Thread Alex Bennée
"Michael S. Tsirkin" writes: > On Fri, Feb 04, 2022 at 01:52:47PM +, Alex Bennée wrote: >> >> "Michael S. Tsirkin" writes: >> >> > On Wed, Jan 12, 2022 at 05:04:57PM +0530, Viresh Kumar wrote: >> >> Hello, >> >> >> >> This patchset adds vhost-user-gpio device's support in Qemu. The

Re: [PATCH-for-7.1] hw/tpm/tpm_tis: Avoid eventual read overrun

2022-03-31 Thread Philippe Mathieu-Daudé
On 31/3/22 09:50, Marc-André Lureau wrote: Hi On Thu, Mar 31, 2022 at 4:02 AM Philippe Mathieu-Daudé > wrote: From: Philippe Mathieu-Daudé mailto:f4...@amsat.org>> The TPMState structure hold an array of TPM_TIS_NUM_LOCALITIES TPMLocality

Re: [PULL 06/29] softfloat: Move compare_floats to softfloat-parts.c.inc

2022-03-31 Thread Peter Maydell
On Thu, 3 Jun 2021 at 22:49, Richard Henderson wrote: > > Rename to parts$N_compare. Rename all of the intermediate > functions to ftype_do_compare. Rename the hard-float functions > to ftype_hs_compare. Convert float128 to FloatParts128. > > Reviewed-by: Alex Bennée > Signed-off-by: Richard

[PULL 00/15] QAPI patches patches for 2022-03-31

2022-03-31 Thread Markus Armbruster
I double-checked these patches affect *only* generated documentation. Safe enough for 7.0, I think. But I'm quite content to hold on to them until after the release, if that's preferred. The following changes since commit aea6e471085f39ada1ccd637043c3ee3dfd88750: Update version for v7.0.0-rc2

[PULL 11/15] qapi: run-state examples: add missing @timestamp

2022-03-31 Thread Markus Armbruster
binjwPzksTVvX.bin Description: Binary data

Re: [PATCH] 9p: move limits.h include from 9p.c to 9p.h

2022-03-31 Thread Peter Maydell
On Wed, 30 Mar 2022 at 22:55, Will Cohen wrote: > > On Wed, Mar 30, 2022 at 5:31 PM Peter Maydell > wrote: >> Is it possible to do this with a meson.build check for whatever >> host property we're relying on here rather than with a >> "which OS is this?" ifdef ? > > > To confirm -- the game

[PATCH v2 0/9] Add support for AST1030 SoC

2022-03-31 Thread Jamin Lin
Changes from v2: - replace aspeed_ast1030.c with aspeed_ast10xx.c for minibmc SOCs family support - Add "ast1030-evb" machine in aspeed.c and removes aspeed_minibmc.c Changes from v1: The patch series supports ADC, SCU, SMC, TIMER, and WDT for AST1030 SoC. Add avocado test case for "ast1030-evb"

  1   2   3   4   >