Re: [RFC 1/2] iova_tree: add an id member to DMAMap

2024-05-02 Thread Eugenio Perez Martin
On Thu, May 2, 2024 at 1:16 AM Si-Wei Liu wrote: > > > > On 4/30/2024 10:19 AM, Eugenio Perez Martin wrote: > > On Tue, Apr 30, 2024 at 7:55 AM Si-Wei Liu wrote: > >> > >> > >> On 4/29/2024 1:14 AM, Eugenio Perez Martin wrote: > >>> On Thu, Apr 25, 2024 at 7:44 PM Si-Wei Liu wrote: > >

[PATCH] ppc/pnv: Update Power10's cfam id to use Power10 DD2

2024-05-02 Thread Aditya Gupta
Power10 DD1.0 was dropped in: commit 8f054d9ee825 ("ppc: Drop support for POWER9 and POWER10 DD1 chips") Use the newer Power10 DD2 chips cfam id. Cc: Cédric Le Goater Cc: David Gibson Cc: Frédéric Barrat Cc: Laurent Vivier Cc: Mahesh J Salgaonkar Cc: Madhavan Srinivasan Cc: Nicholas

Re: QEMU headers in C++

2024-05-02 Thread Thomas Huth
On 02/05/2024 06.40, Roman Kiryanov wrote: Hi QEMU, I work in Android Studio Emulator and we would like to develop devices in C++. Unfortunately, QEMU headers cannot be used with C++ as is (e.g. they use C++ keywords as variable names or implicitly cast void* to T*). Can't you simply use

Re: [RFC 1/2] iova_tree: add an id member to DMAMap

2024-05-02 Thread Eugenio Perez Martin
On Thu, May 2, 2024 at 12:09 AM Si-Wei Liu wrote: > > > > On 4/30/2024 11:11 AM, Eugenio Perez Martin wrote: > > On Mon, Apr 29, 2024 at 1:19 PM Jonah Palmer > > wrote: > >> > >> > >> On 4/29/24 4:14 AM, Eugenio Perez Martin wrote: > >>> On Thu, Apr 25, 2024 at 7:44 PM Si-Wei Liu wrote: >

Re: [PATCH v4 07/17] xen: mapcache: Refactor xen_replace_cache_entry_unlocked

2024-05-02 Thread Edgar E. Iglesias
On Wed, May 1, 2024 at 10:46 PM Stefano Stabellini wrote: > > On Tue, 30 Apr 2024, Edgar E. Iglesias wrote: > > From: "Edgar E. Iglesias" > > > > Add MapCache argument to xen_replace_cache_entry_unlocked in > > preparation for supporting multiple map caches. > > > > No functional change. > > > >

Re: [PATCH 1/2] ppc/pnv: Begin a more complete ADU LPC model for POWER9/10

2024-05-02 Thread Cédric Le Goater
On 5/1/24 14:39, Nicholas Piggin wrote: On Wed Apr 17, 2024 at 9:25 PM AEST, Cédric Le Goater wrote: Hello Nick, On 4/17/24 13:02, Nicholas Piggin wrote: This implements a framework for an ADU unit model. The ADU unit actually implements XSCOM, which is the bridge between MMIO and PIB.

Re: [PATCH] migration/rdma: Allow building without on-demand paging support

2024-05-02 Thread Daniel P . Berrangé
On Thu, May 02, 2024 at 11:05:47AM +0200, Philippe Mathieu-Daudé wrote: > On-demand paging support was added in libibverbs v1.2.0 in > commit https://github.com/linux-rdma/rdma-core/commit/e500adc7b1 That is 9 years old, so I'm surprised any distro we target still is so outdated. Can you say what

Re: [PATCH 14/14] docs: document special exception for machine type deprecation & removal

2024-05-02 Thread Thomas Huth
On 01/05/2024 20.27, Daniel P. Berrangé wrote: This extends the deprecation policy to indicate that versioned machine types will be marked deprecated after 3 years, and then subject to removal after a further 3 years has passed. Signed-off-by: Daniel P. Berrangé --- docs/about/deprecated.rst

Re: [PATCH 14/14] docs: document special exception for machine type deprecation & removal

2024-05-02 Thread Daniel P . Berrangé
On Thu, May 02, 2024 at 11:47:40AM +0200, Thomas Huth wrote: > On 01/05/2024 20.27, Daniel P. Berrangé wrote: > > This extends the deprecation policy to indicate that versioned machine > > types will be marked deprecated after 3 years, and then subject to > > removal after a further 3 years has

[PATCH v2 1/3] crypto: Remove 'crypto-tls-x509-helpers.h' from crypto-tls-psk-helpers.c

2024-05-02 Thread Philippe Mathieu-Daudé
crypto-tls-psk-helpers.c doesn't access the declarations of "crypto-tls-x509-helpers.h", remove the include line to avoid when building with GNUTLS but without Libtasn1: In file included from tests/unit/crypto-tls-psk-helpers.c:23: tests/unit/crypto-tls-x509-helpers.h:26:10: fatal error:

[PATCH v2 3/3] crypto: Allow building with GnuTLS but without Libtasn1

2024-05-02 Thread Philippe Mathieu-Daudé
We only use Libtasn1 in unit tests. As noted in commit d47b83b118 ("tests: add migration tests of TLS with x509 credentials"), having GnuTLS without Libtasn1 is a valid configuration, so do not require Libtasn1, to avoid: Dependency gnutls found: YES 3.7.1 (cached) Run-time dependency

[PATCH v2 2/3] crypto: Restrict pkix_asn1_tab[] to crypto-tls-x509-helpers.c

