[PATCH v3 0/2] UART0 device name and fix hardcode boot address 0

2024-02-15 Thread Jamin Lin via
v1: 1. support uart controller both 0 and 1 base 2. fix hardcode boot address 0 v2: 1. introduce a new UART0 device name 2. remove ASPEED_SOC_SPI_BOOT_ADDR marco v3: 1. add uart helper functions to get the index, start and last. 2. add more description in commit log Jamin Lin (2): aspeed: intr

[PATCH v3 2/2] aspeed: fix hardcode boot address 0

2024-02-15 Thread Jamin Lin via
In the previous design of ASPEED SOCs QEMU model, it set the boot address at "0" which was the hardcode setting for ast10x0, ast2600, ast2500 and ast2400. According to the design of ast2700, it has a bootmcu(riscv-32) which is used for executing SPL and initialize DRAM and copy u-boot image from S

[PATCH] target/mips: Remove mips_def_t::SAARP field

2024-02-15 Thread Philippe Mathieu-Daudé
The SAARP field added in commit 5fb2dcd179 ("target/mips: Provide R/W access to SAARI and SAAR CP0 registers") has never been used, remove it. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/internal.h | 1 - 1 file changed, 1 deletion(-) diff --git a/target/mips/internal.h b/target/mips/

Re: [PATCH] target/mips: Remove mips_def_t::SAARP field

2024-02-15 Thread Richard Henderson
On 2/14/24 22:06, Philippe Mathieu-Daudé wrote: The SAARP field added in commit 5fb2dcd179 ("target/mips: Provide R/W access to SAARI and SAAR CP0 registers") has never been used, remove it. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/internal.h | 1 - 1 file changed, 1 deletion(-)

[PATCH v4 08/10] util/bufferiszero: Simplify test_buffer_is_zero_next_accel

2024-02-15 Thread Richard Henderson
Because the three alternatives are monotonic, we don't need to keep a couple of bitmasks, just identify the strongest alternative at startup. Signed-off-by: Richard Henderson --- util/bufferiszero.c | 56 ++--- 1 file changed, 22 insertions(+), 34 deletion

[PATCH v4 09/10] util/bufferiszero: Add simd acceleration for aarch64

2024-02-15 Thread Richard Henderson
Because non-embedded aarch64 is expected to have AdvSIMD enabled, merely double-check with the compiler flags for __ARM_NEON and don't bother with a runtime check. Otherwise, model the loop after the x86 SSE2 function, and use VADDV to reduce the four vector comparisons. Signed-off-by: Richard He

[RFC PATCH v4 10/10] util/bufferiszero: Add sve acceleration for aarch64

2024-02-15 Thread Richard Henderson
Signed-off-by: Richard Henderson --- RFC because I've not benchmarked this on real hw, only run it through qemu for validation. --- host/include/aarch64/host/cpuinfo.h | 1 + util/bufferiszero.c | 49 + util/cpuinfo-aarch64.c | 1 + mes

[PATCH v4 02/10] util/bufferiszero: Remove AVX512 variant

2024-02-15 Thread Richard Henderson
From: Alexander Monakov Thanks to early checks in the inline buffer_is_zero wrapper, the SIMD routines are invoked much more rarely in normal use when most buffers are non-zero. This makes use of AVX512 unprofitable, as it incurs extra frequency and voltage transition periods during which the CPU

[PATCH v4 07/10] util/bufferiszero: Introduce biz_accel_fn typedef

2024-02-15 Thread Richard Henderson
Signed-off-by: Richard Henderson --- util/bufferiszero.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/util/bufferiszero.c b/util/bufferiszero.c index ce04642c67..ce80713071 100644 --- a/util/bufferiszero.c +++ b/util/bufferiszero.c @@ -26,7 +26,8 @@ #include "qemu

[PATCH v4 01/10] util/bufferiszero: Remove SSE4.1 variant

2024-02-15 Thread Richard Henderson
From: Alexander Monakov The SSE4.1 variant is virtually identical to the SSE2 variant, except for using 'PTEST+JNZ' in place of 'PCMPEQB+PMOVMSKB+CMP+JNE' for testing if an SSE register is all zeroes. The PTEST instruction decodes to two uops, so it can be handled only by the complex decoder, and

[PATCH v4 03/10] util/bufferiszero: Reorganize for early test for acceleration

2024-02-15 Thread Richard Henderson
From: Alexander Monakov Test for length >= 256 inline, where is is often a constant. Before calling into the accelerated routine, sample three bytes from the buffer, which handles most non-zero buffers. Signed-off-by: Alexander Monakov Signed-off-by: Mikhail Romanov Message-Id: <20240206204809

[PATCH v4 00/10] Optimize buffer_is_zero

2024-02-15 Thread Richard Henderson
v3: https://patchew.org/QEMU/20240206204809.9859-1-amona...@ispras.ru/ Changes for v4: - Keep separate >= 256 entry point, but only keep constant length check inline. This allows the indirect function call to be hidden and optimized away when the pointer is constant. - Split out a >=

[PATCH v4 06/10] util/bufferiszero: Improve scalar variant

