[PATCH v4 01/25] migration: Report error when shutdown fails

2024-03-06 Thread Cédric Le Goater
This will help detect issues regarding I/O channels usage. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Xu Signed-off-by: Cédric Le Goater --- migration/qemu-file.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/migration/qemu-file.c b/migration/qemu-file.c i

[PATCH v4 05/25] s390/stattrib: Add Error** argument to set_migrationmode() handler

2024-03-06 Thread Cédric Le Goater
This will prepare ground for future changes adding an Error** argument to the save_setup() handler. We need to make sure that on failure, set_migrationmode() always sets a new error. See the Rules section in qapi/error.h. Cc: Halil Pasic Cc: Christian Borntraeger Cc: Thomas Huth Signed-off-by:

[PATCH v4 03/25] migration: Add documentation for SaveVMHandlers

2024-03-06 Thread Cédric Le Goater
The SaveVMHandlers structure is still in use for complex subsystems and devices. Document the handlers since we are going to modify a few later. Reviewed-by: Peter Xu Signed-off-by: Cédric Le Goater --- include/migration/register.h | 263 +++ 1 file changed, 237

[PATCH v4 16/25] vfio: Add Error** argument to .set_dirty_page_tracking() handler

2024-03-06 Thread Cédric Le Goater
We will use the Error object to improve error reporting in the .log_global*() handlers of VFIO. Add documentation while at it. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Cédric Le Goater --- Changes in v3: - Use error_setg_errno() in vfio_legacy_set_dirty_page_tracking() include/h

[PATCH v4 21/25] vfio: Reverse test on vfio_get_dirty_bitmap()

2024-03-06 Thread Cédric Le Goater
It will simplify the changes coming after. Signed-off-by: Cédric Le Goater --- hw/vfio/common.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index 5b2e6a179cdd5f8ca5be84b7097661e96b391456..6820d2efe4923d5043da7eb

[PATCH v4 08/25] migration: Always report an error in ram_save_setup()

2024-03-06 Thread Cédric Le Goater
This will prepare ground for future changes adding an Error** argument to the save_setup() handler. We need to make sure that on failure, ram_save_setup() sets a new error. Signed-off-by: Cédric Le Goater --- Changes in v4: - Fixed test on error returned by qemu_fflush() migration/ram.c |

[PATCH v4 00/25] migration: Improve error reporting

2024-03-06 Thread Cédric Le Goater
Hello, The motivation behind these changes is to improve error reporting to the upper management layer (libvirt) with a more detailed error, this to let it decide, depending on the reported error, whether to try migration again later. It would be useful in cases where migration fails due to lack o

[PATCH v4 19/25] vfio: Use new Error** argument in vfio_save_setup()

2024-03-06 Thread Cédric Le Goater
Add an Error** argument to vfio_migration_set_state() and adjust callers, including vfio_save_setup(). The error will be propagated up to qemu_savevm_state_setup() where the save_setup() handler is executed. Modify vfio_vmstate_change_prepare() and vfio_vmstate_change() to store a reported error u

[PATCH v4 25/25] vfio: Extend vfio_set_migration_error() with Error* argument

2024-03-06 Thread Cédric Le Goater
vfio_set_migration_error() sets the 'return' error on the migration stream if a migration is in progress. To improve error reporting, add a new Error* argument to also set the Error object on the migration stream, if a migration is progress. Signed-off-by: Cédric Le Goater --- Changes in v4:

[PATCH v4 04/25] migration: Do not call PRECOPY_NOTIFY_SETUP notifiers in case of error

2024-03-06 Thread Cédric Le Goater
When commit bd2270608fa0 ("migration/ram.c: add a notifier chain for precopy") added PRECOPY_NOTIFY_SETUP notifiers at the end of qemu_savevm_state_setup(), it didn't take into account a possible error in the loop calling vmstate_save() or .save_setup() handlers. Check ret value before calling the

Re: [RFC 0/4] mirror: implement incremental and bitmap modes

2024-03-06 Thread Fiona Ebner
Am 29.02.24 um 13:47 schrieb Fiona Ebner: > Am 29.02.24 um 12:48 schrieb Vladimir Sementsov-Ogievskiy: >> On 29.02.24 13:11, Fiona Ebner wrote: >>> >>> The iotest creates a new target image for each incremental sync which >>> only records the diff relative to the previous mirror and those diff >>>

Re: [PATCH v8 1/2] qom: new object to associate device to NUMA node

2024-03-06 Thread Jonathan Cameron via
On Wed, 6 Mar 2024 12:33:16 + wrote: > From: Ankit Agrawal > > NVIDIA GPU's support MIG (Mult-Instance GPUs) feature [1], which allows > partitioning of the GPU device resources (including device memory) into > several (upto 8) isolated instances. Each of the partitioned memory needs > a de

Re: [PATCH v8 2/2] hw/acpi: Implement the SRAT GI affinity structure

2024-03-06 Thread Jonathan Cameron via
On Wed, 6 Mar 2024 12:33:17 + wrote: > From: Ankit Agrawal > > ACPI spec provides a scheme to associate "Generic Initiators" [1] > (e.g. heterogeneous processors and accelerators, GPUs, and I/O devices with > integrated compute or DMA engines GPUs) with Proximity Domains. This is > achieved

[PATCH] blockdev: Fix blockdev-snapshot-sync error reporting for no medium

