Re: [PATCH v3 19/19] target/riscv: Expose Zvk* and Zvb[b, c] cpu properties

2023-04-28 Thread Weiwei Li
On 2023/4/28 22:47, Lawrence Hunter wrote: From: Nazar Kazakov Exposes earlier CPU flags allowing the use of the vector cryptography extensions. Signed-off-by: Nazar Kazakov --- Reviewed-by: Weiwei Li Weiwei Li target/riscv/cpu.c | 10 ++ 1 file changed, 10 insertions(+)

Re: [PATCH v3 11/19] target/riscv: Add Zvbb ISA extension support

2023-04-28 Thread Weiwei Li
On 2023/4/28 22:47, Lawrence Hunter wrote: From: Dickon Hood This commit adds support for the Zvbb vector-crypto extension, which consists of the following instructions: * vrol.[vv,vx] * vror.[vv,vx,vi] * vbrev8.v * vrev8.v * vandn.[vv,vx] * vbrev.v * vclz.v * vctz.v * vcpop.v *

Re: [PATCH v3 07/19] target/riscv: Refactor some of the generic vector functionality

2023-04-28 Thread Weiwei Li
On 2023/4/28 22:47, Lawrence Hunter wrote: From: Kiran Ostrolenk Move some macros out of `vector_helper` and into `vector_internals`. This ensures they can be used by both vector and vector-crypto helpers (latter implemented in proceeding commits). Signed-off-by: Kiran Ostrolenk ---

Re: [PATCH v3 06/19] target/riscv: Refactor translation of vector-widening instruction

2023-04-28 Thread Weiwei Li
On 2023/4/28 22:47, Lawrence Hunter wrote: From: Dickon Hood Zvbb (implemented in later commit) has a widening instruction, which requires an extra check on the enabled extensions. Refactor GEN_OPIVX_WIDEN_TRANS() to take a check function to avoid reimplementing it. Signed-off-by: Dickon

Re: [PATCH v3 05/19] target/riscv: Move vector translation checks

2023-04-28 Thread Weiwei Li
On 2023/4/28 22:47, Lawrence Hunter wrote: From: Nazar Kazakov Move the checks out of `do_opiv{v,x,i}_gvec{,_shift}` functions and into the corresponding macros. This enables the functions to be reused in proceeding commits without check duplication. Signed-off-by: Nazar Kazakov

Re: [PATCH v3 04/19] target/riscv: Add Zvbc ISA extension support

2023-04-28 Thread Weiwei Li
On 2023/4/28 22:47, Lawrence Hunter wrote: This commit adds support for the Zvbc vector-crypto extension, which consists of the following instructions: * vclmulh.[vx,vv] * vclmul.[vx,vv] Translation functions are defined in `target/riscv/insn_trans/trans_rvvk.c.inc` and helpers are defined

Re: [PATCH v3 03/19] target/riscv: Remove redundant "cpu_vl == 0" checks

2023-04-28 Thread Weiwei Li
On 2023/4/28 22:47, Lawrence Hunter wrote: From: Nazar Kazakov Remove the redundant "vl == 0" check which is already included within the vstart >= vl check, when vl == 0. Signed-off-by: Nazar Kazakov --- Reviewed-by: Weiwei Li Weiwei Li target/riscv/insn_trans/trans_rvv.c.inc | 31

Re: [PATCH v3 02/19] target/riscv: Refactor vector-vector translation macro

2023-04-28 Thread Weiwei Li
On 2023/4/28 22:47, Lawrence Hunter wrote: From: Kiran Ostrolenk Refactor the non SEW-specific stuff out of `GEN_OPIVV_TRANS` into function `opivv_trans` (similar to `opivi_trans`). `opivv_trans` will be used in proceeding vector-crypto commits. Signed-off-by: Kiran Ostrolenk Reviewed-by:

Re: [PATCH v3 01/19] target/riscv: Refactor some of the generic vector functionality

2023-04-28 Thread Weiwei Li
On 2023/4/28 22:47, Lawrence Hunter wrote: From: Kiran Ostrolenk Take some functions/macros out of `vector_helper` and put them in a new module called `vector_internals`. This ensures they can be used by both vector and vector-crypto helpers (latter implemented in proceeding commits).

Re: [PATCH v3 3/4] target/riscv: check smstateen fcsr flag

2023-04-28 Thread Weiwei Li
On 2023/4/29 00:52, Mayuresh Chitale wrote: If misa.F and smstateen_fcsr_ok flag are clear then all the floating point instructions must generate an appropriate exception. Signed-off-by: Mayuresh Chitale --- target/riscv/insn_trans/trans_rvd.c.inc | 13 ++---

Re: [PATCH v3 2/4] target/riscv: Reuse tb->flags.FS

