Re: [PATCH v3] ui/gtk-clipboard: async owner_change clipboard_request

2023-11-14 Thread Marc-André Lureau
Hi On Wed, Oct 18, 2023 at 5:38 PM Edmund Raile wrote: > > Previous implementation of both functions was blocking and caused guest > freezes / crashes on host clipboard owner change. > * use callbacks instead of waiting for GTK to deliver >clipboard content type evaluation and contents > *

Re: [PATCH] migration: fix coverity migrate_mode finding

2023-11-14 Thread Fabiano Rosas
Steve Sistare writes: > Coverity diagnoses a possible out-of-range array index here ... > > static GSList *migration_blockers[MIG_MODE__MAX]; > > fill_source_migration_info() { > GSList *cur_blocker = migration_blockers[migrate_mode()]; > > ... because it does not know that

Re: [PATCH-for-9.0 07/10] sysemu/xen-mapcache: Check Xen availability with CONFIG_XEN_IS_POSSIBLE

2023-11-14 Thread Philippe Mathieu-Daudé
On 13/11/23 20:52, David Woodhouse wrote: On Mon, 2023-11-13 at 16:21 +0100, Philippe Mathieu-Daudé wrote: "sysemu/xen.h" defines CONFIG_XEN_IS_POSSIBLE as a target-agnostic version of CONFIG_XEN. Use it in order to use "sysemu/xen-mapcache.h" in target-agnostic files. Signed-off-by: Philippe

Re: [PATCH RFC v1 1/1] ui/sdl2: clipboard sharing implementation for SDL

2023-11-14 Thread BALATON Zoltan
On Tue, 14 Nov 2023, Marc-André Lureau wrote: Hi On Wed, Nov 8, 2023 at 7:56 PM Kamay Xutax wrote: Signed-off-by: Kamay Xutax --- include/ui/sdl2.h | 5 ++ meson.build | 1 + ui/meson.build | 1 + ui/sdl2-clipboard.c | 147

[PATCH v2] target/riscv: don't verify ISA compatibility for zicntr and zihpm

2023-11-14 Thread Clément Chigot
The extensions zicntr and zihpm were officially added in the privilege instruction set specification 1.12. However, QEMU has been implemented them long before it and thus they are forced to be on during the cpu initialization to ensure compatibility (see riscv_cpu_init).

Re: [PATCH for-8.2] accel/tcg: Remove CF_LAST_IO

2023-11-14 Thread Clément Chigot
Tested-by: Clément Chigot On Fri, Nov 10, 2023 at 6:08 PM Richard Henderson wrote: > > In cpu_exec_step_atomic, we did not set CF_LAST_IO, which can > lead to a loop with cpu_io_recompile. > > But since 18a536f1f8 ("Always require can_do_io") we no longer need > a flag to indicate when the last

[PATCH] qom/object: Limit type names to alphanumerical and some few special characters

2023-11-14 Thread Thomas Huth
QOM names currently don't have any enforced naming rules. This can be problematic, e.g. when they are used on the command line for the "-device" option (where the comma is used to separate properties). To avoid that such problematic type names come in again, let's restrict the set of acceptable

Re: [PATCH v5 12/14] tests: acpi: implement TPM CRB tests for ARM virt

2023-11-14 Thread Stefan Berger
On 11/14/23 04:36, Marc-André Lureau wrote: Hi On Tue, Nov 14, 2023 at 6:12 AM Joelle van Dyne wrote: Signed-off-by: Joelle van Dyne Reviewed-by: Stefan Berger nit: you also added tests for x86, could be a different patch? For arm, the test fails until next patch with: # starting

Re: [RFC PATCH 1/2] RISC-V: Add support for Ztso

2023-11-14 Thread Daniel Henrique Barboza
On 11/13/23 06:56, Christoph Muellner wrote: From: Palmer Dabbelt The Ztso extension is already ratified, this adds it as a CPU property and adds various fences throughout the port in order to allow TSO targets to function on weaker hosts. We need no fences for AMOs as they're already SC,

Re: [RFC PATCH] qom/object: Disallow comma in type names

2023-11-14 Thread Markus Armbruster
Thomas Huth writes: > Forgot to CC: qemu-devel (sorry) - thanks to Markus for the hint. > So let's repeat it here: > > On 14/11/2023 10.31, Daniel P. Berrangé wrote: >> On Tue, Nov 14, 2023 at 10:05:37AM +0100, Thomas Huth wrote: >>> QOM names currently don't have any enforced naming rules. This

Re: [PATCH v6 02/21] util/char_dev: Add open_cdev()

2023-11-14 Thread Cédric Le Goater
On 11/14/23 11:09, Zhenzhong Duan wrote: From: Yi Liu /dev/vfio/devices/vfioX may not exist. In that case it is still possible to open /dev/char/$major:$minor instead. Add helper function to abstract the cdev open. Suggested-by: Jason Gunthorpe Signed-off-by: Yi Liu Signed-off-by: Zhenzhong

Re: [PATCH v6 03/21] vfio/common: return early if space isn't empty

2023-11-14 Thread Cédric Le Goater
On 11/14/23 11:09, Zhenzhong Duan wrote: This is a trivial optimization. If there is active container in space, vfio_reset_handler will never be unregistered. So revert the check of space->containers and return early. Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Thanks, C.

Re: [PATCH for-8.2] accel/tcg: Remove CF_LAST_IO

2023-11-14 Thread Claudio Fontana
Reviewed-by: Claudio Fontana On 11/10/23 18:08, Richard Henderson wrote: > In cpu_exec_step_atomic, we did not set CF_LAST_IO, which can > lead to a loop with cpu_io_recompile. > > But since 18a536f1f8 ("Always require can_do_io") we no longer need > a flag to indicate when the last insn should

Re: [PATCH v6 08/21] vfio/pci: Introduce a vfio pci hot reset interface

2023-11-14 Thread Cédric Le Goater
On 11/14/23 11:09, Zhenzhong Duan wrote: Legacy vfio pci and iommufd cdev have different process to hot reset vfio device, expand current code to abstract out pci_hot_reset callback for legacy vfio, this same interface will also be used by iommufd cdev vfio device. Rename vfio_pci_hot_reset to

Re: [PATCH v6 15/21] vfio/ap: Make vfio cdev pre-openable by passing a file handle

2023-11-14 Thread Cédric Le Goater
On 11/14/23 11:09, Zhenzhong Duan wrote: This gives management tools like libvirt a chance to open the vfio cdev with privilege and pass FD to qemu. This way qemu never needs to have privilege to open a VFIO or iommu cdev node. Signed-off-by: Zhenzhong Duan Reviewed-by: Matthew Rosato

Re: [PATCH v6 14/21] vfio/ap: Allow the selection of a given iommu backend

2023-11-14 Thread Cédric Le Goater
On 11/14/23 11:09, Zhenzhong Duan wrote: Now we support two types of iommu backends, let's add the capability to select one of them. This depends on whether an iommufd object has been linked with the vfio-ap device: if the user wants to use the legacy backend, it shall not link the vfio-ap

[PATCH] tests/avocado/intel_iommu: Add asset hashes to avoid warnings

2023-11-14 Thread Thomas Huth
The intel_iommu test is currently succeeding with annoying warnings. Add the proper asset hashes to avoid those. Signed-off-by: Thomas Huth --- tests/avocado/intel_iommu.py | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/avocado/intel_iommu.py

[PATCH-for-9.0 v2 19/19] hw/xen: Have most of Xen files become target-agnostic

2023-11-14 Thread Philippe Mathieu-Daudé
Previous commits re-organized the target-specific bits from Xen files. We can now build the common files once instead of per-target. Only 4 files call libxen API (thus its CPPFLAGS): - xen-hvm-common.c, - xen_pt.c, xen_pt_graphics.c, xen_pt_msi.c Signed-off-by: Philippe Mathieu-Daudé ---

[PATCH-for-9.0 v2 18/19] hw/i386/xen: Compile 'xen-hvm.c' with Xen CPPFLAGS

2023-11-14 Thread Philippe Mathieu-Daudé
xen-hvm.c calls xc_set_hvm_param() from , so better compile it with Xen CPPFLAGS. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/xen/meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/i386/xen/meson.build b/hw/i386/xen/meson.build index

[PATCH-for-9.0 v2 12/19] hw/xen: Merge 'hw/xen/arch_hvm.h' in 'hw/xen/xen-hvm-common.h'

2023-11-14 Thread Philippe Mathieu-Daudé
We don't need a target-specific header for common target-specific prototypes. Declare xen_arch_handle_ioreq() and xen_arch_set_memory() in "hw/xen/xen-hvm-common.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Woodhouse Reviewed-by: Richard Henderson ---

Re: [PATCH-for-9.0 07/10] sysemu/xen-mapcache: Check Xen availability with CONFIG_XEN_IS_POSSIBLE

2023-11-14 Thread David Woodhouse
On Tue, 2023-11-14 at 13:25 +0100, Philippe Mathieu-Daudé wrote: > > As is CONFIG_XEN. > > Maybe be worth renaming CONFIG_ACCEL_XEN if you think we need > guest hw specific CONFIG_foo_XEN variables. I don't think so. We have CONFIG_XEN_BUS and CONFIG_XEN_EMU (from commit 820c1aba519b) which I

Re: [PATCH v6 04/21] vfio/iommufd: Implement the iommufd backend

2023-11-14 Thread Cédric Le Goater
On 11/14/23 11:09, Zhenzhong Duan wrote: From: Yi Liu Add the iommufd backend. The IOMMUFD container class is implemented based on the new /dev/iommu user API. This backend obviously depends on CONFIG_IOMMUFD. So far, the iommufd backend doesn't support dirty page sync yet due to missing

[PATCH] tests/avocado: Replace assertEquals() for Python 3.12 compatibility

2023-11-14 Thread Thomas Huth
assertEquals() has been removed in Python 3.12 and should be replaced by assertEqual(). See: https://docs.python.org/3.12/whatsnew/3.12.html#id3 Signed-off-by: Thomas Huth --- docs/devel/testing.rst | 2 +- tests/avocado/cpu_queries.py| 2 +-

Re: [PATCH v6 06/21] vfio/iommufd: Add support for iova_ranges and pgsizes

2023-11-14 Thread Cédric Le Goater
On 11/14/23 11:09, Zhenzhong Duan wrote: Some vIOMMU such as virtio-iommu use IOVA ranges from host side to setup reserved ranges for passthrough device, so that guest will not use an IOVA range beyond host support. Use an uAPI of IOMMUFD to get IOVA ranges of host side and pass to vIOMMU just

Re: [PATCH-for-9.0 07/10] sysemu/xen-mapcache: Check Xen availability with CONFIG_XEN_IS_POSSIBLE

2023-11-14 Thread Philippe Mathieu-Daudé
Cc'ing Paolo On 14/11/23 13:25, Philippe Mathieu-Daudé wrote: On 13/11/23 20:52, David Woodhouse wrote: On Mon, 2023-11-13 at 16:21 +0100, Philippe Mathieu-Daudé wrote: "sysemu/xen.h" defines CONFIG_XEN_IS_POSSIBLE as a target-agnostic version of CONFIG_XEN. Use it in order to use

Re: [PATCH v6 12/21] vfio/platform: Allow the selection of a given iommu backend

2023-11-14 Thread Cédric Le Goater
On 11/14/23 11:09, Zhenzhong Duan wrote: Now we support two types of iommu backends, let's add the capability to select one of them. This depends on whether an iommufd object has been linked with the vfio-platform device: If the user wants to use the legacy backend, it shall not link the

[PATCH-for-9.0 v2 07/19] hw/xen: Remove unnecessary xen_hvm_inject_msi() stub

2023-11-14 Thread Philippe Mathieu-Daudé
Since commit 04b0de0ee8 ("xen: factor out common functions") xen_hvm_inject_msi() stub is not required. Signed-off-by: Philippe Mathieu-Daudé --- stubs/xen-hw-stub.c | 4 1 file changed, 4 deletions(-) diff --git a/stubs/xen-hw-stub.c b/stubs/xen-hw-stub.c index 7d7ffe83a9..6cf0e9a4c1

[PATCH-for-9.0 v2 02/19] sysemu/xen: Forbid using Xen headers in user emulation

2023-11-14 Thread Philippe Mathieu-Daudé
Xen is a system specific accelerator, it makes no sense to include its headers in user emulation. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: David Woodhouse --- include/sysemu/xen.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff

[PATCH-for-9.0 v2 11/19] hw/xen/xen_arch_hvm: Rename prototypes using 'xen_arch_' prefix

2023-11-14 Thread Philippe Mathieu-Daudé
Use a common 'xen_arch_' prefix for architecture-specific functions. Rename xen_arch_set_memory() and xen_arch_handle_ioreq(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Woodhouse Reviewed-by: Richard Henderson --- include/hw/arm/xen_arch_hvm.h | 4 ++--

[RFC PATCH-for-9.0 v2 13/19] hw/xen: Remove use of 'target_ulong' in handle_ioreq()

2023-11-14 Thread Philippe Mathieu-Daudé
Per commit f17068c1c7 ("xen-hvm: reorganize xen-hvm and move common function to xen-hvm-common"), handle_ioreq() is expected to be target-agnostic. However it uses 'target_ulong', which is a target specific definition. Per xen/include/public/hvm/ioreq.h header: struct ioreq { uint64_t

[PATCH-for-9.0 v2 01/19] tests/avocado: Add 'guest:xen' tag to tests running Xen guest

2023-11-14 Thread Philippe Mathieu-Daudé
Add a tag to run all Xen-specific tests using: $ make check-avocado AVOCADO_TAGS='guest:xen' Signed-off-by: Philippe Mathieu-Daudé --- tests/avocado/boot_xen.py | 3 +++ tests/avocado/kvm_xen_guest.py | 1 + 2 files changed, 4 insertions(+) diff --git a/tests/avocado/boot_xen.py

[PATCH-for-9.0 v2 00/19] hw/xen: Have most of Xen files become target-agnostic

2023-11-14 Thread Philippe Mathieu-Daudé
Missing review: 4-10,13,16,18-19 Since v1: - Rework handle_ioreq() patch (Richard) - Call xen_enabled() and remove various stubs - Use QEMU_ALIGNED() in xen_blkif header - Rename ram_memory -> xen_memory - Have files using Xen API also use its CPPFLAGS - Add missing license - Added Avocado tag -

[PULL 3/3] target/s390x/arch_dump: Add arch cleanup function for PV dumps

2023-11-14 Thread Thomas Huth
From: Janosch Frank PV dumps block vcpu runs until dump end is reached. If there's an error between PV dump init and PV dump end the vm will never be able to run again. One example of such an error is insufficient disk space for the dump file. Let's add a cleanup function that tries to do a

[PULL 0/3] Fix s390x PV dumps in case of errors

2023-11-14 Thread Thomas Huth
The following changes since commit f78ea7ddb0e18766ece9fdfe02061744a7afc41b: Merge tag 'pull-request-2023-11-13' of https://gitlab.com/thuth/qemu into staging (2023-11-13 07:15:43 -0500) are available in the Git repository at: https://gitlab.com/thuth/qemu.git tags/pull-request-2023-11-14

[PULL 1/3] target/s390x/dump: Remove unneeded dump info function pointer init

2023-11-14 Thread Thomas Huth
From: Janosch Frank dump_state_prepare() now sets the function pointers to NULL so we only need to touch them if we're going to use them. Signed-off-by: Janosch Frank Reviewed-by: Marc-André Lureau Reviewed-by: Thomas Huth Message-ID: <20231109120443.185979-2-fran...@linux.ibm.com>

[PULL 2/3] dump: Add arch cleanup function

2023-11-14 Thread Thomas Huth
From: Janosch Frank Some architectures (s390x) need to cleanup after a failed dump to be able to continue to run the vm. Add a cleanup function pointer and call it if it's set. Signed-off-by: Janosch Frank Reviewed-by: Thomas Huth Reviewed-by: Marc-André Lureau Message-ID:

Re: [PATCH RFC v1 1/1] ui/sdl2: clipboard sharing implementation for SDL

2023-11-14 Thread Marc-André Lureau
Hi On Tue, Nov 14, 2023 at 4:27 PM BALATON Zoltan wrote: > > On Tue, 14 Nov 2023, Marc-André Lureau wrote: > > Hi > > > > On Wed, Nov 8, 2023 at 7:56 PM Kamay Xutax wrote: > >> > >> Signed-off-by: Kamay Xutax > >> --- > >> include/ui/sdl2.h | 5 ++ > >> meson.build | 1 + > >>

Re: [PATCH] qom/object: Limit type names to alphanumerical and some few special characters

2023-11-14 Thread Peter Maydell
On Tue, 14 Nov 2023 at 13:05, Thomas Huth wrote: > > QOM names currently don't have any enforced naming rules. This > can be problematic, e.g. when they are used on the command line > for the "-device" option (where the comma is used to separate > properties). To avoid that such problematic type

Re: [PATCH-for-9.0 04/10] hw/xen: Factor xen_arch_align_ioreq_data() out of handle_ioreq()

2023-11-14 Thread David Woodhouse
On Tue, 2023-11-14 at 08:58 +0100, Philippe Mathieu-Daudé wrote: > > > Reviewing quickly hw/block/dataplane/xen-block.c, this code doesn't > > > seem target specific at all IMHO. Otherwise I'd really expect it to > > > fail compiling. But I don't know much about Xen, so I'll let block & > > > xen

Re: [PATCH] tests/avocado: Replace assertEquals() for Python 3.12 compatibility

2023-11-14 Thread Thomas Huth
On 14/11/2023 15.10, Philippe Mathieu-Daudé wrote: Hi Thomas, On 14/11/23 14:43, Thomas Huth wrote: assertEquals() has been removed in Python 3.12 and should be replaced by assertEqual(). See: https://docs.python.org/3.12/whatsnew/3.12.html#id3 From this list I see assertEquals() has been

[PATCH-for-9.0 v2 08/19] hw/xen: Remove unused Xen stubs

2023-11-14 Thread Philippe Mathieu-Daudé
All these stubs are protected by a 'if (xen_enabled())' check. Signed-off-by: Philippe Mathieu-Daudé --- stubs/xen-hw-stub.c | 24 1 file changed, 24 deletions(-) diff --git a/stubs/xen-hw-stub.c b/stubs/xen-hw-stub.c index 6cf0e9a4c1..53c6a6f2a0 100644 ---

[PATCH] tests/avocado: Replace assertRegexpMatches() for Python 3.12 compatibility

2023-11-14 Thread Philippe Mathieu-Daudé
assertRegexpMatches() has been removed in Python 3.12 and should be replaced by assertRegex(). See: https://docs.python.org/3.12/whatsnew/3.12.html#id3 Inspired-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé --- docs/devel/testing.rst | 2 +- tests/avocado/version.py | 2 +- 2 files

[RFC PATCH 3/3] hw/cxl/cxl-mailbox-utils: Add device DDR5 ECS control feature

2023-11-14 Thread shiju . jose--- via
From: Shiju Jose CXL spec 3.1 section 8.2.9.9.11.2 describes the DDR5 Error Check Scrub (ECS) control feature. The Error Check Scrub (ECS) is a feature defined in JEDEC DDR5 SDRAM Specification (JESD79-5) and allows the DRAM to internally read, correct single-bit errors, and write back

[RFC PATCH 1/3] hw/cxl/cxl-mailbox-utils: Add support for feature commands (8.2.9.6)

2023-11-14 Thread shiju . jose--- via
From: Shiju Jose CXL spec 3.0 section 8.2.9.6 describes optional device specific features. CXL devices supports features with changeable attributes. Get Supported Features retrieves the list of supported device specific features. The settings of a feature can be retrieved using Get Feature and

[RFC PATCH 0/3] hw/cxl/cxl-mailbox-utils: Add feature commands, device patrol scrub control and DDR5 ECS control features

2023-11-14 Thread shiju . jose--- via
From: Shiju Jose Add support for the feature commands, device patrol scrub control and DDR5 ECS control features. CXL spec 3.0 section 8.2.9.6 describes optional device specific features. CXL spec 3.1 section 8.2.9.9.11.1 describes the device patrol scrub control feature. CXL spec 3.1 section

[RFC PATCH 2/3] hw/cxl/cxl-mailbox-utils: Add device patrol scrub control feature

2023-11-14 Thread shiju . jose--- via
From: Shiju Jose CXL spec 3.1 section 8.2.9.9.11.1 describes the device patrol scrub control feature. The device patrol scrub proactively locates and makes corrections to errors in regular cycle. The patrol scrub control allows the request to configure patrol scrub input configurations. The

Re: [RFC PATCH 2/2] RISC-V: Add support for Ssdtso

2023-11-14 Thread Daniel Henrique Barboza
On 11/13/23 06:56, Christoph Muellner wrote: From: Christoph Müllner The Ssdtso extension introduces a DTSO field to the {m,s,h}envcfg register to enable TSO at run-time. Building on top of Ztso support, this patch treates Ssdtso just like Ztso (always execute in TSO mode),

Re: [PATCH v6 10/21] vfio/pci: Allow the selection of a given iommu backend

2023-11-14 Thread Cédric Le Goater
On 11/14/23 11:09, Zhenzhong Duan wrote: From: Eric Auger Now we support two types of iommu backends, let's add the capability to select one of them. This depends on whether an iommufd object has been linked with the vfio-pci device: If the user wants to use the legacy backend, it shall not

Re: [PATCH v6 18/21] vfio: Make VFIOContainerBase poiner parameter const in VFIOIOMMUOps callbacks

2023-11-14 Thread Cédric Le Goater
On 11/14/23 11:09, Zhenzhong Duan wrote: Some of the callbacks in VFIOIOMMUOps pass VFIOContainerBase poiner, those callbacks only need read access to the sub object of VFIOContainerBase. So make VFIOContainerBase, VFIOContainer and VFIOIOMMUFDContainer as const in these callbacks. Local

Re: [PATCH v6 16/21] vfio/ccw: Allow the selection of a given iommu backend

2023-11-14 Thread Cédric Le Goater
On 11/14/23 11:09, Zhenzhong Duan wrote: Now we support two types of iommu backends, let's add the capability to select one of them. This depends on whether an iommufd object has been linked with the vfio-ccw device: If the user wants to use the legacy backend, it shall not link the vfio-ccw

Re: [PATCH v6 17/21] vfio/ccw: Make vfio cdev pre-openable by passing a file handle

2023-11-14 Thread Cédric Le Goater
On 11/14/23 11:09, Zhenzhong Duan wrote: This gives management tools like libvirt a chance to open the vfio cdev with privilege and pass FD to qemu. This way qemu never needs to have privilege to open a VFIO or iommu cdev node. Signed-off-by: Zhenzhong Duan Reviewed-by: Matthew Rosato

Re: [PATCH] tests/avocado: Replace assertEquals() for Python 3.12 compatibility

2023-11-14 Thread Philippe Mathieu-Daudé
Hi Thomas, On 14/11/23 14:43, Thomas Huth wrote: assertEquals() has been removed in Python 3.12 and should be replaced by assertEqual(). See: https://docs.python.org/3.12/whatsnew/3.12.html#id3 From this list I see assertEquals() has been deprecated in 3.2, along with assertRegexpMatches().

Re: [PATCH v6 13/21] vfio/platform: Make vfio cdev pre-openable by passing a file handle

2023-11-14 Thread Cédric Le Goater
On 11/14/23 11:09, Zhenzhong Duan wrote: This gives management tools like libvirt a chance to open the vfio cdev with privilege and pass FD to qemu. This way qemu never needs to have privilege to open a VFIO or iommu cdev node. Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater

Re: [PATCH v2 2/4] docs/system: Add vhost-user-input documentation

2023-11-14 Thread Leo Yan
Hi Marc-André, + Mathieu for vhost RNG stuff. On Tue, Nov 14, 2023 at 01:54:50PM +0400, Marc-André Lureau wrote: > Hi > > On Mon, Nov 13, 2023 at 11:04 PM Leo Yan wrote: [...] > > @@ -2233,6 +2233,7 @@ L: virtio...@redhat.com > > virtio-input > > M: Gerd Hoffmann > > S: Odd Fixes > > +F:

[PATCH-for-9.0 v2 16/19] hw/xen/xen_pt: Add missing license

2023-11-14 Thread Philippe Mathieu-Daudé
Commit eaab4d60d3 ("Introduce Xen PCI Passthrough, qdevice") introduced both xen_pt.[ch], but only added the license to xen_pt.c. Use the same license for xen_pt.h. Suggested-by: David Woodhouse Signed-off-by: Philippe Mathieu-Daudé --- hw/xen/xen_pt.h | 10 ++ 1 file changed, 10

Re: [PATCH] tests/avocado: Replace assertEquals() for Python 3.12 compatibility

2023-11-14 Thread Philippe Mathieu-Daudé
On 14/11/23 15:21, Thomas Huth wrote: On 14/11/2023 15.10, Philippe Mathieu-Daudé wrote: Hi Thomas, On 14/11/23 14:43, Thomas Huth wrote: assertEquals() has been removed in Python 3.12 and should be replaced by assertEqual(). See: https://docs.python.org/3.12/whatsnew/3.12.html#id3  From

[PATCH-for-9.0 v2 17/19] hw/xen: Extract 'xen_igd.h' from 'xen_pt.h'

2023-11-14 Thread Philippe Mathieu-Daudé
"hw/xen/xen_pt.h" requires "hw/xen/xen_native.h" which is target specific. It also declares IGD methods, which are not target specific. Target-agnostic code can use IGD methods. To allow that, extract these methos into a new "hw/xen/xen_igd.h" header. Signed-off-by: Philippe Mathieu-Daudé

[PATCH-for-9.0 v2 15/19] hw/xen: Reduce inclusion of 'cpu.h' to target-specific sources

2023-11-14 Thread Philippe Mathieu-Daudé
We rarely need to include "cpu.h" in headers. Including it 'taint' headers to be target-specific. Here only the i386/arm implementations requires "cpu.h", so include it there and remove from the "hw/xen/xen-hvm-common.h" *common* header. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard

Re: [PATCH] target/riscv: don't verify ISA compatibility for zicntr and zihpm

2023-11-14 Thread Daniel Henrique Barboza
(adding maintainers in the CC) On 11/14/23 06:44, Clément Chigot wrote: The extensions zicntr and zihpm were officially added in the privilege instruction set specification 1.12. However, QEMU has been implemented them long before it and thus they are forced to be on during the cpu

Re: [PATCH RFC v1 1/1] ui/sdl2: clipboard sharing implementation for SDL

2023-11-14 Thread Marc-André Lureau
Hi On Wed, Nov 8, 2023 at 7:56 PM Kamay Xutax wrote: > > Signed-off-by: Kamay Xutax > --- > include/ui/sdl2.h | 5 ++ > meson.build | 1 + > ui/meson.build | 1 + > ui/sdl2-clipboard.c | 147 > ui/sdl2.c | 8 +++ > 5

Re: [PATCH v6 01/21] backends/iommufd: Introduce the iommufd object

2023-11-14 Thread Cédric Le Goater
On 11/14/23 11:09, Zhenzhong Duan wrote: From: Eric Auger Introduce an iommufd object which allows the interaction with the host /dev/iommu device. The /dev/iommu can have been already pre-opened outside of qemu, in which case the fd can be passed directly along with the iommufd object: This

Re: [PULL 0/6] Biuld system and CI changes for 2023-11-10

2023-11-14 Thread Paolo Bonzini
Il dom 12 nov 2023, 13:06 Stefan Hajnoczi ha scritto: > On Sat, 11 Nov 2023 at 23:30, Paolo Bonzini wrote: > > > > The following changes since commit > ad6ef0a42e314a8c6ac6c96d5f6e607a1e5644b5: > > > > Merge tag 'for-upstream' of https://repo.or.cz/qemu/kevin into > staging (2023-11-09

Re: [PATCH v6 11/21] vfio/pci: Make vfio cdev pre-openable by passing a file handle

2023-11-14 Thread Cédric Le Goater
On 11/14/23 11:09, Zhenzhong Duan wrote: This gives management tools like libvirt a chance to open the vfio cdev with privilege and pass FD to qemu. This way qemu never needs to have privilege to open a VFIO or iommu cdev node. Together with the earlier support of pre-opening /dev/iommu device,

[PATCH-for-9.0 v2 03/19] sysemu/xen-mapcache: Check Xen availability with CONFIG_XEN_IS_POSSIBLE

2023-11-14 Thread Philippe Mathieu-Daudé
"sysemu/xen.h" defines CONFIG_XEN_IS_POSSIBLE as a target-agnostic version of CONFIG_XEN accelerator. Use it in order to use "sysemu/xen-mapcache.h" in target-agnostic files. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Woodhouse --- include/sysemu/xen-mapcache.h | 3 ++- 1 file

[PATCH-for-9.0 v2 06/19] hw/pci/msi: Restrict xen_is_pirq_msi() call to Xen

2023-11-14 Thread Philippe Mathieu-Daudé
Similarly to the restriction in hw/pci/msix.c (see commit e1e4bf2252 "msix: fix msix_vector_masked"), restrict the xen_is_pirq_msi() call in msi_is_masked() to Xen. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci/msi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH-for-9.0 v2 04/19] system/physmem: Do not include 'hw/xen/xen.h' but 'sysemu/xen.h'

2023-11-14 Thread Philippe Mathieu-Daudé
physmem.c doesn't use any declaration from "hw/xen/xen.h", it only requires "sysemu/xen.h" and "system/xen-mapcache.h". Suggested-by: David Woodhouse Signed-off-by: Philippe Mathieu-Daudé --- system/physmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/physmem.c

[PATCH-for-9.0 v2 10/19] hw/xen: Rename 'ram_memory' global variable as 'xen_memory'

2023-11-14 Thread Philippe Mathieu-Daudé
To avoid a potential global variable shadow in hw/i386/pc_piix.c::pc_init1(), rename Xen's "ram_memory" as "xen_memory". Signed-off-by: Philippe Mathieu-Daudé --- include/hw/xen/xen-hvm-common.h | 2 +- hw/arm/xen_arm.c| 6 +++--- hw/i386/xen/xen-hvm.c | 10

[RFC PATCH-for-9.0 v2 09/19] hw/block/xen_blkif: Align structs with QEMU_ALIGNED() instead of #pragma

2023-11-14 Thread Philippe Mathieu-Daudé
Except imported source files, QEMU code base uses the QEMU_ALIGNED() macro to align its structures. Signed-off-by: Philippe Mathieu-Daudé --- hw/block/xen_blkif.h | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hw/block/xen_blkif.h b/hw/block/xen_blkif.h index

[PATCH-for-9.0 v2 05/19] hw/display: Restrict xen_register_framebuffer() call to Xen

2023-11-14 Thread Philippe Mathieu-Daudé
Only call xen_register_framebuffer() when Xen is enabled. Signed-off-by: Philippe Mathieu-Daudé --- hw/display/vga.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/display/vga.c b/hw/display/vga.c index 37557c3442..f9cf3d6f77 100644 --- a/hw/display/vga.c +++

[PATCH-for-9.0 v2 14/19] hw/xen: Use target-agnostic qemu_target_page_bits()

2023-11-14 Thread Philippe Mathieu-Daudé
Instead of the target-specific TARGET_PAGE_BITS definition, use qemu_target_page_bits() which is target agnostic. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: David Woodhouse --- hw/xen/xen-hvm-common.c | 6 -- 1 file changed, 4 insertions(+), 2

RE: [PATCH v5 05/11] hw/arm: Add GMAC devices to NPCM7XX SoC

2023-11-14 Thread kft...@nuvoton.com
-Original Message- From: Nabih Estefan Sent: Saturday, October 28, 2023 1:55 AM To: peter.mayd...@linaro.org Cc: qemu-...@nongnu.org; qemu-devel@nongnu.org; CS20 KFTing ; wuhao...@google.com; jasonw...@redhat.com; IS20 Avi Fishman ; nabiheste...@google.com; CS20 KWLiu ; IS20 Tomer

Re: [PATCH v5 00/14] tpm: introduce TPM CRB SysBus device

2023-11-14 Thread Marc-André Lureau
Hi On Tue, Nov 14, 2023 at 6:10 AM Joelle van Dyne wrote: > > The impetus for this patch set is to get TPM 2.0 working on Windows 11 ARM64. > Windows' tpm.sys does not seem to work on a TPM TIS device (as verified with > VMWare's implementation). However, the current TPM CRB device uses a fixed

Re: [PATCH v4 26/41] backends/iommufd: Introduce the iommufd object

2023-11-14 Thread Cédric Le Goater
The only tool we have for configuring the schema is the 'if' conditional. 'if': 'CONFIG_IOMMUFD' compiles to #if defined(CONFIG_IOMMUFD) ... #endif. Your use of #ifdef CONFIG_IOMMUFD above suggests this is fine here. Symbols that are only defined in target-dependent compiles (see

[PATCH v3 2/4] Add RISC-V IOPMP support

2023-11-14 Thread Ethan Chen via
Support specification Version 1.0.0-draft4 rapid-k model. Signed-off-by: Ethan Chen --- hw/misc/Kconfig | 4 + hw/misc/meson.build | 1 + hw/misc/riscv_iopmp.c | 967 ++

[PATCH v3 3/4] hw/dma: Add Andes ATCDMAC300 support

2023-11-14 Thread Ethan Chen via
Signed-off-by: Ethan Chen --- hw/dma/Kconfig | 4 + hw/dma/atcdmac300.c | 566 hw/dma/meson.build | 1 + include/hw/dma/atcdmac300.h | 180 4 files changed, 751 insertions(+) create mode 100644

[PATCH v3 1/4] hw/core: Add config stream

2023-11-14 Thread Ethan Chen via
Make other device can use /hw/core/stream.c by select this config. Signed-off-by: Ethan Chen --- hw/core/Kconfig | 3 +++ hw/core/meson.build | 1 + 2 files changed, 4 insertions(+) diff --git a/hw/core/Kconfig b/hw/core/Kconfig index 9397503656..628dc3d883 100644 --- a/hw/core/Kconfig +++

[PATCH v3 4/4] hw/riscv/virt: Add IOPMP support

2023-11-14 Thread Ethan Chen via
- Add 'iopmp=on' option to enable a iopmp device and a dma device connect to the iopmp device - Add 'iopmp_cascade=on' option to enable iopmp cascading. Signed-off-by: Ethan Chen --- hw/riscv/Kconfig| 2 ++ hw/riscv/virt.c | 72 +++--

[PATCH v3 0/4] Support RISC-V IOPMP

2023-11-14 Thread Ethan Chen via
This series implements IOPMP specification v1.0.0-draft4 rapid-k model. When IOPMP is enabled, a DMA device ATCDMAC300 is added to RISC-V virt platform. This DMA devce is connected to the IOPMP and has the functionalities required by IOPMP, including: - Support specify source-id (SID) - Support

Re: Configuring migration

2023-11-14 Thread Juan Quintela
Markus Armbruster wrote: D> Cc: Paolo for QOM expertise. > > Peter Xu writes: > >> On Thu, Nov 02, 2023 at 03:25:25PM +0100, Markus Armbruster wrote: > > [...] > >>> Migration has its own idiosyncratic configuration interface, even though >>> its configuration needs are not special at all. This

Re: Configuring migration

2023-11-14 Thread Daniel P . Berrangé
On Tue, Nov 14, 2023 at 11:28:28AM +0100, Juan Quintela wrote: > Daniel P. Berrangé wrote: > > On Thu, Nov 02, 2023 at 03:25:25PM +0100, Markus Armbruster wrote: > >> Now let's try to apply this to migration. > >> > >> As long as we can have just one migration, we need just one QAPI object > >>

Re: Configuring migration

2023-11-14 Thread Juan Quintela
Daniel P. Berrangé wrote: > On Tue, Nov 14, 2023 at 11:28:28AM +0100, Juan Quintela wrote: >> Daniel P. Berrangé wrote: >> > On Thu, Nov 02, 2023 at 03:25:25PM +0100, Markus Armbruster wrote: >> >> Now let's try to apply this to migration. >> >> >> >> As long as we can have just one migration,

Re: Instruction virtual address in TCG Plugins

2023-11-14 Thread Alex Bennée
Mikhail Tyutin writes: >> > What is the right way to get virtual address of either translation block >> > or instruction inside of TCG plugin? Does >> > plugin API allow that or it needs some extension? >> > >> > So far I use qemu_plugin_tb_vaddr() inside of my block translation >> > callback

Re: [PATCH 0/2] Replace anti-social QOM type names (again)

2023-11-14 Thread Thomas Huth
On 14/11/2023 08.41, Markus Armbruster wrote: Cc: the other QOM maintainers Daniel P. Berrangé writes: On Mon, Nov 13, 2023 at 02:43:42PM +0100, Markus Armbruster wrote: We got rid of QOM type names containing ',' in 6.0, but some have crept back in. Replace them just like we did in 6.0.

RE: Instruction virtual address in TCG Plugins

2023-11-14 Thread Mikhail Tyutin
> > What is the right way to get virtual address of either translation block or > > instruction inside of TCG plugin? Does > > plugin API allow that or it needs some extension? > > > > So far I use qemu_plugin_tb_vaddr() inside of my block translation callback > > to get block virtual address

Re: Configuring migration (was: [PATCH v3 3/4] migration/qapi: Replace @MigrateSetParameters with @MigrationParameters)

2023-11-14 Thread Daniel P . Berrangé
On Thu, Nov 02, 2023 at 03:25:25PM +0100, Markus Armbruster wrote: > Now let's try to apply this to migration. > > As long as we can have just one migration, we need just one QAPI object > to configure it. > > We could create the object with -object / object_add. For convenience, > we'd probably

[PATCH] target/riscv: don't verify ISA compatibility for zicntr and zihpm

2023-11-14 Thread Clément Chigot
The extensions zicntr and zihpm were officially added in the privilege instruction set specification 1.12. However, QEMU has been implemented them long before it and thus they are forced to be on during the cpu initialization to ensure compatibility (see riscv_cpu_init).

Re: [PATCH v2 1/4] hw/virtio: Support set_config() callback in vhost-user-base

2023-11-14 Thread Marc-André Lureau
On Mon, Nov 13, 2023 at 11:04 PM Leo Yan wrote: > > The Virtio input device invokes set_config() callback for retrieving > the event configuration info, but the callback is not supported in > vhost-user-base. > > This patch adds support set_config() callback in vhost-user-base. > > Signed-off-by:

Re: [PATCH 0/2] Replace anti-social QOM type names (again)

2023-11-14 Thread Markus Armbruster
Thomas Huth writes: > On 14/11/2023 08.41, Markus Armbruster wrote: >> Cc: the other QOM maintainers >> Daniel P. Berrangé writes: >> >>> On Mon, Nov 13, 2023 at 02:43:42PM +0100, Markus Armbruster wrote: We got rid of QOM type names containing ',' in 6.0, but some have crept back

Re: Configuring migration

2023-11-14 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Thu, Nov 02, 2023 at 03:25:25PM +0100, Markus Armbruster wrote: >> Now let's try to apply this to migration. >> >> As long as we can have just one migration, we need just one QAPI object >> to configure it. >> >> We could create the object with -object /

[PATCH v6 11/21] vfio/pci: Make vfio cdev pre-openable by passing a file handle

2023-11-14 Thread Zhenzhong Duan
This gives management tools like libvirt a chance to open the vfio cdev with privilege and pass FD to qemu. This way qemu never needs to have privilege to open a VFIO or iommu cdev node. Together with the earlier support of pre-opening /dev/iommu device, now we have full support of passing a vfio

[PATCH v6 21/21] hw/i386: Activate IOMMUFD for q35 machines

2023-11-14 Thread Zhenzhong Duan
From: Cédric Le Goater Signed-off-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan --- hw/i386/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig index 55850791df..a1846be6f7 100644 --- a/hw/i386/Kconfig +++ b/hw/i386/Kconfig @@ -95,6 +95,7 @@

[PATCH v6 17/21] vfio/ccw: Make vfio cdev pre-openable by passing a file handle

2023-11-14 Thread Zhenzhong Duan
This gives management tools like libvirt a chance to open the vfio cdev with privilege and pass FD to qemu. This way qemu never needs to have privilege to open a VFIO or iommu cdev node. Signed-off-by: Zhenzhong Duan Reviewed-by: Matthew Rosato --- hw/vfio/ccw.c | 25 ++---

[PATCH v6 07/21] vfio/pci: Extract out a helper vfio_pci_get_pci_hot_reset_info

2023-11-14 Thread Zhenzhong Duan
This helper will be used by both legacy and iommufd backends. No functional changes intended. Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Signed-off-by: Cédric Le Goater --- hw/vfio/pci.h | 3 +++ hw/vfio/pci.c | 54 +++ 2

[PATCH v6 18/21] vfio: Make VFIOContainerBase poiner parameter const in VFIOIOMMUOps callbacks

2023-11-14 Thread Zhenzhong Duan
Some of the callbacks in VFIOIOMMUOps pass VFIOContainerBase poiner, those callbacks only need read access to the sub object of VFIOContainerBase. So make VFIOContainerBase, VFIOContainer and VFIOIOMMUFDContainer as const in these callbacks. Local functions called by those callbacks also need

[PATCH v6 10/21] vfio/pci: Allow the selection of a given iommu backend

2023-11-14 Thread Zhenzhong Duan
From: Eric Auger Now we support two types of iommu backends, let's add the capability to select one of them. This depends on whether an iommufd object has been linked with the vfio-pci device: If the user wants to use the legacy backend, it shall not link the vfio-pci device with any iommufd

[PATCH v6 15/21] vfio/ap: Make vfio cdev pre-openable by passing a file handle

2023-11-14 Thread Zhenzhong Duan
This gives management tools like libvirt a chance to open the vfio cdev with privilege and pass FD to qemu. This way qemu never needs to have privilege to open a VFIO or iommu cdev node. Signed-off-by: Zhenzhong Duan Reviewed-by: Matthew Rosato --- hw/vfio/ap.c | 23 ++- 1

[PATCH v6 09/21] vfio/iommufd: Enable pci hot reset through iommufd cdev interface

2023-11-14 Thread Zhenzhong Duan
Add a new callback iommufd_cdev_pci_hot_reset to do iommufd specific check and reset operation. Signed-off-by: Zhenzhong Duan --- v6: pci_hot_reset return -errno if fails hw/vfio/iommufd.c| 145 +++ hw/vfio/trace-events | 1 + 2 files changed, 146

[PATCH v6 12/21] vfio/platform: Allow the selection of a given iommu backend

2023-11-14 Thread Zhenzhong Duan
Now we support two types of iommu backends, let's add the capability to select one of them. This depends on whether an iommufd object has been linked with the vfio-platform device: If the user wants to use the legacy backend, it shall not link the vfio-platform device with any iommufd object:

[PATCH v6 20/21] kconfig: Activate IOMMUFD for s390x machines

2023-11-14 Thread Zhenzhong Duan
From: Cédric Le Goater Signed-off-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan Reviewed-by: Matthew Rosato --- hw/s390x/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/s390x/Kconfig b/hw/s390x/Kconfig index 4c068d7960..26ad104485 100644 --- a/hw/s390x/Kconfig +++

[PATCH 1/1] target/arm: enable FEAT_RNG on Neoverse-N2

2023-11-14 Thread Marcin Juszkiewicz
I noticed that Neoverse-V1 has FEAT_RNG enabled so let enable it also on Neoverse-N2. Signed-off-by: Marcin Juszkiewicz --- target/arm/tcg/cpu64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/tcg/cpu64.c b/target/arm/tcg/cpu64.c index 08db1dbcc7..fcda99e158

  1   2   3   4   5   >