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

2024-03-06 Thread Thomas Weißschuh
: db596ae19040574e41d086e78469014191d7d7fc change-id: 20240306-qapi-firmware-json-6fb1213936dd Best regards, -- Thomas Weißschuh

[PATCH 4/4] docs/interop/firmware.json: Include pragma.json

2024-03-06 Thread Thomas Weißschuh
The files included by firmware.json use names that do not satisfy the generators requirements. By including pragma.json these errors are suppressed. Signed-off-by: Thomas Weißschuh --- docs/interop/firmware.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/interop/firmware.json

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 > --- >

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

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

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:

[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:

[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

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

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

2024-03-06 Thread Thomas Weißschuh
The doc title did not match the actual definition. Signed-off-by: Thomas Weißschuh --- docs/interop/firmware.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/interop/firmware.json b/docs/interop/firmware.json index a024f1b9bf3f..54a1fc6c1041 100644 ---

Re: [PATCH 2/2] hw/intc/riscv_aplic: Fix in_clrip[x] read emulation

2024-03-06 Thread Daniel Henrique Barboza
On 3/6/24 06:57, Anup Patel wrote: The reads to in_clrip[x] registers return rectified input values of the interrupt sources. A rectified input value of an interrupt source is defined by the section "4.5.2 Source configurations (sourcecfg[1]–sourcecfg[1023])" of the RISC-V AIA specification

[PATCH 2/4] target/riscv: Add right functions to set agnostic elements

2024-03-06 Thread Huang Tao
We add vext_set_elems_1s to set agnostic elements to 1s in both big and little endian situation. In the function vext_set_elems_1s. We using esz argument to get the first element to set. 'cnt' is just idx * esz. Signed-off-by: Huang Tao --- target/riscv/vector_internals.c | 53

[PATCH] target/riscv: Implement dynamic establishment of custom decoder

2024-03-06 Thread Huang Tao
In this patch, we modify the decoder to be a freely composable data structure instead of a hardcoded one. It can be dynamically builded up according to the extensions. This approach has several benefits: 1. Provides support for heterogeneous cpu architectures. As we add decoder in CPUArchState,

[PATCH 3/4] target/riscv: Replace element agnostic for vector instructions

2024-03-06 Thread Huang Tao
Replace vext_set_elems_1s_le with vext_set_elems_1s for RVV and vcrypto. Signed-off-by: Huang Tao --- target/riscv/vcrypto_helper.c | 32 ++-- target/riscv/vector_helper.c| 92 - target/riscv/vector_internals.c | 8 +--

[PATCH 0/4] target/riscv: Fix the element agnostic function problem

2024-03-06 Thread Huang Tao
In RVV and vcrypto instructions, the element agnostic function vext_set_elems_1s can't deal with the big endian host environment. This patchset fixes the problem by implementing the right function to set agnostic elements. Huang Tao (4): target/riscv: Rename vext_set_elems_1s function

[PATCH v4 14/25] memory: Add Error** argument to the global_dirty_log routines

2024-03-06 Thread Cédric Le Goater
Now that the log_global*() handlers take an Error** parameter and return a bool, do the same for memory_global_dirty_log_start() and memory_global_dirty_log_stop(). The error is reported in the callers for now and it will be propagated in the call stack in the next changes. To be noted a

[PATCH v4 07/25] migration: Always report an error in block_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, block_save_setup() always sets a new error. Cc: Stefan Hajnoczi Signed-off-by: Cédric Le Goater --- Changes in v4: - Added an error when

[PATCH v4 09/25] migration: Add Error** argument to vmstate_save()

2024-03-06 Thread Cédric Le Goater
This will prepare ground for future changes adding an Error** argument to qemu_savevm_state_setup(). Reviewed-by: Prasad Pandit Signed-off-by: Cédric Le Goater --- migration/savevm.c | 26 -- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git

[PATCH v4 06/25] vfio: Always report an error in vfio_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, vfio_save_setup() always sets a new error. Reviewed-by: Fabiano Rosas Signed-off-by: Cédric Le Goater --- Changes in v4: - Fixed state name printed out

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

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

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 > >

[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

[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 +++

[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,

[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 ---

[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

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

2024-03-06 Thread Ankit Agrawal
>> > The structure needs a PCI device handle [2] that consists of the device >> > BDF. >> > The vfio-pci device corresponding to the acpi-generic-initiator object is >> > located to determine the BDF. >> > >> > [1] ACPI Spec 6.3, Section 5.2.16.6 >> > [2] ACPI Spec 6.3, Table 5.80 >> > >> >

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

2024-03-06 Thread Jonathan Cameron via
On Wed, 6 Mar 2024 10:33:17 + Ankit Agrawal wrote: > >> >> Jonathan, Alex, do you know how we may add tests that is dependent > >> >> on the vfio-pci device? > >> > > >> > There are none. > >> > > >> > This would require a host device always available for passthrough and > >> > there is no

[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

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: 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

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

2024-03-06 Thread Ankit Agrawal
>> >> Jonathan, Alex, do you know how we may add tests that is dependent >> on the vfio-pci device? >> > > As Jonathan notes, we've decoupled this from vfio-pci, the pci-dev= arg > can point to any PCI device.  For example, any emulated PCI NIC could > be a stand-in for the vfio-pci device used in

[PATCH v8 0/2] acpi: report NUMA nodes for device memory using GI

2024-03-06 Thread ankita
From: Ankit Agrawal There are upcoming devices which allow CPU to cache coherently access their memory. It is sensible to expose such memory as NUMA nodes separate from the sysmem node to the OS. The ACPI spec provides a scheme in SRAT called Generic Initiator Affinity Structure [1] to allow an

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

2024-03-06 Thread ankita
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 dedicated NUMA node to operate. The partitions are not

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

2024-03-06 Thread ankita
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 using Generic Initiator Affinity Structure in SRAT.

Re: [PATCH v4 2/5] hw/virtio: document SharedObject structures

2024-03-06 Thread Albert Esteve
On Tue, Feb 20, 2024 at 11:34 AM Manos Pitsidianakis < manos.pitsidiana...@linaro.org> wrote: > On Mon, 19 Feb 2024 16:34, Albert Esteve wrote: > >Change VirtioSharedObject value type from > >a generic pointer to a union storing the different > >supported underlying types, which makes naming >

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

2024-03-06 Thread Zhao Liu
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-send-email 2.41.0 > > xhci_flags

Re: [RISC-V][tech-server-soc] [RFC 2/2] target/riscv: Add server platform reference cpu

2024-03-06 Thread Wu, Fei
On 3/5/2024 1:58 PM, Wu, Fei wrote: > On 3/5/2024 3:43 AM, Daniel Henrique Barboza wrote: >> >> >> On 3/4/24 07:25, Fei Wu wrote: >>> The harts requirements of RISC-V server platform [1] require RVA23 ISA >>> profile support, plus Sv48, Svadu, H, Sscofmpf etc. This patch provides >>> a virt CPU

[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

[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 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

[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

[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()

[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

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: >

[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:

[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

[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

[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

[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

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).

[PATCH 1/4] docs/interop/firmware.json: Align examples

2024-03-06 Thread Thomas Weißschuh
The QAPI generator now validates the alignment and rejects this file. Signed-off-by: Thomas Weißschuh --- docs/interop/firmware.json | 384 ++--- 1 file changed, 192 insertions(+), 192 deletions(-) diff --git a/docs/interop/firmware.json

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

2024-03-06 Thread Ankit Agrawal
>> >> Jonathan, Alex, do you know how we may add tests that is dependent >> >> on the vfio-pci device? >> > >> > There are none. >> > >> > This would require a host device always available for passthrough and >> > there is no simple solution for this problem. Such tests would need to >> > run in a

[PATCH 3/4] docs/interop/firmware.json: Use full include paths

2024-03-06 Thread Thomas Weißschuh
The included files are part of the toplevel QAPI directory and need to be included from there. Signed-off-by: Thomas Weißschuh --- docs/interop/firmware.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/interop/firmware.json b/docs/interop/firmware.json index

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

2024-03-06 Thread Het Gala
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 --- tests/qtest/migration-test.c | 54 1 file

Re: [PATCH v3 02/26] vfio: Always report an error in vfio_save_setup()

2024-03-06 Thread Cédric Le Goater
On 3/6/24 11:16, Avihai Horon wrote: On 06/03/2024 11:56, Avihai Horon wrote: On 04/03/2024 14:28, Cédric Le Goater wrote: External email: Use caution opening links or attachments This will prepare ground for futur changes adding an Error** argument to the save_setup() handler. We need to

Re: [PATCH v2 04/13] contrib/elf2dmp: Conform to the error reporting pattern

2024-03-06 Thread Peter Maydell
On Wed, 6 Mar 2024 at 05:01, Akihiko Odaki wrote: > > On 2024/03/05 22:28, Peter Maydell wrote: > > On Tue, 5 Mar 2024 at 07:36, Akihiko Odaki wrote: > >> @@ -206,7 +206,7 @@ static int fix_dtb(struct va_space *vs, QEMU_Elf *qe) > >> va_space_set_dtb(vs, s->cr[3]); > >>

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

2024-03-06 Thread Markus Armbruster
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/include/qapi/qmp/qerror.h @@ -23,9 +23,6 @@

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

2024-03-06 Thread Markus Armbruster
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. Create two block devices -> {"execute":

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

2024-03-06 Thread Markus Armbruster
PATCH 2 requires my "[PATCH] char: Slightly better error reporting when chardev is in use" posted earlier today, PATCH 1 does not. Based-on: <20240306081505.2258405-1-arm...@redhat.com> Markus Armbruster (2): blockdev: Fix block_resize error reporting for op blockers qerror:

[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 11/25] migration: Add Error** argument to .save_setup() handler

2024-03-06 Thread Cédric Le Goater
The purpose is to record a potential error in the migration stream if qemu_savevm_state_setup() fails. Most of the current .save_setup() handlers can be modified to use the Error argument instead of managing their own and calling locally error_report(). Cc: Nicholas Piggin Cc: Harsh Prateek Bora

[PATCH v4 24/25] vfio: Also trace event failures in vfio_save_complete_precopy()

2024-03-06 Thread Cédric Le Goater
vfio_save_complete_precopy() currently returns before doing the trace event. Change that. Signed-off-by: Cédric Le Goater --- hw/vfio/migration.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/hw/vfio/migration.c b/hw/vfio/migration.c index

[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

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 >

[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

[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

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 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

Questions about CXL RAS injection test in qemu

2024-03-06 Thread Yuquan Wang
Hello, Jonathan Recently I met some problems on CXL RAS tests. I tried to use "cxl-inject-uncorrectable-errors" and "cxl-inject-correctable-error" qmp to inject CXL errors, however, there was no any kernel printing information in my qemu machine. And the qmp connection was unstable that made

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

[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>

[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 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>

[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

[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

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 >

Re: [PATCH 1/2] hw/intc/riscv_aplic: Fix setipnum_le write emulation for APLIC MSI-mode

2024-03-06 Thread Daniel Henrique Barboza
On 3/6/24 06:57, Anup Patel wrote: The writes to setipnum_le register in APLIC MSI-mode have special consideration for level-triggered interrupts as-per section "4.9.2 Special consideration for level-sensitive interrupt sources" of the RISC-V AIA specification. Particularly, the below text

[PATCH 1/4] target/riscv: Rename vext_set_elems_1s function

2024-03-06 Thread Huang Tao
In RVV and vcrypto instructions, the masked and tail elements are set to 1s using vext_set_elems_1s function if the vma/vta bit is set. It is the element agnostic policy. However, this function can't deal the big endian situation. We rename the function, adding '_le' to the end of the name, to

[PATCH 4/4] target/riscv: Delete the former element agnostic function

2024-03-06 Thread Huang Tao
Delete vext_set_elems_1s_le. Signed-off-by: Huang Tao --- target/riscv/vector_internals.c | 13 - target/riscv/vector_internals.h | 2 -- 2 files changed, 15 deletions(-) diff --git a/target/riscv/vector_internals.c b/target/riscv/vector_internals.c index 0166e81e02..4f24bd8516

Enabling internal errors for VH CXL devices: [was: Re: Questions about CXL RAS injection test in qemu]

2024-03-06 Thread Jonathan Cameron via
On Wed, 6 Mar 2024 19:27:07 +0800 Yuquan Wang wrote: > Hello, Jonathan > > Recently I met some problems on CXL RAS tests. > > I tried to use "cxl-inject-uncorrectable-errors" and > "cxl-inject-correctable-error" > qmp to inject CXL errors, however, there was no any kernel printing >

[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:

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:

[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:

[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

[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

[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

[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:

[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

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 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

[PATCH v3 0/7] qtest: migration: Add tests for introducing 'channels' argument in migrate QAPIs

2024-03-06 Thread Het Gala
With recent migrate QAPI changes, enabling the direct use of the 'channels' argument to avoid redundant URI string parsing is achieved. To ensure backward compatibility, both 'uri' and 'channels' are kept as optional parameters in migration QMP commands. However, they are mutually exhaustive,

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

2024-03-06 Thread Het Gala
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 Rosas ---

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

2024-03-06 Thread Het Gala
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 ++--- 1 file

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

2024-03-06 Thread Het Gala
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 --- tests/qtest/migration-helpers.c |

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

2024-03-06 Thread Het Gala
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 Rosas ---

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

2024-03-06 Thread Het Gala
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/qtest/migration-helpers.c | 26

  1   2   3   4   >