2023-04-28 Thread Weiwei Li
On 2023/4/29 00:52, Mayuresh Chitale wrote: When misa.F is 0 tb->flags.FS field is unused and can be used to save the current state of smstateen0.FCSR check which is needed by the floating point translation routines. Signed-off-by: Mayuresh Chitale --- Reviewed-by: Weiwei Li Weiwei Li

Re: [PATCH v4 3/3] Add a Hyper-V Dynamic Memory Protocol driver (hv-balloon)

2023-04-28 Thread Philippe Mathieu-Daudé
On 27/4/23 11:08, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" This driver is like virtio-balloon on steroids: it allows both changing the guest memory allocation via ballooning and inserting pieces of extra RAM into it on demand from a provided memory backend. One of advantages of

Re: [PATCH] softmmu: Tidy dirtylimit_dirty_ring_full_time

2023-04-28 Thread Philippe Mathieu-Daudé
On 28/4/23 12:34, Richard Henderson wrote: Drop inline marker: let compiler decide. Change return type to uint64_t: this matches the computation in the return statement and the local variable assignment in the caller. Rename local to dirty_ring_size_MB to fix typo. Simplify conversion to MiB

Re: [PATCH v11 01/13] target/arm: Move cortex sysregs into a separate file

2023-04-28 Thread Philippe Mathieu-Daudé
On 26/4/23 20:00, Fabiano Rosas wrote: The file cpu_tcg.c is about to be moved into the tcg/ directory, so move the register definitions into a new file. Also move the function declaration to the more appropriate cpregs.h. Reviewed-by: Richard Henderson Signed-off-by: Fabiano Rosas ---

Re: [PATCH v11 05/13] target/arm: Move 64-bit TCG CPUs into tcg/

2023-04-28 Thread Philippe Mathieu-Daudé
On 26/4/23 20:00, Fabiano Rosas wrote: Move the 64-bit CPUs that are TCG-only: - cortex-a35 - cortex-a55 - cortex-a72 - cortex-a76 - a64fx - neoverse-n1 Keep the CPUs that can be used with KVM: - cortex-a57 - cortex-a53 - max - host Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson

Re: [PATCH v11 07/13] target/arm: move cpu_tcg to tcg/cpu32.c

2023-04-28 Thread Philippe Mathieu-Daudé
On 26/4/23 20:00, Fabiano Rosas wrote: From: Claudio Fontana move the module containing cpu models definitions for 32bit TCG-only CPUs to tcg/ and rename it for clarity. Signed-off-by: Claudio Fontana Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Acked-by: Thomas Huth ---

Re: [PATCH v11 04/13] target/arm: Do not expose all -cpu max features to qtests

2023-04-28 Thread Philippe Mathieu-Daudé
On 26/4/23 20:00, Fabiano Rosas wrote: We're about to move the TCG-only -cpu max configuration code under CONFIG_TCG. To be able to do that we need to make sure the qtests still have some cpu configured even when no other accelerator is available. Delineate now what is used with TCG-only and

Re: [PATCH v11 08/13] tests/qtest: Fix tests when no KVM or TCG are present

2023-04-28 Thread Philippe Mathieu-Daudé
On 26/4/23 20:00, Fabiano Rosas wrote: It is possible to have a build with both TCG and KVM disabled due to Xen requiring the i386 and x86_64 binaries to be present in an aarch64 host. If we build with --disable-tcg on the aarch64 host, we will end-up with a QEMU binary (x86) that does not

Re: [PATCH v2 5/5] virtio-gpu: CONTEXT_INIT feature

2023-04-28 Thread Philippe Mathieu-Daudé
On 28/4/23 18:48, Gurchetan Singh wrote: From: Antonio Caggiano The feature can be enabled when a backend wants it. Signed-off-by: Antonio Caggiano Reviewed-by: Marc-André Lureau Signed-off-by: Gurchetan Singh --- hw/display/virtio-gpu-base.c | 3 +++ include/hw/virtio/virtio-gpu.h |

Re: [PATCH v2 2/5] hw/display/virtio-gpu-virgl: make GL device more library agnostic

2023-04-28 Thread Philippe Mathieu-Daudé
On 28/4/23 18:48, Gurchetan Singh wrote: From: Gurchetan Singh Rather than create a virtio-gpu-gfxstream device and it's associated variants (vga, pci), let's just extend the GL device. We need to: - Move all virgl functions to their own file - Only all needed class callbacks in the

Re: [PATCH v4 3/5] parallels: Add checking and repairing duplicate offsets in BAT

2023-04-28 Thread Mike Maslenkin
There is another issue with host_cluster_index() function. After this patchset applied `qemu-img check -f parallels some_disk` aborts for empty (just created) disk image. The problem is that host_cluster_index() returns 0 and then bitmap_new(0) rises an abort. For default empty disk

Re: [RFC PATCH] plugins: force slow path when plugins instrument memory ops

2023-04-28 Thread Richard Henderson
On 4/19/23 17:12, Alex Bennée wrote: The lack of SVE memory instrumentation has been an omission in plugin handling since it was introduced. Fortunately we can utilise the probe_* functions to force all all memory access to follow the slow path. We do this by checking the access type and

