Re: [RFC PATCH v2 3/7] contrib/plugins: add plugin showcasing new trap related API

2024-10-21 Thread Pierrick Bouvier
On 10/19/24 09:39, Julian Ganz wrote: We recently introduced new plugin API for registration of trap related callbacks. This change introduces a minimal plugin showcasing the new API. It simply counts the occurances of interrupts, exceptions and semihosting events per CPU and reports the counts w

Re: [PATCH v2] block/file-posix: optimize append write

2024-10-21 Thread Stefan Hajnoczi
On Mon, Oct 21, 2024 at 09:32:50PM +0900, Damien Le Moal wrote: > On 10/21/24 20:08, Kevin Wolf wrote: > > Am 20.10.2024 um 03:03 hat Damien Le Moal geschrieben: > >> On 10/18/24 23:37, Kevin Wolf wrote: > >>> Am 04.10.2024 um 12:41 hat Sam Li geschrieben: > When the file-posix driver emulates

Re: [RFC PATCH v2 4/7] target/arm: call plugin trap callbacks

2024-10-21 Thread Julian Ganz
Thanks for the quick reply! October 21, 2024 at 2:58 PM, Peter Maydell wrote: > This omits M-profile Arm CPUs (whose interrupt/exception > handling is rather more complicated, and lives in > m_helper.c.) Yes, I forgot about the M-profile. I'll include those changes wiith the next patch-series. >

Re: [PATCH v4 1/4] KVM: Dynamic sized kvm memslots array

2024-10-21 Thread Peter Xu
Michael, On Fri, Oct 18, 2024 at 06:38:53PM +0300, Michael Tokarev wrote: > Looking at this from qemu-stable PoV, I'm not 100% sure this change is good > for stable-7.2 series, because 7.2 lacks v8.1.0-1571-g5b23186a95 > "kvm: Return number of free memslots" commit, which was a preparation for > f

Re: [PATCH 08/16] rust: build tests for the qemu_api crate

2024-10-21 Thread Paolo Bonzini
On Mon, Oct 21, 2024 at 4:35 PM Zhao Liu wrote: > > On Tue, Oct 15, 2024 at 03:17:26PM +0200, Paolo Bonzini wrote: > > Date: Tue, 15 Oct 2024 15:17:26 +0200 > > From: Paolo Bonzini > > Subject: [PATCH 08/16] rust: build tests for the qemu_api crate > > X-Mailer: git-send-email 2.46.2 > > > > Fix

Re: [SPAM] [PATCH v1 14/16] test/qtest/aspeed_smc-test: Support to test AST1030

2024-10-21 Thread Cédric Le Goater
On 10/18/24 07:31, Jamin Lin wrote: Add test_ast1030_evb function and reused testcases for AST1030 testing. The base address, flash base address and ce index of fmc_cs0 are 0x7E62, 0x8000 and 0, respectively. The default flash model of fmc_cs0 is "w25q80bl" whose size is 1MB, so set jedec

[PATCH] target/mips: Remove unused CPUMIPSState::current_fpu field