2024-02-15 Thread Richard Henderson
Split less-than and greater-than 256 cases. Use unaligned accesses for head and tail. Avoid using out-of-bounds pointers in loop boundary conditions. Signed-off-by: Richard Henderson --- util/bufferiszero.c | 86 +++-- 1 file changed, 52 insertions(+), 34

[PATCH v4 04/10] util/bufferiszero: Remove useless prefetches

2024-02-15 Thread Richard Henderson
From: Alexander Monakov Use of prefetching in bufferiszero.c is quite questionable: - prefetches are issued just a few CPU cycles before the corresponding line would be hit by demand loads; - they are done for simple access patterns, i.e. where hardware prefetchers can perform better; - th

[PATCH v4 05/10] util/bufferiszero: Optimize SSE2 and AVX2 variants

2024-02-15 Thread Richard Henderson
From: Alexander Monakov Increase unroll factor in SIMD loops from 4x to 8x in order to move their bottlenecks from ALU port contention to load issue rate (two loads per cycle on popular x86 implementations). Avoid using out-of-bounds pointers in loop boundary conditions. Follow SSE2 implementat

[PATCH 0/2] Add field reason to event MIGRATION

2024-02-15 Thread Roman Khapov
Sometimes, when migration fails, it is hard to find out the cause of the problems: you have to grep qemu logs. At the same time, there is MIGRATION event, which looks like suitable place to hold such error descriptions. To handle situation like this (maybe one day it will be useful for other MIGRA

[PATCH 1/2] qapi/migration.json: add reason to MIGRATION event

2024-02-15 Thread Roman Khapov
This commit adds the optional field reason for the events, which contains the string, describing reason of status changing. For example: reason of migration fail. Function migrate_set_state now accepts 4th argument: the reason to pass to event. Every call of this function appended with NULL argume

[PATCH] migration: add error reason for failed MIGRATION events

2024-02-15 Thread Roman Khapov
This patch adds error description as reason for event MIGRATION in every place that generates MIGRATION_STATE_FAILED Signed-off-by: Roman Khapov --- migration/migration.c | 62 ++- migration/multifd.c | 8 +++--- migration/savevm.c| 12 - 3

Re: [PATCH v4 07/10] util/bufferiszero: Introduce biz_accel_fn typedef

2024-02-15 Thread Philippe Mathieu-Daudé
On 15/2/24 09:14, Richard Henderson wrote: Signed-off-by: Richard Henderson --- util/bufferiszero.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v4 08/10] util/bufferiszero: Simplify test_buffer_is_zero_next_accel

2024-02-15 Thread Philippe Mathieu-Daudé
On 15/2/24 09:14, Richard Henderson wrote: Because the three alternatives are monotonic, we don't need to keep a couple of bitmasks, just identify the strongest alternative at startup. Signed-off-by: Richard Henderson --- util/bufferiszero.c | 56 ++---

[PATCH v5 4/4] qemu-options.hx: Add an entry for virtio-iommu-pci and document aw-bits

2024-02-15 Thread Eric Auger
We are missing an entry for the virtio-iommu-pci device. Add the information on which machine it is currently supported and document the new aw-bits option. Signed-off-by: Eric Auger --- v4 -> v5 - tweek the aw-bits option description according to Cédric's suggestion --- qemu-options.hx | 8

[PATCH 2/2] migration: add error reason for failed MIGRATION events

2024-02-15 Thread Roman Khapov
This patch adds error description as reason for event MIGRATION in every place that generates MIGRATION_STATE_FAILED Signed-off-by: Roman Khapov --- migration/migration.c | 62 ++- migration/multifd.c | 8 +++--- migration/savevm.c| 12 - 3

[PATCH v5 3/4] hw: Set virtio-iommu aw-bits default value on pc_q35 and arm virt

2024-02-15 Thread Eric Auger
Currently the default input range can extend to 64 bits. On x86, when the virtio-iommu protects vfio devices, the physical iommu may support only 39 bits. Let's set the default to 39, as done for the intel-iommu. On ARM we set 48b as a default (matching SMMUv3 SMMU_IDR5.VAX == 0). We use hw_compat

[PATCH v5 0/4] VIRTIO-IOMMU: Introduce an aw-bits option

2024-02-15 Thread Eric Auger
In [1] and [2] we attempted to fix a case where a VFIO-PCI device protected with a virtio-iommu is assigned to an x86 guest. On x86 the physical IOMMU may have an address width (gaw) of 39 or 48 bits whereas the virtio-iommu exposes a 64b input address space by default. Hence the guest may try to u

[PATCH v5 1/4] virtio-iommu: Add an option to define the input range width

2024-02-15 Thread Eric Auger
aw-bits is a new option that allows to set the bit width of the input address range. This value will be used as a default for the device config input_range.end. By default it is set to 64 bits which is the current value. Signed-off-by: Eric Auger Reviewed-by: Zhenzhong Duan Reviewed-by: Cédric L

[PATCH v5 2/4] virtio-iommu: Trace domain range limits as unsigned int

2024-02-15 Thread Eric Auger
Use %u format to trace domain_range limits. Signed-off-by: Eric Auger Reviewed-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater --- hw/virtio/trace-events | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/virtio/trace-events b/hw/virtio/trace-events index 77905d1994..23508

Re: possible deprecation and removal of some old QEMU Arm machine types (pxa2xx, omap, sa1110)