Re: [PATCH v4 5/7] accel/tcg: Uncache the host address for instruction fetch when tlb size < 1

2023-04-28 Thread Richard Henderson
On 4/22/23 14:03, Weiwei Li wrote: When PMP entry overlap part of the page, we'll set the tlb_size to 1, which will make the address in tlb entry set with TLB_INVALID_MASK, and the next access will again go through tlb_fill.However, this way will not work in tb_gen_code() =>

Re: [PATCH] softmmu: Tidy dirtylimit_dirty_ring_full_time

2023-04-28 Thread Richard Henderson
On 4/28/23 19:38, Juan Quintela wrote: Thomas Huth wrote: On 28/04/2023 12.34, Richard Henderson wrote: Drop inline marker: let compiler decide. Change return type to uint64_t: this matches the computation in the return statement and the local variable assignment in the caller. Rename local

Re: [PATCH] cpus-common: stop using mb_set/mb_read

2023-04-28 Thread Richard Henderson
On 4/28/23 11:17, Paolo Bonzini wrote: Use a store-release at the end of the work item, and a load-acquire when waiting for the item to be completed. This is the standard message passing pattern and is both enough and clearer than mb_read/mb_set. Signed-off-by: Paolo Bonzini ---

Re: [PATCH v16 08/11] qapi/s390x/cpu topology: set-cpu-topology monitor command

2023-04-28 Thread Nagy Vani

Re: [PATCH v2 0/9] Hexagon (target/hexagon) New architecture support

2023-04-28 Thread Richard Henderson
On 4/27/23 23:40, Taylor Simpson wrote: Add support for new Hexagon architecture versions v68/v69/v71/v73 Where can one find docs for this? The latest Hexagon SDK I can find is 3.5, which still ends at v67. r~

RE: [PATCH v3 2/7] target/i386: Add new EPYC CPU versions with updated cache_info

2023-04-28 Thread Moger, Babu
[AMD Official Use Only - General] Hi Maksim, > -Original Message- > From: Maksim Davydov > Sent: Wednesday, April 26, 2023 3:35 AM > To: Moger, Babu > Cc: weijiang.y...@intel.com; phi...@linaro.org; d...@amazon.co.uk; > p...@xen.org; joao.m.mart...@oracle.com; qemu-devel@nongnu.org; >

Re: [PULL 00/13] DMA reentrancy fixes and other misc patches

2023-04-28 Thread Richard Henderson
On 4/28/23 10:43, Thomas Huth wrote: Hi Richard! The following changes since commit cc5ee50fff9dbac0aac32cd892a7163c7babcca1: Merge tag 'pull-testing-docs-270423-1' ofhttps://gitlab.com/stsquad/qemu into staging (2023-04-27 16:46:17 +0100) are available in the Git repository at:

RE: [PATCH v2] Hexagon (target/hexagon) Additional instructions handled by idef-parser

2023-04-28 Thread Taylor Simpson
> -Original Message- > From: Anton Johansson > Sent: Friday, April 28, 2023 11:25 AM > To: Taylor Simpson ; qemu-devel@nongnu.org > Cc: richard.hender...@linaro.org; phi...@linaro.org; a...@rev.ng; Brian Cain > ; Matheus Bernardino (QUIC) > > Subject: Re: [PATCH v2] Hexagon

[PATCH v2] target/hexagon: fix = vs. == mishap

2023-04-28 Thread Taylor Simpson
From: Paolo Bonzini Changes in v2 Fix yyassert's for sign and zero extends Coverity reports a parameter that is "set but never used". This is caused by an assignment operator being used instead of equality. Co-authored-by: Taylor Simpson Signed-off-by: Paolo Bonzini Signed-off-by:

Re: [PATCH v2 3/3] pci: ROM preallocation for incoming migration

2023-04-28 Thread Vladimir Sementsov-Ogievskiy
On 28.04.23 11:30, Juan Quintela wrote: "Michael S. Tsirkin" wrote: On Tue, Apr 25, 2023 at 07:14:34PM +0300, Vladimir Sementsov-Ogievskiy wrote: On incoming migration we have the following sequence to load option ROM: 1. On device realize we do normal load ROM from the file 2. Than, on

[PATCH v4 05/10] migration: drop colo_incoming_thread from MigrationIncomingState

2023-04-28 Thread Vladimir Sementsov-Ogievskiy
have_colo_incoming_thread variable is unused. colo_incoming_thread can be local. Signed-off-by: Vladimir Sementsov-Ogievskiy --- migration/migration.c | 7 --- migration/migration.h | 2 -- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/migration/migration.c

[PATCH v4 03/10] build: move COLO under CONFIG_REPLICATION

