Re: [PATCH 2/2] docs/about: Deprecate the old "power5+" and "power7+" CPU names

2024-01-11 Thread Cédric Le Goater
ported via +an alias, but for consistency these will get removed in a future +release, too. Use ``power5plus_v2.1`` and ``power7plus_v2.1`` instead. + System emulator machines ---- Reviewed-by: Cédric Le Goater Thanks, C.

Re: [PATCH 1/2] target/ppc/cpu-models: Rename power5+ and power7+ for new QOM naming rules

2024-01-11 Thread Cédric Le Goater
a hack in type_name_is_valid() to still allow them for compatibility reasons. However, there is a much nicer solution for this: Simply use aliases! This way we can still support the old names without the need for the ugly hack in type_name_is_valid(). Signed-off-by: Thomas Huth Reviewed-by: Cédric Le Goater Thanks, C.

Re: [PATCH v2] target/s390x/kvm/pv: Provide some more useful information if decryption fails

2024-01-11 Thread Cédric Le Goater
have gone wrong. Buglink: https://issues.redhat.com/browse/RHEL-18212 Signed-off-by: Thomas Huth --- v2: Print the error in s390_machine_protect() instead of doing it in s390_pv_set_sec_parms(), report the text via Error **errp Reviewed-by: Cédric Le Goater s390_pv_

Re: [PULL 2/7] s390x: do a subsystem reset before the unprotect on reboot

2024-01-11 Thread Cédric Le Goater
On 1/10/24 21:28, Matthew Rosato wrote: On 1/10/24 1:30 PM, Cédric Le Goater wrote: On 9/12/23 13:41, Thomas Huth wrote: From: Janosch Frank Bound APQNs have to be reset before tearing down the secure config via s390_machine_unprotect(). Otherwise the Ultravisor will return a error code. So

Re: [PULL 2/7] s390x: do a subsystem reset before the unprotect on reboot

2024-01-10 Thread Cédric Le Goater
On 9/12/23 13:41, Thomas Huth wrote: From: Janosch Frank Bound APQNs have to be reset before tearing down the secure config via s390_machine_unprotect(). Otherwise the Ultravisor will return a error code. So let's do a subsystem_reset() which includes a AP reset before the unprotect call.

Re: [PATCH 00/10] docs/migration: Reorganize migration documentations

2024-01-10 Thread Cédric Le Goater
On 1/10/24 03:37, Peter Xu wrote: On Tue, Jan 09, 2024 at 02:21:26PM +0100, Cédric Le Goater wrote: A few things I'd like to mention alongside, because it's documentation relevant too, and I'd like to collect if there's any comment. I just mostly rewrote two wiki pages completely: https

Re: [PATCH v8 00/10] Introduce model for IBM's FSI

2024-01-09 Thread Cédric Le Goater
Hello Ninad, Here are comments on the file organization and configs. On 11/29/23 00:56, Ninad Palsule wrote: Hello, Please review the patch-set version 8. I have incorporated review comments from Cedric. - Fixed checkpatch failures. - Fixed commit messages. - Fixed LBUS memory map

Re: [PATCH v3 3/4] ci: Add a migration compatibility test job

2024-01-09 Thread Cédric Le Goater
On 1/5/24 19:04, Fabiano Rosas wrote: The migration tests have support for being passed two QEMU binaries to test migration compatibility. Add a CI job that builds the lastest release of QEMU and another job that uses that version plus an already present build of the current version and run the

Re: [PATCH 00/33] hw/cpu/arm: Remove one use of qemu_get_cpu() in A7/A15 MPCore priv

2024-01-09 Thread Cédric Le Goater
On 1/9/24 18:40, Fabiano Rosas wrote: Cédric Le Goater writes: On 1/3/24 20:53, Fabiano Rosas wrote: Philippe Mathieu-Daudé writes: +Peter/Fabiano On 2/1/24 17:41, Cédric Le Goater wrote: On 1/2/24 17:15, Philippe Mathieu-Daudé wrote: Hi Cédric, On 2/1/24 15:55, Cédric Le Goater wrote

[PATCH] tests/avocado/machine_aspeed.py: Update buildroot images to 2023.11

2024-01-09 Thread Cédric Le Goater
/torvalds/linux.git/commit/?id=9deb10cf160e Signed-off-by: Cédric Le Goater --- tests/avocado/machine_aspeed.py | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/avocado/machine_aspeed.py b/tests/avocado/machine_aspeed.py index 6fa5459a07bf..cec018142453

Re: [PATCH] target/s390x/kvm/pv: Provide some more useful information if decryption fails

2024-01-09 Thread Cédric Le Goater
On 1/9/24 15:30, Thomas Huth wrote: It's a common scenario to copy guest images from one host to another to run the guest on the other machine. This (of course) does not work with "secure exection" guests since they are encrypted with one certain host key. However, if you still (accidentally)

Re: [PATCH 00/33] hw/cpu/arm: Remove one use of qemu_get_cpu() in A7/A15 MPCore priv

2024-01-09 Thread Cédric Le Goater
On 1/3/24 20:53, Fabiano Rosas wrote: Philippe Mathieu-Daudé writes: +Peter/Fabiano On 2/1/24 17:41, Cédric Le Goater wrote: On 1/2/24 17:15, Philippe Mathieu-Daudé wrote: Hi Cédric, On 2/1/24 15:55, Cédric Le Goater wrote: On 12/12/23 17:29, Philippe Mathieu-Daudé wrote: Hi, When

