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 t

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

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 --- a/system/

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

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 for

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

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

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 alr

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 where

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

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

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 ba

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

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 val

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(&chip9->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 [...] > d

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

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

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

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

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 tar

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 ve

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 is

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"), having

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

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 migrat

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 pas

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 libibve

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

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

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

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

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 https://github.com/linux-rdm

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 st

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

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 upp

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

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

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 fo

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

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

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

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

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 update

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: > > https://github.com/riscv-non-isa/riscv-iommu/releases/download

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

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

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 i

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 pass

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 machine

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

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

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

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

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 have

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 manually

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 Sistar

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

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

Re: [PATCH] target/loongarch/kvm: Fix VM recovery from disk failures

2024-05-02 Thread Fabiano Rosas
Peter Xu writes: > On Tue, Apr 30, 2024 at 11:00:24AM -0300, Fabiano Rosas wrote: >> Philippe Mathieu-Daudé writes: >> >> > (Cc'ing migration maintainers) >> > >> > On 30/4/24 03:23, Song Gao wrote: >> >> vmstate does not save kvm_state_conter, >> >> which can cause VM recovery from disk to fai

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

2024-05-02 Thread Peter Maydell
On Tue, 30 Apr 2024 at 21:01, Ryan Mamone wrote: > > From 617b2d92085d03524dcf5c223568a4856cdff47f Mon Sep 17 00:00:00 2001 > > From: Ryan Mamone > > Date: Tue, 30 Apr 2024 13:20:50 -0400 > > Subject: [PATCH] hw/display: Add SSD1306 dot matrix display controller support Hi; thanks for this patch

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) { > > +

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

2024-05-02 Thread Marcin Juszkiewicz
W dniu 2.05.2024 o 15:04, Dorjoy Chowdhury pisze: Should "return" also have "(1 << 24) |" to have MT=1 set? Otherwise MPIDR_EL1 = 0x000100 can mean core0 in cluster1 or core1 in cluster0. Value 0x1000100 shows MT=1 so thread0 in core1 in cluster0. I don't know all the details but from what I

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:11, Marcin Juszkiewicz wrote: > > W dniu 2.05.2024 o 15:04, Dorjoy Chowdhury pisze: > >> Should "return" also have "(1 << 24) |" to have MT=1 set? > >> > >> Otherwise MPIDR_EL1 = 0x000100 can mean core0 in cluster1 or core1 in > >> cluster0. > >> > >> Value 0x1000100 shows

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

[PATCH 1/3] s390x: Introduce a SCLPDevice pointer under the machine

2024-05-02 Thread Cédric Le Goater
Initialize directly SCLPDevice from the machine init handler and remove s390_sclp_init(). We will use the SCLPDevice pointer later to create the consoles. Signed-off-by: Cédric Le Goater --- include/hw/s390x/s390-virtio-ccw.h | 3 +++ include/hw/s390x/sclp.h| 2 -- hw/s390x/s390-vi

[PATCH 3/3] s390x/sclp: Simplify get_sclp_device()

2024-05-02 Thread Cédric Le Goater
get_sclp_device() scans the whole machine to find a TYPE_SCLP object. Now that the SCLPDevice instance is available under the machine state, use it to simplify the lookup. While at it, remove the inline to let the compiler decide on how to optimize. Signed-off-by: Cédric Le Goater --- hw/s390x/s

[PATCH 2/3] s390x/event-facility: Simplify sclp_get_event_facility_bus()

2024-05-02 Thread Cédric Le Goater
sclp_get_event_facility_bus() scans the whole machine to find a TYPE_SCLP_EVENTS_BUS object. The SCLPDevice instance is now available under the machine state, use it to simplify the lookup and adjust the creation of the consoles. Signed-off-by: Cédric Le Goater --- include/hw/s390x/event-facilit

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

2024-05-02 Thread Michael Galaxy
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 changed, but not everybody has 100ge mellanox cards at their disposal. Some people don't.

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 cha

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

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 02:27:54P

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

2024-05-02 Thread Marcin Juszkiewicz
W dniu 2.05.2024 o 15:13, Peter Maydell pisze: On Thu, 2 May 2024 at 14:11, Marcin Juszkiewicz wrote: W dniu 2.05.2024 o 15:04, Dorjoy Chowdhury pisze: Should "return" also have "(1 << 24) |" to have MT=1 set? Otherwise MPIDR_EL1 = 0x000100 can mean core0 in cluster1 or core1 in cluster0. V

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

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 movin

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

[PATCH] 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. Cc: qemu-triv...@nongnu.org Cc: Roman Kiryanov Cc: Daniel Berrange Signed-off-by: Paolo Bonzini --- include/qemu/bitmap.h | 12 ++

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

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

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

2024-05-02 Thread Daniel P . Berrangé
On Thu, May 02, 2024 at 03:29:04PM +0100, Peter Maydell wrote: > 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

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

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

2024-05-02 Thread Peter Xu
On Thu, May 02, 2024 at 01:35:06PM +, Dr. David Alan Gilbert wrote: > * 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 onl

[PATCH v4] Hexagon: add PC alignment check and exception

2024-05-02 Thread Matheus Tavares Bernardino
The Hexagon Programmer's Reference Manual says that the exception 0x1e should be raised upon an unaligned program counter. Let's implement that and also add some tests. Signed-off-by: Matheus Tavares Bernardino Reviewed-by: Richard Henderson --- v3: https://lore.kernel.org/qemu-devel/5c90567ec2

Re: [PATCH v6 0/5] Support message-based DMA in vfio-user server

2024-05-02 Thread John Levon
On Wed, Nov 01, 2023 at 06:16:06AM -0700, Mattias Nissler wrote: > This series adds basic support for message-based DMA in qemu's vfio-user Now qemu 9.0 is out, any reason not to get this series merged? thanks john

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 cla

Re: [PATCH v6 0/5] Support message-based DMA in vfio-user server

2024-05-02 Thread Peter Xu
On Thu, May 02, 2024 at 03:57:25PM +0100, John Levon wrote: > On Wed, Nov 01, 2023 at 06:16:06AM -0700, Mattias Nissler wrote: > > > This series adds basic support for message-based DMA in qemu's vfio-user > > Now qemu 9.0 is out, any reason not to get this series merged? It looks like all patch

Re: QEMU headers in C++

2024-05-02 Thread Peter Maydell
On Thu, 2 May 2024 at 09:02, Daniel P. Berrangé wrote: > > 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. 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 ex

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

[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

  1   2   3   >