Re: [PATCH v6 7/9] hw/i386/q35: Set virtio-iommu aw-bits default value to 39

2024-03-06 Thread Eric Auger
Hi Zhenzhong, On 3/6/24 04:15, Duan, Zhenzhong wrote: > Hi Eric, > >> -Original Message- >> From: Eric Auger >> Subject: [PATCH v6 7/9] hw/i386/q35: Set virtio-iommu aw-bits default >> value to 39 >> >> Currently the default input range can extend to 64 bits. On x86, >> when the virtio-io

Re: [PATCH v6 8/9] hw/arm/virt: Set virtio-iommu aw-bits default value to 48

2024-03-06 Thread Eric Auger
On 3/6/24 04:25, Duan, Zhenzhong wrote: > >> -Original Message- >> From: Eric Auger >> Subject: [PATCH v6 8/9] hw/arm/virt: Set virtio-iommu aw-bits default value >> to 48 >> >> On ARM we set 48b as a default (matching SMMUv3 SMMU_IDR5.VAX == 0). >> >> hw_compat_8_2 is used to handle th

[PATCH] char: Slightly better error reporting when chardev is in use

2024-03-06 Thread Markus Armbruster
Both $ qemu-system-x86_64 -chardev null,id=chr0,mux=on -mon chardev=chr0 -mon chardev=chr0 -mon chardev=chr0 -mon chardev=chr0 -mon chardev=chr0 and $ qemu-system-x86_64 -chardev null,id=chr0 -mon chardev=chr0 -mon chardev=chr0 fail with qemu-system-x86_64: -mon chardev=chr0: Devi

Re: [PATCH] char: Slightly better error reporting when chardev is in use

2024-03-06 Thread Marc-André Lureau
Hi On Wed, Mar 6, 2024 at 12:15 PM Markus Armbruster wrote: > > Both > > $ qemu-system-x86_64 -chardev null,id=chr0,mux=on -mon chardev=chr0 -mon > chardev=chr0 -mon chardev=chr0 -mon chardev=chr0 -mon chardev=chr0 > > and > > $ qemu-system-x86_64 -chardev null,id=chr0 -mon chardev=chr0

Re: [PATCH v2 18/20] tests: acpi/smbios: whitelist expected blobs

2024-03-06 Thread Ani Sinha
> On 05-Mar-2024, at 21:27, Igor Mammedov wrote: > > Signed-off-by: Igor Mammedov Acked-by: Ani Sinha > --- > tests/qtest/bios-tables-test-allowed-diff.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tests/qtest/bios-tables-test-allowed-diff.h > b/tests/qtest/bios-tables-test-a

Re: [PATCH 2/2] virtio-gpu: first surface update with blob scanout after resumed

2024-03-06 Thread Marc-André Lureau
Hi Dongwon Kim On Wed, Mar 6, 2024 at 2:24 AM wrote: > > From: Dongwon Kim > > The guest surface needs to be updated with a blob scanout after resumed > from saved vm state if blob is enabled. > > Cc: Marc-André Lureau > Cc: Vivek Kasireddy > Signed-off-by: Dongwon Kim > --- > hw/display/vir

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

2024-03-06 Thread Jonathan Cameron via
On Mon, 26 Feb 2024 16:42:29 + Jonathan Cameron via wrote: > On Fri, 23 Feb 2024 12:42:23 + > 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 > >

RE: [RFC 0/8] virtio,vhost: Add VIRTIO_F_NOTIFICATION_DATA support

2024-03-06 Thread Xinying Yu
> On Tue, Mar 5, 2024 at 4:21 AM Xinying Yu > wrote: > > > > Of course, I am glad to do. And I need to clarify that our use case only > support VIRTIO_F_NOTIFICATION_DATA transport feature on DPDK vDPA > framework which the backend type is NET_CLIENT_DRIVER_VHOST_USER and > use user_feature_bit