2024-05-02 Thread Philippe Mathieu-Daudé
pkix_asn1_tab[] is only accessed by crypto-tls-x509-helpers.c, rename pkix_asn1_tab.c as pkix_asn1_tab.c.inc and include it once. Signed-off-by: Philippe Mathieu-Daudé --- tests/unit/crypto-tls-x509-helpers.h| 3 --- tests/unit/crypto-tls-x509-helpers.c| 6 +-

Re: [PATCH 04/14] hw/ppc: convert 'spapr' machine definitions to use new macros

2024-05-02 Thread Thomas Huth
On 01/05/2024 20.27, Daniel P. Berrangé wrote: This changes the DEFINE_SPAPR_MACHINE macro to use the common helpers for constructing versioned symbol names and strings, bringing greater consistency across targets. The added benefit is that it avoids the need to repeat the version number twice

Re: [PATCH 13/14] hw/i386: remove obsolete manual deprecation reason string of i440fx machines

2024-05-02 Thread Daniel P . Berrangé
On Thu, May 02, 2024 at 02:08:58PM +0200, Thomas Huth wrote: > On 01/05/2024 20.27, Daniel P. Berrangé wrote: > > The automatic deprecation mechanism introduced in the preceeding patches > > will mark every i440fx machine upto and including 2.12 as deprecated. As > > such we can revert the

Re: [PATCH v4 14/17] xen: Add xen_mr_is_memory()

2024-05-02 Thread David Hildenbrand
On 30.04.24 18:49, Edgar E. Iglesias wrote: From: "Edgar E. Iglesias" Add xen_mr_is_memory() to abstract away tests for the xen_memory MR. Signed-off-by: Edgar E. Iglesias --- [...] #endif diff --git a/system/physmem.c b/system/physmem.c index ad7a8c7d95..1a5ffcba2a 100644 ---

Re: [PATCH v4 12/17] xen: mapcache: Unmap first entries in buckets

2024-05-02 Thread Edgar E. Iglesias
On Tue, Apr 30, 2024 at 6:50 PM Edgar E. Iglesias wrote: > > From: "Edgar E. Iglesias" > > When invalidating memory ranges, if we happen to hit the first > entry in a bucket we were never unmapping it. This was harmless > for foreign mappings but now that we're looking to reuse the > mapcache

Re: [PATCH v2] hw/s390x: Attach the sclpconsole to /machine/sclp/s390-sclp-event-facility

2024-05-02 Thread Cédric Le Goater
On 4/30/24 21:08, Thomas Huth wrote: The sclpconsole currently does not have a proper parent in the QOM tree, so it shows up under /machine/unattached - which is somewhat ugly. We should rather attach it to /machine/sclp/s390-sclp-event-facility where the other devices of type TYPE_SCLP_EVENT

Re: [PATCH] ppc/pnv: Update Power10's cfam id to use Power10 DD2

2024-05-02 Thread Cédric Le Goater
On 5/2/24 08:27, Aditya Gupta wrote: Power10 DD1.0 was dropped in: commit 8f054d9ee825 ("ppc: Drop support for POWER9 and POWER10 DD1 chips") Use the newer Power10 DD2 chips cfam id. Cc: Cédric Le Goater Cc: David Gibson Cc: Frédéric Barrat Cc: Laurent Vivier Cc: Mahesh J Salgaonkar

Re: [PATCH] crypto: Allow building with GnuTLS but without Libtasn1

2024-05-02 Thread Philippe Mathieu-Daudé
On 2/5/24 10:26, Daniel P. Berrangé wrote: On Thu, May 02, 2024 at 10:22:02AM +0200, Philippe Mathieu-Daudé wrote: On 2/5/24 10:11, Philippe Mathieu-Daudé wrote: We only use Libtasn1 in unit tests. As noted in commit d47b83b118 ("tests: add migration tests of TLS with x509 credentials"),

Re: [PATCH v2 04/15] hw/riscv: add riscv-iommu-pci device

2024-05-02 Thread Daniel Henrique Barboza
On 4/29/24 04:21, Frank Chang wrote: Daniel Henrique Barboza mailto:dbarb...@ventanamicro.com>> 於 2024年3月8日 週五 上午12:04寫道: > > From: Tomasz Jeznach mailto:tjezn...@rivosinc.com>> > > The RISC-V IOMMU can be modelled as a PCIe device following the > guidelines of the RISC-V IOMMU spec,

Re: [PATCH] migration/rdma: Allow building without on-demand paging support

2024-05-02 Thread Daniel P . Berrangé
On Thu, May 02, 2024 at 11:21:31AM +0200, Philippe Mathieu-Daudé wrote: > On 2/5/24 11:19, Philippe Mathieu-Daudé wrote: > > On 2/5/24 11:10, Daniel P. Berrangé wrote: > > > On Thu, May 02, 2024 at 11:05:47AM +0200, Philippe Mathieu-Daudé wrote: > > > > On-demand paging support was added in

[PATCH v2 0/3] crypto: Allow building with GnuTLS but without Libtasn1

2024-05-02 Thread Philippe Mathieu-Daudé
Since v1: - split in 3 - remove "crypto-tls-x509-helpers.h" (danpb) - include pkix_asn1_tab.c.inc Philippe Mathieu-Daudé (3): crypto: Remove 'crypto-tls-x509-helpers.h' from crypto-tls-psk-helpers.c crypto: Restrict pkix_asn1_tab[] to crypto-tls-x509-helpers.c crypto: Allow building

Re: [PATCH 09/14] hw: temporarily disable deletion of versioned machine types