2023-04-28 Thread Vladimir Sementsov-Ogievskiy
We don't allow to use x-colo capability when replication is not configured. So, no reason to build COLO when replication is disabled, it's unusable in this case. Note also that the check in migrate_caps_check() is not the only restriction: some functions in migration/colo.c will just abort if

[PATCH v4 04/10] configure: add --disable-colo-proxy option

2023-04-28 Thread Vladimir Sementsov-Ogievskiy
Add option to not build filter-mirror, filter-rewriter and colo-compare when they are not needed. There could be more agile configuration, for example add separate options for each filter, but that may be done in future on demand. The aim of this patch is to make possible to disable the whole

[PATCH v4 08/10] migration: process_incoming_migration_co(): move colo part to colo

2023-04-28 Thread Vladimir Sementsov-Ogievskiy
Let's make better public interface for COLO: instead of colo_process_incoming_thread and not trivial logic around creating the thread let's make simple colo_incoming_co(), hiding implementation from generic code. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/migration/colo.h | 9

[PATCH v4 09/10] migration: disallow change capabilities in COLO state

2023-04-28 Thread Vladimir Sementsov-Ogievskiy
COLO is not listed as running state in migrate_is_running(), so, it's theoretically possible to disable colo capability in COLO state and the unexpected error in migration_iteration_finish() is reachable. Let's disallow that in qmp_migrate_set_capabilities. Than the error becomes absolutely

[PATCH v4 01/10] block/meson.build: prefer positive condition for replication

2023-04-28 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Juan Quintela Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Lukas Straub --- block/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/meson.build b/block/meson.build index 382bec0e7d..b9a72e219b

[PATCH v4 02/10] colo: make colo_checkpoint_notify static and provide simpler API

2023-04-28 Thread Vladimir Sementsov-Ogievskiy
colo_checkpoint_notify() is mostly used in colo.c. Outside we use it once when x-checkpoint-delay migration parameter is set. So, let's simplify the external API to only that function - notify COLO that parameter was set. This make external API more robust and hides implementation details from

[PATCH v4 07/10] migration: split migration_incoming_co

2023-04-28 Thread Vladimir Sementsov-Ogievskiy
Originally, migration_incoming_co was introduced by 25d0c16f625feb3b6 "migration: Switch to COLO process after finishing loadvm" to be able to enter from COLO code to one specific yield point, added by 25d0c16f625feb3b6. Later in 923709896b1b0 "migration: poll the cm event for destination

[PATCH v4 06/10] migration: process_incoming_migration_co: simplify code flow around ret

2023-04-28 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- migration/migration.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index d4fa1a853c..8db0892317 100644 --- a/migration/migration.c +++ b/migration/migration.c @@

[PATCH v4 00/10] COLO: improve build options

2023-04-28 Thread Vladimir Sementsov-Ogievskiy
v4: 01: add r-b by Lukas 02: new 03: - keep x-colo capability enum value unconditional - drop ifdefs in options.c and keep capability check instead - update stubs - add missed a-b by Dr. David 04: keep filter-mirror untouched, add r-b by Juan others: new. Some further improvements of

[PATCH v4 10/10] migration: block incoming colo when capability is disabled

2023-04-28 Thread Vladimir Sementsov-Ogievskiy
We generally require same set of capabilities on source and target. Let's require x-colo capability to use COLO on target. Signed-off-by: Vladimir Sementsov-Ogievskiy --- migration/migration.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/migration/migration.c

RE: [PATCH] target/hexagon: fix = vs. == mishap

2023-04-28 Thread Taylor Simpson
> -Original Message- > From: Taylor Simpson > Sent: Thursday, April 27, 2023 6:05 PM > To: Richard Henderson ; Paolo Bonzini > ; qemu-devel@nongnu.org > Subject: RE: [PATCH] target/hexagon: fix = vs. == mishap > > > > > -Original Message- > > From: Richard Henderson > > Sent:

[PULL 01/21] multifd: We already account for this packet on the multifd thread

2023-04-28 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Lukas Straub --- migration/multifd.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/migration/multifd.c b/migration/multifd.c index 6a59c03dd2..6053012ad9 100644 --- a/migration/multifd.c +++ b/migration/multifd.c @@ -626,10 +626,7 @@ int

[PULL 04/21] migration: Rename RAMStats to MigrationAtomicStats

2023-04-28 Thread Juan Quintela
It is lousely based on MigrationStats, but that name is taken, so this is the best one that I came with. Signed-off-by: Juan Quintela Reviewed-by: Lukas Straub --- If you have any good suggestion for the name, I am all ears. --- migration/migration-stats.c | 2 +- migration/migration-stats.h

[PULL 16/21] ram.c: Remove last ram.c dependency from the core compress code

2023-04-28 Thread Juan Quintela
From: Lukas Straub Make compression interfaces take send_queued_data() as an argument. Remove save_page_use_compression() from flush_compressed_data(). This removes the last ram.c dependency from the core compress code. Signed-off-by: Lukas Straub Reviewed-by: Juan Quintela Signed-off-by:

