Re: [PATCH v7 10/16] i386/cpu: Introduce cluster-id to X86CPU

2024-01-18 Thread Zhao Liu
On Wed, Jan 17, 2024 at 12:40:12AM +0800, Xiaoyao Li wrote: > Date: Wed, 17 Jan 2024 00:40:12 +0800 > From: Xiaoyao Li > Subject: Re: [PATCH v7 10/16] i386/cpu: Introduce cluster-id to X86CPU > > On 1/15/2024 11:18 PM, Zhao Liu wrote: > > Hi Xiaoyao, > > > > On Mon, Jan 15, 2024 at 03:45:58PM +0

RE: [PATCH rfcv1 1/6] backends/iommufd_device: introduce IOMMUFDDevice

2024-01-18 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Subject: Re: [PATCH rfcv1 1/6] backends/iommufd_device: introduce >IOMMUFDDevice > > > >On 1/15/24 11:13, Zhenzhong Duan wrote: >> IOMMUFDDevice represents a device in iommufd and can be used as >> a communication interface between devices (i.e., VF

RE: [PATCH rfcv1 3/6] intel_iommu: add set/unset_iommu_device callback

2024-01-18 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Subject: Re: [PATCH rfcv1 3/6] intel_iommu: add set/unset_iommu_device >callback > > > >On 1/18/24 09:43, Duan, Zhenzhong wrote: >> >>> -Original Message- >>> From: Eric Auger >>> Subject: Re: [PATCH rfcv1 3/6] intel_iommu: add >set/unset_i

Re: [PATCH] target/i386: Add new CPU model SierraForest

2024-01-18 Thread Tao Su
Kindly ping for any comments. Thanks, Tao

Re: [PATCH v2] tests/docker: Add sqlite3 module to openSUSE Leap container

2024-01-18 Thread Michael Tokarev
Sorry for the previous dummy post, - hit the wrong button :) 17.01.2024 19:42, Fabiano Rosas : Avocado needs sqlite3: --- a/tests/docker/dockerfiles/opensuse-leap.docker +++ b/tests/docker/dockerfiles/opensuse-leap.docker @@ -90,6 +90,7 @@ RUN zypper update -y && \ pcre-devel-sta

Re: [PATCH v2] tests/docker: Add sqlite3 module to openSUSE Leap container

2024-01-18 Thread Michael Tokarev
python311-setuptools \ diff --git a/tests/lcitool/mappings.yml b/tests/lcitool/mappings.yml index 0b908882f1..407c03301b 100644 --- a/tests/lcitool/mappings.yml +++ b/tests/lcitool/mappings.yml @@ -59,6 +59,10 @@ mappings: CentOSStream8: OpenSUSELeap15: + python3-s

RE: [RFC 4/7] virtio-iommu: Implement PCIIOMMUOps set_host_resv_regions

2024-01-18 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Subject: Re: [RFC 4/7] virtio-iommu: Implement PCIIOMMUOps >set_host_resv_regions > >Hi Zhenzhong, >On 1/18/24 08:43, Duan, Zhenzhong wrote: >> Hi Eric, >> >>> -Original Message- >>> From: Eric Auger >>> Subject: [RFC 4/7] virtio-iommu: Imp

Why invtsc (CPUID_APM_INVTSC) is unmigratable?

2024-01-18 Thread Xiaoyao Li
I'm wondering why CPUID_APM_INVTSC is set as unmigratable_flags. Could anyone explain it? When the host supports invtsc, it can be exposed to guest. When the src VM has invtsc exposed, what will forbid it to be migrated to a dest that also supports VMs with invtsc exposed?

RE: [RFC 0/7] VIRTIO-IOMMU/VFIO: Fix host iommu geometry handling for hotplugged devices

2024-01-18 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Subject: Re: [RFC 0/7] VIRTIO-IOMMU/VFIO: Fix host iommu geometry >handling for hotplugged devices > >Hi Zhenzhong, >On 1/18/24 08:10, Duan, Zhenzhong wrote: >> Hi Eric, >> >>> -Original Message- >>> From: Eric Auger >>> Cc: m...@redhat.com

RE: FW: [PATCH] vhost-user: add VIRTIO_F_IN_ORDER and VIRTIO_F_NOTIFICATION_DATA feature

2024-01-18 Thread Wentao Jia
VIRTIO_F_IN_ORDER and VIRTIO_F_NOTIFICATION_DATA feature are important feature for dpdk vdpa packets transmitting performance, add the 2 features at vhost-user front-end to negotiation with backend. Signed-off-by: Kyle Xu Signed-off-by: Wentao Jia Reviewed-by: Xinying Yu Reviewed-by: Shuji

Re: [PATCH 1/2] ppc/spapr: change pseries machine default to POWER10 CPU

2024-01-18 Thread Harsh Prateek Bora
On 1/18/24 19:44, Nicholas Piggin wrote: POWER10 is the latest pseries CPU. Signed-off-by: Nicholas Piggin Reviewed-by: Harsh Prateek Bora --- hw/ppc/spapr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index e8dabc8614..021b1a00

Re: [PATCH v4 3/3] ci: Disable migration compatibility tests for aarch64

2024-01-18 Thread Peter Xu
On Thu, Jan 18, 2024 at 01:49:51PM -0300, Fabiano Rosas wrote: > Until 9.0 is out, we need to keep the aarch64 job disabled because the > tests always use the n-1 version of migration-test. That happens to be > broken for aarch64 in 8.2. Once 9.0 is out, it will become the n-1 > version and it will

Re: [PATCH v2 1/2] target/riscv: Convert sdtrig functionality from property to an extension