2024-05-02 Thread Daniel P . Berrangé
On Thu, May 02, 2024 at 01:05:20PM +0200, Thomas Huth wrote: > On 01/05/2024 20.27, Daniel P. Berrangé wrote: > > The new deprecation and deletion policy for versioned machine types is > > being introduced in QEMU 9.1.0. > > > > Under the new policy a number of old machine types (any prior to

Re: [PATCH] target/arm: fix MPIDR value for ARM CPUs with SMT

2024-05-02 Thread Marcin Juszkiewicz
W dniu 19.04.2024 o 20:31, Dorjoy Chowdhury pisze: -uint64_t arm_build_mp_affinity(int idx, uint8_t clustersz) +uint64_t arm_build_mp_affinity(ARMCPU *cpu, int idx, uint8_t clustersz) { +if (cpu->has_smt) { +/* + * Right now, the ARM CPUs with SMT supported by QEMU only

Re: [PATCH v4 13/17] softmmu: Pass RAM MemoryRegion and is_write xen_map_cache()

2024-05-02 Thread Edgar E. Iglesias
On Thu, May 2, 2024 at 9:24 AM David Hildenbrand wrote: > > On 30.04.24 18:49, Edgar E. Iglesias wrote: > > From: "Edgar E. Iglesias" > > > > Propagate MR and is_write to xen_map_cache(). > > I'm pretty sure the patch subject is missing a "to" :) Thanks David! I'll fix it in v5! Cheers, Edgar

Re: [PATCH] mc146818rtc: add a way to generate RTC interrupts via QMP

2024-05-02 Thread Daniil Tatianin
On 4/29/24 4:39 PM, Philippe Mathieu-Daudé wrote: (+Peter who has more experience on such design). On 29/4/24 13:32, Markus Armbruster wrote: Philippe Mathieu-Daudé writes: Hi Daniil, Markus, On 26/4/24 10:39, Markus Armbruster wrote: Daniil Tatianin writes: This can be used to

[PATCH] MAINTAINERS: Update the reviewers for RDMA migration

2024-05-02 Thread Yu Zhang
As the links [1][2] below stated, QEMU development community is currently having some difficulties in maintaining the RDMA migration subsystem due to the lack of resources (maintainers, test cases, test environment etc.) and considering to deprecate it. According to our user experience in the

Re: [PATCH v3 11/19] backends/iommufd: Implement HostIOMMUDeviceClass::check_cap() handler

2024-05-02 Thread Cédric Le Goater
+static int hiod_iommufd_check_cap(HostIOMMUDevice *hiod, int cap, Error **errp) +{ +switch (cap) { +case HOST_IOMMU_DEVICE_CAP_IOMMUFD: +return 1; I don't understand this value. 1 means this host iommu device is attached to IOMMUFD backend, or else 0 if attached to legacy

Re: [PATCH] target/arm: fix MPIDR value for ARM CPUs with SMT

2024-05-02 Thread Peter Maydell
On Wed, 1 May 2024 at 19:08, Marcin Juszkiewicz wrote: > > W dniu 22.04.2024 o 17:21, Richard Henderson pisze: > >>> For Arm's CPUs they fall into two categories: > >>> * older ones don't set MT in their MPIDR, and the Aff0 > >>> field is effectively the CPU number > >>> * newer ones do

Re: [PATCH] MAINTAINERS: Update the reviewers for RDMA migration

2024-05-02 Thread Philippe Mathieu-Daudé
Hi, On 2/5/24 09:44, Yu Zhang wrote: As the links [1][2] below stated, QEMU development community is currently having some difficulties in maintaining the RDMA migration subsystem due to the lack of resources (maintainers, test cases, test environment etc.) and considering to deprecate it.

Re: [PATCH] migration/rdma: Allow building without on-demand paging support

2024-05-02 Thread Philippe Mathieu-Daudé
On 2/5/24 11:10, Daniel P. Berrangé wrote: On Thu, May 02, 2024 at 11:05:47AM +0200, Philippe Mathieu-Daudé wrote: On-demand paging support was added in libibverbs v1.2.0 in commit https://github.com/linux-rdma/rdma-core/commit/e500adc7b1 That is 9 years old, so I'm surprised any distro we

Re: [PATCH v3 00/13] exec: Rework around CPUState user fields (part 2)

2024-05-02 Thread Philippe Mathieu-Daudé
On 30/4/24 23:42, Ilya Leoshkevich wrote: On Tue, Apr 30, 2024 at 09:00:17PM +0200, Philippe Mathieu-Daudé wrote: On 30/4/24 20:45, Philippe Mathieu-Daudé wrote: Hi Ilya, On 30/4/24 19:55, Ilya Leoshkevich wrote: On Tue, Apr 30, 2024 at 02:27:54PM +0200, Philippe Mathieu-Daudé wrote:

Re: [PATCH] target/arm: fix MPIDR value for ARM CPUs with SMT

2024-05-02 Thread Peter Maydell
On Thu, 2 May 2024 at 10:11, Peter Maydell wrote: > On the QEMU side I guess we should strive to set up the MPIDR > fields to something plausibly matching the topology as defined > by the user on the command line. Unanswered questions: > > * I guess we need some kind of back-compat thing where

Re: [PATCH 08/14] include/hw: add macros for deprecation & removal of versioned machines

2024-05-02 Thread Thomas Huth
On 01/05/2024 20.27, Daniel P. Berrangé wrote: Versioned machines live for a long time to provide back compat for incoming migration and restore of saved images. To guide users away from usage of old machines, however, we want to deprecate any older than 3 years (equiv of 9 releases), and delete

Re: [PATCH 03/14] hw/s390x: convert 'ccw' machine definitions to use new macros

2024-05-02 Thread Thomas Huth
On 01/05/2024 20.27, Daniel P. Berrangé wrote: This changes the DEFINE_CCW_MACHINE macro to use the common helpers for constructing versioned symbol names and strings, bringing greater consistency across targets. The added benefit is that it avoids the need to repeat the version number twice in

Re: [PATCH] hw/input/tsc2005: Fix -Wchar-subscripts warning in tsc2005_txrx()

2024-05-02 Thread Peter Maydell
On Thu, 2 May 2024 at 08:42, Philippe Mathieu-Daudé wrote: > > Check the function index is not negative and use an unsigned > variable to avoid the following warning with GCC 13.2.0: > > [666/5358] Compiling C object libcommon.fa.p/hw_input_tsc2005.c.o > hw/input/tsc2005.c: In function

Re: [PATCH 02/14] hw/arm: convert 'virt' machine definitions to use new macros

2024-05-02 Thread Thomas Huth
On 01/05/2024 20.27, Daniel P. Berrangé wrote: This changes the DEFINE_VIRT_MACHINE macro to use the common helpers for constructing versioned symbol names and strings, bringing greater consistency across targets. Signed-off-by: Daniel P. Berrangé --- hw/arm/virt.c | 28

Re: xlnx-versal-virt machine in qemu

2024-05-02 Thread abhijeet rajmane
I am using the following command to boot "xlnx-versal-virt" board with "canbus" and connect it to host machine using "canbus" $ qemu-system-aarch64 -M xlnx-versal-virt -m 4G -serial mon:stdio -display none -kernel ~/linux_kernel/linux-5.15.157/arch/arm64/boot/Image \ -device

Re: [PATCH v4 15/17] xen: mapcache: Remove assumption of RAMBlock with 0 offset

2024-05-02 Thread Edgar E. Iglesias
On Wed, May 1, 2024 at 11:24 PM Stefano Stabellini wrote: > > On Tue, 30 Apr 2024, Edgar E. Iglesias wrote: > > From: "Edgar E. Iglesias" > > > > The current mapcache assumes that all memory is mapped > > in a single RAM MR (the first one with offset 0). Remove > > this assumption and propagate

Re: QEMU headers in C++

2024-05-02 Thread Daniel P . Berrangé
On Wed, May 01, 2024 at 09:40:16PM -0700, Roman Kiryanov wrote: > Hi QEMU, > > I work in Android Studio Emulator and we would like to develop devices > in C++. Unfortunately, QEMU headers cannot be used with C++ as is > (e.g. they use C++ keywords as variable names or implicitly cast void* > to

Re: [PATCH 2/2] ppc/pnv: Implement ADU access to LPC space

2024-05-02 Thread Cédric Le Goater
Hello Nick, diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index 5869aac89a..eb9dbc62dd 100644 --- a/hw/ppc/pnv.c +++ b/hw/ppc/pnv.c @@ -1642,6 +1642,8 @@ static void pnv_chip_power9_realize(DeviceState *dev, Error **errp) } /* ADU */ +object_property_set_link(OBJECT(>adu),

Re: [PATCH] migration/rdma: Allow building without on-demand paging support

2024-05-02 Thread Philippe Mathieu-Daudé
On 2/5/24 11:19, Philippe Mathieu-Daudé wrote: On 2/5/24 11:10, Daniel P. Berrangé wrote: On Thu, May 02, 2024 at 11:05:47AM +0200, Philippe Mathieu-Daudé wrote: On-demand paging support was added in libibverbs v1.2.0 in commit https://github.com/linux-rdma/rdma-core/commit/e500adc7b1 That

Re: [PATCH 01/14] include/hw: add helpers for defining versioned machine types

2024-05-02 Thread Thomas Huth
On 01/05/2024 20.27, Daniel P. Berrangé wrote: The various targets which define versioned machine types have a bunch of obfuscated macro code for defining unique function and variable names using string concatenation. This addes a couple of helpers to improve the clarity of such code macro.

Re: [PATCH 09/14] hw: temporarily disable deletion of versioned machine types

2024-05-02 Thread Thomas Huth
On 01/05/2024 20.27, Daniel P. Berrangé wrote: The new deprecation and deletion policy for versioned machine types is being introduced in QEMU 9.1.0. Under the new policy a number of old machine types (any prior to 2.12) would be liable for immediate deletion which would be a violation of our

Re: [PATCH] target/arm: fix MPIDR value for ARM CPUs with SMT

2024-05-02 Thread Peter Maydell
On Thu, 2 May 2024 at 11:56, Marcin Juszkiewicz wrote: > > W dniu 2.05.2024 o 12:37, Peter Maydell pisze: > >> * what are the constraints on the Aff* fields (eg that kernel > >> commit suggests Aff0 shouldn't be > 15)? > > > This one is apparently related to GICv3 -- if the GIC doesn't > >

Re: [PATCH 12/14] hw/ppc: remove obsolete manual deprecation reason string of spapr machines

2024-05-02 Thread Thomas Huth
On 01/05/2024 20.27, Daniel P. Berrangé wrote: The automatic deprecation mechanism introduced in the preceeding patches will mark every spapr machine upto and including 2.12 as deprecated. As such we can revert the manually added deprecation which was a subset: commit

Re: [PATCH v4 20/22] hw/i386/pc: Remove deprecated pc-i440fx-2.3 machine

2024-05-02 Thread Daniel P . Berrangé
On Tue, Apr 16, 2024 at 08:59:36PM +0200, Philippe Mathieu-Daudé wrote: > The pc-i440fx-2.3 machine was deprecated for the 8.2 > release (see commit c7437f0ddb "docs/about: Mark the > old pc-i440fx-2.0 - 2.3 machine types as deprecated"), > time to remove it. > > Signed-off-by: Philippe

Re: [PATCH v4 3/3] qapi: introduce device-sync-config

2024-05-02 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > On 30.04.24 11:31, Vladimir Sementsov-Ogievskiy wrote: >> On 30.04.24 11:19, Markus Armbruster wrote: >>> Vladimir Sementsov-Ogievskiy writes: >>> Add command to sync config from vhost-user backend to the device. It may be helpful when

Re: [PATCH v4 13/17] softmmu: Pass RAM MemoryRegion and is_write xen_map_cache()

2024-05-02 Thread David Hildenbrand
On 30.04.24 18:49, Edgar E. Iglesias wrote: From: "Edgar E. Iglesias" Propagate MR and is_write to xen_map_cache(). I'm pretty sure the patch subject is missing a "to" :) This is in preparation for adding support for grant mappings. No functional change. Reviewed-by: David Hildenbrand

Re: [PATCH] crypto: Allow building with GnuTLS but without Libtasn1

2024-05-02 Thread Daniel P . Berrangé
On Thu, May 02, 2024 at 10:22:02AM +0200, Philippe Mathieu-Daudé wrote: > On 2/5/24 10:11, Philippe Mathieu-Daudé wrote: > > We only use Libtasn1 in unit tests. As noted in commit d47b83b118 > > ("tests: add migration tests of TLS with x509 credentials"), having > > GnuTLS without Libtasn1 is a

Re: [PATCH v10 1/2] tpm: convert tpmdev options processing to new visitor format

2024-05-02 Thread Markus Armbruster
James Bottomley writes: > Instead of processing the tpmdev options using the old qemu options, > convert to the new visitor format which also allows the passing of > json on the command line. > > Signed-off-by: James Bottomley > Tested-by: Stefan Berger > Reviewed-by: Stefan Berger [...] >

Re: [PATCH v1 0/2] Upgrade ACPI SPCR table to support SPCR table version 4 format

2024-05-02 Thread Peter Maydell
On Thu, 2 May 2024 at 06:12, Sia Jee Heng wrote: > > Update the SPCR table to accommodate the SPCR Table version 4 [1]. > The SPCR table has been modified to adhere to the version 4 format [2]. > > Meanwhile, the virt SPCR golden reference files have been updated to > accommodate the SPCR Table

Re: [PATCH 05/14] hw/m68k: convert 'virt' machine definitions to use new macros

2024-05-02 Thread Thomas Huth
On 01/05/2024 20.27, Daniel P. Berrangé wrote: This changes the DEFINE_VIRT_MACHINE macro to use the common helpers for constructing versioned symbol names and strings, bringing greater consistency across targets. A DEFINE_VIRT_MACHINE_AS_LATEST helper is added so that it is not required to

Re: [PATCH v4 01/22] hw/i386/pc: Deprecate 2.4 to 2.12 pc-i440fx machines

2024-05-02 Thread Daniel P . Berrangé
On Tue, Apr 16, 2024 at 08:59:17PM +0200, Philippe Mathieu-Daudé wrote: > Similarly to the commit c7437f0ddb "docs/about: Mark the > old pc-i440fx-2.0 - 2.3 machine types as deprecated", > deprecate the 2.4 to 2.12 machines. > > Suggested-by: Thomas Huth > Signed-off-by: Philippe Mathieu-Daudé

Re: [PATCH V1 18/26] migration: cpr-exec-args parameter

2024-05-02 Thread Markus Armbruster
Steve Sistare writes: > Create the cpr-exec-args migration parameter, defined as a list of > strings. It will be used for cpr-exec migration mode in a subsequent > patch. > > No functional change, except that cpr-exec-args is shown by the > 'info migrate' command. > > Signed-off-by: Steve

Re: [PATCH V1 20/26] migration: cpr-exec mode

2024-05-02 Thread Markus Armbruster
Steve Sistare writes: > Add the cpr-exec migration mode. Usage: > qemu-system-$arch -machine memfd-alloc=on ... > migrate_set_parameter mode cpr-exec > migrate_set_parameter cpr-exec-args \ > ... -incoming > migrate -d > > The migrate command stops the VM, saves state to the

Re: [PATCH v2] hw/s390x: Attach the sclpconsole to /machine/sclp/s390-sclp-event-facility

2024-05-02 Thread Thomas Huth
On 02/05/2024 09.57, Cédric Le Goater wrote: On 4/30/24 21:08, Thomas Huth wrote: The sclpconsole currently does not have a proper parent in the QOM tree, so it shows up under /machine/unattached - which is somewhat ugly. We should rather attach it to /machine/sclp/s390-sclp-event-facility

Re: [PATCH] crypto: Allow building with GnuTLS but without Libtasn1

2024-05-02 Thread Philippe Mathieu-Daudé
On 2/5/24 10:11, Philippe Mathieu-Daudé wrote: We only use Libtasn1 in unit tests. As noted in commit d47b83b118 ("tests: add migration tests of TLS with x509 credentials"), having GnuTLS without Libtasn1 is a valid configuration, so do not require Libtasn1, to avoid: Dependency gnutls

[PATCH] migration/rdma: Allow building without on-demand paging support

2024-05-02 Thread Philippe Mathieu-Daudé
On-demand paging support was added in libibverbs v1.2.0 in commit https://github.com/linux-rdma/rdma-core/commit/e500adc7b1 We don't check the libibverbs, so add a meson check on the IBV_ACCESS_ON_DEMAND symbol, and define HAVE_IBV_ACCESS_ON_DEMAND if found. Restrict rdma_support_odp() so it

Re: [PATCH] migration/rdma: Allow building without on-demand paging support

2024-05-02 Thread Daniel P . Berrangé
On Thu, May 02, 2024 at 11:19:28AM +0200, Philippe Mathieu-Daudé wrote: > On 2/5/24 11:10, Daniel P. Berrangé wrote: > > On Thu, May 02, 2024 at 11:05:47AM +0200, Philippe Mathieu-Daudé wrote: > > > On-demand paging support was added in libibverbs v1.2.0 in > > > commit

Re: [PATCH v3 06/19] range: Introduce range_get_last_bit()

2024-05-02 Thread Cédric Le Goater
On 4/30/24 11:58, Duan, Zhenzhong wrote: -Original Message- From: Cédric Le Goater Subject: Re: [PATCH v3 06/19] range: Introduce range_get_last_bit() On 4/29/24 08:50, Zhenzhong Duan wrote: This helper get the highest 1 bit position of the upper bound. If the range is empty or

Re: [PATCH 10/14] hw: set deprecation info for all versioned machine types

2024-05-02 Thread Thomas Huth
On 01/05/2024 20.27, Daniel P. Berrangé wrote: This calls the MACHINE_VER_DEPRECATION() macro in the definition of all machine type classes which support versioning. This ensures that they will automatically get deprecation info set when they reach the appropriate point in their lifecycle.

Re: [PATCH v2 03/15] hw/riscv: add RISC-V IOMMU base emulation

2024-05-02 Thread Frank Chang
Hi Daniel, Daniel Henrique Barboza 於 2024年3月8日 週五 上午12:04寫道: > > From: Tomasz Jeznach > > The RISC-V IOMMU specification is now ratified as-per the RISC-V > international process. The latest frozen specifcation can be found > at: > >

Re: [PATCH 11/14] hw: skip registration of outdated versioned machine types

2024-05-02 Thread Thomas Huth
On 01/05/2024 20.27, Daniel P. Berrangé wrote: This calls the MACHINE_VER_DELETION() macro in the machine type registration method, so that when a versioned machine type reaches the end of its life, it is no longer registered with QOM and thus cannot be used. The actual definition of the

Re: [PATCH 13/14] hw/i386: remove obsolete manual deprecation reason string of i440fx machines

2024-05-02 Thread Thomas Huth
On 01/05/2024 20.27, Daniel P. Berrangé wrote: The automatic deprecation mechanism introduced in the preceeding patches will mark every i440fx machine upto and including 2.12 as deprecated. As such we can revert the manually added deprecation which was a subset: commit

Re: [PATCH 1/3] target/riscv: Save counter values during countinhibit update

2024-05-02 Thread Andrew Jones
On Tue, Apr 30, 2024 at 03:00:45PM GMT, Daniel Henrique Barboza wrote: > > > On 4/29/24 16:28, Atish Patra wrote: > > Currently, if a counter monitoring cycle/instret is stopped via > > mcountinhibit we just update the state while the value is saved > > during the next read. This is not accurate

[PATCH] hw/input/tsc2005: Fix -Wchar-subscripts warning in tsc2005_txrx()

2024-05-02 Thread Philippe Mathieu-Daudé
Check the function index is not negative and use an unsigned variable to avoid the following warning with GCC 13.2.0: [666/5358] Compiling C object libcommon.fa.p/hw_input_tsc2005.c.o hw/input/tsc2005.c: In function 'tsc2005_timer_tick': hw/input/tsc2005.c:416:26: warning: array subscript

[PATCH] crypto: Allow building with GnuTLS but without Libtasn1

2024-05-02 Thread Philippe Mathieu-Daudé
We only use Libtasn1 in unit tests. As noted in commit d47b83b118 ("tests: add migration tests of TLS with x509 credentials"), having GnuTLS without Libtasn1 is a valid configuration, so do not require Libtasn1, to avoid: Dependency gnutls found: YES 3.7.1 (cached) Run-time dependency

Re: [PATCH] crypto: Allow building with GnuTLS but without Libtasn1

2024-05-02 Thread Philippe Mathieu-Daudé
On 2/5/24 11:26, Philippe Mathieu-Daudé wrote: On 2/5/24 10:26, Daniel P. Berrangé wrote: On Thu, May 02, 2024 at 10:22:02AM +0200, Philippe Mathieu-Daudé wrote: On 2/5/24 10:11, Philippe Mathieu-Daudé wrote: We only use Libtasn1 in unit tests. As noted in commit d47b83b118 ("tests: add

Re: [PATCH 2/3] vfio/migration: Emit VFIO device migration state change QAPI event

2024-05-02 Thread Joao Martins
On 01/05/2024 13:28, Avihai Horon wrote: > > On 01/05/2024 14:50, Joao Martins wrote: >> External email: Use caution opening links or attachments >> >> >> On 30/04/2024 06:16, Avihai Horon wrote: >>> Emit VFIO device migration state change QAPI event when a VFIO device >>> changes its migration

[PATCH v2] MAINTAINERS: Update the reviewers for RDMA migration

2024-05-02 Thread Yu Zhang
As the links [1][2] below stated, QEMU development community is currently having some difficulties in maintaining the RDMA migration subsystem due to the lack of resources (maintainers, test cases, test environment etc.) and considering to deprecate it. According to our user experience in the

Re: [PATCH] target/arm: fix MPIDR value for ARM CPUs with SMT

2024-05-02 Thread Marcin Juszkiewicz
W dniu 2.05.2024 o 12:37, Peter Maydell pisze: * what are the constraints on the Aff* fields (eg that kernel commit suggests Aff0 shouldn't be > 15)? This one is apparently related to GICv3 -- if the GIC doesn't implement RangeSelector support in ICC_SGI0R_EL1 and other places

Re: [PATCH 1/3] qapi/vfio: Add VFIO device migration state change QAPI event

2024-05-02 Thread Markus Armbruster
Avihai Horon writes: > Add a new QAPI event for VFIO device migration state change. This event > will be emitted when a VFIO device changes its migration state, for > example, during migration or when stopping/starting the guest. > > This event can be used by management applications to get

Re: [PATCH v3 3/6] migration: Remove 'blk/-b' option from migrate commands

2024-05-02 Thread Markus Armbruster
Fabiano Rosas writes: > The block migration is considered obsolete and has been deprecated in > 8.2. Remove the migrate command option that enables it. This only > affects the QMP and HMP commands, the feature can still be accessed by > setting the migration 'block' capability. The whole feature

[PATCH 0/3] s390x: Simplify SCLPDevice usage

2024-05-02 Thread Cédric Le Goater
Hello, Here is a little series reworking the SCLPDevice initialization in the machine to simplify its use. Applies on top of : https://lore.kernel.org/qemu-devel/20240430190843.453903-1-th...@redhat.com/ Thanks, C. Cédric Le Goater (3): s390x: Introduce a SCLPDevice pointer under the

Re: [PATCH-for-9.1 v2 2/3] migration: Remove RDMA protocol handling

2024-05-02 Thread Jinpu Wang
Hi Michael, Hi Peter, On Thu, May 2, 2024 at 3:23 PM Michael Galaxy wrote: > > Yu Zhang / Jinpu, > > Any possibility (at your lesiure, and within the disclosure rules of > your company, IONOS) if you could share any of your performance > information to educate the group? > > NICs have indeed

Re: [PATCH v3 3/6] migration: Remove 'blk/-b' option from migrate commands

2024-05-02 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > Fabiano Rosas writes: > > > The block migration is considered obsolete and has been deprecated in > > 8.2. Remove the migrate command option that enables it. This only > > affects the QMP and HMP commands, the feature can still be accessed by > >

Re: [PATCH v3 00/13] exec: Rework around CPUState user fields (part 2)

2024-05-02 Thread Philippe Mathieu-Daudé
On 2/5/24 12:27, Philippe Mathieu-Daudé wrote: On 30/4/24 23:42, Ilya Leoshkevich wrote: On Tue, Apr 30, 2024 at 09:00:17PM +0200, Philippe Mathieu-Daudé wrote: On 30/4/24 20:45, Philippe Mathieu-Daudé wrote: Hi Ilya, On 30/4/24 19:55, Ilya Leoshkevich wrote: On Tue, Apr 30, 2024 at

RE: [PATCH] hw/display: Add SSD1306 dot matrix display controller support

2024-05-02 Thread Ryan Mamone
I saw the patch failed to be applied so figured the email mangled it. I sent another email of the patch as plain text so hopefully that will work better. Sorry for the duplicate submission but I didn't have this email thread yet to respond to. How would you like to continue this discussion

[PATCH] ui/cocoa.m: Drop old macOS-10.12-and-earlier compat ifdefs

2024-05-02 Thread Peter Maydell
We only support the most recent two versions of macOS (currently macOS 13 Ventura and macOS 14 Sonoma), and our ui/cocoa.m code already assumes at least macOS 12 Monterey or better, because it uses NSScreen safeAreaInsets, which is 12.0-or-newer. Remove the ifdefs that were providing backwards

Re: [PATCH v3] Hexagon: add PC alignment check and exception

2024-05-02 Thread Matheus Tavares Bernardino
On Tue, 30 Apr 2024 08:52:36 -0700 Richard Henderson wrote: > > On 4/30/24 07:25, Matheus Tavares Bernardino wrote: > > +void test_multi_cof(void) > > +{ > > +asm volatile( > > +"p0 = cmp.eq(r0, r0)\n" > > +"{\n" > > +"if (p0) jump test_multi_cof_unaligned\n" > >

Re: [PATCH 01/14] include/hw: add helpers for defining versioned machine types

2024-05-02 Thread Eric Blake
On Wed, May 01, 2024 at 07:27:46PM +0100, Daniel P. Berrangé wrote: > The various targets which define versioned machine types have > a bunch of obfuscated macro code for defining unique function > and variable names using string concatenation. > > This addes a couple of helpers to improve the

Re: QEMU headers in C++

2024-05-02 Thread Paolo Bonzini
On 5/2/24 10:02, Daniel P. Berrangé wrote: Hi QEMU, I work in Android Studio Emulator and we would like to develop devices in C++. Unfortunately, QEMU headers cannot be used with C++ as is (e.g. they use C++ keywords as variable names or implicitly cast void* to T*). NB, in recent past QEMU

[PATCH v2] bitmap: Use g_try_new0/g_renew

2024-05-02 Thread Paolo Bonzini
Avoids an explicit use of sizeof(). The GLib allocation macros ensure that the multiplication by the size of the element uses the right type and does not overflow. While at it, change bitmap_new() to use g_new0 directly. Its current impl of calling bitmap_try_new() followed by a plain abort()

[PATCH ats_vtd v1 17/24] intel_iommu: implement the get_memory_region_pasid iommu operation

2024-05-02 Thread CLEMENT MATHIEU--DRIF
Signed-off-by: Clément Mathieu--Drif --- hw/i386/intel_iommu.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index e9fa48b378..a62cbf303d 100644 --- a/hw/i386/intel_iommu.c +++ b/hw/i386/intel_iommu.c @@ -6000,9 +6000,24 @@

[PATCH ats_vtd v1 20/24] atc: generic ATC that can be used by PCIe devices that support SVM

2024-05-02 Thread CLEMENT MATHIEU--DRIF
As the SVM-capable devices will need to cache translations, we provide an first implementation. This cache uses a two-level design based on hash tables. The first level is indexed by a PASID and the second by a virtual addresse. Signed-off-by: Clément Mathieu--Drif --- tests/unit/meson.build |

[PATCH ats_vtd v1 21/24] memory: add an API for ATS support

2024-05-02 Thread CLEMENT MATHIEU--DRIF
IOMMU have to implement iommu_ats_request_translation to support ATS. Devices can use IOMMU_TLB_ENTRY_TRANSLATION_ERROR to check the tlb entries returned by a translation request. Signed-off-by: Clément Mathieu--Drif --- include/exec/memory.h | 26 ++ system/memory.c

[PATCH ats_vtd v1 12/24] intel_iommu: add support for PASID-based device IOTLB invalidation

2024-05-02 Thread CLEMENT MATHIEU--DRIF
Signed-off-by: Clément Mathieu--Drif --- hw/i386/intel_iommu.c | 42 ++ hw/i386/intel_iommu_internal.h | 10 2 files changed, 47 insertions(+), 5 deletions(-) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index

[PATCH ats_vtd v1 15/24] pci: add a pci-level initialization function for iommu notifiers

2024-05-02 Thread CLEMENT MATHIEU--DRIF
We add a convenient way to initialize an device-iotlb notifier. This is meant to be used by ATS-capable devices. pci_device_iommu_memory_region_pasid is introduces in this commit and will be used in several other SVM-related functions exposed in the PCI API. Signed-off-by: Clément Mathieu--Drif

[PATCH ats_vtd v1 23/24] intel_iommu: set the address mask even when a translation fails

2024-05-02 Thread CLEMENT MATHIEU--DRIF
Implements the behavior defined in section 10.2.3.5 of PCIe spec rev 5. This is needed by devices that support ATS. Signed-off-by: Clément Mathieu--Drif --- hw/i386/intel_iommu.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/i386/intel_iommu.c

Re: [PATCH-for-9.1 v2 2/3] migration: Remove RDMA protocol handling

2024-05-02 Thread Peter Xu
On Thu, May 02, 2024 at 03:30:58PM +0200, Jinpu Wang wrote: > Hi Michael, Hi Peter, > > > On Thu, May 2, 2024 at 3:23 PM Michael Galaxy wrote: > > > > Yu Zhang / Jinpu, > > > > Any possibility (at your lesiure, and within the disclosure rules of > > your company, IONOS) if you could share any

Re: [PATCH] target/arm: fix MPIDR value for ARM CPUs with SMT

2024-05-02 Thread Peter Maydell
On Thu, 2 May 2024 at 14:50, Marcin Juszkiewicz wrote: > Both hw/arm/sbsa-ref.c and hw/arm/virt.c build cpu information in > DeviceTree using "arm_build_mp_afinnity()" function. So if firmware > parses it then it gets wrong values. What wrong values? The values in the dtb should match the Aff*

[PATCH ats_vtd v1 22/24] pci: add a pci-level API for ATS

2024-05-02 Thread CLEMENT MATHIEU--DRIF
Devices implementing ATS can send translation requests using pci_ats_request_translation_pasid. The invalidation events are sent back to the device using the iommu notifier managed with pci_register_iommu_tlb_event_notifier and pci_unregister_iommu_tlb_event_notifier Signed-off-by: Clément

[PATCH ats_vtd v1 18/24] memory: Allow to store the PASID in IOMMUTLBEntry

2024-05-02 Thread CLEMENT MATHIEU--DRIF
This will be useful for devices that support ATS Signed-off-by: Clément Mathieu--Drif --- include/exec/memory.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/exec/memory.h b/include/exec/memory.h index 304504de02..f4b33415d7 100644 --- a/include/exec/memory.h +++

[PATCH ats_vtd v1 02/24] intel_iommu: make types match

2024-05-02 Thread CLEMENT MATHIEU--DRIF
The 'level' field in vtd_iotlb_key is an uint8_t. We don't need to store level as an int in vtd_lookup_iotlb (avoids a 'loosing precision' warning). VTDIOTLBPageInvInfo.mask is used in binary operations with addresses. Signed-off-by: Clément Mathieu--Drif --- hw/i386/intel_iommu.c | 2

[PATCH ats_vtd v1 07/24] memory: add permissions in IOMMUAccessFlags

2024-05-02 Thread CLEMENT MATHIEU--DRIF
This will be necessary for devices implementing ATS. We also define a new macro IOMMU_ACCESS_FLAG_FULL in addition to IOMMU_ACCESS_FLAG to support more access flags. IOMMU_ACCESS_FLAG is kept for convenience and backward compatibility. Here are the flags added (defined by the PCIe 5

Re: [PATCH] target/arm: fix MPIDR value for ARM CPUs with SMT

2024-05-02 Thread Dorjoy Chowdhury
On Thu, May 2, 2024 at 6:14 PM Marcin Juszkiewicz wrote: > > W dniu 19.04.2024 o 20:31, Dorjoy Chowdhury pisze: > > -uint64_t arm_build_mp_affinity(int idx, uint8_t clustersz) > > +uint64_t arm_build_mp_affinity(ARMCPU *cpu, int idx, uint8_t clustersz) > > { > > +if (cpu->has_smt) { > > +

[PATCH v5] xlnx_dpdma: fix descriptor endianness bug

2024-05-02 Thread Alexandra Diupina
Add xlnx_dpdma_read_descriptor() and xlnx_dpdma_write_descriptor() functions. xlnx_dpdma_read_descriptor() combines reading a descriptor from desc_addr by calling dma_memory_read() and swapping the desc fields from guest memory order to host memory order. xlnx_dpdma_write_descriptor() performs

Re: [PATCH] bitmap: Use g_try_new0/g_renew

2024-05-02 Thread Daniel P . Berrangé
On Thu, May 02, 2024 at 04:23:16PM +0200, Paolo Bonzini wrote: > Avoids an explicit use of sizeof(). The GLib allocation macros > ensure that the multiplication by the size of the element > uses the right type and does not overflow. > > Cc: qemu-triv...@nongnu.org > Cc: Roman Kiryanov > Cc:

Re: QEMU headers in C++

2024-05-02 Thread Warner Losh
On Thu, May 2, 2024 at 12:20 AM Thomas Huth wrote: > On 02/05/2024 06.40, Roman Kiryanov wrote: > > Hi QEMU, > > > > I work in Android Studio Emulator and we would like to develop devices > > in C++. Unfortunately, QEMU headers cannot be used with C++ as is > > (e.g. they use C++ keywords as

  1   2   3   >