Re: [PATCH 00/10] docs/migration: Reorganize migration documentations

2024-01-09 Thread Cédric Le Goater
A few things I'd like to mention alongside, because it's documentation relevant too, and I'd like to collect if there's any comment. I just mostly rewrote two wiki pages completely: https://wiki.qemu.org/ToDo/LiveMigration https://wiki.qemu.org/Features/Migration> I merged all the TODO

Re: [PATCH v8 06/10] hw/fsi: Aspeed APB2OPB interface

2024-01-08 Thread Cédric Le Goater
Hello Ninad, +static void fsi_aspeed_apb2opb_realize(DeviceState *dev, Error **errp) +{ +    SysBusDevice *sbd = SYS_BUS_DEVICE(dev); +    AspeedAPB2OPBState *s = ASPEED_APB2OPB(dev); +    int i; + +    sysbus_init_irq(sbd, >irq); + +    memory_region_init_io(>iomem, OBJECT(s), _apb2opb_ops, s,

Re: [PATCH 10/10] docs/migration: Further move virtio to be feature of migration

2024-01-08 Thread Cédric Le Goater
On 1/9/24 07:46, pet...@redhat.com wrote: From: Peter Xu Move it one layer down, so taking Virtio-migration as a feature for migration. Cc: Michael S. Tsirkin Cc: Jason Wang Signed-off-by: Peter Xu Reviewed-by: Cédric Le Goater Thanks, C. --- docs/devel/migration/features.rst

Re: [PATCH 09/10] docs/migration: Further move vfio to be feature of migration

2024-01-08 Thread Cédric Le Goater
On 1/9/24 07:46, pet...@redhat.com wrote: From: Peter Xu Move it one layer down, so taking VFIO-migration as a feature for migration. Cc: Alex Williamson Cc: Cédric Le Goater Signed-off-by: Peter Xu Reviewed-by: Cédric Le Goater Thanks, C. --- docs/devel/migration/features.rst

Re: [PATCH 08/10] docs/migration: Organize "Postcopy" page

2024-01-08 Thread Cédric Le Goater
+ Postcopy +.. contents:: + 'Postcopy' migration is a way to deal with migrations that refuse to converge The quote character is used in a few places to emphasize words which should be reworked. The rest looks good, so Reviewed-by: Cédric Le Goater Thanks, C. (or take too l

Re: [PATCH 07/10] docs/migration: Split "dirty limit"

2024-01-08 Thread Cédric Le Goater
On 1/9/24 07:46, pet...@redhat.com wrote: From: Peter Xu Split that into a separate file, put under "features". Cc: Yong Huang Signed-off-by: Peter Xu Reviewed-by: Cédric Le Goater Thanks, C. --- docs/devel/migration/dirty-limit.rst | 71

Re: [PATCH 06/10] docs/migration: Split "Postcopy"

2024-01-08 Thread Cédric Le Goater
On 1/9/24 07:46, pet...@redhat.com wrote: From: Peter Xu Split postcopy into a separate file. Introduce a head page "features.rst" to keep all the features on top of migration framework. Signed-off-by: Peter Xu Reviewed-by: Cédric Le Goater Thanks, C. --- docs/devel

Re: [PATCH 05/10] docs/migration: Split "Debugging" and "Firmware"

2024-01-08 Thread Cédric Le Goater
On 1/9/24 07:46, pet...@redhat.com wrote: From: Peter Xu Move the two sections into a separate file called "best-practises.rst". Add the entry into index. Signed-off-by: Peter Xu Reviewed-by: Cédric Le Goater Thanks, C. --- docs/devel/migration/best-practise

Re: [PATCH 04/10] docs/migration: Split "Backwards compatibility" separately

2024-01-08 Thread Cédric Le Goater
On 1/9/24 07:46, pet...@redhat.com wrote: From: Peter Xu Split the section from main.rst into a separate file. Reference it in the index.rst. Signed-off-by: Peter Xu Reviewed-by: Cédric Le Goater Thanks, C.

Re: [PATCH 03/10] docs/migration: Convert virtio.txt into rST

2024-01-08 Thread Cédric Le Goater
On 1/9/24 07:46, pet...@redhat.com wrote: From: Peter Xu Convert the plain old .txt into .rst, add it into migration/index.rst. Signed-off-by: Peter Xu Reviewed-by: Cédric Le Goater Thanks, C. --- docs/devel/migration/index.rst | 1 + docs/devel/migration/virtio.rst | 115

Re: [PATCH 02/10] docs/migration: Create index page

2024-01-08 Thread Cédric Le Goater
"migration framework". Cc: Alex Williamson Cc: Cédric Le Goater Signed-off-by: Peter Xu Reviewed-by: Cédric Le Goater Thanks, C. --- docs/devel/index-internals.rst | 3 +-- docs/devel/migration/index.rst | 11 +++ docs/devel/migration/main.rst | 6 +++--- docs/deve

Re: [PATCH 01/10] docs/migration: Create migration/ directory

2024-01-08 Thread Cédric Le Goater
is still not yet converted to rST. That is a job for later. Cc: Michael S. Tsirkin Cc: Jason Wang Cc: Alex Williamson Cc: Cédric Le Goater Signed-off-by: Peter Xu Reviewed-by: Cédric Le Goater Thanks, C. --- docs/devel/index-internals.rst| 2 +- docs/devel

Re: [PATCH 2/2] hw/block: Deprecate the TC58128 block device

2024-01-08 Thread Cédric Le Goater
-by: Samuel Tardieu Reviewed-by: Cédric Le Goater Thanks, C. --- docs/about/deprecated.rst | 2 +- hw/block/tc58128.c| 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index e6a12c9077..15e39f8bbb 100644

Re: [PATCH 1/2] target/sh4: Deprecate the shix machine

2024-01-08 Thread Cédric Le Goater
to deprecate it. Signed-off-by: Samuel Tardieu Reviewed-by: Cédric Le Goater Thanks, C. --- docs/about/deprecated.rst | 5 + hw/sh4/shix.c | 1 + 2 files changed, 6 insertions(+) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 2e15040246

Re: [PATCH 8/9] tests/avocado: ppc add hypervisor tests

2024-01-08 Thread Cédric Le Goater
/rtas* F: tests/qtest/libqos/rtas* F: tests/avocado/ppc_pseries.py +F: tests/avocado/ppc_hv_tests.py PowerNV (Non-Virtualized) M: Cédric Le Goater diff --git a/tests/avocado/ppc_hv_tests.py b/tests/avocado/ppc_hv_tests.py new file mode 100644 index 00..2162d6bd68 --- /dev/null

Re: [PATCH] target/ppc: Fix crash on machine check caused by ifetch

2024-01-08 Thread Cédric Le Goater
On 1/7/24 18:05, Nicholas Piggin wrote: is_prefix_insn_excp() loads the first word of the instruction address which caused an exception, to determine whether or not it was prefixed so the prefix bit can be set in [H]SRR1. In case it was the instruction fetch itself that caused the exception,

Re: [PATCH 9/9] tests/avocado: Add FreeBSD distro boot tests for ppc

2024-01-08 Thread Cédric Le Goater
On 1/7/24 18:01, Nicholas Piggin wrote: FreeBSD project provides qcow2 images that work well for testing QEMU. Add pseries tests for HPT and Radix, KVM and TCG. This uses a short term VM image, because FreeBSD has not set up long term builds for ppc64 at present. Other architectures could be

Re: [PATCH 7/9] tests/avocado: Add pseries KVM boot_linux test

2024-01-08 Thread Cédric Le Goater
On 1/7/24 18:01, Nicholas Piggin wrote: ppc has no avocado tests for the KVM backend. Add a KVM boot_linux.py test for pseries. Signed-off-by: Nicholas Piggin Reviewed-by: Cédric Le Goater Thanks, C. --- tests/avocado/boot_linux.py | 8 1 file changed, 8 insertions

Re: [PATCH 5/9] tests/avocado: ppc add powernv10 boot_linux_console test

2024-01-08 Thread Cédric Le Goater
On 1/7/24 18:01, Nicholas Piggin wrote: Add test for POWER10. Signed-off-by: Nicholas Piggin Reviewed-by: Cédric Le Goater Thanks, C. --- tests/avocado/boot_linux_console.py | 8 1 file changed, 8 insertions(+) diff --git a/tests/avocado/boot_linux_console.py b/tests

Re: [PATCH 2/9] tests/avocado: mark boot_linux.py long runtime instead of flaky

2024-01-08 Thread Cédric Le Goater
n though they run in less than 50s. Anyhow, Reviewed-by: Cédric Le Goater Thanks, C. + AVOCADO_ALLOW_UNTRUSTED_CODE There are tests which will boot a kernel image or firmware that can be diff --git a/tests/avocado/boot_linux.py b/tests/avocado/boot_linux.p

Re: [PATCH 1/9] gitlab: fix s390x tag for avocado-system-centos

2024-01-08 Thread Cédric Le Goater
On 1/7/24 18:01, Nicholas Piggin wrote: The 390x tag should be s390x. Signed-off-by: Nicholas Piggin Reviewed-by: Cédric Le Goater Thanks, C. --- .gitlab-ci.d/buildtest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d

[PULL 13/17] vfio/iommufd: Remove the use of stat() to check file existence

2024-01-07 Thread Cédric Le Goater
opendir to avoid the race. Fixes: CID 1531551 Signed-off-by: Cédric Le Goater Reviewed-by: Zhenzhong Duan --- hw/vfio/iommufd.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/hw/vfio/iommufd.c b/hw/vfio/iommufd.c index d4c586e842def8f04d3a914843f5eece2c75ea30

[PULL 08/17] vfio/iommufd: Introduce a VFIOIOMMU iommufd QOM interface

2024-01-07 Thread Cédric Le Goater
As previously done for the sPAPR and legacy IOMMU backends, convert the VFIOIOMMUOps struct to a QOM interface. The set of of operations for this backend can be referenced with a literal typename instead of a C struct. Reviewed-by: Zhenzhong Duan Tested-by: Eric Farman Signed-off-by: Cédric Le

[PULL 01/17] vfio/spapr: Extend VFIOIOMMUOps with a release handler

2024-01-07 Thread Cédric Le Goater
This allows to abstract a bit more the sPAPR IOMMU support in the legacy IOMMU backend. Reviewed-by: Zhenzhong Duan Tested-by: Eric Farman Signed-off-by: Cédric Le Goater --- include/hw/vfio/vfio-container-base.h | 1 + hw/vfio/container.c | 10 +++- hw/vfio/spapr.c

[PULL 04/17] vfio/container: Introduce a VFIOIOMMU QOM interface

2024-01-07 Thread Cédric Le Goater
referencing the various implementations. Simply transform the VFIOIOMMUOps struct in an InterfaceClass and do some initial name replacements. Next changes will start converting VFIOIOMMUOps. Reviewed-by: Zhenzhong Duan Tested-by: Eric Farman Signed-off-by: Cédric Le Goater --- include/hw/vfio/vfio

[PULL 11/17] vfio/container: Replace basename with g_path_get_basename

2024-01-07 Thread Cédric Le Goater
-by: Eric Auger Reviewed-by: Zhao Liu Reviewed-by: Zhenzhong Duan Signed-off-by: Cédric Le Goater --- hw/vfio/container.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/vfio/container.c b/hw/vfio/container.c index 688cf23bab88f85246378bc5a7da3c51ea6b79d9

[PULL 06/17] vfio/container: Intoduce a new VFIOIOMMUClass::setup handler

2024-01-07 Thread Cédric Le Goater
This will help in converting the sPAPR IOMMU backend to a QOM interface. Reviewed-by: Zhenzhong Duan Tested-by: Eric Farman Signed-off-by: Cédric Le Goater --- include/hw/vfio/vfio-container-base.h | 1 + hw/vfio/container.c | 1 + 2 files changed, 2 insertions(+) diff

[PULL 15/17] vfio/migration: Add helper function to set state or reset device

2024-01-07 Thread Cédric Le Goater
and remove duplicate comments. Signed-off-by: Avihai Horon Reviewed-by: Cédric Le Goater Reviewed-by: Philippe Mathieu-Daudé --- hw/vfio/migration.c | 41 + 1 file changed, 17 insertions(+), 24 deletions(-) diff --git a/hw/vfio/migration.c b/hw/vfio/migration.c

[PULL 16/17] backends/iommufd: Remove check on number of backend users

2024-01-07 Thread Cédric Le Goater
QOM already has a ref count on objects and it will assert much earlier, when INT_MAX is reached. Reviewed-by: Eric Auger Reviewed-by: Zhenzhong Duan Signed-off-by: Cédric Le Goater --- backends/iommufd.c | 5 - 1 file changed, 5 deletions(-) diff --git a/backends/iommufd.c b/backends

[PULL 17/17] backends/iommufd: Remove mutex

2024-01-07 Thread Cédric Le Goater
BQL lock and it should be safe to drop the IOMMUFD backend mutex. Simply remove it. Fixes: CID 1531550 Fixes: CID 1531549 Reviewed-by: Eric Auger Reviewed-by: Zhenzhong Duan Signed-off-by: Cédric Le Goater --- include/sysemu/iommufd.h | 2 -- backends/iommufd.c | 7 --- 2 files chan

[PULL 05/17] vfio/container: Introduce a VFIOIOMMU legacy QOM interface

2024-01-07 Thread Cédric Le Goater
-by: Cédric Le Goater --- include/hw/vfio/vfio-common.h | 1 - include/hw/vfio/vfio-container-base.h | 1 + hw/vfio/common.c | 6 ++- hw/vfio/container.c | 58 ++- 4 files changed, 55 insertions(+), 11 deletions(-) diff --git

[PULL 09/17] vfio/spapr: Only compile sPAPR IOMMU support when needed

2024-01-07 Thread Cédric Le Goater
sPAPR IOMMU support is only needed for pseries machines. Compile out support when CONFIG_PSERIES is not set. This saves ~7K of text. Reviewed-by: Zhenzhong Duan Tested-by: Eric Farman Signed-off-by: Cédric Le Goater --- hw/vfio/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PULL 12/17] hw/vfio: fix iteration over global VFIODevice list

2024-01-07 Thread Cédric Le Goater
afe ("vfio/common: Introduce a global VFIODevice list") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2061 Signed-off-by: Volker Rümelin Reviewed-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Reviewed-by: Eric Auger --- hw/vfio/common.c | 8 1 file changed, 4 insert

[PULL 03/17] vfio/container: Initialize VFIOIOMMUOps under vfio_init_container()

2024-01-07 Thread Cédric Le Goater
-by: Cédric Le Goater --- hw/vfio/container.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/vfio/container.c b/hw/vfio/container.c index afcfe8048805c58291d1104ff0ef20bdc457f99c..f4a0434a5239bfb6a17b91c8879cb98e686afccc 100644 --- a/hw/vfio/container.c +++ b/hw/vfio

[PULL 00/17] vfio queue

2024-01-07 Thread Cédric Le Goater
, including the removal of the iommufd backend mutex * Introduced VFIOIOMMUClass, to avoid compiling spapr when !CONFIG_PSERIES Avihai Horon (1): vfio/migration: Add helper function to set state or reset device Cédric Le Goater (14

[PULL 14/17] vfio/container: Rename vfio_init_container to vfio_set_iommu

2024-01-07 Thread Cédric Le Goater
. vfio_init_container() operates on legacy container and setup IOMMU context with ioctl(VFIO_SET_IOMMU). So choose to rename vfio_init_container to vfio_set_iommu to avoid the confusion. No functional change intended. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le

[PULL 02/17] vfio/container: Introduce vfio_legacy_setup() for further cleanups

2024-01-07 Thread Cédric Le Goater
This will help subsequent patches to unify the initialization of type1 and sPAPR IOMMU backends. Reviewed-by: Zhenzhong Duan Tested-by: Eric Farman Signed-off-by: Cédric Le Goater --- hw/vfio/container.c | 63 + 1 file changed, 35 insertions(+), 28

[PULL 07/17] vfio/spapr: Introduce a sPAPR VFIOIOMMU QOM interface

2024-01-07 Thread Cédric Le Goater
specific to the sPAPR IOMMU. This allows reuse and provides better abstraction of the backends. It will be useful to avoid compiling the sPAPR IOMMU backend on targets not supporting it. Reviewed-by: Zhenzhong Duan Tested-by: Eric Farman Signed-off-by: Cédric Le Goater --- include/hw/vfio/vfio

[PULL 10/17] vfio/iommufd: Remove CONFIG_IOMMUFD usage

2024-01-07 Thread Cédric Le Goater
Availability of the IOMMUFD backend can now be fully determined at runtime and the ifdef check was a build time protection (for PPC not supporting it mostly). Reviewed-by: Zhenzhong Duan Tested-by: Eric Farman Signed-off-by: Cédric Le Goater --- hw/vfio/common.c | 3 --- 1 file changed, 3

Re: [PATCH 0/2] backends/iommufd: Remove mutex

2024-01-04 Thread Cédric Le Goater
On 1/2/24 13:32, Cédric Le Goater wrote: Hello ! Coverity has some reports regarding the IOMMUFDBackend mutex. Since the IOMMUFDBackend routines are called from the QEMU main thread, this series simply suggests removing the mutex and rely on the BQL to handle concurrent access. Thanks, C

Re: [PATCH 1/2] backends/iommufd: Remove check on number of backend users

2024-01-03 Thread Cédric Le Goater
Hello Zhenzhong, On 1/3/24 02:40, Duan, Zhenzhong wrote: Hi Cédric, -Original Message- From: Cédric Le Goater Sent: Tuesday, January 2, 2024 8:32 PM To: qemu-devel@nongnu.org Cc: Liu, Yi L ; Eric Auger ; Duan, Zhenzhong ; Cédric Le Goater Subject: [PATCH 1/2] backends/iommufd

Re: [PATCH 00/33] hw/cpu/arm: Remove one use of qemu_get_cpu() in A7/A15 MPCore priv

2024-01-02 Thread Cédric Le Goater
On 1/2/24 17:15, Philippe Mathieu-Daudé wrote: Hi Cédric, On 2/1/24 15:55, Cédric Le Goater wrote: On 12/12/23 17:29, Philippe Mathieu-Daudé wrote: Hi, When a MPCore cluster is used, the Cortex-A cores belong the the cluster container, not to the board/soc layer. This series move

Re: [PATCH v3 5/5] Rename "QEMU global mutex" to "BQL" in comments and docs

2024-01-02 Thread Cédric Le Goater
i Acked-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Thanks, C.

Re: [PATCH v3 4/5] Replace "iothread lock" with "BQL" in comments

2024-01-02 Thread Cédric Le Goater
On 1/2/24 16:35, Stefan Hajnoczi wrote: The term "iothread lock" is obsolete. The APIs use Big QEMU Lock (BQL) in their names. Update the code comments to use "BQL" instead of "iothread lock". Signed-off-by: Stefan Hajnoczi Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 00/33] hw/cpu/arm: Remove one use of qemu_get_cpu() in A7/A15 MPCore priv

2024-01-02 Thread Cédric Le Goater
On 12/12/23 17:29, Philippe Mathieu-Daudé wrote: Hi, When a MPCore cluster is used, the Cortex-A cores belong the the cluster container, not to the board/soc layer. This series move the creation of vCPUs to the MPCore private container. Doing so we consolidate the QOM model, moving common code

Re: [PATCH 11/33] hw/cpu/arm: Have A9MPCORE/A15MPCORE inheritate common CORTEX_MPCORE_PRIV

2024-01-02 Thread Cédric Le Goater
On 12/12/23 17:29, Philippe Mathieu-Daudé wrote: TYPE_CORTEX_MPCORE_PRIV becomes the common parent to TYPE_A9MPCORE_PRIV and TYPE_A15MPCORE_PRIV. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Thanks, C.

Re: [PATCH 12/33] hw/cpu/arm: Create MPCore container in QOM parent

2024-01-02 Thread Cédric Le Goater
On 12/12/23 17:29, Philippe Mathieu-Daudé wrote: Move the memory region container creation to the abstract QOM parent. Children set the region size via the class 'container_size' field. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Thanks, C.

Re: [PATCH 10/33] hw/cpu/arm: Introduce abstract CORTEX_MPCORE_PRIV QOM type

2024-01-02 Thread Cédric Le Goater
On 12/12/23 17:29, Philippe Mathieu-Daudé wrote: This type will be common to A9MPCORE/A15MPCORE devices. Reviewed-by: Cédric Le Goater Thanks, C.

Re: [PATCH 09/33] hw/cpu/arm: Merge {a9mpcore.h, a15mpcore.h} as cortex_mpcore.h

2024-01-02 Thread Cédric Le Goater
On 12/12/23 17:29, Philippe Mathieu-Daudé wrote: Merge Cortex-A{9,15} MPCore devices in the same header. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Thanks, C.

Re: [PATCH 08/33] hw/cpu/arm: Declare CPU QOM types using DEFINE_TYPES() macro

2024-01-02 Thread Cédric Le Goater
-by: Cédric Le Goater Thanks, C.

Re: [PATCH 07/33] hw/cpu/arm: Alias 'num-cpu' property on TYPE_REALVIEW_MPCORE

2024-01-02 Thread Cédric Le Goater
On 12/12/23 17:29, Philippe Mathieu-Daudé wrote: No need to duplicate and forward the 'num-cpu' property from TYPE_ARM11MPCORE_PRIV to TYPE_REALVIEW_MPCORE, alias it with QOM object_property_add_alias(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Thanks, C.

Re: [PATCH 06/33] hw/cpu/arm: Rename 'busdev' -> 'gicsbd' in a15mp_priv_realize()

2024-01-02 Thread Cédric Le Goater
-by: Cédric Le Goater Thanks, C.

Re: [PATCH 05/33] hw/cpu: Remove dead Kconfig

2024-01-02 Thread Cédric Le Goater
On 12/12/23 17:29, Philippe Mathieu-Daudé wrote: ARM MPCore Kconfig are defined in hw/arm/Kconfig. hw/cpu/Kconfig is never used, remove it. Fixes: 82f5181777 ("kconfig: introduce kconfig files") Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Thanks, C.

Re: [PATCH 04/33] hw/arm/fsl-imx7: Add a local 'gic' variable

2024-01-02 Thread Cédric Le Goater
On 12/12/23 17:29, Philippe Mathieu-Daudé wrote: The A7MPCore forward the IRQs from its internal GIC. To make the code clearer, add a 'gic' variable. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Thanks, C.

Re: [PATCH 03/33] hw/arm/fsl-imx6ul: Add a local 'gic' variable

2024-01-02 Thread Cédric Le Goater
On 12/12/23 17:29, Philippe Mathieu-Daudé wrote: The A7MPCore forward the IRQs from its internal GIC. To make the code clearer, add a 'gic' variable. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Thanks, C.

Re: [PATCH 02/33] hw/arm/fsl-imx6: Add a local 'gic' variable

2024-01-02 Thread Cédric Le Goater
On 12/12/23 17:29, Philippe Mathieu-Daudé wrote: The A9MPCore forward the IRQs from its internal GIC. To make the code clearer, add a 'gic' variable. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Thanks, C.

Re: [PATCH 01/33] hw/arm/boot: Propagate vCPU to arm_load_dtb()

2024-01-02 Thread Cédric Le Goater
On 12/12/23 17:29, Philippe Mathieu-Daudé wrote: In heterogeneous setup the first vCPU might not be the one expected, better pass it explicitly. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Thanks, C.

[PATCH 2/2] backends/iommufd: Remove mutex

2024-01-02 Thread Cédric Le Goater
BQL lock and it should be safe to drop the IOMMUFD backend mutex. Simply remove it. Fixes: CID 1531550 Fixes: CID 1531549 Signed-off-by: Cédric Le Goater --- include/sysemu/iommufd.h | 2 -- backends/iommufd.c | 7 --- 2 files changed, 9 deletions(-) diff --git a/include/sysemu/iommuf

[PATCH 0/2] backends/iommufd: Remove mutex

2024-01-02 Thread Cédric Le Goater
Hello ! Coverity has some reports regarding the IOMMUFDBackend mutex. Since the IOMMUFDBackend routines are called from the QEMU main thread, this series simply suggests removing the mutex and rely on the BQL to handle concurrent access. Thanks, C. Cédric Le Goater (2): backends/iommufd

[PATCH 1/2] backends/iommufd: Remove check on number of backend users

2024-01-02 Thread Cédric Le Goater
QOM already has a ref count on objects and it will assert much earlier, when INT_MAX is reached. Signed-off-by: Cédric Le Goater --- backends/iommufd.c | 5 - 1 file changed, 5 deletions(-) diff --git a/backends/iommufd.c b/backends/iommufd.c index ba58a0eb0d0ba9aae625c987eb728547543dba66

Re: [PATCH] vfio/migration: Add helper function to set state or reset device

2024-01-02 Thread Cédric Le Goater
On 12/31/23 11:48, Avihai Horon wrote: There are several places where failure in setting the device state leads to a device reset, which is done by setting ERROR as the recover state. Add a helper function that sets the device state and resets the device in case of failure. This will make the

Re: [PATCH] vfio/migration: Add helper function to set state or reset device

2024-01-02 Thread Cédric Le Goater
the code cleaner and remove duplicate comments. Signed-off-by: Avihai Horon Reviewed-by: Cédric Le Goater Thanks, C.

Re: [PATCH 1/2] hw/s390x/ccw: Replace basename() with g_path_get_basename()

2024-01-02 Thread Cédric Le Goater
], replace basename() with g_path_get_basename(). [1]: https://lore.kernel.org/all/20231212010228.2701544-1-raj.k...@gmail.com/ Suggested-by: Cédric Le Goater Signed-off-by: Zhao Liu Reviewed-by: Cédric Le Goater Thanks, C. --- Suggested by credit: Cédric: Referred his description

Re: [PATCH 2/2] hw/s390x/ccw: Replace dirname() with g_path_get_dirname()

2024-01-02 Thread Cédric Le Goater
g argument. Replace dirname() with g_path_get_dirname(). Suggested-by: Cédric Le Goater Signed-off-by: Zhao Liu Reviewed-by: Cédric Le Goater Thanks, C. --- Suggested by credit: Cédric: Referred his words for g_path_get_basename() and g_path_get_dirname() has the same advantage

Re: [PATCH] vfio/container: Rename vfio_init_container to vfio_set_iommu

2024-01-02 Thread Cédric Le Goater
'VFIOContainerBase *' ops. vfio_init_container() operates on legacy container and setup IOMMU context with ioctl(VFIO_SET_IOMMU). So choose to rename vfio_init_container to vfio_set_iommu to avoid the confusion. No functional change intended. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan

Re: [PATCH] vfio/iommufd: Remove the use of stat() to check file existence

2024-01-02 Thread Cédric Le Goater
On 12/21/23 09:09, Cédric Le Goater wrote: Using stat() before opening a file or a directory can lead to a time-of-check to time-of-use (TOCTOU) filesystem race, which is reported by coverity as a Security best practices violations. The sequence could be replaced by open and fdopendir

Re: [PATCH] hw/vfio: fix iteration over global VFIODevice list

2024-01-02 Thread Cédric Le Goater
On 1/2/24 05:27, Duan, Zhenzhong wrote: -Original Message- From: Volker Rümelin Subject: [PATCH] hw/vfio: fix iteration over global VFIODevice list Commit 3d779abafe ("vfio/common: Introduce a global VFIODevice list") introduced a global VFIODevice list, but forgot to update the

Re: [PATCH] hw/vfio: fix iteration over global VFIODevice list

2024-01-01 Thread Cédric Le Goater
ld. Fixes: 3d779abafe ("vfio/common: Introduce a global VFIODevice list") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2061 Signed-off-by: Volker Rümelin Reviewed-by: Cédric Le Goater Thanks, C. --- hw/vfio/common.c | 8 1 file changed, 4 insertions(+), 4 dele

Re: [PULL 20/47] backends/iommufd: Introduce the iommufd object

2023-12-22 Thread Cédric Le Goater
On 12/22/23 11:09, Eric Auger wrote: Hi Cédric, On 12/21/23 22:23, Cédric Le Goater wrote: On 12/21/23 18:14, Eric Auger wrote: Hi Cédric, On 12/21/23 17:00, Cédric Le Goater wrote: [ ... ] +static void iommufd_backend_init(Object *obj) +{ +    IOMMUFDBackend *be = IOMMUFD_BACKEND(obj

Re: [PULL 20/47] backends/iommufd: Introduce the iommufd object

2023-12-21 Thread Cédric Le Goater
On 12/21/23 18:14, Eric Auger wrote: Hi Cédric, On 12/21/23 17:00, Cédric Le Goater wrote: [ ... ] +static void iommufd_backend_init(Object *obj) +{ +    IOMMUFDBackend *be = IOMMUFD_BACKEND(obj); + +    be->fd = -1; +    be->users = 0; +    be->owned = true; +    qemu_mutex_i

Re: [PULL 20/47] backends/iommufd: Introduce the iommufd object

2023-12-21 Thread Cédric Le Goater
[ ... ] +static void iommufd_backend_init(Object *obj) +{ +IOMMUFDBackend *be = IOMMUFD_BACKEND(obj); + +be->fd = -1; +be->users = 0; +be->owned = true; +qemu_mutex_init(>lock);> +} + +static void iommufd_backend_finalize(Object *obj) +{ +IOMMUFDBackend *be =

Re: [PATCH] vfio/iommufd: Remove the use of stat() to check file existence

2023-12-21 Thread Cédric Le Goater
Hello Zhenzhong On 12/21/23 09:55, Duan, Zhenzhong wrote: -Original Message- From: Cédric Le Goater Sent: Thursday, December 21, 2023 4:10 PM Subject: [PATCH] vfio/iommufd: Remove the use of stat() to check file existence Using stat() before opening a file or a directory can lead

Re: [PATCH] vfio/container: Rename vfio_init_container to vfio_set_iommu

2023-12-21 Thread Cédric Le Goater
'VFIOContainerBase *' ops. vfio_init_container() operates on legacy container and setup IOMMU context with ioctl(VFIO_SET_IOMMU). So choose to rename vfio_init_container to vfio_set_iommu to avoid the confusion. No functional change intended. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan

Re: [PATCH v2 59/71] hw/vfio: Constify VMState

2023-12-21 Thread Cédric Le Goater
On 12/21/23 04:16, Richard Henderson wrote: Signed-off-by: Richard Henderson Reviewed-by: Cédric Le Goater I suppose you will include the patch in : https://lore.kernel.org/qemu-devel/20231221031652.119827-1-richard.hender...@linaro.org/ Thanks, C. --- hw/vfio/display.c | 2

[PATCH] vfio/iommufd: Remove the use of stat() to check file existence

2023-12-21 Thread Cédric Le Goater
opendir to avoid the race. Fixes: CID 1531551 Signed-off-by: Cédric Le Goater --- hw/vfio/iommufd.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/hw/vfio/iommufd.c b/hw/vfio/iommufd.c index d4c586e842def8f04d3a914843f5eece2c75ea30..9bfddc1360895413176a9f170e29e89027384a66 100644 --- a/hw

Re: [PATCH for-9.0 v2 00/10] vfio: Introduce a VFIOIOMMUClass

2023-12-21 Thread Cédric Le Goater
On 12/20/23 21:35, Eric Farman wrote: On Tue, 2023-12-19 at 07:58 +0100, Cédric Le Goater wrote: Hello, The VFIO object hierarchy has some constraints because each VFIO type has a dual nature: a VFIO nature for passthrough support and a bus nature (PCI, AP, CCW, Platform) for its initial

Re: [PATCH] vfio/container: Replace basename with g_path_get_basename

2023-12-20 Thread Cédric Le Goater
Hello, On 12/20/23 16:09, Zhao Liu wrote: Hi Cédric, On Wed, Dec 20, 2023 at 02:53:02PM +0100, Cédric Le Goater wrote: Date: Wed, 20 Dec 2023 14:53:02 +0100 From: Cédric Le Goater Subject: [PATCH] vfio/container: Replace basename with g_path_get_basename X-Mailer: git-send-email 2.43.0

Re: [PATCH] vfio/container: Replace basename with g_path_get_basename

2023-12-20 Thread Cédric Le Goater
On 12/20/23 14:53, Cédric Le Goater wrote: g_path_get_basename() is a portable utility function that has the advantage of not modifing the string argument. It also fixes a compile breakage with the Musl C library reported in [1]. [1] https://lore.kernel.org/all/20231212010228.2701544-1-raj.k

Re: [PATCH for-9.0 v2 00/10] vfio: Introduce a VFIOIOMMUClass

2023-12-20 Thread Cédric Le Goater
On 12/19/23 07:58, Cédric Le Goater wrote: Hello, The VFIO object hierarchy has some constraints because each VFIO type has a dual nature: a VFIO nature for passthrough support and a bus nature (PCI, AP, CCW, Platform) for its initial presentation. It seemed the best approach made because multi

[PATCH] vfio/container: Replace basename with g_path_get_basename

2023-12-20 Thread Cédric Le Goater
-off-by: Cédric Le Goater --- hw/vfio/container.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/vfio/container.c b/hw/vfio/container.c index 688cf23bab88f85246378bc5a7da3c51ea6b79d9..8d334f52f2438d05f632502e07ffd4dc2ec76cb5 100644 --- a/hw/vfio/container.c +++ b/hw

[PULL 03/47] vfio/container: Switch to dma_map|unmap API

2023-12-19 Thread Cédric Le Goater
From: Eric Auger No functional change intended. Signed-off-by: Eric Auger Signed-off-by: Yi Liu Signed-off-by: Yi Sun Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Signed-off-by: Cédric Le Goater --- include/hw/vfio/vfio-common.h | 4 --- include/hw/vfio/vfio

[PULL 44/47] vfio/ccw: Move VFIODevice initializations in vfio_ccw_instance_init

2023-12-19 Thread Cédric Le Goater
From: Zhenzhong Duan Some of the VFIODevice initializations is in vfio_ccw_realize, move all of them in vfio_ccw_instance_init. No functional change intended. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Eric Farman Tested

[PULL 36/47] vfio/ccw: Make vfio cdev pre-openable by passing a file handle

2023-12-19 Thread Cédric Le Goater
Goater Reviewed-by: Eric Farman Tested-by: Nicolin Chen Signed-off-by: Cédric Le Goater --- hw/vfio/ccw.c | 25 ++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c index d2d58bb677cfad38a6965ea6a43783256407207b

[PULL 29/47] vfio/pci: Allow the selection of a given iommu backend

2023-12-19 Thread Cédric Le Goater
Suggested-by: Alex Williamson Signed-off-by: Eric Auger Signed-off-by: Yi Liu Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Tested-by: Eric Auger Tested-by: Nicolin Chen Signed-off-by: Cédric Le Goater --- hw/vfio/pci.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw

[PULL 28/47] vfio/iommufd: Enable pci hot reset through iommufd cdev interface

2023-12-19 Thread Cédric Le Goater
From: Zhenzhong Duan Implement the newly introduced pci_hot_reset callback named iommufd_cdev_pci_hot_reset to do iommufd specific check and reset operation. Signed-off-by: Zhenzhong Duan Reviewed-by: Eric Auger Tested-by: Eric Auger Tested-by: Nicolin Chen Signed-off-by: Cédric Le Goater

[PULL 30/47] vfio/pci: Make vfio cdev pre-openable by passing a file handle

2023-12-19 Thread Cédric Le Goater
Cédric Le Goater Tested-by: Eric Auger Tested-by: Nicolin Chen Signed-off-by: Cédric Le Goater --- include/hw/vfio/vfio-common.h | 4 hw/vfio/helpers.c | 43 +++ hw/vfio/iommufd.c | 12 ++ hw/vfio/pci.c

[PULL 46/47] docs/devel: Add VFIO iommufd backend documentation

2023-12-19 Thread Cédric Le Goater
From: Zhenzhong Duan Suggested-by: Cédric Le Goater Signed-off-by: Eric Auger Signed-off-by: Yi Liu Signed-off-by: Zhenzhong Duan Tested-by: Nicolin Chen Signed-off-by: Cédric Le Goater --- MAINTAINERS| 1 + docs/devel/index-internals.rst | 1 + docs/devel/vfio

[PULL 39/47] kconfig: Activate IOMMUFD for s390x machines

2023-12-19 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan Reviewed-by: Matthew Rosato Reviewed-by: Eric Farman Tested-by: Nicolin Chen Signed-off-by: Cédric Le Goater --- hw/s390x/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/s390x/Kconfig b/hw/s390x/Kconfig index

<    5   6   7   8   9   10   11   12   13   14   >