[PULL 18/21] ram.c: Move core decompression code into its own file

2023-04-28 Thread Juan Quintela
From: Lukas Straub No functional changes intended. Signed-off-by: Lukas Straub Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/ram-compress.c | 203 ++ migration/ram-compress.h | 5 +

[PULL 21/21] migration: Initialize and cleanup decompression in migration.c

2023-04-28 Thread Juan Quintela
From: Lukas Straub This fixes compress with colo. Signed-off-by: Lukas Straub Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/migration.c | 9 + migration/ram.c | 5 - 2 files changed, 9 insertions(+), 5 deletions(-) diff --git

[PULL 17/21] ram.c: Move core compression code into its own file

2023-04-28 Thread Juan Quintela
From: Lukas Straub No functional changes intended. Signed-off-by: Lukas Straub Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/meson.build| 5 +- migration/ram-compress.c | 274 +++ migration/ram-compress.h | 65 ++

[PULL 03/21] migration: Rename ram_counters to mig_stats

2023-04-28 Thread Juan Quintela
migration_stats is just too long, and it is going to have more than ram counters in the near future. Signed-off-by: Juan Quintela Reviewed-by: Lukas Straub --- migration/migration-stats.c | 2 +- migration/migration-stats.h | 2 +- migration/migration.c | 32 -

[PULL 06/21] migration/rdma: Unfold last user of acct_update_position()

2023-04-28 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Lukas Straub --- migration/ram.c | 9 - migration/ram.h | 1 - migration/rdma.c | 4 +++- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index c249a1f468..7d81c4a39e 100644 ---

[PULL 14/21] ram.c: Do not call save_page_header() from compress threads

2023-04-28 Thread Juan Quintela
From: Lukas Straub save_page_header() accesses several global variables, so calling it from multiple threads is pretty ugly. Instead, call save_page_header() before writing out the compressed data from the compress buffer to the migration stream. This also makes the core compress code more

[PULL 02/21] migration: Move ram_stats to its own file migration-stats.[ch]

2023-04-28 Thread Juan Quintela
There is already include/qemu/stats.h, so stats.h was a bad idea. We want this file to not depend on anything else, we will move all the migration counters/stats to this struct. Signed-off-by: Juan Quintela Reviewed-by: Lukas Straub --- migration/meson.build | 1 +

[PULL 20/21] ram-compress.c: Make target independent

2023-04-28 Thread Juan Quintela
From: Lukas Straub Make ram-compress.c target independent. Signed-off-by: Lukas Straub Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/meson.build| 3 ++- migration/ram-compress.c | 17 ++--- 2 files changed, 12

[PULL 09/21] qtest/migration-test.c: Add tests with compress enabled

2023-04-28 Thread Juan Quintela
From: Lukas Straub There has never been tests for migration with compress enabled. Add suitable tests, testing with compress-wait-thread = false too. Signed-off-by: Lukas Straub Acked-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c |

[PULL 10/21] qtest/migration-test.c: Add postcopy tests with compress enabled

2023-04-28 Thread Juan Quintela
From: Lukas Straub Add postcopy tests with compress enabled to ensure nothing breaks with the refactoring in the next commits. preempt+compress is blocked, so no test needed for that case. Signed-off-by: Lukas Straub Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela ---

[PULL 05/21] migration/rdma: Split the zero page case from acct_update_position

2023-04-28 Thread Juan Quintela
Now that we have atomic counters, we can do it on the place that we need it, no need to do it inside ram.c. Signed-off-by: Juan Quintela Reviewed-by: Lukas Straub --- migration/ram.c | 12 migration/ram.h | 2 +- migration/rdma.c | 7 +-- 3 files changed, 10 insertions(+),

[PULL 11/21] ram.c: Let the compress threads return a CompressResult enum

2023-04-28 Thread Juan Quintela
From: Lukas Straub This will be used in the next commits to move save_page_header() out of compress code. Signed-off-by: Lukas Straub Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/ram.c | 34 ++ 1 file changed, 22 insertions(+), 12

[PULL 13/21] ram.c: Reset result after sending queued data

2023-04-28 Thread Juan Quintela
From: Lukas Straub And take the param->mutex lock for the whole section to ensure thread-safety. Now, it is explicitly clear if there is no queued data to send. Before, this was handled by param->file stream being empty and thus qemu_put_qemu_file() not sending anything. This will be used in

[PULL 15/21] ram.c: Call update_compress_thread_counts from compress_send_queued_data

2023-04-28 Thread Juan Quintela
From: Lukas Straub This makes the core compress code more independend from ram.c. Signed-off-by: Lukas Straub Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/ram.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/migration/ram.c

[PULL 12/21] ram.c: Dont change param->block in the compress thread

2023-04-28 Thread Juan Quintela
From: Lukas Straub Instead introduce a extra parameter to trigger the compress thread. Now, when the compress thread is done, we know what RAMBlock and offset it did compress. This will be used in the next commits to move save_page_header() out of compress code. Signed-off-by: Lukas Straub