2024-01-18 Thread Anup Patel
On Wed, Jan 17, 2024 at 7:54 PM Himanshu Chauhan wrote: > > The debug trigger (sdtrig) capability is controlled using the debug property. > The sdtrig is an ISA extension and should be treated so. The sdtrig extension > may or may not be implemented in a system. Therefore, it must raise an illegal

Re: [RFC PATCH v3 19/30] migration/ram: Ignore multifd flush when doing fixed-ram migration

2024-01-18 Thread Peter Xu
On Wed, Jan 17, 2024 at 03:13:20PM -0300, Fabiano Rosas wrote: > >> @@ -3242,8 +3243,11 @@ static int ram_save_iterate(QEMUFile *f, void > >> *opaque) > >> out: > >> if (ret >= 0 > >> && migration_is_setup_or_active(migrate_get_current()->state)) { > >> -if (migrate_multifd(

Re: [PATCH 2/8] ppc/spapr|pnv: Remove SAO from pa-features when running MTTCG

2024-01-18 Thread David Gibson
On Fri, Jan 19, 2024 at 12:09:36AM +1000, Nicholas Piggin wrote: > SAO is a page table attribute that strengthens the memory ordering of > accesses. QEMU with MTTCG does not implement this, so clear it in > ibm,pa-features. There is a complication with spapr migration that is > addressed with comme

Re: [RFC PATCH v3 15/30] io: Add a pwritev/preadv version that takes a discontiguous iovec

2024-01-18 Thread Peter Xu
On Thu, Jan 18, 2024 at 09:47:18AM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Wed, Jan 17, 2024 at 03:06:15PM -0300, Fabiano Rosas wrote: > >> Oh no, you're right. Because of p->pending_job. And thinking about > >> p->pending_job, wouldn't a trylock to the same job while being more >

Re: [RFC PATCH v3 18/30] migration/multifd: Allow receiving pages without packets

2024-01-18 Thread Peter Xu
On Tue, Jan 16, 2024 at 05:25:03PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Mon, Nov 27, 2023 at 05:26:00PM -0300, Fabiano Rosas wrote: > >> Currently multifd does not need to have knowledge of pages on the > >> receiving side because all the information needed is within the > >> p

Re: [PATCH v4 3/6] target/riscv: Add helper functions to calculate current number of masked bits for pointer masking

2024-01-18 Thread Deepak Gupta
On Thu, Jan 18, 2024 at 12:50 PM Richard Henderson wrote: > > On 1/19/24 04:21, Deepak Gupta wrote: > > On Tue, Jan 9, 2024 at 2:31 AM Alexey Baturo > > wrote: > >> > >> From: Alexey Baturo > >> > >> Signed-off-by: Alexey Baturo > >> --- > > > >> + > >> +bool riscv_cpu_virt_mem_enabled(CPURISC

bug -net tap on qemu

2024-01-18 Thread Kawaguchi Maeda
hello qemu I have given up on the documentation that you have provided, you provided documentation but it did not match the reality when providing it. are you not serious about giving the command "-net tap"? I have 4 ethernets namely eth0, eth1, eth2 , and eth3 . My default connection is eth0, bu

Re: [PATCH 00/20] arm: Rework target/ headers to build various hw/ files once

2024-01-18 Thread Richard Henderson
On 1/19/24 07:06, Philippe Mathieu-Daudé wrote: Hi, In order to fix a bug noticed [*] by Cédric and Fabiano in my "Remove one use of qemu_get_cpu() in A7/A15 MPCore priv" series, I ended reusing commits from other branches and it grew quite a lot. This is the first "cleanup" part, unrelated on M

Re: [PATCH v3 2/2] target/ppc: Implement attn instruction on BookS 64-bit processors

2024-01-18 Thread Richard Henderson
On 1/19/24 02:25, Nicholas Piggin wrote: +/* attn enable check */ +static inline int check_attn_none(CPUPPCState *env) Don't mark inline ... @@ -2150,6 +2170,7 @@ POWERPC_FAMILY(405)(ObjectClass *oc, void *data) dc->desc = "PowerPC

[PATCH v5 5/9] target/ppc: Simplify syscall exception handlers

2024-01-18 Thread BALATON Zoltan
After previous changes the hypercall handling in 7xx and 74xx exception handlers can be folded into one if statement to simpilfy this code. Also add "unlikely" to mark the less freqiently used branch for the compiler. Signed-off-by: BALATON Zoltan --- target/ppc/excp_helper.c | 24 --

[PATCH v5 3/9] target/ppc: Fix gen_sc to use correct nip

2024-01-18 Thread BALATON Zoltan
Most exceptions are raised with nip pointing to the faulting instruction but the sc instruction generating a syscall exception leaves nip pointing to next instruction. Fix gen_sc to not use gen_exception_err() which sets nip back but correctly set nip to pc_next so we don't have to patch this in th

[PATCH v5 1/9] target/ppc: Use env_cpu for cpu_abort in excp_helper

2024-01-18 Thread BALATON Zoltan
Use the env_cpu function to get the CPUState for cpu_abort. These are only needed in case of fatal errors so this allows to avoid casting and storing CPUState in a local variable wnen not needed. Signed-off-by: BALATON Zoltan --- target/ppc/excp_helper.c | 118 +--

[PATCH v5 6/9] target/ppc: Clean up ifdefs in excp_helper.c, part 1

2024-01-18 Thread BALATON Zoltan
Use #ifdef, #ifndef for brevity and add comments to #endif that are more than a few lines apart for clarity. Signed-off-by: BALATON Zoltan --- target/ppc/excp_helper.c | 49 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/target/ppc/excp_h

[PATCH v5 2/9] target/ppc: Readability improvements in exception handlers

2024-01-18 Thread BALATON Zoltan
Improve readability by shortening some long comments, removing comments that state the obvious and dropping some empty lines so they don't distract when reading the code. Signed-off-by: BALATON Zoltan Acked-by: Nicholas Piggin --- target/ppc/cpu.h | 1 + target/ppc/excp_helper.c | 179

[PATCH v5 0/9] Misc clean ups to target/ppc exception handling

2024-01-18 Thread BALATON Zoltan
These are some small clean ups for target/ppc/excp_helper.c trying to make this code a bit simpler. No functional change is intended. This series was submitted before but only partially merged due to freeze and conflicting series os thia was postponed then to avoid conflicts. v5: - rebase on maste

[PATCH v5 9/9] target/ppc: Remove interrupt handler wrapper functions

2024-01-18 Thread BALATON Zoltan
These wrappers call out to handle POWER7 and newer in separate functions but reduce to the generic case when TARGET_PPC64 is not defined. It is easy enough to include the switch in the beginning of the generic functions to branch out to the specific functions and get rid of these wrappers. This avo

[PATCH v5 4/9] target/ppc: Move patching nip from exception handler to helper_scv

2024-01-18 Thread BALATON Zoltan
From: Nicholas Piggin Unlike sc, for scv a facility unavailable interrupt must be generated if FSCR[SCV]=0 so we can't raise the exception with nip set to next instruction but we can move advancing nip if the FSCR check passes to helper_scv so the exception handler does not need to change it. [b

[PATCH v5 7/9] target/ppc: Clean up ifdefs in excp_helper.c, part 2

2024-01-18 Thread BALATON Zoltan
Remove check for !defined(CONFIG_USER_ONLY) as this is already within an #ifndef CONFIG_USER_ONLY block. Signed-off-by: BALATON Zoltan --- target/ppc/excp_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c index d8

[PATCH v5 8/9] target/ppc: Clean up ifdefs in excp_helper.c, part 3

2024-01-18 Thread BALATON Zoltan
Concatenate #if blocks that are ending then beginning on the next line again. Signed-off-by: BALATON Zoltan --- target/ppc/excp_helper.c | 15 ++- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c index 2d4a72883f..5124

Re: [PATCH v4 4/4] virtio-blk: add iothread-vq-mapping parameter

2024-01-18 Thread Stefan Hajnoczi
On Thu, Dec 21, 2023 at 02:10:20PM +0100, Kevin Wolf wrote: > Am 20.12.2023 um 14:47 hat Stefan Hajnoczi geschrieben: > > Add the iothread-vq-mapping parameter to assign virtqueues to IOThreads. > > Store the vq:AioContext mapping in the new struct > > VirtIOBlockDataPlane->vq_aio_context[] field a

Re: [PATCH 1/2] target/s390x: Emulate CVDG

2024-01-18 Thread Richard Henderson
On 1/16/24 07:21, Ilya Leoshkevich wrote: CVDG is the same as CVD, except that it converts 64 bits into 128, rather than 32 into 64. Use larger data types in the CVD helper and reuse it. Reported-by: Ido Plat Signed-off-by: Ilya Leoshkevich --- target/s390x/helper.h| 1 + targe

Re: [PATCH v4 3/6] target/riscv: Add helper functions to calculate current number of masked bits for pointer masking

2024-01-18 Thread Richard Henderson
On 1/19/24 04:21, Deepak Gupta wrote: On Tue, Jan 9, 2024 at 2:31 AM Alexey Baturo wrote: From: Alexey Baturo Signed-off-by: Alexey Baturo --- + +bool riscv_cpu_virt_mem_enabled(CPURISCVState *env) +{ +bool virt_mem_en = false; +#ifndef CONFIG_USER_ONLY +int satp_mode = 0; +i

[PATCH 16/20] hw/arm/armv7m: Make 'hw/intc/armv7m_nvic.h' a target agnostic header

2024-01-18 Thread Philippe Mathieu-Daudé
Now than we can access the M-profile bank index definitions from the target-agnostic "cpu-qom.h" header, we don't need the huge "cpu.h" anymore (except in hw/arm/armv7m.c). Reduce its inclusion to the source unit. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/intc/armv7m_nvic.h | 2 +- hw

[PATCH 19/20] target/arm: Move GTimer definitions to new 'gtimer.h' header

2024-01-18 Thread Philippe Mathieu-Daudé
Move Arm A-class Generic Timer definitions to the new "target/arm/gtimer.h" header so units in hw/ which don't need access to ARMCPU internals can use them without having to include the huge "cpu.h". Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/arm/cpu.h

[PATCH 08/20] target/arm: Rename arm_cpu_mp_affinity

2024-01-18 Thread Philippe Mathieu-Daudé
From: Richard Henderson Rename to arm_build_mp_affinity. This frees up the name for other usage, and emphasizes that the cpu object is not involved. Signed-off-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/arm/cpu.h | 2 +- hw/arm/npcm7xx.c | 2 +- hw/arm/sbsa-ref.

[PATCH 11/20] target/arm: Declare ARM_CPU_TYPE_NAME/SUFFIX in 'cpu-qom.h'

2024-01-18 Thread Philippe Mathieu-Daudé
Missed in commit 2d56be5a29 ("target: Declare FOO_CPU_TYPE_NAME/SUFFIX in 'cpu-qom.h'"). See it for more details. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/arm/cpu-qom.h | 3 +++ target/arm/cpu.h | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-)

[PATCH 10/20] target/arm: Expose arm_cpu_mp_affinity() in 'multiprocessing.h' header

2024-01-18 Thread Philippe Mathieu-Daudé
Declare arm_cpu_mp_affinity() prototype in the new "target/arm/multiprocessing.h" header so units in hw/arm/ can use it without having to include the huge target-specific "cpu.h". File list to include the new header generated using: $ git grep -lw arm_cpu_mp_affinity Signed-off-by: Philippe M

[PATCH 14/20] hw/misc/xlnx-versal-crl: Build it only once

2024-01-18 Thread Philippe Mathieu-Daudé
hw/misc/xlnx-versal-crl.c doesn't require "cpu.h" anymore. By removing it, the unit become target agnostic: we can build it once. Update meson. Signed-off-by: Philippe Mathieu-Daudé --- hw/misc/xlnx-versal-crl.c | 1 - hw/misc/meson.build | 2 +- 2 files changed, 1 insertion(+), 2 deletio

Re: [PATCH 00/20] arm: Rework target/ headers to build various hw/ files once

2024-01-18 Thread Philippe Mathieu-Daudé
On 18/1/24 21:06, Philippe Mathieu-Daudé wrote: Hi, In order to fix a bug noticed [*] by Cédric and Fabiano in my "Remove one use of qemu_get_cpu() in A7/A15 MPCore priv" series, I ended reusing commits from other branches and it grew quite a lot. This is the first "cleanup" part, unrelated on M

[PATCH 02/20] hw/arm/xilinx_zynq: Include missing 'exec/tswap.h' header

2024-01-18 Thread Philippe Mathieu-Daudé
hw/arm/xilinx_zynq.c calls tswap32() which is declared in "exec/tswap.h". Include it in order to avoid when refactoring unrelated headers: hw/arm/xilinx_zynq.c:103:31: error: call to undeclared function 'tswap32'; ISO C99 and later do not support implicit function declarations [-Wimplicit-fun

[PATCH 20/20] hw/arm: Build various units only once

2024-01-18 Thread Philippe Mathieu-Daudé
Various files in hw/arm/ don't require "cpu.h" anymore. Except virt-acpi-build.c, all of them don't require any ARM specific knowledge anymore and can be build once as target agnostic units. Update meson accordingly. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/collie.c | 1 - hw/

[PATCH 17/20] target/arm: Move ARM_CPU_IRQ/FIQ definitions to 'cpu-qom.h' header

2024-01-18 Thread Philippe Mathieu-Daudé
The ARM_CPU_IRQ/FIQ definitions are used to index the GPIO IRQ created calling qdev_init_gpio_in() in ARMCPU instance_init() handler. To allow non-ARM code to raise interrupt on ARM cores, move they to 'target/arm/cpu-qom.h' which is non-ARM specific and can be included by any hw/ file. File list

[PATCH 13/20] hw/misc/xlnx-versal-crl: Include generic 'cpu-qom.h' instead of 'cpu.h'

2024-01-18 Thread Philippe Mathieu-Daudé
"target/arm/cpu.h" is target specific, any file including it becomes target specific too, thus this is the same for any file including "hw/misc/xlnx-versal-crl.h". "hw/misc/xlnx-versal-crl.h" doesn't require any target specific definition however, only the target-agnostic QOM definitions from "tar

[PATCH 03/20] hw/arm/smmuv3: Include missing 'hw/registerfields.h' header

2024-01-18 Thread Philippe Mathieu-Daudé
hw/arm/smmuv3-internal.h uses the REG32() and FIELD() macros defined in "hw/registerfields.h". Include it in order to avoid when refactoring unrelated headers: In file included from ../../hw/arm/smmuv3.c:34: hw/arm/smmuv3-internal.h:36:28: error: expected identifier REG32(IDR0,

[PATCH 09/20] target/arm: Create arm_cpu_mp_affinity

2024-01-18 Thread Philippe Mathieu-Daudé
From: Richard Henderson Wrapper to return the mp affinity bits from the cpu. Signed-off-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/arm/cpu.h | 5 + hw/arm/virt-acpi-build.c | 2 +- hw/arm/virt.c | 6 +++--- hw/arm/xlnx-versal-virt.c | 3 ++

[PATCH 15/20] target/arm: Expose M-profile register bank index definitions

2024-01-18 Thread Philippe Mathieu-Daudé
The ARMv7M QDev container accesses the QDev SysTickState by its secure/non-secure bank index. In order to make the "hw/intc/armv7m_nvic.h" header target-agnostic in the next commit, first move the M-profile bank index definitions to "target/arm/cpu-qom.h". Signed-off-by: Philippe Mathieu-Daudé --

[PATCH 18/20] target/arm: Move e2h_access() helper around

2024-01-18 Thread Philippe Mathieu-Daudé
e2h_access() was added in commit bb5972e439 ("target/arm: Add VHE timer register redirection and aliasing") close to the generic_timer_cp_reginfo[] array, but isn't used until vhe_reginfo[] definition. Move it closer to the other e2h helpers. Signed-off-by: Philippe Mathieu-Daudé --- target/arm/

[PATCH 12/20] hw/cpu/a9mpcore: Build it only once

2024-01-18 Thread Philippe Mathieu-Daudé
hw/cpu/a9mpcore.c doesn't require "cpu.h" anymore. By removing it, the unit become target agnostic: we can build it once. Update meson. Signed-off-by: Philippe Mathieu-Daudé --- hw/cpu/a9mpcore.c | 2 +- hw/cpu/meson.build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/h

[PATCH 04/20] hw/arm/xlnx-versal: Include missing 'cpu.h' header

2024-01-18 Thread Philippe Mathieu-Daudé
include/hw/arm/xlnx-versal.h uses the ARMCPU structure which is defined in the "target/arm/cpu.h" header. Include it in order to avoid when refactoring unrelated headers: In file included from hw/arm/xlnx-versal-virt.c:20: include/hw/arm/xlnx-versal.h:62:23: error: array has incomplete element

[PATCH 07/20] target/arm/cpregs: Include missing 'kvm-consts.h' header

2024-01-18 Thread Philippe Mathieu-Daudé
target/arm/cpregs.h uses the CP_REG_ARCH_* definitions from "target/arm/kvm-consts.h". Include it in order to avoid when refactoring unrelated headers: target/arm/cpregs.h:191:18: error: use of undeclared identifier 'CP_REG_ARCH_MASK' if ((kvmid & CP_REG_ARCH_MASK) == CP_REG_ARM64) {

[PATCH 06/20] target/arm/cpregs: Include missing 'hw/registerfields.h' header

2024-01-18 Thread Philippe Mathieu-Daudé
target/arm/cpregs.h uses the FIELD() macro defined in "hw/registerfields.h". Include it in order to avoid when refactoring unrelated headers: target/arm/cpregs.h:347:30: error: expected identifier FIELD(HFGRTR_EL2, AFSR0_EL1, 0, 1) ^ Signed-off-by: Philippe Math

[PATCH 00/20] arm: Rework target/ headers to build various hw/ files once

2024-01-18 Thread Philippe Mathieu-Daudé
Hi, In order to fix a bug noticed [*] by Cédric and Fabiano in my "Remove one use of qemu_get_cpu() in A7/A15 MPCore priv" series, I ended reusing commits from other branches and it grew quite a lot. This is the first "cleanup" part, unrelated on MPCorePriv. Please review, Phil. Philippe Mathie

[PATCH 01/20] hw/arm/exynos4210: Include missing 'exec/tswap.h' header

2024-01-18 Thread Philippe Mathieu-Daudé
hw/arm/exynos4210.c calls tswap32() which is declared in "exec/tswap.h". Include it in order to avoid when refactoring unrelated headers: hw/arm/exynos4210.c:499:22: error: call to undeclared function 'tswap32'; ISO C99 and later do not support implicit function declarations [-Wimplicit-funct

[PATCH 05/20] target/arm/cpu-features: Include missing 'hw/registerfields.h' header

2024-01-18 Thread Philippe Mathieu-Daudé
target/arm/cpu-features.h uses the FIELD_EX32() macro defined in "hw/registerfields.h". Include it in order to avoid when refactoring unrelated headers: target/arm/cpu-features.h:44:12: error: call to undeclared function 'FIELD_EX32'; ISO C99 and later do not support implicit function declara

Re: [PATCH 2/2] target/riscv: Check 'A' and split extensions for atomic instructions

2024-01-18 Thread Daniel Henrique Barboza
On 1/15/24 13:25, Rob Bradford wrote: Following the pattern for 'M' and Zmmul check if either the 'A' extension is enabled or the appropriate split extension for the instruction. Also remove the assumption that only checking for 64-bit systems is required for the double word variants. Code

[PATCH v2] target/i386/host-cpu: Use iommu phys_bits with VFIO assigned devices on Intel h/w

2024-01-18 Thread Vivek Kasireddy
Recent updates in OVMF and Seabios have resulted in MMIO regions being placed at the upper end of the physical address space. As a result, when a Host device is assigned to the Guest via VFIO, the following mapping failures occur when VFIO tries to map the MMIO regions of the device: VFIO_MAP_DMA f

Re: [PATCH v2 0/3] s390x/pci: fix ISM reset

2024-01-18 Thread Cédric Le Goater
On 1/18/24 19:51, Matthew Rosato wrote: Commit ef1535901a0 (re-)introduced an issue where passthrough ISM devices on s390x would enter an error state after reboot. This was previously fixed by 03451953c79e, using device reset callbacks, however the change in ef1535901a0 effectively triggers a co

Re: [PATCH v3] qemu-img: Fix Column Width and Improve Formatting in snapshot list

2024-01-18 Thread Kevin Wolf
Am 11.01.2024 um 18:25 hat Abhiram Tilak geschrieben: > When running the command `qemu-img snapshot -l SNAPSHOT` the output of > VM_CLOCK (measures the offset between host and VM clock) cannot to > accommodate values in the order of thousands (4-digit). > > This line [1] hints on the problem. Addi

Re: [PATCH 1/2] target/riscv: Add Zaamo and Zalrsc extensions

2024-01-18 Thread Daniel Henrique Barboza
On 1/15/24 13:25, Rob Bradford wrote: These extensions represent the atomic operations from A (Zaamo) and the Load-Reserved/Store-Conditional operations from A (Zalrsc) Signed-off-by: Rob Bradford --- Reviewed-by: Daniel Henrique Barboza target/riscv/cpu.c | 5 + target/riscv

Re: [PATCH v2 3/3] s390x/pci: drive ISM reset from subsystem reset

2024-01-18 Thread Eric Farman
On Thu, 2024-01-18 at 13:51 -0500, Matthew Rosato wrote: > ISM devices are sensitive to manipulation of the IOMMU, so the ISM > device > needs to be reset before the vfio-pci device is reset (triggering a > full > UNMAP).  In order to ensure this occurs, trigger ISM device resets > from > subsystem

Re: [PATCH 19/24] configure: remove compiler sanity check

2024-01-18 Thread Thomas Huth
On 11/05/2023 11.50, Paolo Bonzini wrote: The comment is not correct anymore, in that the usability test for the compiler and linker are done after probing $cpu, and Meson will redo them anyway. Signed-off-by: Paolo Bonzini --- configure | 14 -- 1 file changed, 14 deletions(-)

Re: [PATCH v2] block/blklogwrites: Protect mutable driver state with a mutex.

2024-01-18 Thread Kevin Wolf
Am 11.01.2024 um 17:32 hat Ari Sundholm geschrieben: > During the review of a fix for a concurrency issue in blklogwrites, > it was found that the driver needs an additional fix when enabling > multiqueue, which is a new feature introduced in QEMU 9.0, as the > driver state may be read and written

[PATCH v2 2/3] s390x/pci: refresh fh before disabling aif

2024-01-18 Thread Matthew Rosato
Typically we refresh the host fh during CLP enable, however it's possible that the device goes through multiple reset events before the guest performs another CLP enable. Let's handle this for now by refreshing the host handle from vfio before disabling aif. Fixes: 03451953c7 ("s390x/pci: reset I

[PATCH v2 3/3] s390x/pci: drive ISM reset from subsystem reset

2024-01-18 Thread Matthew Rosato
ISM devices are sensitive to manipulation of the IOMMU, so the ISM device needs to be reset before the vfio-pci device is reset (triggering a full UNMAP). In order to ensure this occurs, trigger ISM device resets from subsystem_reset before triggering the PCI bus reset (which will also trigger vfi

[PATCH v2 1/3] s390x/pci: avoid double enable/disable of aif

2024-01-18 Thread Matthew Rosato
Use a flag to keep track of whether AIF is currently enabled. This can be used to avoid enabling/disabling AIF multiple times as well as to determine whether or not it should be disabled during reset processing. Fixes: d0bc7091c2 ("s390x/pci: enable adapter event notification for interpreted dev

[PATCH v2 0/3] s390x/pci: fix ISM reset

2024-01-18 Thread Matthew Rosato
Commit ef1535901a0 (re-)introduced an issue where passthrough ISM devices on s390x would enter an error state after reboot. This was previously fixed by 03451953c79e, using device reset callbacks, however the change in ef1535901a0 effectively triggers a cold reset of the pci bus before the device

Re: [PATCH V2] Handle wrap around in limit calculation

2024-01-18 Thread Shlomo Pongratz
See Inline. On 15/01/2024 18:47, Peter Maydell wrote: On Mon, 15 Jan 2024 at 13:51, Shlomo Pongratz wrote: On 15/01/2024 12:37, Peter Maydell wrote: For instance, the kernel code suggests that pre-460A there's a 32 bit limit register, and post-460A there is a 64-bit limit (with an "UPPER_LIMI

Re: [PATCH v3] backends/cryptodev: Do not ignore throttle/backends Errors

2024-01-18 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Both cryptodev_backend_set_throttle() and CryptoDevBackendClass::init() > can set their Error** argument. Do not ignore them, return early > on failure. Without that, running into another failure trips > error_setv()'s assertion. Use the ERRP_GUARD() macro as sugg

[PATCH v3] backends/cryptodev: Do not ignore throttle/backends Errors

2024-01-18 Thread Philippe Mathieu-Daudé
Both cryptodev_backend_set_throttle() and CryptoDevBackendClass::init() can set their Error** argument. Do not ignore them, return early on failure. Without that, running into another failure trips error_setv()'s assertion. Use the ERRP_GUARD() macro as suggested in commit ae7c80a7bd ("error: New m

Re: [PATCH v2 0/3] monitor: only run coroutine commands in qemu_aio_context

2024-01-18 Thread Kevin Wolf
Am 18.01.2024 um 15:48 hat Stefan Hajnoczi geschrieben: > v2: > - Filter image format in 141 test output [Kevin] > - Fix pylint and mypy errors in 141 [Kevin] > > Several bugs have been reported related to how QMP commands are rescheduled in > qemu_aio_context: > - https://gitlab.com/qemu-project/

[Stable-7.2.9 8/8] .gitlab-ci.d/buildtest.yml: Work around htags bug when environment is large

2024-01-18 Thread Michael Tokarev
From: Peter Maydell Sometimes the CI "pages" job fails with a message like this from htags: $ htags -anT --tree-view=filetree -m qemu_init -t "Welcome to the QEMU sourcecode" htags: Negative exec line limit = -371 This is due to a bug in hflags where if the environment is too large it falls ov

[Stable-7.2.9 6/8] hw/intc/arm_gicv3_cpuif: handle LPIs in in the list registers

2024-01-18 Thread Michael Tokarev
From: Peter Maydell The hypervisor can deliver (virtual) LPIs to a guest by setting up a list register to have an intid which is an LPI. The GIC has to treat these a little differently to standard interrupt IDs, because LPIs have no Active state, and so the guest will only EOI them, it will not

[Stable-7.2.9 2/8] vl: Improve error message for conflicting -incoming and -loadvm

2024-01-18 Thread Michael Tokarev
From: Kevin Wolf Currently, the conflict between -incoming and -loadvm is only detected when loading the snapshot fails because the image is still inactive for the incoming migration. This results in a suboptimal error message: $ ./qemu-system-x86_64 -hda /tmp/test.qcow2 -loadvm foo -incoming de

[Stable-7.2.9 5/8] chardev/char.c: fix "abstract device type" error message

2024-01-18 Thread Michael Tokarev
Current error message: qemu-system-x86_64: -chardev spice,id=foo: Parameter 'driver' expects an abstract device type while in fact the meaning is in reverse, -chardev expects a non-abstract device type. Fixes: 777357d758d9 ("chardev: qom-ify" 2016-12-07) Signed-off-by: Michael Tokarev Reviewe

[Stable-7.2.9 3/8] iotests: Basic tests for internal snapshots

2024-01-18 Thread Michael Tokarev
From: Kevin Wolf We have a few test cases that include tests for corner case aspects of internal snapshots, but nothing that tests that they actually function as snapshots or that involves deleting a snapshot. Add a test for this kind of basic internal snapshot functionality. The error cases inc

[Stable-7.2.9 4/8] target/riscv: Fix mcycle/minstret increment behavior

2024-01-18 Thread Michael Tokarev
From: Xu Lu The mcycle/minstret counter's stop flag is mistakenly updated on a copy on stack. Thus the counter increments even when the CY/IR bit in the mcountinhibit register is set. This commit corrects its behavior. Fixes: 3780e33732f88 (target/riscv: Support mcycle/minstret write operation)

[Stable-7.2.9 0/8] Patch Round-up for stable 7.2.9, freeze on 2024-01-27

2024-01-18 Thread Michael Tokarev
The following patches are queued for QEMU stable v7.2.9: https://gitlab.com/qemu-project/qemu/-/commits/staging-7.2 Patch freeze is 2024-01-27, and the release is planned for 2024-01-29: https://wiki.qemu.org/Planning/7.2 Please respond here or CC qemu-sta...@nongnu.org on any additional pa

[Stable-7.2.9 7/8] target/s390x: Fix LAE setting a wrong access register

2024-01-18 Thread Michael Tokarev
From: Ilya Leoshkevich LAE should set the access register corresponding to the first operand, instead, it always modifies access register 1. Co-developed-by: Ido Plat Cc: qemu-sta...@nongnu.org Fixes: a1c7610a6879 ("target-s390x: implement LAY and LAEY instructions") Reviewed-by: David Hildenbr

[Stable-7.2.9 1/8] block: Fix crash when loading snapshot on inactive node

2024-01-18 Thread Michael Tokarev
From: Kevin Wolf bdrv_is_read_only() only checks if the node is configured to be read-only eventually, but even if it returns false, writing to the node may not be permitted at the moment (because it's inactive). bdrv_is_writable() checks that the node can be written to right now, and this is wh

Re: [PATCH 0/2] target/s390x: Emulate CVDG

2024-01-18 Thread Thomas Huth
On 15/01/2024 21.21, Ilya Leoshkevich wrote: Hi, Ido reported that we are missing the CVDG emulation (which is very similar to the existing CVD emulation). This series adds it along with a test. Just FYI, your patch made me curious which other instructions we still might be missing from chapt

Re: [PATCH v4 3/6] target/riscv: Add helper functions to calculate current number of masked bits for pointer masking

2024-01-18 Thread Deepak Gupta
On Tue, Jan 9, 2024 at 2:31 AM Alexey Baturo wrote: > > From: Alexey Baturo > > Signed-off-by: Alexey Baturo > --- > + > +bool riscv_cpu_virt_mem_enabled(CPURISCVState *env) > +{ > +bool virt_mem_en = false; > +#ifndef CONFIG_USER_ONLY > +int satp_mode = 0; > +int priv_mode = cpu_ad

Updated invitation: QEMU developers fortnightly conference call @ Every 2 weeks from 15:00 to 16:00 on Tuesday from Tue 2024-01-09 to Tue 2024-01-23 (GMT+1) (qemu-devel@nongnu.org)

2024-01-18 Thread Juan Quintela
BEGIN:VCALENDAR PRODID:-//Google Inc//Google Calendar 70.9054//EN VERSION:2.0 CALSCALE:GREGORIAN METHOD:REQUEST BEGIN:VTIMEZONE TZID:America/New_York X-LIC-LOCATION:America/New_York BEGIN:DAYLIGHT TZOFFSETFROM:-0500 TZOFFSETTO:-0400 TZNAME:EDT DTSTART:19700308T02 RRULE:FREQ=YEARLY;BYMONTH=3;BYD

Updated invitation: QEMU developers fortnightly conference call @ Every 2 weeks from 15:00 to 16:00 on Tuesday from Tue 2024-01-23 to Wed 2023-02-22 (GMT+1) (qemu-devel@nongnu.org)

2024-01-18 Thread Juan Quintela
BEGIN:VCALENDAR PRODID:-//Google Inc//Google Calendar 70.9054//EN VERSION:2.0 CALSCALE:GREGORIAN METHOD:REQUEST BEGIN:VTIMEZONE TZID:America/New_York X-LIC-LOCATION:America/New_York BEGIN:DAYLIGHT TZOFFSETFROM:-0500 TZOFFSETTO:-0400 TZNAME:EDT DTSTART:19700308T02 RRULE:FREQ=YEARLY;BYMONTH=3;BYD

Updated invitation: QEMU developers fortnightly conference call @ Every 2 weeks from 15:00 to 16:00 on Tuesday from Tue 2022-08-23 to Tue 2024-01-23 (GMT+2) (qemu-devel@nongnu.org)

2024-01-18 Thread Juan Quintela
BEGIN:VCALENDAR PRODID:-//Google Inc//Google Calendar 70.9054//EN VERSION:2.0 CALSCALE:GREGORIAN METHOD:REQUEST BEGIN:VTIMEZONE TZID:America/New_York X-LIC-LOCATION:America/New_York BEGIN:DAYLIGHT TZOFFSETFROM:-0500 TZOFFSETTO:-0400 TZNAME:EDT DTSTART:19700308T02 RRULE:FREQ=YEARLY;BYMONTH=3;BYD

Re: [PATCH] hw/arm/virt.c: Remove newline from error_report() string

2024-01-18 Thread Philippe Mathieu-Daudé
On 18/1/24 17:09, Peter Maydell wrote: On Thu, 18 Jan 2024 at 15:30, Philippe Mathieu-Daudé wrote: On 18/1/24 16:17, Philippe Mathieu-Daudé wrote: On 18/1/24 14:16, Peter Maydell wrote: error_report() strings should not include trailing newlines; remove the newline from the error we print wh

[PATCH v4 2/3] ci: Add a migration compatibility test job

2024-01-18 Thread Fabiano Rosas
The migration tests have support for being passed two QEMU binaries to test migration compatibility. Add a CI job that builds the lastest release of QEMU and another job that uses that version plus an already present build of the current version and run the migration tests with the two, both as so

[PATCH v4 1/3] tests/qtest/migration: Don't use -cpu max for aarch64

2024-01-18 Thread Fabiano Rosas
The 'max' cpu is not expected to be stable in terms of features across QEMU versions, so it should not be expected to migrate. While the tests currently all pass with -cpu max, that is only because we're not testing across QEMU versions, which is the more common use-case for migration. We've rece

[PATCH v4 0/3] migration & CI: Add a CI job for migration compat testing

2024-01-18 Thread Fabiano Rosas
Here's the second half of adding a migration compatibility test to CI. We've already added support for running the full set of migration tests with two QEMU binaries since commit 5050ad2a380 ("tests/qtest/migration: Support more than one QEMU binary"), now what's left is adding it to the CI. chan

[PATCH v4 3/3] ci: Disable migration compatibility tests for aarch64

2024-01-18 Thread Fabiano Rosas
Until 9.0 is out, we need to keep the aarch64 job disabled because the tests always use the n-1 version of migration-test. That happens to be broken for aarch64 in 8.2. Once 9.0 is out, it will become the n-1 version and it will bring the fixed tests. We can revert this patch when 9.0 releases. S

[PATCH v2 2/4] Avoid conflicting types for 'copy_file_range'

2024-01-18 Thread Manolo de Medici
Compilation fails on systems where copy_file_range is already defined as a stub. The prototype of copy_file_range in glibc returns an ssize_t, not an off_t. The function currently only exists on linux and freebsd, and in both cases the return type is ssize_t Signed-off-by: Manolo de Medici ---

Re: [PATCH 2/4] reset: Allow multiple stages of system resets

2024-01-18 Thread Peter Maydell
On Thu, 18 Jan 2024 at 15:53, Philippe Mathieu-Daudé wrote: > Unfortunately despite DeviceReset being deprecated since 4 years > in commit c11256aa6f ("hw/core: add Resettable support to BusClass > and DeviceClass"), we keep adding code using this legacy API; for > example in the last 4 months: >

[PATCH v2 3/4] Add the GNU/Hurd as a target host

2024-01-18 Thread Manolo de Medici
Signed-off-by: Manolo de Medici --- configure | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure b/configure index 21ab9a64e9..fb11ede5b2 100755 --- a/configure +++ b/configure @@ -353,6 +353,8 @@ elif check_define __NetBSD__; then host_os=netbsd elif check_define __APPLE__; then

Re: [PATCH] hw/arm/virt.c: Remove newline from error_report() string

2024-01-18 Thread Peter Maydell
On Thu, 18 Jan 2024 at 15:30, Philippe Mathieu-Daudé wrote: > > On 18/1/24 16:17, Philippe Mathieu-Daudé wrote: > > On 18/1/24 14:16, Peter Maydell wrote: > >> error_report() strings should not include trailing newlines; remove > >> the newline from the error we print when devices won't fit into t

[PATCH v2 4/4] Exclude TPM ioctls definitions for the GNU/Hurd

2024-01-18 Thread Manolo de Medici
The Hurd currently doesn't have any TPM driver, compilation fails for missing symbols unless these are left undefined. Signed-off-by: Manolo de Medici --- backends/tpm/tpm_ioctl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backends/tpm/tpm_ioctl.h b/backends/tpm/tpm_ioct

[PATCH v2 1/4] Include new arbitrary limits if not already defined

2024-01-18 Thread Manolo de Medici
qemu uses the PATH_MAX and IOV_MAX constants extensively in the code. Define these constants to sensible values ourselves if the system doesn't define them already. Signed-off-by: Manolo de Medici --- include/qemu/osdep.h | 8 1 file changed, 8 insertions(+) diff --git a/include/qemu/o

[PATCH v2 0/4] Port qemu to GNU/Hurd

2024-01-18 Thread Manolo de Medici
Recently, a testsuite for gnumach, the GNU/Hurd microkernel, was developed that uses qemu. Currently qemu cannot be compiled for the GNU/Hurd, as such, this testsuite is available only for GNU/Linux users. This patcheset allows qemu compilation in GNU/Hurd. With this patchset applied, qemu can be

Re: [PATCH 2/4] reset: Allow multiple stages of system resets

2024-01-18 Thread Philippe Mathieu-Daudé
On 17/1/24 18:46, Peter Maydell wrote: On Wed, 17 Jan 2024 at 09:16, wrote: From: Peter Xu QEMU resets do not have a way to order reset hooks. Add one coarse grained reset stage so that some devices can be reset later than some others. Signed-off-by: Peter Xu --- include/sysemu/reset.h

Re: [PATCH] ui/gtk: Strip trailing '\n' from error string arguments

2024-01-18 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > error_report() strings should not include trailing newlines. > > Noticed running: > > $ spatch \ > --macro-file scripts/cocci-macro-file.h \ > --sp-file scripts/coccinelle/err-bad-newline.cocci \ > --keep-comments --use-gitgrep --dir . > ./ui/gtk.c

  1   2   3   >