2024-02-15 Thread Arnd Bergmann
On Thu, Feb 15, 2024, at 09:31, Andreas Kemnade wrote: > On Wed, 14 Feb 2024 23:42:58 +0100 > "Arnd Bergmann" wrote: >> On Wed, Feb 14, 2024, at 13:26, Dmitry Baryshkov wrote: >> > On Tue, 13 Feb 2024 at 23:22, Linus Walleij >> > wrote: >> >> On Tue, Feb 13, 2024 at 9:12 PM Arnd Bergmann wrot

[PATCH v3 1/1] target: Add system emulation aiming to target any architecture

2024-02-15 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Add the 'any'-architecture target. - Only consider 64-bit targets - Do not use any hardware accelerator (except qtest) - For architecture constants, use: . max of supported targets phys/virt address space . max of supported targets MMU modes . min of supported

[PATCH v3 0/1] target: New binary to prototype heterogeneous machines

2024-02-15 Thread Philippe Mathieu-Daudé
Since v2: - Run check-qtest instead of check-unit in CI (Alex) Almost 2 years later we got hundreds of cleanups patches merged, so we can get this patch in. Building the 'any' target has to be explictly requested in ./configure target-list argument. This binary will be use to rework QEMU startup

Re: [PATCH v4 09/10] util/bufferiszero: Add simd acceleration for aarch64

2024-02-15 Thread Alexander Monakov
On Wed, 14 Feb 2024, Richard Henderson wrote: > Because non-embedded aarch64 is expected to have AdvSIMD enabled, merely > double-check with the compiler flags for __ARM_NEON and don't bother with > a runtime check. Otherwise, model the loop after the x86 SSE2 function, > and use VADDV to reduc

Re: possible deprecation and removal of some old QEMU Arm machine types (pxa2xx, omap, sa1110)

2024-02-15 Thread Dmitry Baryshkov
On Thu, 15 Feb 2024 at 10:45, Arnd Bergmann wrote: > > On Thu, Feb 15, 2024, at 09:31, Andreas Kemnade wrote: > > On Wed, 14 Feb 2024 23:42:58 +0100 > > "Arnd Bergmann" wrote: > >> On Wed, Feb 14, 2024, at 13:26, Dmitry Baryshkov wrote: > >> > On Tue, 13 Feb 2024 at 23:22, Linus Walleij > >> >

Re: [PATCH v4 00/10] Optimize buffer_is_zero

2024-02-15 Thread Alexander Monakov
On Wed, 14 Feb 2024, Richard Henderson wrote: > v3: https://patchew.org/QEMU/20240206204809.9859-1-amona...@ispras.ru/ > > Changes for v4: > - Keep separate >= 256 entry point, but only keep constant length > check inline. This allows the indirect function call to be hidden > and opt

Re: [PATCH] target/mips: Use qemu_irq typedef for CPUMIPSState::irq member

2024-02-15 Thread Philippe Mathieu-Daudé
On 30/1/24 12:11, Philippe Mathieu-Daudé wrote: Missed during commit d537cf6c86 ("Unify IRQ handling") when qemu_irq typedef was introduced for IRQState. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Patch queued.

Re: [PATCH v3 0/9] sparc/leon3: Add support for -smp

2024-02-15 Thread Philippe Mathieu-Daudé
Hi Clément, On 31/1/24 09:50, Clément Chigot wrote: This series allows leon3 emulations to record up 4 CPUs. Clément Chigot (9): sparc/grlib: split out the headers for each peripherals intc/grlib_irqmp: add ncpus property intc/grlib_irqmp: implements the multiprocessor status regist

Re: [PATCH v6] arm/kvm: Enable support for KVM_ARM_VCPU_PMU_V3_FILTER

2024-02-15 Thread Eric Auger
Hi Shaoqin, On 2/1/24 09:51, Shaoqin Huang wrote: > The KVM_ARM_VCPU_PMU_V3_FILTER provides the ability to let the VMM decide > which PMU events are provided to the guest. Add a new option > `kvm-pmu-filter` as -cpu sub-option to set the PMU Event Filtering. > Without the filter, all PMU events ar

[PATCH] system/physmem: remove redundant arg reassignment

2024-02-15 Thread Manos Pitsidianakis
Arguments `ram_block` are reassigned to local declarations `block` without further use. Remove re-assignment to reduce noise. Signed-off-by: Manos Pitsidianakis --- system/physmem.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/system/physmem.c b/system/physmem.c ind

Re: [PATCH v3 0/9] sparc/leon3: Add support for -smp

2024-02-15 Thread Clément Chigot
Hi Philippe On Thu, Feb 15, 2024 at 10:02 AM Philippe Mathieu-Daudé wrote: > > Hi Clément, > > On 31/1/24 09:50, Clément Chigot wrote: > > > This series allows leon3 emulations to record up 4 CPUs. > > > Clément Chigot (9): > >sparc/grlib: split out the headers for each peripherals > >int

Re: [PULL 00/60] virtio,pc,pci: features, cleanups, fixes

2024-02-15 Thread Michael Tokarev
14.02.2024 14:13, Michael S. Tsirkin: virtio,pc,pci: features, cleanups, fixes vhost-user-snd support x2APIC mode with TCG support CXL update to r3.1 fixes, cleanups all over the place. Signed-off-by: Michael S. Tsirkin Akihik