Re: [PATCH v2 20/20] tests: acpi: update expected SSDT.dimmpxm blob

2024-03-06 Thread Ani Sinha
> On 05-Mar-2024, at 21:27, Igor Mammedov wrote: > > address shift is caused by switch to 32-bit SMBIOS entry point > which has slightly different size from 64-bit one and happens > to trigger a bit different memory layout. Why does it affect only q35 machines and not i440fx as well? > > Ex

Re: [PATCH] migration/multifd: Don't fsync when closing QIOChannelFile

2024-03-06 Thread Daniel P . Berrangé
On Wed, Mar 06, 2024 at 08:52:41AM +0800, Peter Xu wrote: > On Tue, Mar 05, 2024 at 05:49:33PM +, Daniel P. Berrangé wrote: > > I don't think you should be removing this. Calling qio_channel_close() > > remains recommended best practice, even with fdatasync() removed, as > > it provides a stron

Re: What is the correct way to add linker dependency to QEMU build system?

2024-03-06 Thread Alex Bennée
Paz Offer writes: > ...after some testing... > [Trying to add 'libdl' to be linked with QEMU] > > I did try to use 'g_module_open/close/symbol', but what I noticed is that > 'g_module_close' did not really unload my library. > So if I would do: > > 1 g_module_open(my-lib) > 2 Load symbols, use m

Re: [PATCH v3] target/riscv: Fix shift count overflow

2024-03-06 Thread Daniel Henrique Barboza
Hi Alistair, Please don't forget to queue this up. Thanks, Daniel On 2/26/24 06:31, Daniel Henrique Barboza wrote: On 2/25/24 14:41, demin.han wrote: The result of (8 - 3 - vlmul) is negative when vlmul >= 6, and results in wrong vill. Signed-off-by: demin.han --- Reviewed-by: Daniel

[PATCH 14/14] tests/unit/test-smp-parse: Test "parameter=0" SMP configurations

2024-03-06 Thread Zhao Liu
From: Zhao Liu The support for "parameter=0" SMP configurations is removed, and QEMU returns error for those cases. So add the related test cases to ensure parameters can't accept 0. Signed-off-by: Zhao Liu --- tests/unit/test-smp-parse.c | 92 + 1 file cha

[PATCH 10/14] tests/unit/test-smp-parse: Test "drawers" parameter in -smp

2024-03-06 Thread Zhao Liu
From: Zhao Liu Although drawer was introduced to -smp along with book by s390 machine, as a general topology level in QEMU that may be reused by other arches in the future, it is desirable to cover this parameter's parsing in a separate case. Signed-off-by: Zhao Liu Tested-by: Xiaoling Song Re

[PATCH 05/14] tests/unit/test-smp-parse: Drop the unsupported "dies=1" case

2024-03-06 Thread Zhao Liu
From: Zhao Liu Unsupported "parameter=1" SMP configurations is marked as deprecated, so drop the related test case. Signed-off-by: Zhao Liu --- tests/unit/test-smp-parse.c | 5 - 1 file changed, 5 deletions(-) diff --git a/tests/unit/test-smp-parse.c b/tests/unit/test-smp-parse.c index 24

[PATCH 12/14] tests/unit/test-smp-parse: Test the full 7-levels topology hierarchy

2024-03-06 Thread Zhao Liu
From: Zhao Liu Currently, -smp supports up to 7-levels topology hierarchy: -drawers/books/sockets/dies/clusters/cores/threads. Though no machine supports all these 7 levels yet, these 7 levels have the strict containment relationship and together form the generic CPU topology representation of

[PATCH 13/14] tests/unit/test-smp-parse: Test smp_props.has_clusters

2024-03-06 Thread Zhao Liu
From: Zhao Liu The smp_props.has_clusters in MachineClass is not a user configured field, and it indicates if user specifies "clusters" in -smp. After -smp parsing, other module could aware if the cluster level is configured by user. This is used when the machine has only 1 cluster since there's