[PULL 07/21] migration: Drop unused parameter for migration_tls_get_creds()

2023-04-28 Thread Juan Quintela
It is not needed since we moved the accessor for tls properties to options.c. Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Juan Quintela Reviewed-by: Vladimir Sementsov-Ogievskiy --- migration/tls.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git

[PULL 00/21] Migration 20230428 patches

2023-04-28 Thread Juan Quintela
/migration-20230428-pull-request for you to fetch changes up to 05ecac612ec6a4bdb358e68554b4406ac2c8e25a: migration: Initialize and cleanup decompression in migration.c (2023-04-28 20:54:53 +0200) Migration Pull request (20230429

[PULL 08/21] migration: Drop unused parameter for migration_tls_client_create()

2023-04-28 Thread Juan Quintela
It is not needed since we moved the accessor for tls properties to options.c. Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Juan Quintela Reviewed-by: Vladimir Sementsov-Ogievskiy --- migration/multifd.c | 2 +- migration/postcopy-ram.c | 2 +- migration/tls.c | 5

[PULL 19/21] ram compress: Assert that the file buffer matches the result

2023-04-28 Thread Juan Quintela
From: Lukas Straub Before this series, "nothing to send" was handled by the file buffer being empty. Now it is tracked via param->result. Assert that the file buffer state matches the result. Signed-off-by: Lukas Straub Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela ---

Re: [PATCH 17/17] qapi: Reformat doc comments to conform to current conventions

2023-04-28 Thread Lukas Straub
On Fri, 28 Apr 2023 12:54:29 +0200 Markus Armbruster wrote: > Change > > # @name: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed > #do eiusmod tempor incididunt ut labore et dolore magna aliqua. > > to > > # @name: Lorem ipsum dolor sit amet, consectetur

Re: [PATCH] softmmu: Tidy dirtylimit_dirty_ring_full_time

2023-04-28 Thread Juan Quintela
Thomas Huth wrote: > On 28/04/2023 12.34, Richard Henderson wrote: >> Drop inline marker: let compiler decide. >> Change return type to uint64_t: this matches the computation in the >> return statement and the local variable assignment in the caller. >> Rename local to dirty_ring_size_MB to fix

Re: [PATCH 12/17] qapi: Rewrite parsing of doc comment section symbols and tags

2023-04-28 Thread Juan Quintela
Markus Armbruster wrote: > To recognize a line starting with a section symbol and or tag, we > first split it at the first space, then examine the part left of the > space. We can just as well examine the unsplit line, so do that. > > Signed-off-by: Markus Armbruster Reviewed-by: Juan Quintela

Re: [PATCH 13/17] qapi: Relax doc string @name: description indentation rules

2023-04-28 Thread Juan Quintela
Markus Armbruster wrote: > The QAPI schema doc comment language provides special syntax for > command and event arguments, struct and union members, alternate > branches, enumeration values, and features: descriptions starting with > "@name:". > > By convention, we format them like this: > >

Re: [PATCH 14/17] qapi: Section parameter @indent is no longer used, drop

2023-04-28 Thread Juan Quintela
Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- Reviewed-by: Juan Quintela

Re: [PATCH 16/17] qga/qapi-schema: Reformat doc comments to conform to current conventions

2023-04-28 Thread Juan Quintela
Markus Armbruster wrote: > Change > > # @name: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed > #do eiusmod tempor incididunt ut labore et dolore magna aliqua. > > to > > # @name: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed > # do eiusmod

Re: [PATCH 15/17] docs/devel/qapi-code-gen: Update doc comment conventions

2023-04-28 Thread Juan Quintela
Markus Armbruster wrote: > The commit before previous relaxed the indentation rules to let us > improve the doc comment conventions. This commit changes the written > conventions. The next commits will update QAPI schemas to conform to > them. > > Signed-off-by: Markus Armbruster Reviewed-by:

Re: [PATCH 11/17] qapi: Fix argument description indentation stripping

2023-04-28 Thread Juan Quintela
Markus Armbruster wrote: > When an argument's description starts on the line after the "#arg: " > line, indentation is stripped only from the description's first line, > as demonstrated by the previous commit. Moreover, subsequent lines > with less indentation are not rejected. > > Make the

Re: [PATCH 10/17] tests/qapi-schema/doc-good: Improve argument description tests

2023-04-28 Thread Juan Quintela
Markus Armbruster wrote: > Improve the comments to better describe what they test. > > Cover argument description starting on a new line indented. This > style isn't documented in docs/devel/qapi-code-gen.rst. qapi-gen.py > accepts it, but messes up indentation: it's stripped from the first >

Re: [PATCH 09/17] tests/qapi-schema/doc-good: Improve a comment

2023-04-28 Thread Juan Quintela
Markus Armbruster wrote: > The QAPI generator doesn't reject undocumented members and > features (yet). doc-good.json covers this, with clear "is > undocumented" notes to signal intent. > > Except for @Variant1 member @var1, where it's "(but no @var: line)". > Less clear. Replace by "@var1 is

Re: [PATCH] ui: return NULL when getting cursor without a console

2023-04-28 Thread Philippe Mathieu-Daudé
On 28/4/23 17:48, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau VNC may try to get the current cursor even when there are no consoles and crashes. Simple reproducer is qemu with -nodefaults. Fixes: (again) https://gitlab.com/qemu-project/qemu/-/issues/1548 Fixes: commit

Re: [PATCH 08/17] qapi/dump: Indent bulleted lists consistently

2023-04-28 Thread Juan Quintela
Markus Armbruster wrote: > Documentation of dump-guest-memory contains two bulleted lists. The > first one is indented, the second one isn't. Delete the first one's > indentation for a more consistent look. > > Signed-off-by: Markus Armbruster Reviewed-by: Juan Quintela

Re: [PATCH 07/17] qapi: Tidy up a slightly awkward TODO comment

2023-04-28 Thread Juan Quintela
Markus Armbruster wrote: > MigrateSetParameters has a TODO comment sitting right behind its doc > comment. I wrote it this way to keep it out of the manual, but that > reason is not obvious. > > The previous commit (sphinx/qapidoc: Do not emit TODO sections into > user manuals) lets me move it

Re: [PATCH 06/17] sphinx/qapidoc: Do not emit TODO sections into user manuals

2023-04-28 Thread Juan Quintela
Markus Armbruster wrote: > QAPI doc comments are for QMP users: they go into the "QEMU QMP > Reference Manual" and the "QEMU Storage Daemon QMP Reference Manual". > > The doc comment TODO sections are for somebody else, namely for the > people who can do: developers. Do not emit them into the

Re: [PATCH 05/17] Revert "qapi: BlockExportRemoveMode: move comments to TODO"

2023-04-28 Thread Juan Quintela
Markus Armbruster wrote: > This reverts commit 97cd74f77231f3897838f8db32b659d94803e01f. > > The next commit will hide TODO: sections. See there for rationale. Reviewing with forward pointers has its own challenges O:-) > Signed-off-by: Markus Armbruster Reviewed-by: Juan Quintela