Re: [PATCH] hw/i386/sgx: Use QDev API

2024-02-15 Thread Michael Tokarev
13.02.2024 10:16, Philippe Mathieu-Daudé: Prefer the QDev API over the low level QOM one. No logical change intended. Reviewed-by: Michael Tokarev Picked up for trivial-patches. /mjt

Re: [PATCH] hw/i386/sgx: Use QDev API

2024-02-15 Thread Michael Tokarev
13.02.2024 10:16, Philippe Mathieu-Daudé : Prefer the QDev API over the low level QOM one. No logical change intended. ... /* set the numa node property for sgx epc object */ -object_property_set_uint(obj, SGX_EPC_NUMA_NODE_PROP, list->value->node, -

Re: [PATCH v5 4/4] qemu-options.hx: Add an entry for virtio-iommu-pci and document aw-bits

2024-02-15 Thread Eric Auger
On 2/15/24 09:42, Eric Auger wrote: > We are missing an entry for the virtio-iommu-pci device. Add the > information on which machine it is currently supported and document > the new aw-bits option. > > Signed-off-by: Eric Auger argh forgot to add Cédric R-b collected on v4 Reviewed-by: Cédric

Re: [PATCH] system/physmem: remove redundant arg reassignment

2024-02-15 Thread David Hildenbrand
On 15.02.24 10:15, Manos Pitsidianakis wrote: Arguments `ram_block` are reassigned to local declarations `block` without further use. Remove re-assignment to reduce noise. Signed-off-by: Manos Pitsidianakis --- system/physmem.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) di

Re: [PATCH v3 1/3] hw/virtio: check owner for removing objects

2024-02-15 Thread Albert Esteve
On Mon, Feb 5, 2024 at 1:57 PM Alex Bennée wrote: > Albert Esteve writes: > > > Shared objects lack spoofing protection. > > For VHOST_USER_BACKEND_SHARED_OBJECT_REMOVE messages > > received by the vhost-user interface, any backend was > > allowed to remove entries from the shared table just > >

Re: [PATCH] system/physmem: remove redundant arg reassignment

2024-02-15 Thread Michael Tokarev
15.02.2024 12:15, Manos Pitsidianakis : Arguments `ram_block` are reassigned to local declarations `block` without further use. Remove re-assignment to reduce noise. Reviewed-by: Michael Tokarev And applied to trivial-patches, thanks! /mjt

Re: [PATCH 1/2] target/riscv/csr.c: Add functional of hvictl CSR

2024-02-15 Thread Alistair Francis
On Tue, Feb 13, 2024 at 3:13 AM Irina Ryapolova wrote: > > CSR hvictl (Hypervisor Virtual Interrupt Control) provides further flexibility > for injecting interrupts into VS level in situations not fully supported by > the > facilities described thus far, but only with more active involvement of t

Re: [PATCH v3 2/3] hw/virtio: cleanup shared resources