[PATCH 11/14] tests/unit/test-smp-parse: Test "drawers" and "books" combination case

2024-03-06 Thread Zhao Liu
From: Zhao Liu Since s390 machine supports both "drawers" and "books" in -smp, add the "drawers" and "books" combination test case to match the actual topology usage scenario. Signed-off-by: Zhao Liu Tested-by: Xiaoling Song --- tests/unit/test-smp-parse.c | 103 ++

[PATCH 02/14] hw/core/machine-smp: Deprecate unsupported "parameter=1" SMP configurations

2024-03-06 Thread Zhao Liu
From: Zhao Liu Currentlt, it was allowed for users to specify the unsupported topology parameter as "1". For example, x86 PC machine doesn't support drawer/book/cluster topology levels, but user could specify "-smp drawers=1,books=1,clusters=1". This is meaningless and confusing, so that the sup

[PATCH 00/14] Cleanup on SMP and its test

2024-03-06 Thread Zhao Liu
From: Zhao Liu Hi all, To make review easier, I've merged my previous single SMP patch [1] and SMP test series [2] into this series as well. So this series includes: * [Patch 1] Remove deprecated "parameter=0" SMP configurations, which is marked as deprecated in v6.2. * [Patch 2] Deprecate

[PATCH 04/14] hw/core/machine-smp: Calculate total CPUs once in machine_parse_smp_config()

2024-03-06 Thread Zhao Liu
From: Zhao Liu In machine_parse_smp_config(), the number of total CPUs is calculated by: drawers * books * sockets * dies * clusters * cores * threads To avoid missing the future new topology level, use a local variable to cache the calculation result so that total CPUs are only calculated

[PATCH 06/14] tests/unit/test-smp-parse: Use CPU number macros in invalid topology case

2024-03-06 Thread Zhao Liu
From: Zhao Liu Use MAX_CPUS/MIN_CPUS macros in invalid topology case. This gives us the flexibility to change the maximum and minimum CPU limits. Signed-off-by: Zhao Liu Tested-by: Xiaoling Song Reviewed-by: Thomas Huth --- tests/unit/test-smp-parse.c | 22 ++ 1 file chan

[PATCH 03/14] hw/core/machine-smp: Simplify variables' initialization in machine_parse_smp_config()

2024-03-06 Thread Zhao Liu
From: Zhao Liu SMPConfiguration initializes its int64_t members as 0 by default. Therefore, in machine_parse_smp_config(), initialize local topology variables with SMPConfiguration's members directly. Suggested-by: Prasad Pandit Signed-off-by: Zhao Liu --- hw/core/machine-smp.c | 18

[PATCH 07/14] tests/unit/test-smp-parse: Bump max_cpus to 4096

2024-03-06 Thread Zhao Liu
From: Zhao Liu The q35 machine is trying to support up to 4096 vCPUs [1], so it's necessary to bump max_cpus in test-smp-parse to 4096 to cover the topological needs of future machines. [1]: https://lore.kernel.org/qemu-devel/20240228143351.3967-1-anisi...@redhat.com/ Signed-off-by: Zhao Liu

[PATCH 08/14] tests/unit/test-smp-parse: Make test cases aware of the book/drawer

2024-03-06 Thread Zhao Liu
From: Zhao Liu Currently, -smp supports 2 more new levels: book and drawer. It is necessary to consider the effects of book and drawer in the test cases to ensure that the calculations are correct. This is also the preparation to add new book and drawer test cases. Signed-off-by: Zhao Liu Test

[PATCH 09/14] tests/unit/test-smp-parse: Test "books" parameter in -smp

2024-03-06 Thread Zhao Liu
From: Zhao Liu Although book was introduced to -smp along with drawer by s390 machine, as a general topology level in QEMU that may be reused by other arches in the future, it is desirable to cover this parameter's parsing in a separate case. Signed-off-by: Zhao Liu Tested-by: Xiaoling Song Re

