[PATCH] hmp/migration: Fix documents for "migrate" command

2024-05-02 Thread Peter Xu
Peter missed the Sphinx HMP document for the "resume/-r" flag in commit 7a4da28b26 ("qmp: hmp: add migrate "resume" option"). Add it. Avoid adding a Fixes to make life easier for the stable maintainer. When at it, slightly cleanup the lines, move "detach/-d" to a separate section rather than

Re: [PATCH v2] bitmap: Use g_try_new0/g_renew

2024-05-02 Thread Daniel P . Berrangé
On Thu, May 02, 2024 at 05:22:42PM +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. > > While at it, change bitmap_new() to use g_new0 directly.

[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

[PATCH ats_vtd v1 04/24] intel_iommu: set accessed and dirty bits during first stage translation

2024-05-02 Thread CLEMENT MATHIEU--DRIF
Signed-off-by: Clément Mathieu--Drif --- hw/i386/intel_iommu.c | 26 ++ hw/i386/intel_iommu_internal.h | 3 +++ 2 files changed, 29 insertions(+) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index 240ecb8f72..cad70e0d05 100644 ---

[PATCH ats_vtd v1 10/24] intel_iommu: declare supported PASID size

2024-05-02 Thread CLEMENT MATHIEU--DRIF
Signed-off-by: Clément Mathieu--Drif --- hw/i386/intel_iommu.c | 2 +- hw/i386/intel_iommu_internal.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index c475a354a0..98c4a70fe0 100644 --- a/hw/i386/intel_iommu.c +++

[PATCH ats_vtd v1 19/24] intel_iommu: fill the PASID field when creating an instance of IOMMUTLBEntry

2024-05-02 Thread CLEMENT MATHIEU--DRIF
Signed-off-by: Clément Mathieu--Drif --- hw/i386/intel_iommu.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index a62cbf303d..02c5f0fa4f 100644 --- a/hw/i386/intel_iommu.c +++ b/hw/i386/intel_iommu.c @@ -2302,6 +2302,7 @@ out:

[PATCH ats_vtd v1 06/24] intel_iommu: do not consider wait_desc as an invalid descriptor

2024-05-02 Thread CLEMENT MATHIEU--DRIF
Signed-off-by: Clément Mathieu--Drif --- hw/i386/intel_iommu.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index 85a7ebac67..c475a354a0 100644 --- a/hw/i386/intel_iommu.c +++ b/hw/i386/intel_iommu.c @@ -3365,6 +3365,11 @@ static bool

[PATCH ats_vtd v1 08/24] pcie: add helper to declare PASID capability for a pcie device

2024-05-02 Thread CLEMENT MATHIEU--DRIF
Signed-off-by: Clément Mathieu--Drif --- hw/pci/pcie.c | 24 include/hw/pci/pcie.h | 6 +- include/hw/pci/pcie_regs.h | 3 +++ 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c index

[PATCH ats_vtd v1 14/24] pci: add IOMMU operations to get address spaces and memory regions with PASID

2024-05-02 Thread CLEMENT MATHIEU--DRIF
Signed-off-by: Clément Mathieu--Drif --- hw/pci/pci.c | 20 include/hw/pci/pci.h | 34 ++ 2 files changed, 54 insertions(+) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index e5f72f9f1d..9ed788c95d 100644 --- a/hw/pci/pci.c +++

[PATCH ats_vtd v1 11/24] intel_iommu: add an internal API to find an address space with PASID

2024-05-02 Thread CLEMENT MATHIEU--DRIF
This will be used to implement the device IOTLB invalidation Signed-off-by: Clément Mathieu--Drif --- hw/i386/intel_iommu.c | 39 --- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index

[PATCH ats_vtd v1 01/24] intel_iommu: fix FRCD construction macro.

2024-05-02 Thread CLEMENT MATHIEU--DRIF
The constant must be unsigned, otherwise the two's complement overrides the other fields when a PASID is present Signed-off-by: Clément Mathieu--Drif --- hw/i386/intel_iommu_internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/intel_iommu_internal.h

[PATCH ats_vtd v1 09/24] pcie: helper functions to check if PASID and ATS are enabled

2024-05-02 Thread CLEMENT MATHIEU--DRIF
ats_enabled and pasid_enabled check whether the capabilities are present or not. If so, we read the configuration space to get the status of the feature (enabled or not). Signed-off-by: Clément Mathieu--Drif --- hw/pci/pcie.c | 18 ++ include/hw/pci/pcie.h | 3 +++ 2

[PATCH ats_vtd v1 05/24] intel_iommu: extract device IOTLB invalidation logic

2024-05-02 Thread CLEMENT MATHIEU--DRIF
This piece of code can be shared by both IOTLB invalidation and PASID-based IOTLB invalidation Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Clément Mathieu--Drif --- hw/i386/intel_iommu.c | 57 +-- 1 file changed, 33 insertions(+), 24 deletions(-)

[PATCH ats_vtd v1 24/24] intel_iommu: add support for ATS

2024-05-02 Thread CLEMENT MATHIEU--DRIF
Signed-off-by: Clément Mathieu--Drif --- hw/i386/intel_iommu.c | 75 -- hw/i386/intel_iommu_internal.h | 1 + 2 files changed, 73 insertions(+), 3 deletions(-) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index aac7677063..400b27fc95

[PATCH ats_vtd v1 00/24] ATS support for VT-d

2024-05-02 Thread CLEMENT MATHIEU--DRIF
This series belongs to a list of series that add SVM support for VT-d. As a starting point, we use the series called 'intel_iommu: Enable stage-1 translation' (rfc2) by Zhenzhong Duan and Yi Liu. Here we focus on the implementation of ATS support in the IOMMU and on a PCI-level API for ATS to

[PATCH ats_vtd v1 03/24] intel_iommu: check if the input address is canonical

2024-05-02 Thread CLEMENT MATHIEU--DRIF
First stage translation must fail if the address to translate is not canonical. Signed-off-by: Clément Mathieu--Drif --- hw/i386/intel_iommu.c | 22 ++ hw/i386/intel_iommu_internal.h | 2 ++ 2 files changed, 24 insertions(+) diff --git a/hw/i386/intel_iommu.c

[PATCH ats_vtd v1 16/24] intel_iommu: implement the get_address_space_pasid iommu operation

2024-05-02 Thread CLEMENT MATHIEU--DRIF
Signed-off-by: Clément Mathieu--Drif --- hw/i386/intel_iommu.c | 13 ++--- include/hw/i386/intel_iommu.h | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index e7c1a5582a..e9fa48b378 100644 ---

[PATCH ats_vtd v1 13/24] pci: cache the bus mastering status in the device

2024-05-02 Thread CLEMENT MATHIEU--DRIF
Signed-off-by: Clément Mathieu--Drif --- hw/pci/pci.c| 24 ++-- include/hw/pci/pci_device.h | 1 + 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 045d69f4c1..e5f72f9f1d 100644 --- a/hw/pci/pci.c +++

[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

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

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

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.

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

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

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

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

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

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

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

[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

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

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*

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.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

<    1   2   3   >