2024-02-15 Thread Albert Esteve
On Tue, Feb 6, 2024 at 12:11 AM Alex Bennée wrote: > Albert Esteve writes: > > > Ensure that we cleanup all virtio shared > > resources when the vhost devices is cleaned > > up (after a hot unplug, or a crash). > > > > To do so, we add a new function to the virtio_dmabuf > > API called `virtio_d

Re: [PATCH 2/2] target/riscv/csr: Added the ability to delegate LCOFI to VS

2024-02-15 Thread Alistair Francis
On Tue, Feb 13, 2024 at 3:13 AM Irina Ryapolova wrote: > > From: Vadim Shakirov > > In the AIA specification in the paragraph "Virtual interrupts for VS level" > it is indicated for interrupts 13-63: if the bit in hideleg is enabled, > then the corresponding vsip and vsie bits are aliases to sip

[PATCH 1/1] target/i386: Generate an illegal opcode exception on cmp instructions with lock prefix

2024-02-15 Thread Ziqiao Kong
target/i386: As specified by Intel Manual Vol2 3-180, cmp instructions are not allowed to have lock prefix and a `UD` should be raised. Without this patch, s1->T0 will be uninitialized and used in the case OP_CMPL. Signed-off-by: Ziqiao Kong --- target/i386/tcg/translate.c | 11 ++- 1 fi

[PATCH 0/1] Fix tcg assert when decoding "lock cmp"

2024-02-15 Thread Ziqiao Kong
(Resending again because I found I accidentally unsubscribed the list. And sorry for disturbance for Richard.) Hello QEMU Developers! I'm from the downstream project Unicorn Engine (https://github.com/unicorn-engine/unicorn). I identified a simple bug that triggers a tcg assertion in QEMU. Althoug

Re: [PATCH v3 0/6] riscv: named features riscv,isa, 'svade' rework

2024-02-15 Thread Alistair Francis
On Sat, Feb 3, 2024 at 1:23 AM Daniel Henrique Barboza wrote: > > Hi, > > In this new version we changed patch 3 as suggested by Alistair in v1 > [1]. Instead of creating individual always-true bool for each named > feature, create a bool flag will be always 'true' to be used as config > offset fo

Re: [PATCH 0/2] RISC-V: Add Ztso extension

2024-02-15 Thread Christoph Müllner
On Wed, Feb 14, 2024 at 5:25 PM Andrew Jones wrote: > > On Wed, Feb 14, 2024 at 02:38:34PM +0100, Christoph Müllner wrote: > > On Wed, Feb 14, 2024 at 2:35 PM Daniel Henrique Barboza > > wrote: > > > > > > > > > > > > On 2/7/24 09:22, Christoph Müllner wrote: > > > > The first patch of this serie

Re: [PATCH v2] target/riscv: Update $ra with current $pc in trans_cm_jalt()

2024-02-15 Thread Alistair Francis
On Wed, Feb 7, 2024 at 6:18 PM Jason Chien wrote: > > The original implementation sets $pc to the address read from the jump > vector table first and links $ra with the address of the next instruction > after the updated $pc. After jumping to the updated $pc and executing the > next ret instructio

Re: [PATCH v2 0/2] RISC-V: ACPI: Enable SPCR

2024-02-15 Thread Alistair Francis
On Tue, Jan 16, 2024 at 11:11 AM Sia Jee Heng wrote: > > This series focuses on enabling the Serial Port Console Redirection (SPCR) > table for the RISC-V virt platform. Considering that ARM utilizes the same > function, the initial patch involves migrating the build_spcr function to > common code

Re: [PATCH 0/2] linux-user/riscv: Sync hwprobe keys with kernel

2024-02-15 Thread Alistair Francis
On Wed, Feb 7, 2024 at 10:00 PM Christoph Müllner wrote: > > This series syncs the hwprobe keys with those available in the upstream > kernel repository with the exception of Ztso, which is not supported in > QEMU as of now. > > The first patch is a resend (sent on Nov 27), as it should have been

Re: [PATCH v2] hw: riscv: Allow large kernels to boot by moving the initrd further away in RAM

2024-02-15 Thread Alistair Francis
On Wed, Feb 7, 2024 at 1:42 AM Alexandre Ghiti wrote: > > Currently, the initrd is placed at 128MB, which overlaps with the kernel > when it is large (for example syzbot kernels are). From the kernel side, > there is no reason we could not push the initrd further away in memory > to accommodate la

Re: possible deprecation and removal of some old QEMU Arm machine types (pxa2xx, omap, sa1110)

2024-02-15 Thread Marcin Juszkiewicz
W dniu 15.02.2024 o 9:52 AM, Dmitry Baryshkov pisze: If we want to actually go there, I think the best option for PCMCIA support is likely to replace the entire "soc_common" pcmcia driver with a simple drivers/pata/ storage driver and no support for other cards. hmm, main usage for PCMCIA/CF i

Re: double free or corruption (out) in iscsi virtual machine

2024-02-15 Thread Fiona Ebner
Am 17.01.24 um 08:23 schrieb M_O_Bz: > Basic Info: > 1. Issue: I got a " double free or corruption (out)", head for > attachment debug.log for details, the debug.log print the backtrace of > one virtual machine > 2. Reproduce: currently I cann't destribe how to reproduce this bug, > because it's in

[PATCH 0/2] Trace skipped memory sections at vdpa memory listener

2024-02-15 Thread Eugenio Pérez
Some memory regions are not being skipped in vhost_vdpa_listener_region_del, but they are skipped in vhost_vdpa_listener_region_add, or vice versa. The vhost-vdpa code expects all parts to maintain their properties, so we're adding a trace to help with debugging when any part is skipped. Eugenio

[PATCH 1/2] vdpa: stash memory region properties in vars

2024-02-15 Thread Eugenio Pérez
Next changes uses this variables, so avoid call repeatedly to memory region functions. No functional change intended. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-vdpa.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhos

[PATCH 2/2] vdpa: trace skipped memory sections

2024-02-15 Thread Eugenio Pérez
Sometimes, certain parts are not being skipped in vhost_vdpa_listener_region_del, but they are skipped in vhost_vdpa_listener_region_add, or vice versa. The vhost-vdpa code expects all parts to maintain their properties, so we're adding a trace to help with debugging when any part is skipped. Sig

Re: Assessment of the difficulty in porting CPU architecture for qemu

2024-02-15 Thread Peter Maydell
On Fri, 17 Nov 2023 at 07:35, 方 <1584389...@qq.com> wrote: > > Hello everyone! I am working on implementing a tool to assess the complexity > of CPU architecture porting. It primarily focuses on RISC-V architecture > porting. In fact, the tool may have an average estimate of various > architect

[PATCH v3 0/4] hw/pci-host: Build ppc4xx_pci.c/ppc440_pcix.c once

2024-02-15 Thread Philippe Mathieu-Daudé
v3: - PPC440_PCI -> PPC440_PCIX (Zoltan) - MIT -> GPLv2 (Zoltan) v2: - Squashed 2 patches (Zoltan) v1: - Move ppc4xx_pci.c/ppc440_pcix.c from hw/ppc/ to hw/pci-host/ - Build them once for all targets If it is convenient for PPC maintainers I can queue this via my misc-hw tree. Thanks, Phil. P

[PATCH v3 3/4] hw/ppc/ppc4xx_pci: Move ppc4xx_pci.c to hw/pci-host/

2024-02-15 Thread Philippe Mathieu-Daudé
ppc4xx_pci.c is moved from the target specific ppc_ss[] meson source set to pci_ss[] which is common to all targets: the object is built once. Declare PPC4XX_PCI selector in pci-host/Kconfig. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- MAINTAINERS |

[PATCH v3 1/4] hw/ppc/ppc4xx_pci: Remove unused "hw/ppc/ppc.h" header

2024-02-15 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: BALATON Zoltan Reviewed-by: Thomas Huth --- hw/ppc/ppc440_pcix.c | 1 - hw/ppc/ppc4xx_pci.c | 1 - 2 files changed, 2 deletions(-) diff --git a/hw/ppc/ppc440_pcix.c b/hw/ppc/ppc440_pcix.c index df4ee374d0..d84418cb7b 100644 --- a/hw/ppc/ppc44

[PATCH v3 4/4] hw/ppc/ppc440_pcix: Move ppc440_pcix.c to hw/pci-host/

2024-02-15 Thread Philippe Mathieu-Daudé
ppc440_pcix.c is moved from the target specific ppc_ss[] meson source set to pci_ss[] which is common to all targets: the object is built once. Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS| 2 +- hw/{ppc => pci-host}/ppc440_pcix.c | 0 h

[PATCH v3 2/4] hw/ppc/ppc4xx_pci: Extract PCI host definitions to hw/pci-host/ppc4xx.h

2024-02-15 Thread Philippe Mathieu-Daudé
Reviewed-by: BALATON Zoltan Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 1 + include/hw/pci-host/ppc4xx.h | 17 + include/hw/ppc/ppc4xx.h | 5 - hw/ppc/ppc440_bamboo.c | 1 + hw/ppc/ppc440_pcix.c |

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

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

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

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

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

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

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

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

Re: [PATCH] system/physmem: remove redundant arg reassignment

2024-02-15 Thread Philippe Mathieu-Daudé
On 15/2/24 10:15, Manos Pitsidianakis wrote: Arguments `ram_block` are reassigned to local declarations `block` without further use. Remove re-assignment to reduce noise. Signed-off-by: Manos Pitsidianakis --- system/physmem.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) dif

Re: [PATCH v3 8/9] mips/loongson3_virt: do not require CONFIG_USB

2024-02-15 Thread Paolo Bonzini
On Thu, Feb 15, 2024 at 8:55 AM Philippe Mathieu-Daudé wrote: > > if (defaults_enabled() && object_class_by_name("pci-ohci")) { > > pci_create_simple(pci_bus, -1, "pci-ohci"); > > -usb_create_simple(usb_bus_find(-1), "usb-kbd"); > > -usb_create_simple(usb_bus_find(-

Re: [PATCH v3 2/3] hw/virtio: cleanup shared resources

2024-02-15 Thread Alex Bennée
Albert Esteve writes: > On Tue, Feb 6, 2024 at 12:11 AM Alex Bennée wrote: > > Albert Esteve writes: > > > Ensure that we cleanup all virtio shared > > resources when the vhost devices is cleaned > > up (after a hot unplug, or a crash). > > > > To do so, we add a new function to the virti

Re: [PATCH 0/2] RISC-V: Add Ztso extension

2024-02-15 Thread Daniel Henrique Barboza
On 2/15/24 06:53, Christoph Müllner wrote: On Wed, Feb 14, 2024 at 5:25 PM Andrew Jones wrote: On Wed, Feb 14, 2024 at 02:38:34PM +0100, Christoph Müllner wrote: On Wed, Feb 14, 2024 at 2:35 PM Daniel Henrique Barboza wrote: On 2/7/24 09:22, Christoph Müllner wrote: The first patch o

Re: [PATCH v3 0/1] target: New binary to prototype heterogeneous machines

2024-02-15 Thread Philippe Mathieu-Daudé
Forgot to Cc Anton :/ On 15/2/24 09:46, Philippe Mathieu-Daudé wrote: Since v2: - Run check-qtest instead of check-unit in CI (Alex) Almost 2 years later we got hundreds of cleanups patches merged, so we can get this patch in. Building the 'any' target has to be explictly requested in ./configu

Re: [PATCH v3 0/9] sparc/leon3: Add support for -smp

2024-02-15 Thread Philippe Mathieu-Daudé
On 15/2/24 10:17, Clément Chigot wrote: This series allows leon3 emulations to record up 4 CPUs. What is your base commit to apply this series? It's commit 11be70677c70fdccd452a3233653949b79e97908 Merge tag 'pull-vfio-20240129' of https://github.com/legoater/qemu into staging Thanks,

Re: [PATCH v3 6/9] leon3: remove SP initialization

2024-02-15 Thread Philippe Mathieu-Daudé
On 31/1/24 09:50, Clément Chigot wrote: According to the doc (see §4.2.15 in [1]), the reset operation should not impact %SP. [1] https://gaisler.com/doc/gr712rc-usermanual.pdf Signed-off-by: Clément Chigot --- hw/sparc/leon3.c | 3 --- 1 file changed, 3 deletions(-) Reviewed-by: Philippe

[PATCH v2 0/2] Field 'reason' for MIGRATION event

2024-02-15 Thread Roman Khapov
This is resending of series 20240215082659.1378342-1-rkha...@yandex-team.ru, where patch subjects numbers were broken in patch 2/2. Sometimes, when migration fails, it is hard to find out the cause of the problems: you have to grep qemu logs. At the same time, there is MIGRATION event, which looks

[PATCH v2 2/2] migration: add error reason for failed MIGRATION events

2024-02-15 Thread Roman Khapov
This patch adds error description as reason for event MIGRATION in every place that generates MIGRATION_STATE_FAILED Signed-off-by: Roman Khapov --- migration/migration.c | 62 ++- migration/multifd.c | 8 +++--- migration/savevm.c| 12 - 3

[PATCH v2 1/2] qapi/migration.json: add reason to MIGRATION event

2024-02-15 Thread Roman Khapov
This commit adds the optional field reason for the events, which contains the string, describing reason of status changing. For example: reason of migration fail. Function migrate_set_state now accepts 4th argument: the reason to pass to event. Every call of this function appended with NULL argume

Re: double free or corruption (out) in iscsi virtual machine

2024-02-15 Thread m_o_bz
yep,I found this commit too, already patch this commit and test it, the bug can not reproduce any more 原始邮件 发件人:Fiona Ebner 时间:2024年2月15日 18:29 收件人:M_O_Bz ,qemu-block 抄送:"deepa.srinivasan" ,qemu-devel ,ronniesahlberg ,pbonzini ,pl 主题:Re: double free or corruption (out)

Re: [PATCH 1/1] target/i386: Generate an illegal opcode exception on cmp instructions with lock prefix

2024-02-15 Thread Paolo Bonzini
On 2/15/24 10:50, Ziqiao Kong wrote: target/i386: As specified by Intel Manual Vol2 3-180, cmp instructions are not allowed to have lock prefix and a `UD` should be raised. Without this patch, s1->T0 will be uninitialized and used in the case OP_CMPL. Signed-off-by: Ziqiao Kong --- target/i38

Re: [PATCH v3 1/3] qmp: Switch x-query-virtio-status back to numeric encoding

2024-02-15 Thread Yong Huang
On Tue, Feb 13, 2024 at 6:26 PM Michael S. Tsirkin wrote: > On Fri, Feb 02, 2024 at 10:32:15PM +0800, Hyman Huang wrote: > > x-query-virtio-status returns several sets of virtio feature and > > status flags. It goes back to v7.2.0. > > > > In the initial commit 90c066cd682 (qmp: add QMP command

Re: [PATCH v3 0/1] Sending small fix for NPCM GMAC test to properly test on Nuvoton 7xx

2024-02-15 Thread Peter Maydell
On Thu, 8 Feb 2024 at 19:48, Nabih Estefan wrote: > > Accidentally added extra file to v2 that broke email sending (and was > not meant to be upstreamed). Sending our v3 to skip that confusion. > > Removing testing for PCS registers since that doesn't exist on 7xx. > > Nabih Estefan (1): > tests

Re: [PATCH v3 1/1] target: Add system emulation aiming to target any architecture

2024-02-15 Thread Manos Pitsidianakis
On Thu, 15 Feb 2024 10:46, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daudé Add the 'any'-architecture target. - Only consider 64-bit targets - Do not use any hardware accelerator (except qtest) - For architecture constants, use: . max of supported targets phys/virt address space

Re: [PATCH 1/2] hw/arm: Use TYPE_OR_IRQ when connecting STM32L4x5 EXTI fan-in IRQs

2024-02-15 Thread Peter Maydell
On Mon, 12 Feb 2024 at 16:34, Inès Varhol wrote: > > Fixes: 52671f69f7a4 ("[PATCH v8 0/3] Add device STM32L4x5 EXTI") > Signed-off-by: Inès Varhol > --- > hw/arm/stm32l4x5_soc.c | 69 -- > 1 file changed, 59 insertions(+), 10 deletions(-) > > diff --git a/

Re: [PATCH 2/2] tests/qtest: Check that EXTI fan-in irqs are correctly connected

2024-02-15 Thread Peter Maydell
On Mon, 12 Feb 2024 at 16:34, Inès Varhol wrote: > > This commit adds a QTest that verifies each input line of a specific > EXTI OR gate can influence the output line. > > Signed-off-by: Inès Varhol > --- > tests/qtest/stm32l4x5_exti-test.c | 97 +++ > 1 file changed,

Re: [PULL 26/34] migration/multifd: Join the TLS thread

2024-02-15 Thread Fabiano Rosas
Michael Tokarev writes: > 14.02.2024 16:27, Fabiano Rosas : >> Michael Tokarev writes: > ..>>> This change, which is suggested for -stable, while simple by its own, > seems to depend on the previous changes in this series, which are not for -stable. In particular, whole "Finally

Re: possible deprecation and removal of some old QEMU Arm machine types (pxa2xx, omap, sa1110)

2024-02-15 Thread H. Nikolaus Schaller
> Am 15.02.2024 um 09:31 schrieb Andreas Kemnade : > > On Wed, 14 Feb 2024 23:42:58 +0100 > "Arnd Bergmann" wrote: > >> On Wed, Feb 14, 2024, at 13:26, Dmitry Baryshkov wrote: >>> On Tue, 13 Feb 2024 at 23:22, Linus Walleij >>> wrote: On Tue, Feb 13, 2024 at 9:12 PM Arnd Bergmann wr

[PATCH 1/1] Generate an illegal opcode exception on cmp instructions with lock prefix

2024-02-15 Thread Ziqiao Kong
target/i386/tcg: As specified by Intel Manual Vol2 3-180, cmp instructions are not allowed to have lock prefix and a `UD` should be raised. Without this patch, s1->T0 will be uninitialized and used in the case OP_CMPL. Signed-off-by: Ziqiao Kong --- target/i386/tcg/translate.c | 11 ++-

[PATCH 0/2] hw/sparc/leon3: Trivial cleanups around write_bootloader()

2024-02-15 Thread Philippe Mathieu-Daudé
Have write_bootloader() take a void* and remove unused 'env' arg. Philippe Mathieu-Daudé (2): hw/sparc/leon3: Remove unused 'env' argument of write_bootloader() hw/sparc/leon3: Have write_bootloader() take a void pointer argument hw/sparc/leon3.c | 10 +++--- 1 file changed, 3 insertions

[PATCH 0/1] Fix tcg assert when decoding "lock cmp"

2024-02-15 Thread Ziqiao Kong
Hello Qemu Developers! I'm from the downstream project Unicorn Engine (https://github.com/unicorn-engine/unicorn). I identified a simple bug that triggers a tcg assertion in QEMU. Although I used a usermode usecase to illustrate the bug, it shall also affect system emulation. Assume a binary looks

Re: possible deprecation and removal of some old QEMU Arm machine types (pxa2xx, omap, sa1110)

2024-02-15 Thread Andreas Kemnade
On Wed, 14 Feb 2024 23:42:58 +0100 "Arnd Bergmann" wrote: > On Wed, Feb 14, 2024, at 13:26, Dmitry Baryshkov wrote: > > On Tue, 13 Feb 2024 at 23:22, Linus Walleij > > wrote: > >> On Tue, Feb 13, 2024 at 9:12 PM Arnd Bergmann wrote: > >> > On Tue, Feb 13, 2024, at 16:36, Guenter Roeck wrot

[PATCH 2/2] hw/sparc/leon3: Have write_bootloader() take a void pointer argument

2024-02-15 Thread Philippe Mathieu-Daudé
Directly use the void pointer argument returned by memory_region_get_ram_ptr(). Signed-off-by: Philippe Mathieu-Daudé --- hw/sparc/leon3.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c index d096fb04cb..8717c72e77 100644 --- a/hw

[PATCH 0/1] Fix tcg assert when decoding "lock cmp"

2024-02-15 Thread Ziqiao Kong
(Resending this series since it looks like being ignored by the list) Hello QEMU Developers! I'm from the downstream project Unicorn Engine (https://github.com/unicorn-engine/unicorn). I identified a simple bug that triggers a tcg assertion in QEMU. Although I used a usermode usecase to illustrate

[PATCH 1/2] hw/sparc/leon3: Remove unused 'env' argument of write_bootloader()

2024-02-15 Thread Philippe Mathieu-Daudé
'CPUSPARCState *env' argument is unused, remove it. Signed-off-by: Philippe Mathieu-Daudé --- hw/sparc/leon3.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c index 2dfb742566..d096fb04cb 100644 --- a/hw/sparc/leon3.c +++ b/hw/sparc/le

[PATCH 1/1] target/i386: Generate an illegal opcode exception on cmp instructions with lock prefix

2024-02-15 Thread Ziqiao Kong
target/i386: As specified by Intel Manual Vol2 3-180, cmp instructions are not allowed to have lock prefix and a `UD` should be raised. Without this patch, s1->T0 will be uninitialized and used in the case OP_CMPL. Signed-off-by: Ziqiao Kong --- target/i386/tcg/translate.c | 11 ++- 1 fi

Re: [PATCH v3 3/6] target/riscv: add remaining named features

2024-02-15 Thread Conor Dooley
On Fri, Feb 02, 2024 at 12:21:51PM -0300, Daniel Henrique Barboza wrote: > The RVA22U64 and RVA22S64 profiles mandates certain extensions that, > until now, we were implying that they were available. > > We can't do this anymore since named features also has a riscv,isa > entry. Let's add them to

Re: [PATCH v3 1/1] target: Add system emulation aiming to target any architecture

2024-02-15 Thread Philippe Mathieu-Daudé
On 15/2/24 14:02, Manos Pitsidianakis wrote: On Thu, 15 Feb 2024 10:46, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daudé Add the 'any'-architecture target. - Only consider 64-bit targets - Do not use any hardware accelerator (except qtest) - For architecture constants, use:  . max

Re: [PULL 00/60] virtio,pc,pci: features, cleanups, fixes

2024-02-15 Thread Michael S. Tsirkin
Maybe add On Thu, Feb 15, 2024 at 12:20:53PM +0300, Michael Tokarev wrote: > > Akihiko Odaki (2): > >hw/smbios: Fix OEM strings table option validation > >hw/smbios: Fix port connector option validation this > > Dmitry Osipenko (1): > >virtio-gpu: Correct virgl_renderer_r

  1   2   3   4   >