[PATCH 01/14] hw/core/machine-smp: Remove deprecated "parameter=0" SMP configurations

2024-03-06 Thread Zhao Liu
From: Zhao Liu The "parameter=0" SMP configurations have been marked as deprecated since v6.2. For these cases, -smp currently returns the warning and adjusts the zeroed parameters to 1 by default. Remove the above compatibility logic in v9.0, and return error directly if any -smp parameter is

Re: [PATCH] migration/multifd: Don't fsync when closing QIOChannelFile

2024-03-06 Thread Peter Xu
On Wed, Mar 06, 2024 at 09:25:24AM +, Daniel P. Berrangé wrote: > On Wed, Mar 06, 2024 at 08:52:41AM +0800, Peter Xu wrote: > > On Tue, Mar 05, 2024 at 05:49:33PM +, Daniel P. Berrangé wrote: > > > I don't think you should be removing this. Calling qio_channel_close() > > > remains recommen

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

2024-03-06 Thread Avihai Horon
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 make sure that on failure, vfio_save_setup() always sets a new error. Signed-off

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

2024-03-06 Thread Anup Patel
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 from the RISC-V specification defines the

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

2024-03-06 Thread Anup Patel
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 as: "rectified input value = (incoming wi

[PATCH 0/2] RISC-V APLIC fixes

2024-03-06 Thread Anup Patel
Few fixes for RISC-V APLIC discovered during Linux AIA patch reviews. These patches can also be found in the apatel_aplic_fixes_v1 branch at: https://github.com/avpatel/qemu.git Anup Patel (2): hw/intc/riscv_aplic: Fix setipnum_le write emulation for APLIC MSI-mode hw/intc/riscv_aplic: Fi

Re: [PATCH v2 17/20] smbios: clear smbios_type4_count before building tables

2024-03-06 Thread Igor Mammedov
On Wed, 6 Mar 2024 13:17:39 +0530 Ani Sinha wrote: > > On 05-Mar-2024, at 21:27, Igor Mammedov wrote: > > > > it will help to keep type 4 tables accounting correct in case > > SMBIOS tables are built multiple times. > > > I suggest you arrange this before patch 15 where you are actually cal

Re: [PATCH v2 20/20] tests: acpi: update expected SSDT.dimmpxm blob

2024-03-06 Thread Igor Mammedov
On Wed, 6 Mar 2024 14:50:20 +0530 Ani Sinha wrote: > > On 05-Mar-2024, at 21:27, Igor Mammedov wrote: > > > > address shift is caused by switch to 32-bit SMBIOS entry point > > which has slightly different size from 64-bit one and happens > > to trigger a bit different memory layout. > > Why

[PATCH v3 11/20] smbios: build legacy mode code only for 'pc' machine

2024-03-06 Thread Igor Mammedov
basically moving code around without functional change. And exposing some symbols so that they could be shared between smbbios.c and new smbios_legacy.c plus some meson magic to build smbios_legacy.c only for 'pc' machine and otherwise replace it with stub if not selected. Signed-off-by: Igor Mam

Re: [PATCH v2 11/20] smbios: build legacy mode code only for 'pc' machine

2024-03-06 Thread Igor Mammedov
On Wed, 6 Mar 2024 12:57:47 +0530 Ani Sinha wrote: > > On 05-Mar-2024, at 21:27, Igor Mammedov wrote: > > > > basically moving code around without functional change. > > And exposing some symbols so that they could be shared > > between smbbios.c and new smbios_legacy.c > > > > plus some meson

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

2024-03-06 Thread Avihai Horon
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 make sure that on failure, vfio_save_s

Re: [PATCH] char: Slightly better error reporting when chardev is in use