2024-03-06 Thread Markus Armbruster
When external_snapshot_abort() rejects a BlockDriverState without a medium, it creates an error like this: error_setg(errp, "Device '%s' has no medium", device); Trouble is @device can be null. My system formats null as "(null)", but other systems might crash. Reproducer: 1. Create a b

RE: Does "-object" support structured options now?

2024-03-06 Thread Chun Feng Wu
Thanks Daniel for your response! I tried it with the following cmd qemu-system-x86_64 [other options...] \ -object '{"qom-type":"throttle-group","id":"limits0","limits":{"iops-total":200}}' And I got error: qemu-system-x86_64: -object {"qom-type":"throttle-group","id":"limits0","limits":{"io

QEMU Compatibility for Cortex-A55 AArch32 Firmware

2024-03-06 Thread yb liu
Dear QEMU developers I hope this email finds you well. We are currently facing an issue related to QEMU and the Cortex-A55 architecture. Specifically, we have compiled a firmware for Cortex-A55 and would like it to run smoothly on QEMU A55 in AArch32 mode. Despite our numerous attempts, we contin

Re: Does "-object" support structured options now?

2024-03-06 Thread Daniel P . Berrangé
On Wed, Mar 06, 2024 at 02:33:05PM +, Chun Feng Wu wrote: > Thanks Daniel for your response! > > I tried it with the following cmd > > qemu-system-x86_64 [other options...] \ > -object > '{"qom-type":"throttle-group","id":"limits0","limits":{"iops-total":200}}' > > And I got error: > qemu

Re: [PATCH v3 4/7] Add migrate_set_ports into migrate_qmp to change migration port number

2024-03-06 Thread Fabiano Rosas
Het Gala writes: > Add a migrate_set_ports() function that from each QDict, fills in > the port in case it was 0 in the test. > Handle a list of channels so we can add a negative test that > passes more than one channel. > > Signed-off-by: Het Gala > Suggested-by: Fabiano Rosas > --- > tests/q

Re: [PATCH v3 1/7] Add 'to' object into migrate_qmp()

2024-03-06 Thread Fabiano Rosas
Het Gala writes: > Add the 'to' object into migrate_qmp(), so we can use > migrate_get_socket_address() inside migrate_qmp() to get > the port value. This is not applied to other migrate_qmp* > because they don't need the port. > > Signed-off-by: Het Gala > Suggested-by: Fabiano Rosas Reviewed

Re: [PATCH v3 2/7] Replace connect_uri and move migrate_get_socket_address inside migrate_qmp

2024-03-06 Thread Fabiano Rosas
Het Gala writes: > Move the calls to migrate_get_socket_address() into migrate_qmp(). > Get rid of connect_uri and replace it with args->connect_uri only > because 'to' object will help to generate connect_uri with the > correct port number. > > Signed-off-by: Het Gala > Suggested-by: Fabiano Ro

Re: [PATCH v3 3/7] Add channels parameter in migrate_qmp_fail

2024-03-06 Thread Fabiano Rosas
Het Gala writes: > Alter migrate_qmp_fail() to allow both uri and channels > independently. For channels, convert string to a Dict. > No dealing with migrate_get_socket_address() here because > we will fail before starting the migration anyway. > > Signed-off-by: Het Gala > Suggested-by: Fabiano

Re: Does "-object" support structured options now?

2024-03-06 Thread Markus Armbruster
Chun Feng Wu writes: > Thanks Daniel for your response! > > I tried it with the following cmd > > qemu-system-x86_64 [other options...] \ > -object > '{"qom-type":"throttle-group","id":"limits0","limits":{"iops-total":200}}' > > And I got error: > qemu-system-x86_64: -object > {"qom-type":"th

[PULL 16/29] plugins: implement inline operation relative to cpu_index

2024-03-06 Thread Alex Bennée
From: Pierrick Bouvier Instead of working on a fixed memory location, allow to address it based on cpu_index, an element size and a given offset. Result address: ptr + offset + cpu_index * element_size. With this, we can target a member in a struct array from a base pointer. Current semantic is

[PULL 11/29] gdbstub: Introduce gdb_handle_detach_user()

2024-03-06 Thread Alex Bennée
From: Ilya Leoshkevich The upcoming follow-fork-mode child support needs to perform certain actions when GDB detaches from the stopped parent or the stopped child. Introduce a user-specific hook for this. Signed-off-by: Ilya Leoshkevich Message-Id: <20240219141628.246823-11-...@linux.ibm.com> S

[PULL 03/29] {linux,bsd}-user: Introduce get_task_state()

2024-03-06 Thread Alex Bennée
From: Ilya Leoshkevich A CPU's TaskState is stored in the CPUState's void *opaque field, accessing which is somewhat awkward due to having to use a cast. Introduce a wrapper and use it everywhere. Suggested-by: Alex Bennée Signed-off-by: Ilya Leoshkevich Reviewed-by: Warner Losh Reviewed-by:

[PULL 02/29] gdbstub: Support disablement in a multi-threaded process

2024-03-06 Thread Alex Bennée
From: Ilya Leoshkevich The upcoming follow-fork-mode child support will require disabling gdbstub in the parent process, which may have multiple threads (which are represented as CPUs). Loop over all CPUs in order to remove breakpoints and disable single-step. Move the respective code into a sep

[PULL 05/29] gdbstub: Introduce gdbserver_fork_start()

2024-03-06 Thread Alex Bennée
From: Ilya Leoshkevich The upcoming follow-fork-mode child support requires knowing when fork() is about to happen in order to initialize its state. Add a hook for that. Reviewed-by: Alex Bennée Signed-off-by: Ilya Leoshkevich Message-Id: <20240219141628.246823-5-...@linux.ibm.com> Signed-off-

[PULL 01/29] tests: bump QOS_PATH_MAX_ELEMENT_SIZE again

2024-03-06 Thread Alex Bennée
We "fixed" a bug with LTO builds with 100c459f194 (tests/qtest: bump up QOS_PATH_MAX_ELEMENT_SIZE) but it seems it has triggered again. The array is sized according to the maximum anticipated length of a path on the graph. However, the worst case for a depth-first search is to push all nodes on th

[PULL 07/29] {linux,bsd}-user: Pass pid to gdbserver_fork()

2024-03-06 Thread Alex Bennée
From: Ilya Leoshkevich The upcoming follow-fork-mode child support requires knowing the child pid. Pass it down. Reviewed-by: Richard Henderson Signed-off-by: Ilya Leoshkevich Message-Id: <20240219141628.246823-7-...@linux.ibm.com> Signed-off-by: Alex Bennée Message-Id: <20240305121005.352807

[PULL 24/29] plugins: remove non per_vcpu inline operation from API

2024-03-06 Thread Alex Bennée
From: Pierrick Bouvier Now we have a thread-safe equivalent of inline operation, and that all plugins were changed to use it, there is no point to keep the old API. In more, it will help when we implement more functionality (conditional callbacks), as we can assume that we operate on a scoreboar

[PULL 09/29] gdbstub: Introduce gdb_handle_query_supported_user()

2024-03-06 Thread Alex Bennée
From: Ilya Leoshkevich The upcoming follow-fork-mode child support requires advertising the fork-events feature, which is user-specific. Introduce a user-specific hook for this. Reviewed-by: Richard Henderson Signed-off-by: Ilya Leoshkevich Message-Id: <20240219141628.246823-9-...@linux.ibm.co

Re: [PATCH v3 5/7] Add channels parameter in migrate_qmp

2024-03-06 Thread Fabiano Rosas
Het Gala writes: > Alter migrate_qmp() to allow use of channels parameter, but only > fill the uri with correct port number if there are no channels. > Here we don't want to allow the wrong cases of having both or > none (ex: migrate_qmp_fail). > > Signed-off-by: Het Gala > Suggested-by: Fabiano

[PULL 10/29] gdbstub: Introduce gdb_handle_set_thread_user()

2024-03-06 Thread Alex Bennée
From: Ilya Leoshkevich The upcoming follow-fork-mode child support needs to perform certain actions when GDB switches between the stopped parent and the stopped child. Introduce a user-specific hook for this. Signed-off-by: Ilya Leoshkevich Message-Id: <20240219141628.246823-10-...@linux.ibm.co

[PULL 12/29] gdbstub: Implement follow-fork-mode child

2024-03-06 Thread Alex Bennée
From: Ilya Leoshkevich Currently it's not possible to use gdbstub for debugging linux-user code that runs in a forked child, which is normally done using the `set follow-fork-mode child` GDB command. Purely on the protocol level, the missing piece is the fork-events feature. However, a deeper pr

[PULL 23/29] contrib/plugins/howvec: migrate to new per_vcpu API

2024-03-06 Thread Alex Bennée
From: Pierrick Bouvier Reviewed-by: Alex Bennée Tested-by: Alex Bennée Signed-off-by: Pierrick Bouvier Message-Id: <20240304130036.124418-11-pierrick.bouv...@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240305121005.3528075-24-alex.ben...@linaro.org> diff --git a/contrib/plugins/how

[PULL 18/29] tests/plugin: add test plugin for inline operations

2024-03-06 Thread Alex Bennée
From: Pierrick Bouvier For now, it simply performs instruction, bb and mem count, and ensure that inline vs callback versions have the same result. Later, we'll extend it when new inline operations are added. Use existing plugins to test everything works is a bit cumbersome, as different events

[PULL for 9.0 00/29] maintainer updates (tests, gdbstub, plugins)

2024-03-06 Thread Alex Bennée
The following changes since commit db596ae19040574e41d086e78469014191d7d7fc: Merge tag 'pull-target-arm-20240305' of https://git.linaro.org/people/pmaydell/qemu-arm into staging (2024-03-05 13:54:54 +) are available in the Git repository at: https://gitlab.com/stsquad/qemu.git tags/pul

[PULL 08/29] gdbstub: Call gdbserver_fork() both in parent and in child

2024-03-06 Thread Alex Bennée
From: Ilya Leoshkevich The upcoming follow-fork-mode child support requires post-fork message exchange between the parent and the child. Prepare gdbserver_fork() for this purpose. Rename it to gdbserver_fork_end() to better reflect its purpose. Reviewed-by: Richard Henderson Signed-off-by: Ilya

Re: Does "-object" support structured options now?

2024-03-06 Thread Daniel P . Berrangé
On Wed, Mar 06, 2024 at 02:36:08PM +, Daniel P. Berrangé wrote: > On Wed, Mar 06, 2024 at 02:33:05PM +, Chun Feng Wu wrote: > > Thanks Daniel for your response! > > > > I tried it with the following cmd > > > > qemu-system-x86_64 [other options...] \ > > -object > > '{"qom-type":"throt

[PULL 14/29] plugins: scoreboard API

2024-03-06 Thread Alex Bennée
From: Pierrick Bouvier We introduce a cpu local storage, automatically managed (and extended) by QEMU itself. Plugin allocate a scoreboard, and don't have to deal with how many cpus are launched. This API will be used by new inline functions but callbacks can benefit from this as well. This way,

[PULL 25/29] plugins: cleanup codepath for previous inline operation

2024-03-06 Thread Alex Bennée
From: Pierrick Bouvier Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Pierrick Bouvier Message-Id: <20240304130036.124418-13-pierrick.bouv...@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240305121005.3528075-26-alex.ben...@linaro.org> diff --git a/plugins/plu

[PULL 15/29] plugins: define qemu_plugin_u64

2024-03-06 Thread Alex Bennée
From: Pierrick Bouvier Additionally to the scoreboard, we define a qemu_plugin_u64, which is a simple struct holding a pointer to a scoreboard, and a given offset. This allows to have a scoreboard containing structs, without having to bring offset to operate on a specific field. Since most of th

[PULL 13/29] tests/tcg: Add two follow-fork-mode tests

2024-03-06 Thread Alex Bennée
From: Ilya Leoshkevich Add follow-fork-mode child and and follow-fork-mode parent tests. Check for the obvious pitfalls, such as lingering breakpoints, catchpoints, and single-step mode. Signed-off-by: Ilya Leoshkevich Message-Id: <20240219141628.246823-13-...@linux.ibm.com> Signed-off-by: Alex

[PULL 19/29] tests/plugin/mem: migrate to new per_vcpu API

2024-03-06 Thread Alex Bennée
From: Pierrick Bouvier Reviewed-by: Luc Michel Signed-off-by: Pierrick Bouvier Message-Id: <20240304130036.124418-7-pierrick.bouv...@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240305121005.3528075-20-alex.ben...@linaro.org> diff --git a/tests/plugin/mem.c b/tests/plugin/mem.c index

[PULL 04/29] {linux,bsd}-user: Update ts_tid after fork()

2024-03-06 Thread Alex Bennée
From: Ilya Leoshkevich Currently ts_tid contains the parent tid after fork(), which is not correct. So far it has not affected anything, but the upcoming follow-fork-mode child support relies on the correct value, so fix it. Reviewed-by: Alex Bennée Signed-off-by: Ilya Leoshkevich Reviewed-by:

[PULL 06/29] {linux,bsd}-user: Pass pid to fork_end()

2024-03-06 Thread Alex Bennée
From: Ilya Leoshkevich The upcoming follow-fork-mode child support requires knowing the child pid. Pass it down. Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson Signed-off-by: Ilya Leoshkevich Message-Id: <20240219141628.246823-6-...@linux.ibm.com> Signed-off-by: Alex Bennée Message-

[PULL 17/29] plugins: add inline operation per vcpu

2024-03-06 Thread Alex Bennée
From: Pierrick Bouvier Extends API with three new functions: qemu_plugin_register_vcpu_{tb, insn, mem}_exec_inline_per_vcpu(). Those functions takes a qemu_plugin_u64 as input. This allows to have a thread-safe and type-safe version of inline operations. Reviewed-by: Alex Bennée Reviewed-by:

[PULL 20/29] tests/plugin/insn: migrate to new per_vcpu API

2024-03-06 Thread Alex Bennée
From: Pierrick Bouvier Reviewed-by: Luc Michel Signed-off-by: Pierrick Bouvier Message-Id: <20240304130036.124418-8-pierrick.bouv...@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240305121005.3528075-21-alex.ben...@linaro.org> diff --git a/tests/plugin/insn.c b/tests/plugin/insn.c ind

[PULL 29/29] target/riscv: honour show_opcodes when disassembling

2024-03-06 Thread Alex Bennée
This makes the output suitable when used for plugins. Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20240305121005.3528075-30-alex.ben...@linaro.org> diff --git a/disas/riscv.c b/disas/riscv.c index 8a546d5ea53..e236c8b5b7c 100644 --- a/disas/riscv.c +++ b/disas/riscv.c

[PULL 27/29] disas/hppa: honour show_opcodes

2024-03-06 Thread Alex Bennée
Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20240305121005.3528075-28-alex.ben...@linaro.org> diff --git a/disas/hppa.c b/disas/hppa.c index 22dce9b41bb..49e2231ae62 100644 --- a/disas/hppa.c +++ b/disas/hppa.c @@ -1972,9 +1972,11 @@ print_insn_hppa (bfd_vma memaddr, d

[PULL 28/29] target/loongarch: honour show_opcodes when disassembling

2024-03-06 Thread Alex Bennée
This makes the output suitable when used for plugins. Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20240305121005.3528075-29-alex.ben...@linaro.org> diff --git a/target/loongarch/disas.c b/target/loongarch/disas.c index 2040f3e44db..63989a6282d 100644 --- a/target/loon

[PULL 21/29] tests/plugin/bb: migrate to new per_vcpu API

2024-03-06 Thread Alex Bennée
From: Pierrick Bouvier Reviewed-by: Luc Michel Reviewed-by: Alex Bennée Signed-off-by: Pierrick Bouvier Message-Id: <20240304130036.124418-9-pierrick.bouv...@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240305121005.3528075-22-alex.ben...@linaro.org> diff --git a/tests/plugin/bb.c b

[PULL 26/29] disas: introduce show_opcodes

2024-03-06 Thread Alex Bennée
For plugins we don't expect the raw opcodes in the disassembly. We already deal with this by hand crafting our capstone call but for other diassemblers we need a flag. Introduce show_opcodes which defaults to off. Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20240305121

[PULL 22/29] contrib/plugins/hotblocks: migrate to new per_vcpu API

2024-03-06 Thread Alex Bennée
From: Pierrick Bouvier Signed-off-by: Pierrick Bouvier Message-Id: <20240304130036.124418-10-pierrick.bouv...@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240305121005.3528075-23-alex.ben...@linaro.org> diff --git a/contrib/plugins/hotblocks.c b/contrib/plugins/hotblocks.c index 4de1b

Re: [PULL v2 1/1] loongarch: Change the UEFI loading mode to loongarch

2024-03-06 Thread chen huacai
Hi, Xianglai, How to pass the BIOS file to qemu after this patch? With the old cmdline I get an RCU stall and freeze the kvm host. Huacai On Sat, Mar 2, 2024 at 12:14 PM lixianglai wrote: > > Hi Philippe: > > On 29/2/24 12:38, Song Gao wrote: > > From: Xianglai Li > > The UEFI loading mode in

Re: [PATCH v4 08/10] hw/cxl/cxl-mailbox-utils: Add mailbox commands to support add/release dynamic capacity response

2024-03-06 Thread Jonathan Cameron via
... > > > I cannot find anything specific to this in the specification either. > > > Since we have already detected the case where the extent range across > > > multiple regions, the only case we need to capture here is one/multiple > > > portions of an extents getting released and causing extent

Re: [PATCH v2 0/3 qemu] tcg/i386: Page tables in MMIO memory fixes (CXL)

2024-03-06 Thread Jonathan Cameron via
On Thu, 22 Feb 2024 09:07:03 -1000 Richard Henderson wrote: > On 2/19/24 07:31, Jonathan Cameron wrote: > > v2: Changes documented in patch 3. > > - I have not addressed Richard's comment on recursive locks as that > > seems to be a more general issue not specific to this patch set. > >

Re: [PATCH v3 4/7] Add migrate_set_ports into migrate_qmp to change migration port number

2024-03-06 Thread Het Gala
On 06/03/24 8:06 pm, Fabiano Rosas wrote: Het Gala writes: Add a migrate_set_ports() function that from each QDict, fills in the port in case it was 0 in the test. Handle a list of channels so we can add a negative test that passes more than one channel. Signed-off-by: Het Gala Suggested-by:

Re: [PATCH v2] hw/cxl/cxl-mailbox-utils: remove unneeded mailbox output payload space zeroing

2024-03-06 Thread Jonathan Cameron via
On Wed, 21 Feb 2024 14:18:11 -0800 nifan@gmail.com wrote: > From: Fan Ni > > The whole mailbox output payload space is already zeroed after copying > out the input payload, which happens before processing the specific mailbox > command: > https://elixir.bootlin.com/qemu/v8.2.1/source/hw/cxl/

Re: [PATCH v3 6/7] Add multifd_tcp_plain test using list of channels instead of uri

2024-03-06 Thread Fabiano Rosas
Het Gala writes: > Add a positive test to check multifd live migration but this time > using list of channels (restricted to 1) as the starting point > instead of simple uri string. > > Signed-off-by: Het Gala > Suggested-by: Fabiano Rosas > --- > tests/qtest/migration-test.c | 29

Re: [PATCH v5 01/13] hw/cxl/cxl-mailbox-utils: Add dc_event_log_size field to output payload of identify memory device command

2024-03-06 Thread Jonathan Cameron via
On Mon, 4 Mar 2024 11:33:56 -0800 nifan@gmail.com wrote: > From: Fan Ni > > Based on CXL spec r3.1 Table 8-127 (Identify Memory Device Output > Payload), dynamic capacity event log size should be part of > output of the Identify command. > Add dc_event_log_size to the output payload for the

Re: [PATCH v3 7/7] Add negative tests to validate migration QAPIs

2024-03-06 Thread Fabiano Rosas
Het Gala writes: > Migration QAPI arguments - uri and channels are mutually exhaustive. > Add negative validation tests, one with both arguments present and > one with none present. > > Signed-off-by: Het Gala > Suggested-by: Fabiano Rosas Reviewed-by: Fabiano Rosas

Re: [PATCH v3 3/7] Add channels parameter in migrate_qmp_fail

2024-03-06 Thread Het Gala
On 06/03/24 8:10 pm, Fabiano Rosas wrote: Het Gala writes: Alter migrate_qmp_fail() to allow both uri and channels independently. For channels, convert string to a Dict. No dealing with migrate_get_socket_address() here because we will fail before starting the migration anyway. Signed-off-by

Re: [PATCH v5 02/13] hw/cxl/cxl-mailbox-utils: Add dynamic capacity region representative and mailbox command support

2024-03-06 Thread Jonathan Cameron via
On Mon, 4 Mar 2024 11:33:57 -0800 nifan@gmail.com wrote: > From: Fan Ni > > Per cxl spec r3.1, add dynamic capacity region representative based on > Table 8-165 and extend the cxl type3 device definition to include dc region > information. Also, based on info in 8.2.9.9.9.1, add 'Get Dynami

Re: QEMU Compatibility for Cortex-A55 AArch32 Firmware

2024-03-06 Thread Peter Maydell
On Wed, 6 Mar 2024 at 14:33, yb liu wrote: > > > Dear QEMU developers > > I hope this email finds you well. We are currently facing an issue related to > QEMU and the Cortex-A55 architecture. Specifically, we have compiled a > firmware for Cortex-A55 and would like it to run smoothly on QEMU A55

Re: [PATCH v3 5/7] Add channels parameter in migrate_qmp

2024-03-06 Thread Het Gala
On 06/03/24 8:12 pm, Fabiano Rosas wrote: Het Gala writes: Alter migrate_qmp() to allow use of channels parameter, but only fill the uri with correct port number if there are no channels. Here we don't want to allow the wrong cases of having both or none (ex: migrate_qmp_fail). Signed-off-b

Re: [PATCH v5 03/13] include/hw/cxl/cxl_device: Rename mem_size as static_mem_size for type3 memory devices

2024-03-06 Thread Jonathan Cameron via
On Mon, 4 Mar 2024 11:33:58 -0800 nifan@gmail.com wrote: > From: Fan Ni > > Rename mem_size as static_mem_size for type3 memdev to cover static RAM and > pmem capacity, preparing for the introduction of dynamic capacity to support > dynamic capacity devices. > > Signed-off-by: Fan Ni Revi

Re: [PATCH v5 04/13] hw/mem/cxl_type3: Add support to create DC regions to type3 memory devices

2024-03-06 Thread Jonathan Cameron via
On Mon, 4 Mar 2024 11:33:59 -0800 nifan@gmail.com wrote: > From: Fan Ni > > With the change, when setting up memory for type3 memory device, we can > create DC regions. > A property 'num-dc-regions' is added to ct3_props to allow users to pass the > number of DC regions to create. To make i

Re: [PATCH-for-9.1 16/18] hw/i386/pc: Remove deprecated pc-i440fx-2.3 machine

2024-03-06 Thread Thomas Huth
On 05/03/2024 14.42, Philippe Mathieu-Daudé wrote: The pc-i440fx-2.3 machine was deprecated for the 8.2 release (see commit c7437f0ddb "docs/about: Mark the old pc-i440fx-2.0 - 2.3 machine types as deprecated"), time to remove it. Signed-off-by: Philippe Mathieu-Daudé --- docs/about/deprecate

Re: [PATCH v3 4/7] Add migrate_set_ports into migrate_qmp to change migration port number

2024-03-06 Thread Fabiano Rosas
Het Gala writes: > On 06/03/24 8:06 pm, Fabiano Rosas wrote: >> Het Gala writes: >> >>> Add a migrate_set_ports() function that from each QDict, fills in >>> the port in case it was 0 in the test. >>> Handle a list of channels so we can add a negative test that >>> passes more than one channel.

Re: [PATCH v5 05/13] hw/mem/cxl-type3: Refactor ct3_build_cdat_entries_for_mr to take mr size insead of mr as argument

2024-03-06 Thread Jonathan Cameron via
On Mon, 4 Mar 2024 11:34:00 -0800 nifan@gmail.com wrote: > From: Fan Ni > > The function ct3_build_cdat_entries_for_mr only uses size of the passed > memory region argument, refactor the function definition to make the passed > arguments more specific. Typo in title, instead

Re: [PATCH v5 05/13] hw/mem/cxl-type3: Refactor ct3_build_cdat_entries_for_mr to take mr size insead of mr as argument

2024-03-06 Thread Jonathan Cameron via
On Mon, 4 Mar 2024 11:34:00 -0800 nifan@gmail.com wrote: > From: Fan Ni > > The function ct3_build_cdat_entries_for_mr only uses size of the passed > memory region argument, refactor the function definition to make the passed > arguments more specific. > > Signed-off-by: Fan Ni Reviewed-b

Re: [PATCH-for-9.1 02/18] hw/usb/hcd-xhci: Enumerate xhci_flags setting values

2024-03-06 Thread Philippe Mathieu-Daudé
Hi Zhao, On 6/3/24 14:27, Zhao Liu wrote: Hi Philippe, On Tue, Mar 05, 2024 at 02:42:04PM +0100, Philippe Mathieu-Daudé wrote: Date: Tue, 5 Mar 2024 14:42:04 +0100 From: Philippe Mathieu-Daudé Subject: [PATCH-for-9.1 02/18] hw/usb/hcd-xhci: Enumerate xhci_flags setting values X-Mailer: git

[PATCH] target/riscv/vector_helper.c: Avoid shifting negative in fractional LMUL checking

2024-03-06 Thread Max Chou
When vlmul is larger than 5, the original fractional LMUL checking may gets unexpected result. Signed-off-by: Max Chou --- target/riscv/vector_helper.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/riscv/vector_helper.c b/target/riscv/vector_helper.c index 84cec73e

Re: [PATCH 2/4] docs/interop/firmware.json: Fix doc for FirmwareFlashMode

2024-03-06 Thread Philippe Mathieu-Daudé
On 6/3/24 11:31, Thomas Weißschuh wrote: The doc title did not match the actual definition. Fixes: 2720ceda05 ("docs: expand firmware descriptor to allow flash without NVRAM") Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Weißschuh --- docs/interop/firmware.json | 2 +- 1

Re: [PATCH-for-9.1 03/18] hw/usb/hcd-xhci: Remove XHCI_FLAG_FORCE_PCIE_ENDCAP flag

2024-03-06 Thread Thomas Huth
On 05/03/2024 14.42, Philippe Mathieu-Daudé wrote: XHCI_FLAG_FORCE_PCIE_ENDCAP was only used by the pc-i440fx-2.0 machine, which got removed. Remove it and simplify usb_xhci_pci_realize(). Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/hcd-xhci.h | 1 - hw/usb/hcd-xhci-nec.c | 2 -- h

Re: [PATCH 0/4] docs/interop/firmware.json: scripts/qapi-gen.py compatibility

2024-03-06 Thread Philippe Mathieu-Daudé
| 392 +++-- 1 file changed, 197 insertions(+), 195 deletions(-) --- base-commit: db596ae19040574e41d086e78469014191d7d7fc change-id: 20240306-qapi-firmware-json-6fb1213936dd Best regards,

Re: [PATCH-for-9.1 04/18] hw/usb/hcd-xhci: Remove XHCI_FLAG_SS_FIRST flag

2024-03-06 Thread Thomas Huth
On 05/03/2024 14.42, Philippe Mathieu-Daudé wrote: XHCI_FLAG_SS_FIRST was only used by the pc-i440fx-2.0 machine, which got removed. Remove it and simplify various functions in hcd-xhci.c. Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/hcd-xhci.h | 1 - hw/usb/hcd-xhci-nec.c | 2 --

Re: [PATCH 2/2] qerror: QERR_DEVICE_IN_USE is no longer used, drop

2024-03-06 Thread Philippe Mathieu-Daudé
On 6/3/24 14:10, Markus Armbruster wrote: Signed-off-by: Markus Armbruster --- include/qapi/qmp/qerror.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerror.h index 8dd9fcb071..0c2689cf8a 100644 --- a/include/qapi/qmp/qerror.h +++ b/includ

Re: [PATCH 1/2] blockdev: Fix block_resize error reporting for op blockers

2024-03-06 Thread Philippe Mathieu-Daudé
On 6/3/24 14:10, Markus Armbruster wrote: When block_resize() runs into an op blocker, it creates an error like this: error_setg(errp, "Device '%s' is in use", device); Trouble is @device can be null. My system formats null as "(null)", but other systems might crash. Reproducer: 1.

Re: [PATCH-for-9.1 05/18] hw/i386/acpi: Remove PCMachineClass::legacy_acpi_table_size

2024-03-06 Thread Thomas Huth
On 05/03/2024 14.42, Philippe Mathieu-Daudé wrote: PCMachineClass::legacy_acpi_table_size was only used by the pc-i440fx-2.0 machine, which got removed. Remove it and simplify acpi_build(). Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 1 - hw/i386/acpi-build.c | 60 +

Re: How do I enumerate devices connected to i2c busses on running QEMU?

2024-03-06 Thread Philippe Mathieu-Daudé
Hi Paz, On 6/3/24 12:44, Paz Offer wrote: Hi, I want to enumerate all devices connected to i2c busses in running QEMU hosting Linux. I understand I need to use 'qom-list' and 'qom-get' in monitor mode, but I did not find documentation on how to use them for specific information. Try "info q

Re: [PATCH v5 06/13] hw/mem/cxl_type3: Add host backend and address space handling for DC regions

2024-03-06 Thread Jonathan Cameron via
On Mon, 4 Mar 2024 11:34:01 -0800 nifan@gmail.com wrote: > From: Fan Ni > > Add (file/memory backed) host backend, all the dynamic capacity regions > will share a single, large enough host backend. Set up address space for > DC regions to support read/write operations to dynamic capacity fo

Re: Problem with migration/rdma

2024-03-06 Thread Philippe Mathieu-Daudé
Cc'ing RDMA migration reviewers/maintainers: $ ./scripts/get_maintainer.pl -f migration/rdma.c Li Zhijian (reviewer:RDMA Migration) Peter Xu (maintainer:Migration) Fabiano Rosas (maintainer:Migration) On 5/3/24 22:32, Yu Zhang wrote: Hello Het and all, while I was testing qemu-8.2, I saw a

Re: [PATCH 0/4] docs/interop/firmware.json: scripts/qapi-gen.py compatibility

2024-03-06 Thread Thomas Weißschuh
firmware.json: Include pragma.json > > > > docs/interop/firmware.json | 392 > > +++-- > > 1 file changed, 197 insertions(+), 195 deletions(-) > > --- > > base-commit: db596ae19040574e41d086e78469014191d7d7fc > > change-id: 20240306-qapi-firmware-json-6fb1213936dd > > > > Best regards,

Re: [PATCH v5 07/13] hw/mem/cxl_type3: Add DC extent list representative and get DC extent list mailbox support

2024-03-06 Thread Jonathan Cameron via
On Mon, 4 Mar 2024 11:34:02 -0800 nifan@gmail.com wrote: > From: Fan Ni > > Add dynamic capacity extent list representative to the definition of > CXLType3Dev and add get DC extent list mailbox command per > CXL.spec.3.1:.8.2.9.9.9.2. > > Signed-off-by: Fan Ni Hi Fan, A small thing in he

Re: [PATCH-for-9.1 01/18] hw/i386/pc: Remove deprecated pc-i440fx-2.0 machine

2024-03-06 Thread Thomas Huth
On 05/03/2024 14.42, Philippe Mathieu-Daudé wrote: The pc-i440fx-2.0 machine was deprecated for the 8.2 release (see commit c7437f0ddb "docs/about: Mark the old pc-i440fx-2.0 - 2.3 machine types as deprecated"), time to remove it. Signed-off-by: Philippe Mathieu-Daudé --- docs/about/deprecate

Re: [PATCH-for-9.1 07/18] target/i386/kvm: Remove x86_cpu_change_kvm_default() and 'kvm-cpu.h'

2024-03-06 Thread Thomas Huth
On 05/03/2024 14.42, Philippe Mathieu-Daudé wrote: x86_cpu_change_kvm_default() was only used out of kvm-cpu.c by the pc-i440fx-2.1 machine, which got removed. Inline it, and s/Inline/Make it static/ ? (since it is not a real inlining here) remove its declaration. "kvm-cpu.h" is now empty, re

Re: [PATCH-for-9.1 08/18] hw/i386/pc: Remove PCMachineClass::smbios_uuid_encoded

2024-03-06 Thread Thomas Huth
On 05/03/2024 14.42, Philippe Mathieu-Daudé wrote: PCMachineClass::smbios_uuid_encoded was only used by the pc-i440fx-2.1 machine, which got removed. It is now always true, remove it. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 1 - hw/i386/fw_cfg.c | 2 +- hw/i386/

Re: [PATCH-for-9.1 09/18] hw/i386/pc: Remove PCMachineClass::enforce_aligned_dimm

2024-03-06 Thread Thomas Huth
On 05/03/2024 14.42, Philippe Mathieu-Daudé wrote: PCMachineClass::enforce_aligned_dimm was only used by the pc-i440fx-2.1 machine, which got removed. It is now always true. Remove it, simplifying pc_get_device_memory_range(). Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h |

Re: [PATCH-for-9.1 10/18] hw/mem/pc-dimm: Remove legacy_align argument from pc_dimm_pre_plug()

2024-03-06 Thread Thomas Huth
On 05/03/2024 14.42, Philippe Mathieu-Daudé wrote: 'legacy_align' is always NULL, remove it. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/mem/pc-dimm.h | 3 +-- hw/arm/virt.c| 2 +- hw/i386/pc.c | 2 +- hw/loongarch/virt.c | 2 +- hw/mem/pc-dimm.c

Re: [PATCH-for-9.1 11/18] hw/mem/memory-device: Remove legacy_align from memory_device_pre_plug()

2024-03-06 Thread Thomas Huth
On 05/03/2024 14.42, Philippe Mathieu-Daudé wrote: 'legacy_align' is always NULL, remove it, simplifying memory_device_pre_plug(). Signed-off-by: Philippe Mathieu-Daudé --- include/hw/mem/memory-device.h | 2 +- hw/i386/pc.c | 3 +-- hw/mem/memory-device.c | 12 +

Re: [PATCH-for-9.1 06/18] hw/i386/pc: Remove deprecated pc-i440fx-2.1 machine

2024-03-06 Thread Thomas Huth
On 05/03/2024 14.42, Philippe Mathieu-Daudé wrote: The pc-i440fx-2.1 machine was deprecated for the 8.2 release (see commit c7437f0ddb "docs/about: Mark the old pc-i440fx-2.0 - 2.3 machine types as deprecated"), time to remove it. Signed-off-by: Philippe Mathieu-Daudé --- docs/about/deprecate

Re: [RFC PATCH-for-9.0 0/9] hw/xen: Have ARM targets use common xen_memory_listener

2024-03-06 Thread Philippe Mathieu-Daudé
ping ^ 2 On 13/12/23 18:00, Philippe Mathieu-Daudé wrote: ping? On 14/11/23 17:31, Philippe Mathieu-Daudé wrote: Hi, While looking at Xen target-specific code, I noticed some generic code used by x86 which is not implemented for ARM. Maybe ARM machines don't need it, I don't know. But I want

[PATCH 0/5] target/riscv: Support Zve32x and Zve64x extensions

2024-03-06 Thread Jason Chien
This patch series adds the support for Zve32x and Zvx64x and makes vector registers visible in GDB if any of the V/Zve*/Zvk* extensions is enabled. Jason Chien (5): target/riscv: Add support for Zve32x extension target/riscv: Expose Zve32x extension to users target/riscv: Add support for Zve

[PATCH 5/5] target/riscv: Relax vector register check in RISCV gdbstub

2024-03-06 Thread Jason Chien
In current implementation, the gdbstub allows reading vector registers only if V extension is supported. However, all vector extensions and vector crypto extensions have the vector registers and they all depend on Zve32x. The gdbstub should check for Zve32x instead. Signed-off-by: Jason Chien Rev

[PATCH 4/5] target/riscv: Expose Zve64x extension to users

2024-03-06 Thread Jason Chien
Signed-off-by: Jason Chien Reviewed-by: Frank Chang Reviewed-by: Max Chou --- target/riscv/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 8b5d1eb6a8..58b2a94694 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -1473,6 +1473,7 @

Re: [PATCH-for-9.1 13/18] hw/i386/pc: Remove PCMachineClass::resizable_acpi_blob

2024-03-06 Thread Thomas Huth
On 05/03/2024 14.42, Philippe Mathieu-Daudé wrote: PCMachineClass::resizable_acpi_blob was only used by the pc-i440fx-2.2 machine, which got removed. It is now always true. Remove it, simplifying acpi_build(). Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 3 --- hw/i386/ac

[PATCH 2/5] target/riscv: Expose Zve32x extension to users

2024-03-06 Thread Jason Chien
Signed-off-by: Jason Chien Reviewed-by: Frank Chang Reviewed-by: Max Chou --- target/riscv/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 10ccae3323..37e4557b47 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -1469,6 +1469,7 @

[PATCH 1/5] target/riscv: Add support for Zve32x extension

2024-03-06 Thread Jason Chien
Add support for Zve32x extension and replace some checks for Zve32f with Zve32x, since Zve32f depends on Zve32x. Signed-off-by: Jason Chien Reviewed-by: Frank Chang Reviewed-by: Max Chou --- target/riscv/cpu.c | 1 + target/riscv/cpu_cfg.h | 1 + target/

<    1   2   3   4   >