2024-10-21 Thread Philippe Mathieu-Daudé
The 'current_fpu' field is unused since commit f01be154589 ("Move the active FPU registers into env again, and use more TCG registers to access them"). Signed-off-by: Philippe Mathieu-Daudé --- target/mips/cpu.h| 1 - target/mips/sysemu/machine.c | 2 +- 2 files changed, 1 insertion(

Re: [Question] What is the definition of “private” fields in QOM?

2024-10-21 Thread Zhao Liu
On Mon, Oct 21, 2024 at 04:06:08PM +0100, Peter Maydell wrote: > Date: Mon, 21 Oct 2024 16:06:08 +0100 > From: Peter Maydell > Subject: Re: [Question] What is the definition of “private” fields in > QOM? > > On Mon, 21 Oct 2024 at 16:02, Zhao Liu wrote: > > > > On Mon, Oct 21, 2024 at 03:20:39P

Re: [PATCH 2/3] vfio/migration: Refactor vfio_vmstate_change/_prepare() error reporting

2024-10-21 Thread Peter Xu
On Mon, Oct 21, 2024 at 06:43:13PM +0200, Cédric Le Goater wrote: > Hello, > > > IIUC the migration thread should always see valid migration object, as it > > takes one refcount at the entrance of migration_thread(): > > > > object_ref(OBJECT(s)); > > Could the migration have failed before

[PATCH] gitlab: enable afalg tests in fedora system test

2024-10-21 Thread Daniel P . Berrangé
The AF_ALG crypto integration for Linux is not being tested in any CI scenario. It always requires an explicit configure time flag to be passed to turn it on. The Fedora system test is arbitrarily picked as the place to test it. Signed-off-by: Daniel P. Berrangé --- .gitlab-ci.d/buildtest.yml |

Re: [PATCH] util: don't set SO_REUSEADDR on client sockets

2024-10-21 Thread Peter Maydell
On Mon, 21 Oct 2024 at 15:54, Daniel P. Berrangé wrote: > > Setting the SO_REUSEADDR property on a socket allows binding to a port > number that is in the TIMED_WAIT state. This is usually done on listener > sockets, to enable a server to restart itself without having to wait for > the completion

Re: [PATCH] util: don't set SO_REUSEADDR on client sockets

2024-10-21 Thread Daniel P . Berrangé
On Mon, Oct 21, 2024 at 05:53:17PM +0100, Peter Maydell wrote: > On Mon, 21 Oct 2024 at 15:54, Daniel P. Berrangé wrote: > > > > Setting the SO_REUSEADDR property on a socket allows binding to a port > > number that is in the TIMED_WAIT state. This is usually done on listener > > sockets, to enabl

Re: [PATCH 0/2] arm: Add collie and sx functional tests

2024-10-21 Thread Guenter Roeck
On 10/21/24 02:17, Peter Maydell wrote: On Mon, 21 Oct 2024 at 09:01, Thomas Huth wrote: On 21/10/2024 09.15, Thomas Huth wrote: On 17/10/2024 18.32, Peter Maydell wrote: This patchset adds new functional tests for the collie and sx1 boards, which are the only remaining ones that survived th

[PATCH] .gitlab-ci.d/cirrus: Remove the macos-15 job

2024-10-21 Thread Thomas Huth
Cirrus-CI stopped providing the possibility to run macOS 15 jobs. Quoting https://cirrus-ci.org/guide/macOS/ : "Cirrus CI Cloud only allows ghcr.io/cirruslabs/macos-runner:sonoma image ..." If you still try to run a Sequoia image, it gets automatically "upgraded" to Sonoma instead. So the macos-

Re: [PULL 00/21] Test updates (tuxrun tests, new QTest maintainer, ...)

2024-10-21 Thread Thomas Huth
On 21/10/2024 15.59, Peter Maydell wrote: On Mon, 21 Oct 2024 at 14:55, Thomas Huth wrote: On 21/10/2024 15.18, Thomas Huth wrote: On 21/10/2024 15.00, Peter Maydell wrote: On Mon, 21 Oct 2024 at 12:35, Thomas Huth wrote: The following changes since commit f1dd640896ee2b50cb34328f2568aad3

Re: [Question] What is the definition of “private” fields in QOM?

2024-10-21 Thread Zhao Liu
Hi Peter, On Mon, Oct 21, 2024 at 10:25:07AM +0100, Peter Maydell wrote: > Date: Mon, 21 Oct 2024 10:25:07 +0100 > From: Peter Maydell > Subject: Re: [Question] What is the definition of “private” fields in > QOM? > > On Sat, 19 Oct 2024 at 16:54, Zhao Liu wrote: > > > > Hi maintainers and lis

[PATCH] tests/tcg: Replace -mpower8-vector with -mvsx

2024-10-21 Thread Ilya Leoshkevich
[1] deprecated -mpower8-vector, resulting in: powerpc64-linux-gnu-gcc: warning: switch '-mpower8-vector' is no longer supported qemu/tests/tcg/ppc64/vsx_f2i_nan.c:4:15: error: expected ';' before 'float' 4 | typedef vector float vsx_float32_vec_t; | ^~

Re: [PATCH 03/16] rust: pass rustc_args when building all crates

2024-10-21 Thread Zhao Liu
On Mon, Oct 21, 2024 at 03:38:06PM +0200, Paolo Bonzini wrote: > Date: Mon, 21 Oct 2024 15:38:06 +0200 > From: Paolo Bonzini > Subject: Re: [PATCH 03/16] rust: pass rustc_args when building all crates > > On Mon, Oct 21, 2024 at 8:16 AM Zhao Liu wrote: > > unsafe_op_in_unsafe_fn is allowed in >

Re: [RFC V1 02/14] accel: accel preinit function

2024-10-21 Thread Peter Xu
On Thu, Oct 17, 2024 at 08:14:03AM -0700, Steve Sistare wrote: > Extract the first part of the AccelState init_machine function into > a new function preinit, which can be called without knowing any > machine properties. For now call preinit and init_machine at the > same place, so no functional c

Re: [PATCH 4/4] ci: Add check-migration-quick to the clang job

2024-10-21 Thread Daniel P . Berrangé
On Fri, Oct 18, 2024 at 04:25:07PM +0100, Peter Maydell wrote: > On Fri, 18 Oct 2024 at 10:01, Daniel P. Berrangé wrote: > > Test reliability is a different thing. If a particular test is > > flaky, it needs to either be fixed or disabled. Splitting into > > a fast & slow grouping doesn't address

Re: [PATCH v2 1/2] meson: build contrib/plugins with meson

2024-10-21 Thread Pierrick Bouvier
On 10/21/24 02:38, Alex Bennée wrote: Pierrick Bouvier writes: Tried to unify this meson.build with tests/tcg/plugins/meson.build but the resulting modules are not output in the right directory. Originally proposed by Anton Kochkov, thank you! Solves: https://gitlab.com/qemu-project/qemu/-/i

Re: [PATCH] util: don't set SO_REUSEADDR on client sockets

2024-10-21 Thread Peter Xu
On Mon, Oct 21, 2024 at 03:54:10PM +0100, Daniel P. Berrangé wrote: > Setting the SO_REUSEADDR property on a socket allows binding to a port > number that is in the TIMED_WAIT state. This is usually done on listener > sockets, to enable a server to restart itself without having to wait for > the co

Re: [PATCH 3/3] vfio/migration: Change trace formats from hex to decimal

2024-10-21 Thread Cédric Le Goater
On 10/20/24 15:01, Avihai Horon wrote: Data sizes in VFIO migration trace events are printed in hex format while in migration core trace events they are printed in decimal format. This inconsistency makes it less readable when using both trace event types. Hence, change the data sizes print form

Re: [PATCH 08/16] rust: build tests for the qemu_api crate

2024-10-21 Thread Zhao Liu
On Mon, Oct 21, 2024 at 04:36:24PM +0200, Paolo Bonzini wrote: > Date: Mon, 21 Oct 2024 16:36:24 +0200 > From: Paolo Bonzini > Subject: Re: [PATCH 08/16] rust: build tests for the qemu_api crate > > On Mon, Oct 21, 2024 at 4:35 PM Zhao Liu wrote: > > > > On Tue, Oct 15, 2024 at 03:17:26PM +0200,

Re: [PATCH v3 06/12] target/ppc: Split out helper_dbczl for 970 (fwd)

2024-10-21 Thread Guenter Roeck
On 10/21/24 07:36, Guenter Roeck wrote: On 10/21/24 03:43, BALATON Zoltan wrote: (Resend with fixed ppc list address.) On Sun, 20 Oct 2024, Guenter Roeck wrote: Hi, On Fri, Jul 19, 2024 at 11:07:01AM +1000, Richard Henderson wrote: We can determine at translation time whether the insn is or

Re: [PULL 00/21] Test updates (tuxrun tests, new QTest maintainer, ...)

2024-10-21 Thread Peter Maydell
On Mon, 21 Oct 2024 at 15:11, Thomas Huth wrote: > Looking at the log files of the job, I can see in > https://gitlab.com/qemu-project/qemu/-/jobs/8141649069/artifacts/browse/build/tests/functional/aarch64/test_aarch64_tuxrun.TuxRunAarch64Test.test_arm64be/ > console.log: > > 2024-10-21 13:20:32,8

Re: [PATCH 2/3] vfio/migration: Refactor vfio_vmstate_change/_prepare() error reporting

2024-10-21 Thread Peter Xu
On Mon, Oct 21, 2024 at 05:14:11PM +0200, Cédric Le Goater wrote: > Hello Avihai, > > On 10/20/24 15:01, Avihai Horon wrote: > > When the VM is shut down vfio_vmstate_change/_prepare() are called to > > transition the VFIO device state to STOP. They are called after > > migration_shutdown() and th

Re: [PATCH v2 1/2] meson: build contrib/plugins with meson

2024-10-21 Thread Pierrick Bouvier
On 10/21/24 02:38, Alex Bennée wrote: Pierrick Bouvier writes: Tried to unify this meson.build with tests/tcg/plugins/meson.build but the resulting modules are not output in the right directory. Originally proposed by Anton Kochkov, thank you! Solves: https://gitlab.com/qemu-project/qemu/-/i

[PATCH] stubs: avoid duplicate symbols in libqemuutil.a

2024-10-21 Thread Paolo Bonzini
qapi_event_send_device_deleted is always included (together with the rest of QAPI) in libqemuutil.a if either system-mode emulation or tools are being built, and in that case the stub causes a duplicate symbol to appear in libqemuutil.a. Add the symbol only if events are not being requested. Supe

Re: [PATCH v2 2/5] tests/migration: Make initrd-stress.img built by default

2024-10-21 Thread Daniel P . Berrangé
On Sat, Oct 19, 2024 at 02:25:04AM +0800, Hyman Huang wrote: > The initrd-stress.img was compiled by specifying the target, > to make it easier for developers to play the guestperf tool, > make it built when dependencies suffices. > > Signed-off-by: Hyman Huang > --- > tests/migration/meson.buil

Re: [PATCH v2 1/5] tests/migration: Move the guestperf tool to scripts directory

2024-10-21 Thread Daniel P . Berrangé
On Sat, Oct 19, 2024 at 02:25:03AM +0800, Hyman Huang wrote: > Guestperf was designed to test the performance of migration, > with a loose connection to the fundamental test cases of QEMU. > > To improve the repository's structure, move it to the scripts > directory. > > Add myself as a maintaine

[PATCH v2 01/13] meson: import rust module into a global variable

2024-10-21 Thread Paolo Bonzini
Reviewed-by: Zhao Liu Signed-off-by: Paolo Bonzini --- meson.build | 1 + rust/qemu-api-macros/meson.build | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index d26690ce204..ffd78b6cbb3 100644 --- a/meson.build +++ b/meson.buil

[PATCH v2 00/13] rust: miscellaneous cleanups + QOM integration tests

2024-10-21 Thread Paolo Bonzini
This series integrates some of the observations from the MSRV patches at https://lore.kernel.org/qemu-devel/20241015131735.518771-1-pbonz...@redhat.com/. The main changes here are two: first, build an integration test that actually tries to create a QOM object that is defined by Rust code; second,

Re: [PATCH v2 3/5] guestperf: Support deferred migration for multifd

2024-10-21 Thread Daniel P . Berrangé
On Sat, Oct 19, 2024 at 02:25:05AM +0800, Hyman Huang wrote: > The way to enable multifd migration has been changed by commit, > 82137e6c8c (migration: enforce multifd and postcopy preempt to > be set before incoming), and guestperf has not made the > necessary changes. If multifd migration had bee

[PATCH v2 04/13] rust: do not use --no-size_t-is-usize

2024-10-21 Thread Paolo Bonzini
This not necessary and makes it harder to write code that is portable between 32- and 64-bit systems: it adds extra casts even though size_of, align_of or offset_of already return the right type. Signed-off-by: Paolo Bonzini --- meson.build | 1 - rust/qemu-api/src/definitio

Re: [PATCH v2 4/5] guestperf: Nitpick the inconsistent parameters

2024-10-21 Thread Daniel P . Berrangé
On Sat, Oct 19, 2024 at 02:25:06AM +0800, Hyman Huang wrote: > Signed-off-by: Hyman Huang > Reviewed-by: Fabiano Rosas > --- > scripts/migration/guestperf/comparison.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Daniel P. Berrangé With regards, Daniel -- |: https:/

[PATCH v2 02/13] meson: remove repeated search for rust_root_crate.sh

2024-10-21 Thread Paolo Bonzini
Avoid repeated lines of the form Program scripts/rust/rust_root_crate.sh found: YES (/home/pbonzini/work/upstream/qemu/scripts/rust/rust_root_crate.sh) in the meson logs. Reviewed-by: Junjie Mao Reviewed-by: Zhao Liu Signed-off-by: Paolo Bonzini --- meson.build | 3 ++- 1 file changed, 2 in

[PATCH v2 06/13] rust: modernize link_section usage for ELF platforms

2024-10-21 Thread Paolo Bonzini
Some newer ABI implementations do not provide .ctors; and while some linkers rewrite .ctors into .init_array, not all of them do. Use the newer .init_array ABI, which works more reliably, and apply it to all non-Apple, non-Windows platforms. This is similar to how the ctor crate operates; without

[PATCH v2 12/13] rust: provide safe wrapper for MaybeUninit::zeroed()

2024-10-21 Thread Paolo Bonzini
MaybeUninit::zeroed() is handy, but it introduces unsafe (and has a pretty heavy syntax in general). Introduce a trait that provides the same functionality while staying within safe Rust. In addition, MaybeUninit::zeroed() is not available as a "const" function until Rust 1.75.0, so this also pre

[PATCH v2 07/13] rust: build integration test for the qemu_api crate

2024-10-21 Thread Paolo Bonzini
Adjust the integration test to compile with a subset of QEMU object files, and make it actually create an object of the class it defines. Follow the Rust filesystem conventions, where tests go in tests/ if they use the library in the same way any other code would. Reviewed-by: Zhao Liu Signed-of

Re: [PATCH v2 5/5] guestperf: Introduce multifd compression option

2024-10-21 Thread Daniel P . Berrangé
On Sat, Oct 19, 2024 at 02:25:07AM +0800, Hyman Huang wrote: > Guestperf tool does not cover the multifd compression option > currently, it is worth supporting so that developers can > analysis the migration performance with different > compression algorithms. > > Multifd support 4 compression alg

[PATCH v2 08/13] rust: cleanup module_init!, use it from #[derive(Object)]

2024-10-21 Thread Paolo Bonzini
Remove the duplicate code by using the module_init! macro; at the same time, simplify how module_init! is used, by taking inspiration from the implementation of #[derive(Object)]. Signed-off-by: Paolo Bonzini --- rust/qemu-api-macros/src/lib.rs | 33 +++- rust/qemu-api/src/definitio

[PATCH v2 10/13] qdev: make properties array "const"

2024-10-21 Thread Paolo Bonzini
Constify all accesses to qdev properties, except for the ObjectPropertyAccessor itself. This makes it possible to place them in read-only memory, and also lets Rust bindings switch from "static mut" arrays to "static"; which is advantageous, because mutable statics are highly discouraged. Signed-

[PATCH v2 03/13] meson: pass rustc_args when building all crates

2024-10-21 Thread Paolo Bonzini
rustc_args is needed to smooth the difference in warnings between the various versions of rustc. Always include those arguments. Signed-off-by: Paolo Bonzini --- meson.build | 20 +--- rust/qemu-api/meson.build | 2 +- rust/qemu-api/src/device_clas

[PATCH v2 05/13] rust: remove uses of #[no_mangle]

2024-10-21 Thread Paolo Bonzini
Mangled symbols do not cause any issue; disabling mangling is only useful if C headers reference the Rust function, which is not the case here. Reviewed-by: Junjie Mao Signed-off-by: Paolo Bonzini --- rust/hw/char/pl011/src/device.rs | 5 - rust/hw/char/pl011/src/device_class.rs | 2 -

[PATCH v2 11/13] rust: make properties array immutable

2024-10-21 Thread Paolo Bonzini
Now that device_class_set_props() takes a const pointer, the only part of "define_property!" that needs to be non-const is the call to try_into(). This in turn will only break if offset_of returns a value with the most significant bit set (i.e. a struct size that is >=2^31 or >= 2^63, respectively

[PATCH v2 13/13] rust: do not use TYPE_CHARDEV unnecessarily

2024-10-21 Thread Paolo Bonzini
In the invocation of qdev_prop_set_chr(), "chardev" is the name of a property rather than a type and has to match the name of the property in device_class.rs. Do not use TYPE_CHARDEV here, just like in the C version of pl011_create. Reviewed-by: Junjie Mao Signed-off-by: Paolo Bonzini --- rust

[PATCH v2 09/13] rust: clean up define_property macro

2024-10-21 Thread Paolo Bonzini
Use the "struct update" syntax to initialize most of the fields to zero, and simplify the handmade type-checking of $name. Reviewed-by: Junjie Mao Signed-off-by: Paolo Bonzini --- rust/qemu-api/src/device_class.rs | 29 ++--- 1 file changed, 6 insertions(+), 23 deletions

Re: [RFC V1 05/14] migration: init and listen during precreate

2024-10-21 Thread Peter Xu
On Thu, Oct 17, 2024 at 08:14:06AM -0700, Steve Sistare wrote: > Initialize the migration object as early as possible so that migration > configuration commands may be sent during the precreate phase. Also, > start listening for the incoming migration connection during precreate, > so that the lis

Re: [PATCH] util: don't set SO_REUSEADDR on client sockets

2024-10-21 Thread Fabiano Rosas
Daniel P. Berrangé writes: > Setting the SO_REUSEADDR property on a socket allows binding to a port > number that is in the TIMED_WAIT state. This is usually done on listener > sockets, to enable a server to restart itself without having to wait for > the completion of TIMED_WAIT on the port. > >

Re: [PATCH 2/3] vfio/migration: Refactor vfio_vmstate_change/_prepare() error reporting

2024-10-21 Thread Cédric Le Goater
Hello, IIUC the migration thread should always see valid migration object, as it takes one refcount at the entrance of migration_thread(): object_ref(OBJECT(s)); Could the migration have failed before ? in migrate_fd_connect() So it's not yet clear to me on why the mutex was destroyed,

Re: [PATCH v3 1/4] qemu-ga: 'Null' check for mandatory parameters

2024-10-21 Thread Daniel P . Berrangé
On Mon, Oct 21, 2024 at 09:28:36PM +0800, Dehan Meng wrote: > sscanf return values are checked and add 'Null' check for > mandatory parameters. > > Signed-off-by: Dehan Meng > --- > qga/commands-linux.c | 12 +++- > 1 file changed, 11 insertions(+), 1 deletion(-) > > diff --git a/qga/co

Re: [PATCH v3 3/4] qemu-ga: Avoiding freeing line prematurely

2024-10-21 Thread Daniel P . Berrangé
On Mon, Oct 21, 2024 at 09:28:38PM +0800, Dehan Meng wrote: > It's now only freed at the end of the function. > > Signed-off-by: Dehan Meng > --- > qga/commands-linux.c | 6 ++ > 1 file changed, 2 insertions(+), 4 deletions(-) Reviewed-by: Daniel P. Berrangé With regards, Daniel -- |: h

Re: [Question] What is the definition of “private” fields in QOM?

2024-10-21 Thread Peter Maydell
On Mon, 21 Oct 2024 at 16:25, Zhao Liu wrote: > My initial confusion stemmed from seeing the private comment and > noticing that there are many direct accesses to parent_obj/parent_class > in QEMU (which I could list in my reply to Daniel). Now I understand > that these examples are only valid wit

Re: [PATCH v3 2/4] qemu-ga: Initialize correctly so getline works properly

2024-10-21 Thread Daniel P . Berrangé
On Mon, Oct 21, 2024 at 09:28:37PM +0800, Dehan Meng wrote: > Proper initialization of param 'size_t n' to '0' for > getline to function correctly. > > Signed-off-by: Dehan Meng > --- > qga/commands-linux.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Daniel P. Berrangé

Re: [PATCH v6 03/14] util: Add RISC-V vector extension probe in cpuinfo

2024-10-21 Thread Daniel Henrique Barboza
Hi, This patch is breaking a KVM guest that runs with '-cpu host' in an emulated Risc-V host. The break happens regardless of the RVV support in the emulated host: $ qemu-system-riscv64 \ -machine virt,accel=kvm -m 2G -smp 1 \ -cpu host \ -nographic -snapshot \

[PATCH v3 0/5] Guestperf: miscellaneous refinement and enrichment

2024-10-21 Thread yong . huang
From: Hyman Huang v3: 1. Remove the two redundant assignments in [PATCH v2 2/5] suggested by Daniel Please review, thanks Yong v2: 1. Update the MAINTAINERS section suggested by Fabiano Rosas 2. Ensure the dependencies when build the initrd-stress.img suggested by Daniel 3. Fix some bugs v1:

[PATCH v3 4/5] guestperf: Nitpick the inconsistent parameters

2024-10-21 Thread yong . huang
From: Hyman Huang Signed-off-by: Hyman Huang Reviewed-by: Fabiano Rosas Reviewed-by: Daniel P. Berrangé --- scripts/migration/guestperf/comparison.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/migration/guestperf/comparison.py b/scripts/migration/guestperf/co

[PATCH v3 2/5] tests/migration: Make initrd-stress.img built by default

2024-10-21 Thread yong . huang
From: Hyman Huang The initrd-stress.img was compiled by specifying the target, to make it easier for developers to play the guestperf tool, make it built when dependencies suffices. Signed-off-by: Hyman Huang Reviewed-by: Daniel P. Berrangé --- tests/migration/meson.build | 30 +++

Re: [PATCH v2 08/13] rust: cleanup module_init!, use it from #[derive(Object)]

2024-10-21 Thread Junjie Mao
Paolo Bonzini writes: > Remove the duplicate code by using the module_init! macro; at the same time, > simplify how module_init! is used, by taking inspiration from the > implementation > of #[derive(Object)]. > > Signed-off-by: Paolo Bonzini Reviewed-by: Junjie Mao One minor comment below

[PATCH v3 5/5] guestperf: Introduce multifd compression option

2024-10-21 Thread yong . huang
From: Hyman Huang Guestperf tool does not cover the multifd compression option currently, it is worth supporting so that developers can analysis the migration performance with different compression algorithms. Multifd support 4 compression algorithms currently: zlib, zstd, qpl, uadk To request

[PATCH v3 1/5] tests/migration: Move the guestperf tool to scripts directory

2024-10-21 Thread yong . huang
From: Hyman Huang Guestperf was designed to test the performance of migration, with a loose connection to the fundamental test cases of QEMU. To improve the repository's structure, move it to the scripts directory. Add myself as a maintainer for the guestperf so that I can help to fix bugs. Si

[PATCH] MAINTAINERS: Add myself as a reviewer of x86 general architecture support

2024-10-21 Thread Zhao Liu
X86 architecture has always been a focus of my work. I would like to help to review more related patches. Signed-off-by: Zhao Liu --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index c21d6a2f9e1e..d103c1149cbb 100644 --- a/MAINTAINERS +++ b/MAINTAIN

[PATCH v3 3/5] guestperf: Support deferred migration for multifd

2024-10-21 Thread yong . huang
From: Hyman Huang The way to enable multifd migration has been changed by commit, 82137e6c8c (migration: enforce multifd and postcopy preempt to be set before incoming), and guestperf has not made the necessary changes. If multifd migration had been enabled in the previous manner, the following e

Re: [PATCH] linux-user: Tolerate CONFIG_LSM_MMAP_MIN_ADDR

2024-10-21 Thread Richard Henderson
On 10/21/24 05:17, Ilya Leoshkevich wrote: Running qemu-i386 on a system running with SELinux in enforcing mode fails with: qemu-i386: tests/tcg/i386-linux-user/sigreturn-sigmask: Unable to find a guest_base to satisfy all guest address mapping requirements - The re

Re: [PATCH 03/16] rust: pass rustc_args when building all crates

2024-10-21 Thread Junjie Mao
Paolo Bonzini writes: > On Mon, Oct 21, 2024 at 8:16 AM Zhao Liu wrote: >> unsafe_op_in_unsafe_fn is allowed in >> rust/qemu-api/src/lib.rs. So should we wrap the bindings in a separate >> lib (similar to the rust/bindings in the Linux kernel)? >> >> This way, the special lint settings can be

Re: [SPAM] [PATCH v1 11/16] test/qtest/aspeed_smc-test: Support to test all flash models

2024-10-21 Thread Andrew Jeffery
On Mon, 2024-10-21 at 14:39 +0200, Cédric Le Goater wrote: > On 10/18/24 07:31, Jamin Lin wrote: > > Currently, these test cases used the hardcode offset 0x140 (0x14000 * > > 256) > > which was beyond the 16MB flash size for flash page read/write command > > testing. > > However, the default

[PATCH v7 07/14] tcg/riscv: Implement vector cmp/cmpsel ops

2024-10-21 Thread Richard Henderson
From: TANG Tiancheng Extend comparison results from mask registers to SEW-width elements, following recommendations in The RISC-V SPEC Volume I (Version 20240411). This aligns with TCG's cmp_vec behavior by expanding compare results to full element width: all 1s for true, all 0s for false. Signe

[PATCH v7 00/14] tcg/riscv: Add support for vector

2024-10-21 Thread Richard Henderson
Introduce support for the RISC-V vector extension in the TCG backend. Changes for v7: - Adjust cpuinfo-riscv.c probing for vector support. In addition to adjusting @left, assert expected value in vlenb. I wondered what would happen if a binary built for -march=rv64gv was run on a host without v

[PATCH v7 03/14] util: Add RISC-V vector extension probe in cpuinfo

2024-10-21 Thread Richard Henderson
From: TANG Tiancheng Add support for probing RISC-V vector extension availability in the backend. This information will be used when deciding whether to use vector instructions in code generation. Cache lg2(vlenb) for the backend. The storing of lg2(vlenb) means we can convert all of the divisio

[PATCH v7 05/14] tcg/riscv: Implement vector mov/dup{m/i}

2024-10-21 Thread Richard Henderson
From: TANG Tiancheng Signed-off-by: TANG Tiancheng Reviewed-by: Liu Zhiwei Reviewed-by: Richard Henderson Message-ID: <20241007025700.47259-5-zhiwei_...@linux.alibaba.com> Signed-off-by: Richard Henderson --- tcg/riscv/tcg-target.c.inc | 76 +- 1 file chan

[PATCH v7 01/14] tcg: Reset data_gen_ptr correctly

2024-10-21 Thread Richard Henderson
This pointer needs to be reset after overflow just like code_buf and code_ptr. Cc: qemu-sta...@nongnu.org Fixes: 57a269469db ("tcg: Infrastructure for managing constant pools") Acked-by: Alistair Francis Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- tcg/tcg.c | 2 +- 1 fil

[PATCH v7 10/14] tcg/riscv: Implement vector sat/mul ops

2024-10-21 Thread Richard Henderson
From: TANG Tiancheng Signed-off-by: TANG Tiancheng Reviewed-by: Liu Zhiwei Reviewed-by: Richard Henderson Message-ID: <20241007025700.47259-9-zhiwei_...@linux.alibaba.com> Signed-off-by: Richard Henderson --- tcg/riscv/tcg-target.h | 4 ++-- tcg/riscv/tcg-target.c.inc | 41 +

[PATCH v7 04/14] tcg/riscv: Add basic support for vector

2024-10-21 Thread Richard Henderson
From: Huang Shiyuan The RISC-V vector instruction set utilizes the LMUL field to group multiple registers, enabling variable-length vector registers. This implementation uses only the first register number of each group while reserving the other register numbers within the group. In TCG, each VE

[PATCH v7 13/14] tcg/riscv: Implement vector roti/v/x ops

2024-10-21 Thread Richard Henderson
From: TANG Tiancheng Signed-off-by: TANG Tiancheng Reviewed-by: Liu Zhiwei Message-ID: <20241007025700.47259-12-zhiwei_...@linux.alibaba.com> Signed-off-by: Richard Henderson --- tcg/riscv/tcg-target.h | 6 +++--- tcg/riscv/tcg-target.c.inc | 36 2 fi

[PATCH v7 06/14] tcg/riscv: Add support for basic vector opcodes

2024-10-21 Thread Richard Henderson
From: TANG Tiancheng Signed-off-by: TANG Tiancheng Reviewed-by: Liu Zhiwei Reviewed-by: Richard Henderson Message-ID: <20241007025700.47259-6-zhiwei_...@linux.alibaba.com> Signed-off-by: Richard Henderson --- tcg/riscv/tcg-target-con-set.h | 3 ++ tcg/riscv/tcg-target-con-str.h | 1 + tcg/

[PATCH v7 12/14] tcg/riscv: Implement vector shi/s/v ops

2024-10-21 Thread Richard Henderson
From: TANG Tiancheng Signed-off-by: TANG Tiancheng Reviewed-by: Liu Zhiwei Reviewed-by: Richard Henderson Message-ID: <20241007025700.47259-11-zhiwei_...@linux.alibaba.com> Signed-off-by: Richard Henderson --- tcg/riscv/tcg-target-con-set.h | 1 + tcg/riscv/tcg-target.h | 6 +-- tc

[PATCH v7 02/14] disas/riscv: Fix vsetivli disassembly

2024-10-21 Thread Richard Henderson
The first immediate field is unsigned, whereas operand_vimm extracts a signed value. There is no need to mask the result with 'u'; just print the immediate with 'i'. Fixes: 07f4964d178 ("disas/riscv.c: rvv: Add disas support for vector instructions") Reviewed-by: Alistair Francis Reviewed-by: P

[PATCH v7 09/14] tcg/riscv: Accept constant first argument to sub_vec

2024-10-21 Thread Richard Henderson
Use vrsub.vi to subtract from a constant. Signed-off-by: Richard Henderson --- tcg/riscv/tcg-target-con-set.h | 1 + tcg/riscv/tcg-target.c.inc | 8 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tcg/riscv/tcg-target-con-set.h b/tcg/riscv/tcg-target-con-set.h index 9

[PATCH v7 14/14] tcg/riscv: Enable native vector support for TCG host

2024-10-21 Thread Richard Henderson
From: TANG Tiancheng Signed-off-by: TANG Tiancheng Reviewed-by: Liu Zhiwei Reviewed-by: Richard Henderson Message-ID: <20241007025700.47259-13-zhiwei_...@linux.alibaba.com> Signed-off-by: Richard Henderson --- tcg/riscv/tcg-target.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

[PATCH v7 11/14] tcg/riscv: Implement vector min/max ops

2024-10-21 Thread Richard Henderson
From: TANG Tiancheng Signed-off-by: TANG Tiancheng Reviewed-by: Liu Zhiwei Reviewed-by: Richard Henderson Message-ID: <20241007025700.47259-10-zhiwei_...@linux.alibaba.com> Signed-off-by: Richard Henderson --- tcg/riscv/tcg-target.h | 2 +- tcg/riscv/tcg-target.c.inc | 33 ++

[PATCH v7 08/14] tcg/riscv: Implement vector neg ops

2024-10-21 Thread Richard Henderson
From: TANG Tiancheng Signed-off-by: TANG Tiancheng Reviewed-by: Liu Zhiwei Reviewed-by: Richard Henderson Message-ID: <20241007025700.47259-8-zhiwei_...@linux.alibaba.com> Signed-off-by: Richard Henderson --- tcg/riscv/tcg-target.h | 2 +- tcg/riscv/tcg-target.c.inc | 7 +++ 2 files

[PATCH] disas: Fix build against Capstone v6 (again)

2024-10-21 Thread Richard Henderson
Like 9971cbac2f3, which set CAPSTONE_AARCH64_COMPAT_HEADER, also set CAPSTONE_SYSTEMZ_COMPAT_HEADER. Fixes the build against capstone v6-alpha. Signed-off-by: Richard Henderson --- include/disas/capstone.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/disas/capstone.h b/include/di

RE: [SPAM] [PATCH v1 09/16] test/qtest/aspeed_smc-test: Introduce a new TestData to test different BMC SOCs

2024-10-21 Thread Jamin Lin
Hi Cedric, > Subject: Re: [SPAM] [PATCH v1 09/16] test/qtest/aspeed_smc-test: Introduce a > new TestData to test different BMC SOCs > > On 10/18/24 07:31, Jamin Lin wrote: > > Currently, these test cases are only used for testing fmc_cs0 for AST2400. > > To test others BMC SOCs, introduces a new

RE: [SPAM] [PATCH v1 11/16] test/qtest/aspeed_smc-test: Support to test all flash models

2024-10-21 Thread Jamin Lin
Hi Andrew and Cedric, * Email Confidentiality Notice 免責聲明: 本信件(或其附件)可能包含機密資訊,並受法律保護。如 台端非指定之收件者,請以電子郵件通知本電子郵件之發送者, 並請立即刪除本電子郵件及其附件和銷毀所有複印件。謝謝您的合作! DISCLAIMER: This message (and any attachments) may contain legally privileged and/or other confidential information

RE: [SPAM] [PATCH v1 16/16] test/qtest/ast2700-smc-test: Support to test AST2700

2024-10-21 Thread Jamin Lin
Hi Cedric, > Subject: Re: [SPAM] [PATCH v1 16/16] test/qtest/ast2700-smc-test: Support to > test AST2700 > > Hello Jamin, > > On 10/18/24 07:31, Jamin Lin wrote: > > Add test_ast2700_evb function and reused testcases which are from > > aspeed_smc-test.c for AST2700 testing. The base address, fla

Re: [PATCH v2] block/file-posix: optimize append write

2024-10-21 Thread Damien Le Moal
On 10/22/24 03:13, Stefan Hajnoczi wrote: > On Mon, Oct 21, 2024 at 09:32:50PM +0900, Damien Le Moal wrote: >> On 10/21/24 20:08, Kevin Wolf wrote: >>> Am 20.10.2024 um 03:03 hat Damien Le Moal geschrieben: On 10/18/24 23:37, Kevin Wolf wrote: > Am 04.10.2024 um 12:41 hat Sam Li geschriebe

Re: [PATCH v3] target-i386: Walk NPT in guest real mode

2024-10-21 Thread Richard Henderson
On 9/21/24 01:57, Alexander Graf wrote: When translating virtual to physical address with a guest CPU that supports nested paging (NPT), we need to perform every page table walk access indirectly through the NPT, which we correctly do. However, we treat real mode (no page table walk) special: In

Re: [PATCH] linux-user: Trace rt_sigprocmask's sigsets

2024-10-21 Thread Richard Henderson
On 10/17/24 02:14, Ilya Leoshkevich wrote: @@ -3312,10 +3358,26 @@ print_rt_sigprocmask(CPUArchState *cpu_env, const struct syscallname *name, case TARGET_SIG_SETMASK: how = "SIG_SETMASK"; break; } qemu_log("%s,", how); -print_pointer(arg1, 0); -print_pointer(arg2, 0);

RE: [SPAM] [PATCH v1 11/16] test/qtest/aspeed_smc-test: Support to test all flash models

2024-10-21 Thread Jamin Lin
Hi Cedric, > Subject: Re: [SPAM] [PATCH v1 11/16] test/qtest/aspeed_smc-test: Support to > test all flash models > > On 10/18/24 07:31, Jamin Lin wrote: > > Currently, these test cases used the hardcode offset 0x140 > > (0x14000 * 256) which was beyond the 16MB flash size for flash page > re

Re: [PATCH v2 0/3] target/i386: Use probe_access_full_mmu in ptw_translate

2024-10-21 Thread Richard Henderson
On 10/13/24 11:47, Richard Henderson wrote: Changes for v2: - Improve probe_access_full{,_mmu} documentation - Remove ra parameter from ptw_translate r~ Richard Henderson (3): include/exec: Improve probe_access_full{,_mmu} documentation target/i386: Use probe_access_full_mmu in pt

Re: [PATCH v2 07/13] rust: build integration test for the qemu_api crate

2024-10-21 Thread Junjie Mao
Paolo Bonzini writes: > Adjust the integration test to compile with a subset of QEMU object > files, and make it actually create an object of the class it defines. > > Follow the Rust filesystem conventions, where tests go in tests/ if > they use the library in the same way any other code would

Re: [PATCH] linux-user: Emulate /proc/self/maps under mmap_lock

2024-10-21 Thread Richard Henderson
On 10/14/24 13:34, Ilya Leoshkevich wrote: If one thread modifies the mappings and another thread prints them, a situation may occur that the printer thread sees a guest mapping without a corresponding host mapping, leading to a crash in open_self_maps_2(). Cc: qemu-sta...@nongnu.org Fixes: 7b7a

Re: [PATCH 2/2] tests/tcg: Test that sigreturn() does not corrupt the signal mask

2024-10-21 Thread Richard Henderson
On 10/17/24 05:54, Ilya Leoshkevich wrote: Add a small test to prevent regressions. Signed-off-by: Ilya Leoshkevich --- tests/tcg/multiarch/sigreturn-sigmask.c | 51 + 1 file changed, 51 insertions(+) create mode 100644 tests/tcg/multiarch/sigreturn-sigmask.c Ack

Re: [PATCH v6 02/14] disas/riscv: Fix vsetivli disassembly

2024-10-21 Thread LIU Zhiwei
On 2024/10/17 03:31, Richard Henderson wrote: The first immediate field is unsigned, whereas operand_vimm extracts a signed value. There is no need to mask the result with 'u'; just print the immediate with 'i'. Fixes: 07f4964d178 ("disas/riscv.c: rvv: Add disas support for vector instructio

Re: [Question] What is the definition of “private” fields in QOM?

2024-10-21 Thread Junjie Mao
Peter Maydell writes: > On Mon, 21 Oct 2024 at 16:25, Zhao Liu wrote: >> My initial confusion stemmed from seeing the private comment and >> noticing that there are many direct accesses to parent_obj/parent_class >> in QEMU (which I could list in my reply to Daniel). Now I understand >> that t

Re: [PATCH] hw/cxl: Support aborting background commands

2024-10-21 Thread Davidlohr Bueso
On Tue, 27 Aug 2024, Jonathan Cameron wrote:\n No comments inline and LGTM. I'll queue it on my tree and push that out on gitlab sometime soonish. I don't see this picked up, which is a good thing atm. While testing the kernel side, I noticed the following is needed, will send a v2 with it fold

Re: [PATCH v2 03/13] meson: pass rustc_args when building all crates

2024-10-21 Thread Junjie Mao
Paolo Bonzini writes: > rustc_args is needed to smooth the difference in warnings between the various > versions of rustc. Always include those arguments. > > Signed-off-by: Paolo Bonzini Reviewed-by: Junjie Mao -- Best Regards Junjie Mao

Re: [PATCH v2 04/13] rust: do not use --no-size_t-is-usize

2024-10-21 Thread Junjie Mao
Paolo Bonzini writes: > This not necessary and makes it harder to write code that This *is* not ... > is portable between 32- and 64-bit systems: it adds extra casts even > though size_of, align_of or offset_of already return the right type. > > Signed-off-by: Paolo Bonzini Reviewed-by: Jun

Re: [PATCH v6 01/14] tcg: Reset data_gen_ptr correctly

2024-10-21 Thread LIU Zhiwei
On 2024/10/17 03:31, Richard Henderson wrote: This pointer needs to be reset after overflow just like code_buf and code_ptr. Cc: qemu-sta...@nongnu.org Fixes: 57a269469db ("tcg: Infrastructure for managing constant pools") Signed-off-by: Richard Henderson --- tcg/tcg.c | 2 +- 1 file chang

<    1   2   3   4   >