2024-03-06 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Wed, Mar 6, 2024 at 12:15 PM Markus Armbruster wrote: >> >> Both >> >> $ qemu-system-x86_64 -chardev null,id=chr0,mux=on -mon chardev=chr0 -mon >> chardev=chr0 -mon chardev=chr0 -mon chardev=chr0 -mon chardev=chr0 >> >> and >> >> $ qemu-system-x86_6

[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 --- a/docs/interop

[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 b/d

[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 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 b/docs/interop/fi

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

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

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

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

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 10: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 make sure that on failure, vfio_save_setup()

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

[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 --- tests/qtest/migration-

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

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

[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 --- tests/qtest/migrati

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

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

2024-03-06 Thread Het Gala
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 Rosas --- tests/qtest/migrati

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

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 m

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: [Stable-8.2.1 61/71] linux-user/riscv: Adjust vdso signal frame cfa offsets

2024-03-06 Thread Andreas Schwab
$ qemu-riscv64 -strace -E LD_LIBRARY_PATH=../src/.libs .libs/Gtest-resume-sig 30962 brk(NULL) = 0xa000 30962 faccessat(AT_FDCWD,"/etc/ld.so.preload",R_OK,AT_SYMLINK_NOFOLLOW|0x8c98) = -1 errno=2 (No such file or directory) 30962 openat(AT_FDCWD,"../src/.libs/libunwind-riscv.so.8",

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

2024-03-06 Thread Paz Offer
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. Thanks for any tip, Paz

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

RE: [PATCH v4 3/8] configure: add --enable-qpl build option

2024-03-06 Thread Fabiano Rosas
"Liu, Yuan1" writes: >> -Original Message- >> From: Fabiano Rosas >> Sent: Wednesday, March 6, 2024 4:32 AM >> To: Liu, Yuan1 ; pet...@redhat.com >> Cc: qemu-devel@nongnu.org; hao.xi...@bytedance.com; >> bryan.zh...@bytedance.com; Liu, Yuan1 ; Zou, Nanhai >> >> Subject: Re: [PATCH v4 3/

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

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

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

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 fr

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 a

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]); > >>

Re: [RFC 1/2] hw/riscv: Add server platform reference machine

2024-03-06 Thread Wu, Fei
On 3/6/2024 8:19 AM, Alistair Francis wrote: > On Mon, Mar 4, 2024 at 8:28 PM Fei Wu wrote: >> >> The RISC-V Server Platform specification[1] defines a standardized set >> of hardware and software capabilities, that portable system software, >> such as OS and hypervisors can rely on being present

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

2024-03-06 Thread Het Gala
On 06/03/24 4:19 pm, Het Gala wrote: Can also find the successful build here: https://gitlab.com/galahet/Qemu/-/pipelines/1201488612 Het Gala (7): Add 'to' object into migrate_qmp() Replace connect_uri and move migrate_get_socket_address inside migrate_qmp Add channels parameter i

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

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

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

[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 +-- target/riscv/vector_internals

Re: [PATCH 3/4] target: Improve error reporting for CpuModelInfo member @props

2024-03-06 Thread Daniel Henrique Barboza
On 3/5/24 11:59, Markus Armbruster wrote: query-cpu-model-comparison, query-cpu-model-baseline, and query-cpu-model-expansion take CpuModelInfo arguments. Errors in @props members of these arguments are reported for 'props', without further context. For instance, s390x rejects {"execut

Re: [PATCH 1/4] target: Simplify type checks for CpuModelInfo member @props

2024-03-06 Thread Daniel Henrique Barboza
On 3/5/24 11:59, Markus Armbruster wrote: CpuModelInfo member @props is semantically a mapping from name to value, and syntactically a JSON object on the wire. This translates to QDict in C. Since the QAPI schema language lacks the means to express 'object', we use 'any' instead. This is QO

[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 @@ #define

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

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

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 ar

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

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 typ

[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 a/migration/savev

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

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

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

[PATCH v4 18/25] vfio: Add Error** argument to vfio_devices_dma_logging_stop()

2024-03-06 Thread Cédric Le Goater
This improves error reporting in the log_global_stop() VFIO handler. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Cédric Le Goater --- Changes in v4: - Dropped log_global_stop() and log_global_sync() changes Changes in v3: - Use error_setg_errno() in vfio_devices_dma_logging_sto

[PATCH v4 02/25] migration: Remove SaveStateHandler and LoadStateHandler typedefs

2024-03-06 Thread Cédric Le Goater
They are only used once. Reviewed-by: Fabiano Rosas Reviewed-by: Peter Xu Signed-off-by: Cédric Le Goater --- include/migration/register.h | 4 ++-- include/qemu/typedefs.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/migration/register.h b/include/migrat

[PATCH v4 17/25] vfio: Add Error** argument to vfio_devices_dma_logging_start()

2024-03-06 Thread Cédric Le Goater
This allows to update the Error argument of the VFIO log_global_start() handler. Errors detected when device level logging is started will be propagated up to qemu_savevm_state_setup() when the ram save_setup() handler is executed. The vfio_set_migration_error() call becomes redundant. Remove it.

[PATCH v4 13/25] memory: Add Error** argument to .log_global_start() handler

2024-03-06 Thread Cédric Le Goater
Modify all .log_global_start() handlers to take an Error** parameter and return a bool. Adapt memory_global_dirty_log_start() to interrupt on the first error the loop on handlers. In such case, a rollback is performed to stop dirty logging on all listeners where it was previously enabled. Cc: Stef

[PATCH v4 22/25] memory: Add Error** argument to memory_get_xlat_addr()

2024-03-06 Thread Cédric Le Goater
Let the callers do the reporting. This will be useful in vfio_iommu_map_dirty_notify(). Cc: "Michael S. Tsirkin" Cc: Paolo Bonzini Cc: David Hildenbrand Signed-off-by: Cédric Le Goater --- include/exec/memory.h | 15 ++- hw/vfio/common.c | 13 + hw/virtio/vhost-

[PATCH v4 12/25] migration: Add Error** argument to .load_setup() handler

2024-03-06 Thread Cédric Le Goater
This will be useful to report errors at a higher level, mostly in VFIO today. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Xu Signed-off-by: Cédric Le Goater --- Changes in v3: - ERRP_GUARD() because of error_prepend use - Made sure an error is always set in case of failure in

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

2024-03-06 Thread Cédric Le Goater
Use vmstate_save_state_with_err() to improve error reporting in the callers and store a reported error under the migration stream. Add documentation while at it. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Cédric Le Goater --- include/hw/vfio/vfio-common.h | 25 -

[PATCH v4 15/25] migration: Modify ram_init_bitmaps() to report dirty tracking errors

2024-03-06 Thread Cédric Le Goater
The .save_setup() handler has now an Error** argument that we can use to propagate errors reported by the .log_global_start() handler. Do that for the RAM. The caller qemu_savevm_state_setup() will store the error under the migration stream for later detection in the migration sequence. Signed-off

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

2024-03-06 Thread Cédric Le Goater
Let the callers do the error reporting. Add documentation while at it. Signed-off-by: Cédric Le Goater --- include/hw/vfio/vfio-common.h | 4 +- include/hw/vfio/vfio-container-base.h | 17 +++- hw/vfio/common.c | 59 ++- hw/vfio/container

[PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-06 Thread Cédric Le Goater
This prepares ground for the changes coming next which add an Error** argument to the .save_setup() handler. Callers of qemu_savevm_state_setup() now handle the error and fail earlier setting the migration state from MIGRATION_STATUS_SETUP to MIGRATION_STATUS_FAILED. In qemu_savevm_state(), move t

[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 bd48f2ee472a5230c2c84bff829dae1e217db33f..c8aeb

  1   2   3   4   >