Re: [PATCH 04/17] meson: Fix to make QAPI generator output depend on main.py

2023-04-28 Thread Juan Quintela
Markus Armbruster wrote: > @qapi_gen_depends is missing scripts/qapi/main.py. Fix that, and drop > a duplicate scripts/qapi/common.py. > > Signed-off-by: Markus Armbruster Reviewed-by: Juan Quintela > --- > meson.build | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [PATCH 03/17] qapi: Fix crash on stray double quote character

2023-04-28 Thread Juan Quintela
Markus Armbruster wrote: > When the lexer chokes on a stray character, its shows the characters > until the next structural character in the error message. You have a problem > It uses a regular expression You use regular expresions. Now you have two problems. Yes, I had to do it. > to

Re: [PATCH 02/17] docs/devel/qapi-code-gen: Turn FIXME admonitions into comments

2023-04-28 Thread Juan Quintela
Markus Armbruster wrote: > We have two FIXME notes. These FIXMEs are for QAPI developers. They > are not useful for QAPI schema developers. They are marked up as > admonitions, which makes them look important in generated HTML. > > Turn them into comments. QAPI developers will still see them

Re: [PATCH 17/17] qapi: Reformat doc comments to conform to current conventions

2023-04-28 Thread Juan Quintela
Markus Armbruster wrote: > Change > > # @name: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed > #do eiusmod tempor incididunt ut labore et dolore magna aliqua. > > to > > # @name: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed > # do eiusmod

Re: [PATCH v7 1/1] arm/kvm: add support for MTE

2023-04-28 Thread Juan Quintela
Cornelia Huck wrote: > Extend the 'mte' property for the virt machine to cover KVM as > well. For KVM, we don't allocate tag memory, but instead enable the > capability. > > If MTE has been enabled, we need to disable migration, And I was wondering why I was cc'd in a patch that talks about arm,

Re: [PATCH v3] meson: Pass -j option to sphinx

2023-04-28 Thread Fabiano Rosas
Markus Armbruster writes: > Fabiano Rosas writes: > >> Save a bit of build time by passing the number of jobs option to >> sphinx. >> >> We cannot use the -j option from make because meson does not support >> setting build time parameters for custom targets. Use nproc instead or >> the

Re: [PATCH v2 14/13] migration: Initialize and cleanup decompression in migration.c

2023-04-28 Thread Juan Quintela
Lukas Straub wrote: > This fixes compress with colo. > > Signed-off-by: Lukas Straub Reviewed-by: Juan Quintela > --- > > Oops, this one slipped trough As the saying goes, it happes in the best families. Yeap, it is a literal translation of a Spanish saying O:-)

Re: [PATCH v2 13/13] ram-compress.c: Make target independent

2023-04-28 Thread Juan Quintela
Lukas Straub wrote: > Make ram-compress.c target independent. > > Signed-off-by: Lukas Straub Reviewed-by: Juan Quintela

Re: [PATCH v2 12/13] ram compress: Assert that the file buffer matches the result

2023-04-28 Thread Juan Quintela
Lukas Straub wrote: > Before this series, "nothing to send" was handled by the file buffer > being empty. Now it is tracked via param->result. > > Assert that the file buffer state matches the result. > > Signed-off-by: Lukas Straub Reviewed-by: Juan Quintela Even when: > +/* > + * Check if

Re: [PATCH v2 11/13] ram.c: Move core decompression code into its own file

2023-04-28 Thread Juan Quintela
Lukas Straub wrote: > No functional changes intended. > > Signed-off-by: Lukas Straub > Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Juan Quintela

Re: [PATCH v3] meson: Pass -j option to sphinx

2023-04-28 Thread Markus Armbruster
Fabiano Rosas writes: > Save a bit of build time by passing the number of jobs option to > sphinx. > > We cannot use the -j option from make because meson does not support > setting build time parameters for custom targets. Use nproc instead or > the equivalent sphinx option "-j auto", if that

Re: [PATCH 10/13] hw/ide/piix: Reuse PCIIDEState::{cmd,data}_ops

2023-04-28 Thread BALATON Zoltan
On Fri, 28 Apr 2023, Bernhard Beschow wrote: Am 27. April 2023 18:15:24 UTC schrieb Bernhard Beschow : Am 27. April 2023 10:52:17 UTC schrieb Mark Cave-Ayland : On 26/04/2023 21:14, Bernhard Beschow wrote: Am 26. April 2023 18:18:35 UTC schrieb Bernhard Beschow : Am 26. April 2023 11:37:48

Re: [PATCH] async: Suppress GCC13 false positive in aio_bh_poll()

2023-04-28 Thread Paolo Bonzini
Il ven 28 apr 2023, 18:25 Juan Quintela ha scritto: > > On the other hand, if the pointer to the heap-allocated BHListSlice > > escaped, this would be a dangling pointer as well—just not the kind that > > the new GCC warning can report. > > I don't agree here. > If with my patch it becomes a

Re: QMP (without OOB) function running in thread different from the main thread as part of aio_poll

2023-04-28 Thread Juan Quintela
Kevin Wolf wrote: > Am 28.04.2023 um 10:38 hat Juan Quintela geschrieben: >> Kevin Wolf wrote: >> >> I am perhaps a bit ingenuous here, but it is there a way to convince >> >> qemu that snapshot_save_job_bh *HAS* to run on the main thread? >> > >> > I believe we're talking about a technicality

[PATCH v3 4/4] target/riscv: smstateen knobs

2023-04-28 Thread Mayuresh Chitale
Add knobs to allow users to enable smstateen and also export it via the ISA extension string. Signed-off-by: Mayuresh Chitale Reviewed-by: Weiwei Li Reviewed-by: Alistair Francis --- target/riscv/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/riscv/cpu.c

[PATCH v3 1/4] target/riscv: smstateen check for fcsr

2023-04-28 Thread Mayuresh Chitale
If smstateen is implemented and smtateen0.fcsr is clear and misa.F is off then the floating point operations must return illegal instruction exception or virtual instruction trap, if relevant. Signed-off-by: Mayuresh Chitale Reviewed-by: Weiwei Li --- target/riscv/csr.c | 15 +++ 1

[PATCH v3 2/4] target/riscv: Reuse tb->flags.FS

2023-04-28 Thread Mayuresh Chitale
When misa.F is 0 tb->flags.FS field is unused and can be used to save the current state of smstateen0.FCSR check which is needed by the floating point translation routines. Signed-off-by: Mayuresh Chitale --- target/riscv/cpu_helper.c | 9 + target/riscv/translate.c | 12 +++-

[PATCH v3 0/4] Smstateen FCSR

2023-04-28 Thread Mayuresh Chitale
Patch 4 and 5 of the smstateen series need to be re-submitted with changes described in the email below. https://lists.nongnu.org/archive/html/qemu-riscv/2022-11/msg00155.html Hence splitting the patch 4 of the original series into three and re-submitting along with the original patch 5. Changes

[PATCH v3 3/4] target/riscv: check smstateen fcsr flag

2023-04-28 Thread Mayuresh Chitale
If misa.F and smstateen_fcsr_ok flag are clear then all the floating point instructions must generate an appropriate exception. Signed-off-by: Mayuresh Chitale --- target/riscv/insn_trans/trans_rvd.c.inc | 13 ++--- target/riscv/insn_trans/trans_rvf.c.inc | 24 ++---

  1   2   3   4   >