Re: [PATCH v2 32/37] target/sparc: Implement VIS4 comparisons

2024-06-05 Thread Philippe Mathieu-Daudé
On 26/5/24 21:42, Richard Henderson wrote: VIS4 completes the set, adding missing signed 8-bit ops and missing unsigned 16 and 32-bit ops. Signed-off-by: Richard Henderson --- target/sparc/helper.h | 12 +-- target/sparc/insns.decode | 6 ++ target/sparc/translate.c | 12 +++ targ

Re: [PATCH v2 4/4] backends/hostmem: Report error when memory size is unaligned

2024-06-05 Thread Mario Casquero
This patch has been successfully tested by QE. After allocating some hugepages in the host, try to boot up a VM with the memory backed by a file and the size unaligned, check now the message displayed by QEMU: qemu-system-x86_64: backend memory size must be multiple of 0x20 Tested-by: Mario Ca

Re: [RFC PATCH 0/1] vhost-user: Add SHMEM_MAP/UNMAP requests

2024-06-05 Thread Albert Esteve
On Tue, Jun 4, 2024 at 8:16 PM Stefan Hajnoczi wrote: > On Thu, May 30, 2024 at 05:22:22PM +0200, Albert Esteve wrote: > > Hi all, > > > > This is an early attempt to have backends > > support dynamic fd mapping into shared > > memory regions. As such, there are a few > > things that need settlin

[PATCH 2/3] tests/qtest/libqtest: add qtest_has_cpu() api

2024-06-05 Thread Ani Sinha
Added a new test api qtest_has_cpu() in order to check availability of some cpu models in the current QEMU binary. The specific architecture of the QEMU binary is selected using the QTEST_QEMU_BINARY environment variable. This api would be useful to run tests against some older cpu models after che

[PATCH v2 1/3] qtest/x86/numa-test: do not use the obsolete 'pentium' cpu

2024-06-05 Thread Ani Sinha
'pentium' cpu is old and obsolete and should be avoided for running tests if its not strictly needed. Use 'max' cpu instead for generic non-cpu specific numa test. CC: th...@redhat.com Reviewed-by: Thomas Huth Signed-off-by: Ani Sinha --- tests/qtest/numa-test.c | 3 ++- 1 file changed, 2 inser

Re: [RFC PATCH v2 0/2] ui/gtk: Introduce new param - Connectors

2024-06-05 Thread Marc-André Lureau
Hi On Tue, Jun 4, 2024 at 9:59 PM Kim, Dongwon wrote: > Hi Marc-André, > > On 6/4/2024 3:37 AM, Marc-André Lureau wrote: > > Hi > > > > On Fri, May 31, 2024 at 11:00 PM > > wrote: > > > > From: Dongwon Kim dongwon@intel.com>> > > > > This patch series

[PATCH 0/3] x86 cpu test refactoring

2024-06-05 Thread Ani Sinha
Add a new library api to check for the support of a specific cpu type. Used the new api to check support for some older x86 cpu models before running the tests. CC: th...@redhat.com CC: imamm...@redhat.com CC: qemu-devel@nongnu.org CC: pbonz...@redhat.com CC: lviv...@redhat.com Ani Sinha (3):

[PATCH 3/3] tests/qtest/x86: check for availability of older cpu models before running tests

2024-06-05 Thread Ani Sinha
Some older cpu models like 486, athlon, pentium, penryn, phenom, core2duo etc may not be available in all builds. Check for their availability in qemu before running the corresponding tests. The order of the tests has been altered so that all tests for similar checks under a specific cpu is placed

Re: [PATCH v2 35/37] target/sparc: Implement MWAIT

2024-06-05 Thread Philippe Mathieu-Daudé
On 26/5/24 21:42, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 1 + target/sparc/translate.c | 11 +++ 2 files changed, 12 insertions(+) +static void do_wrmwait(DisasContext *dc, TCGv src) +{ +/* + * TODO: This is a stub vers

Re: [PULL 00/46] virtio: features,fixes

2024-06-05 Thread Michael S. Tsirkin
On Tue, Jun 04, 2024 at 03:06:01PM -0400, Michael S. Tsirkin wrote: > The following changes since commit 60b54b67c63d8f076152e0f7dccf39854dfc6a77: > > Merge tag 'pull-lu-20240526' of https://gitlab.com/rth7680/qemu into > staging (2024-05-26 17:51:00 -0700) > > are available in the Git reposit

Re: [PULL 04/46] virtio-pci: Fix the use of an uninitialized irqfd.

2024-06-05 Thread Michael S. Tsirkin
On Tue, Jun 04, 2024 at 03:06:15PM -0400, Michael S. Tsirkin wrote: > From: Cindy Lu > > The crash was reported in MAC OS and NixOS, here is the link for this bug > https://gitlab.com/qemu-project/qemu/-/issues/2334 > https://gitlab.com/qemu-project/qemu/-/issues/2321 > > The root cause is that

Re: [PATCH v2 4/4] vga/cirrus: deprecate, don't build by default

2024-06-05 Thread Gerd Hoffmann
Hi, > > Upstream QEMU's scope is to emulate pretty much arbitrary hardware that > > may have existed at any point in time. Emulating Cirrus is very much > > in scope upstream, and even if there are other better VGA devices, that > > doesn't make emulation of Cirrus redundant. > > > > Downstream

Re: [PATCH v2 30/37] target/sparc: Implement FALIGNDATAi

2024-06-05 Thread Philippe Mathieu-Daudé
On 26/5/24 21:42, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 1 + target/sparc/translate.c | 33 ++--- 2 files changed, 31 insertions(+), 3 deletions(-) Nice. Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v2 1/3] stdvga: fix screen blanking

2024-06-05 Thread Gerd Hoffmann
On Tue, Jun 04, 2024 at 10:27:18AM GMT, Marc-André Lureau wrote: > Hi > > > +if (is_buffer_shared(surface)) { > > Perhaps the suggestion to rename the function (in the following patch) > should instead be surface_is_allocated() ? that would match the actual > flag check. But callers would hav

Re: [PATCH v2 23/37] target/sparc: Implement MOVsTOw, MOVdTOx, MOVwTOs, MOVxTOd

2024-06-05 Thread Philippe Mathieu-Daudé
On 26/5/24 21:42, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 6 ++ target/sparc/translate.c | 36 2 files changed, 42 insertions(+) +MOVsTOuw10 . 110110 0 1 0001 0001 .@r_r2

[PATCH RESEND 0/6] Introduce extension implied rules

2024-06-05 Thread Jerry Zhang Jian
Reviewed-by: Jerry Zhang Jian -- 2.44.0

Re: [PATCH 2/5] s390x: Add loadparm to CcwDevice

2024-06-05 Thread Thomas Huth
On 29/05/2024 17.43, jro...@linux.ibm.com wrote: From: Jared Rossi Add a loadparm property to the CcwDevice object so that different loadparms can be defined on a per-device basis when using multiple boot devices. The machine/global loadparm is still supported. If both a global and per-device

Re: [PATCH v2 21/37] target/sparc: Implement LDXEFSR

2024-06-05 Thread Philippe Mathieu-Daudé
On 26/5/24 21:42, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/sparc/helper.h | 1 + target/sparc/insns.decode | 1 + target/sparc/fop_helper.c | 6 ++ target/sparc/translate.c | 11 +-- 4 files changed, 17 insertions(+), 2 deletions(-) Reviewe

Re: [PATCH] ui/gtk: Wait until the current guest frame is rendered before switching to RUN_STATE_SAVE_VM

2024-06-05 Thread Marc-André Lureau
Hi On Tue, Jun 4, 2024 at 9:49 PM Kim, Dongwon wrote: > On 6/4/2024 4:12 AM, Marc-André Lureau wrote: > > Hi > > > > On Thu, May 30, 2024 at 2:44 AM > > wrote: > > > > From: Dongwon mailto:dongwon@intel.com>> > > > > Make sure rendering of the current f

Re: [PATCH v2 19/37] target/sparc: Implement FPCMPEQ8, FPCMPNE8, FPCMPULE8, FPCMPUGT8

2024-06-05 Thread Philippe Mathieu-Daudé
On 26/5/24 21:42, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/sparc/helper.h | 4 target/sparc/insns.decode | 5 + target/sparc/translate.c | 9 + target/sparc/vis_helper.c | 40 +++ 4 files changed, 58 i

Re: [PATCH 0/6] refactor RDMA live migration based on rsocket API

2024-06-05 Thread Michael S. Tsirkin
On Tue, Jun 04, 2024 at 08:14:06PM +0800, Gonglei wrote: > From: Jialin Wang > > Hi, > > This patch series attempts to refactor RDMA live migration by > introducing a new QIOChannelRDMA class based on the rsocket API. > > The /usr/include/rdma/rsocket.h provides a higher level rsocket API > tha

Re: [PATCH 0/5] s390x: Add Full Boot Order Support

2024-06-05 Thread Thomas Huth
On 29/05/2024 17.43, jro...@linux.ibm.com wrote: From: Jared Rossi This patch set primarily adds support for the specification of multiple boot devices, allowing for the guest to automatically use an alternative device on a failed boot without needing to be reconfigured. It additionally provide

Re: [PATCH v2 18/37] target/sparc: Implement FPADDS, FPSUBS

2024-06-05 Thread Philippe Mathieu-Daudé
On 26/5/24 21:42, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 9 + target/sparc/translate.c | 82 +++ 2 files changed, 91 insertions(+) +static void gen_op_fpadds16s(TCGv_i32 d, TCGv_i32 src1, TCGv_i3

Re: [PATCH v2 13/37] target/sparc: Implement FCHKSM16

2024-06-05 Thread Philippe Mathieu-Daudé
On 26/5/24 21:42, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/sparc/helper.h | 1 + target/sparc/insns.decode | 1 + target/sparc/translate.c | 32 target/sparc/vis_helper.c | 23 +++ 4 files changed, 57 i

Re: [RFC PATCH 1/1] vhost-user: add shmem mmap request

2024-06-05 Thread Albert Esteve
On Tue, Jun 4, 2024 at 8:54 PM Stefan Hajnoczi wrote: > On Thu, May 30, 2024 at 05:22:23PM +0200, Albert Esteve wrote: > > Add SHMEM_MAP/UNMAP requests to vhost-user. > > > > This request allows backends to dynamically map > > fds into a shared memory region indentified by > > Please call this "V

Re: [PATCH RFC 2/8] target/riscv: Decouple AIA processing from xiselect and xireg

2024-06-05 Thread Jason Chien
Atish Patra 於 2024/2/17 上午 08:01 寫道: From: Kaiwen Xue Since xiselect and xireg also will be of use in sxcsrind, AIA should have its own separated interface when those CSRs are accessed. Signed-off-by: Atish Patra Signed-off-by: Kaiwen Xue --- target/riscv/csr.c | 147

Re: [PATCH 4/5] s390x: Add boot device fallback infrastructure

2024-06-05 Thread Thomas Huth
On 29/05/2024 17.43, jro...@linux.ibm.com wrote: From: Jared Rossi Add a routine for loading the next IPLB if a device fails to boot. This includes some minor changes to the List-Directed IPL routine so that the failing device may be retried using the legacy boot pointers before moving on to t

Re: [PATCH 1/3] gpex-acpi: Support PCI link devices outside the host bridge

2024-06-05 Thread Michael S. Tsirkin
On Tue, May 28, 2024 at 01:01:01PM +0530, Sunil V L wrote: > Currently, PCI link devices (PNP0C0F) are always created within the > scope of the PCI root complex. However, RISC-V needs PCI link devices to > be outside the scope of the PCI host bridge to properly enable the probe > order. This matche

[PATCH v7 02/17] backends/host_iommu_device: Introduce HostIOMMUDeviceCaps

2024-06-05 Thread Zhenzhong Duan
HostIOMMUDeviceCaps's elements map to the host IOMMU's capabilities. Different platform IOMMU can support different elements. Currently only two elements, type and aw_bits, type hints the host platform IOMMU type, i.e., INTEL vtd, ARM smmu, etc; aw_bits hints host IOMMU address width. Introduce .

[PATCH v7 01/17] backends: Introduce HostIOMMUDevice abstract

2024-06-05 Thread Zhenzhong Duan
A HostIOMMUDevice is an abstraction for an assigned device that is protected by a physical IOMMU (aka host IOMMU). The userspace interaction with this physical IOMMU can be done either through the VFIO IOMMU type 1 legacy backend or the new iommufd backend. The assigned device can be a VFIO device

[PATCH v7 05/17] range: Introduce range_get_last_bit()

2024-06-05 Thread Zhenzhong Duan
This helper get the highest 1 bit position of the upper bound. If the range is empty or upper bound is zero, -1 is returned. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan Reviewed-by: Eric Auger --- include/qemu/range.h | 11 +++ 1 file changed, 11 insertions(+) diff -

[PATCH v7 06/17] vfio/container: Implement HostIOMMUDeviceClass::realize() handler

2024-06-05 Thread Zhenzhong Duan
The realize function populates the capabilities. For now only the aw_bits caps is computed for legacy backend. Introduce a helper function vfio_device_get_aw_bits() which calls range_get_last_bit() to get host aw_bits and package it in HostIOMMUDeviceCaps for query with .get_cap(). This helper wil

[PATCH v7 16/17] intel_iommu: Implement [set|unset]_iommu_device() callbacks

2024-06-05 Thread Zhenzhong Duan
From: Yi Liu Implement [set|unset]_iommu_device() callbacks in Intel vIOMMU. In set call, we take a reference of HostIOMMUDevice and store it in hash table indexed by PCI BDF. Note this BDF index is device's real BDF not the aliased one which is different from the index of VTDAddressSpace. There

[PATCH v7 07/17] backends/iommufd: Introduce helper function iommufd_backend_get_device_info()

2024-06-05 Thread Zhenzhong Duan
Introduce a helper function iommufd_backend_get_device_info() to get host IOMMU related information through iommufd uAPI. Signed-off-by: Yi Liu Signed-off-by: Yi Sun Signed-off-by: Zhenzhong Duan --- include/sysemu/iommufd.h | 3 +++ backends/iommufd.c | 22 ++ 2 fil

[PATCH v7 15/17] intel_iommu: Extract out vtd_cap_init() to initialize cap/ecap

2024-06-05 Thread Zhenzhong Duan
Extract cap/ecap initialization in vtd_cap_init() to make code cleaner. No functional change intended. Reviewed-by: Eric Auger Signed-off-by: Zhenzhong Duan --- hw/i386/intel_iommu.c | 93 --- 1 file changed, 51 insertions(+), 42 deletions(-) diff --git

[PATCH v7 09/17] vfio/container: Implement HostIOMMUDeviceClass::get_cap() handler

2024-06-05 Thread Zhenzhong Duan
Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan --- hw/vfio/container.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/hw/vfio/container.c b/hw/vfio/container.c index 2f62c13214..99beeba422 100644 --- a/hw/vfio/container.c +++ b/hw/vfio/container.c @@ -1147,11

[PATCH v7 13/17] hw/pci: Introduce pci_device_[set|unset]_iommu_device()

2024-06-05 Thread Zhenzhong Duan
From: Yi Liu pci_device_[set|unset]_iommu_device() call pci_device_get_iommu_bus_devfn() to get iommu_bus->iommu_ops and call [set|unset]_iommu_device callback to set/unset HostIOMMUDevice for a given PCI device. Signed-off-by: Yi Liu Signed-off-by: Yi Sun Signed-off-by: Nicolin Chen Signed-o

[PATCH v7 08/17] vfio/iommufd: Implement HostIOMMUDeviceClass::realize() handler

2024-06-05 Thread Zhenzhong Duan
It calls iommufd_backend_get_device_info() to get host IOMMU related information and translate it into HostIOMMUDeviceCaps for query with .get_cap(). For aw_bits, use the same way as legacy backend by calling vfio_device_get_aw_bits() which is common for different vendor IOMMU. Signed-off-by: Zhe

[PATCH v7 03/17] vfio/container: Introduce TYPE_HOST_IOMMU_DEVICE_LEGACY_VFIO device

2024-06-05 Thread Zhenzhong Duan
TYPE_HOST_IOMMU_DEVICE_LEGACY_VFIO represents a host IOMMU device under VFIO legacy container backend. It will have its own realize implementation. Suggested-by: Eric Auger Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan --- include/hw/vfio/vfio-common.h | 3 +++ hw/vfio/containe

[PATCH v7 00/17] Add a host IOMMU device abstraction to check with vIOMMU

2024-06-05 Thread Zhenzhong Duan
Hi, This series introduce a HostIOMMUDevice abstraction and sub-classes. Also HostIOMMUDeviceCaps structure in HostIOMMUDevice and a new interface between vIOMMU and HostIOMMUDevice. A HostIOMMUDevice is an abstraction for an assigned device that is protected by a physical IOMMU (aka host IOMMU).

[PATCH v7 14/17] vfio/pci: Pass HostIOMMUDevice to vIOMMU

2024-06-05 Thread Zhenzhong Duan
With HostIOMMUDevice passed, vIOMMU can check compatibility with host IOMMU, call into IOMMUFD specific methods, etc. Originally-by: Yi Liu Signed-off-by: Nicolin Chen Signed-off-by: Yi Sun Signed-off-by: Zhenzhong Duan Reviewed-by: Eric Auger --- hw/vfio/pci.c | 19 ++- 1 fi

[PATCH v7 04/17] backends/iommufd: Introduce TYPE_HOST_IOMMU_DEVICE_IOMMUFD[_VFIO] devices

2024-06-05 Thread Zhenzhong Duan
TYPE_HOST_IOMMU_DEVICE_IOMMUFD represents a host IOMMU device under iommufd backend. It is abstract, because it is going to be derived into VFIO or VDPA type'd device. It will have its own .get_cap() implementation. TYPE_HOST_IOMMU_DEVICE_IOMMUFD_VFIO is a sub-class of TYPE_HOST_IOMMU_DEVICE_IOMM

[PATCH v7 11/17] vfio: Create host IOMMU device instance

2024-06-05 Thread Zhenzhong Duan
Create host IOMMU device instance in vfio_attach_device() and call .realize() to initialize it further. Introuduce attribute VFIOIOMMUClass::hiod_typename and initialize it based on VFIO backend type. It will facilitate HostIOMMUDevice creation in vfio_attach_device(). Suggested-by: Cédric Le Goa

[PATCH v7 17/17] intel_iommu: Check compatibility with host IOMMU capabilities

2024-06-05 Thread Zhenzhong Duan
If check fails, host device (either VFIO or VDPA device) is not compatible with current vIOMMU config and should not be passed to guest. Only aw_bits is checked for now, we don't care about other caps before scalable modern mode is introduced. Signed-off-by: Yi Liu Signed-off-by: Zhenzhong Duan

[PATCH v7 10/17] backends/iommufd: Implement HostIOMMUDeviceClass::get_cap() handler

2024-06-05 Thread Zhenzhong Duan
Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan --- backends/iommufd.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/backends/iommufd.c b/backends/iommufd.c index c7e969d6f7..84fefbc9ee 100644 --- a/backends/iommufd.c +++ b/backends/iommufd.c @@ -230,6

Re: [PATCH v2 4/4] vga/cirrus: deprecate, don't build by default

2024-06-05 Thread Daniel P . Berrangé
On Wed, Jun 05, 2024 at 09:32:01AM +0200, Gerd Hoffmann wrote: > Hi, > > > > Upstream QEMU's scope is to emulate pretty much arbitrary hardware that > > > may have existed at any point in time. Emulating Cirrus is very much > > > in scope upstream, and even if there are other better VGA devices,

[PATCH v7 12/17] hw/pci: Introduce helper function pci_device_get_iommu_bus_devfn()

2024-06-05 Thread Zhenzhong Duan
Extract out pci_device_get_iommu_bus_devfn() from pci_device_iommu_address_space() to facilitate implementation of pci_device_[set|unset]_iommu_device() in following patch. No functional change intended. Signed-off-by: Yi Liu Signed-off-by: Yi Sun Signed-off-by: Nicolin Chen Signed-off-by: Zhe

Re: [PATCH 3/3] tests/qtest/x86: check for availability of older cpu models before running tests

2024-06-05 Thread Daniel P . Berrangé
On Wed, Jun 05, 2024 at 12:55:11PM +0530, Ani Sinha wrote: > Some older cpu models like 486, athlon, pentium, penryn, phenom, core2duo etc > may not be available in all builds. Check for their availability in qemu > before > running the corresponding tests. >From an upstream POV this is very much

Re: [PATCH 07/20] qga: move CONFIG_FSFREEZE/TRIM to be meson defined options

2024-06-05 Thread Marc-André Lureau
Hi On Tue, Jun 4, 2024 at 5:50 PM Daniel P. Berrangé wrote: > Defining these at the meson level allows them to be used a conditional > tests in the QAPI schemas. > > Signed-off-by: Daniel P. Berrangé > --- > meson.build | 18 ++ > qga/commands-common.h | 9 -

Re: [PATCH 07/20] qga: move CONFIG_FSFREEZE/TRIM to be meson defined options

2024-06-05 Thread Daniel P . Berrangé
On Wed, Jun 05, 2024 at 12:47:39PM +0400, Marc-André Lureau wrote: > Hi > > On Tue, Jun 4, 2024 at 5:50 PM Daniel P. Berrangé > wrote: > > > Defining these at the meson level allows them to be used a conditional > > tests in the QAPI schemas. > > > > Signed-off-by: Daniel P. Berrangé > > --- >

[PULL 01/46] docs, tests: do not specify scsi=off

2024-06-05 Thread Paolo Bonzini
This has been the default forever. Acked-by: Alex Bennée Signed-off-by: Paolo Bonzini --- docs/pci_expander_bridge.txt | 2 +- docs/specs/tpm.rst| 2 +- tests/avocado/intel_iommu.py | 2 +- tests/avocado/smmu.py | 2 +- tests/avocado/tuxrun_baselines.py | 2

[PULL 00/46] mostly i386 patches for 2024-06-04

2024-06-05 Thread Paolo Bonzini
The following changes since commit 3ab42e46acf867c45bc929fcc37693e327a35a24: Merge tag 'pull-ufs-20240603' of https://gitlab.com/jeuk20.kim/qemu into staging (2024-06-03 08:18:14 -0500) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for you to

[PATCH 1/2] qcow2: handle discard-no-unref in measure

2024-06-05 Thread Jean-Louis Dupond
When doing a measure on an image with a backing file and discard-no-unref is enabled, the code should take this into account. If for example you have a snapshot image with a base, and you do a discard within the snapshot, it will be ZERO and ALLOCATED, but without host offset. Now if we commit thi

[PATCH 2/2] qcow2: don't allow discard-no-unref when discard is not enabled

2024-06-05 Thread Jean-Louis Dupond
When discard is not set to unmap/on, we should not allow setting discard-no-unref. Signed-off-by: Jean-Louis Dupond --- block/qcow2.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/block/qcow2.c b/block/qcow2.c index 1ce7ebbab4..54c6b041b1 100644 --- a/block/qcow2.c +++ b/block/qcow2.

linux-user emulation hangs during fork

2024-06-05 Thread Andreas Schwab
$ qemu-x86_64 --version qemu-x86_64 version 9.0.50 (v9.0.0-1211-gd16cab541a) Copyright (c) 2003-2024 Fabrice Bellard and the QEMU Project developers $ cat fork.rb begin r, w = IO.pipe if pid1 = fork w.close r.read 1 Process.kill "USR1", pid1 Process.wait2 pid1 else print

[PATCH 1/2] util: Add lasx cpuinfo for loongarch64

2024-06-05 Thread Bibo Mao
Lasx is 256bit vector FPU capability, lsx is 128bit vector VFP. lsx is added already, lasx is added here. Signed-off-by: Bibo Mao --- host/include/loongarch64/host/cpuinfo.h | 1 + util/cpuinfo-loongarch.c| 1 + 2 files changed, 2 insertions(+) diff --git a/host/include/loongarc

[PATCH 0/2] Add simd optimization with function buffer_is_zero

2024-06-05 Thread Bibo Mao
On some loongarch machines, simd FPU such lsx/lasx is supported. Here function buffer_is_zero is optimized with simd FPU supported. Bibo Mao (2): util: Add lasx cpuinfo for loongarch64 util/bufferiszero: Add simd acceleration for loongarch64 host/include/loongarch64/host/cpuinfo.h | 1 +

[PATCH 2/2] util/bufferiszero: Add simd acceleration for loongarch64

2024-06-05 Thread Bibo Mao
Different gcc versions have different features, macro CONFIG_LSX_OPT and CONFIG_LASX_OPT is added here to detect whether gcc supports built-in lsx/lasx macro. Function buffer_zero_lsx() is added for 128bit simd fpu optimization, and function buffer_zero_lasx() is for 256bit simd fpu optimization.

Re: [PATCH 19/20] qga: move declare of QGAConfig struct to top of file

2024-06-05 Thread Marc-André Lureau
On Tue, Jun 4, 2024 at 5:51 PM Daniel P. Berrangé wrote: > It is referenced byy QGAState already, and it is clearer to declare all > minor "byy" typo > data types at the top of the file, rather than have them mixed with > code later. > > Signed-off-by: Daniel P. Berrangé > --- > qga/main.c |

RE: [PATCH 0/6] refactor RDMA live migration based on rsocket API

2024-06-05 Thread Gonglei (Arei)
> -Original Message- > From: Michael S. Tsirkin [mailto:m...@redhat.com] > Sent: Wednesday, June 5, 2024 3:57 PM > To: Gonglei (Arei) > Cc: qemu-devel@nongnu.org; pet...@redhat.com; yu.zh...@ionos.com; > mgal...@akamai.com; elmar.ger...@ionos.com; zhengchuan > ; berra...@redhat.com; arm

RE: [PATCH 1/6] migration: remove RDMA live migration temporarily

2024-06-05 Thread Gonglei (Arei)
> -Original Message- > From: David Hildenbrand [mailto:da...@redhat.com] > Sent: Tuesday, June 4, 2024 10:02 PM > To: Gonglei (Arei) ; qemu-devel@nongnu.org > Cc: pet...@redhat.com; yu.zh...@ionos.com; mgal...@akamai.com; > elmar.ger...@ionos.com; zhengchuan ; > berra...@redhat.com; arm..

RE: [PATCH 0/6] refactor RDMA live migration based on rsocket API

2024-06-05 Thread Gonglei (Arei)
Hi Peter, > -Original Message- > From: Peter Xu [mailto:pet...@redhat.com] > Sent: Wednesday, June 5, 2024 3:32 AM > To: Gonglei (Arei) > Cc: qemu-devel@nongnu.org; yu.zh...@ionos.com; mgal...@akamai.com; > elmar.ger...@ionos.com; zhengchuan ; > berra...@redhat.com; arm...@redhat.com; liz

Re: [PULL 00/20] Net patches

2024-06-05 Thread Michael Tokarev
04.06.2024 10:37, Jason Wang wrote: Akihiko Odaki (18): tap: Remove tap_probe_vnet_hdr_len() tap: Remove qemu_using_vnet_hdr() net: Move virtio-net header length assertion net: Remove receive_raw() tap: Call tap_receive_iov() from tap_receive() tap: Shrin

Re: [PATCH 0/6] refactor RDMA live migration based on rsocket API

2024-06-05 Thread Michael S. Tsirkin
On Wed, Jun 05, 2024 at 10:00:24AM +, Gonglei (Arei) wrote: > > > > -Original Message- > > From: Michael S. Tsirkin [mailto:m...@redhat.com] > > Sent: Wednesday, June 5, 2024 3:57 PM > > To: Gonglei (Arei) > > Cc: qemu-devel@nongnu.org; pet...@redhat.com; yu.zh...@ionos.com; > > mgal

Re: [PULL 07/20] virtio-net: Do not propagate ebpf-rss-fds errors

2024-06-05 Thread Daniel P . Berrangé
On Tue, Jun 04, 2024 at 03:37:42PM +0800, Jason Wang wrote: > From: Akihiko Odaki > > Propagating ebpf-rss-fds errors has several problems. > > First, it makes device realization fail and disables the fallback to the > conventional eBPF loading. AFAICT, this is not a bug - this is desired behav

Re: [PATCH 20/20] qga: centralize logic for disabling/enabling commands

2024-06-05 Thread Marc-André Lureau
Hi On Tue, Jun 4, 2024 at 5:51 PM Daniel P. Berrangé wrote: > It is confusing having many different pieces of code enabling and > disabling commands, and it is not clear that they all have the same > semantics, especially wrt prioritization of the block/allow lists. > > Centralizing the code in

Re: [PATCH 20/20] qga: centralize logic for disabling/enabling commands

2024-06-05 Thread Marc-André Lureau
Hi On Wed, Jun 5, 2024 at 2:37 PM Marc-André Lureau wrote: > Hi > > On Tue, Jun 4, 2024 at 5:51 PM Daniel P. Berrangé > wrote: > >> It is confusing having many different pieces of code enabling and >> disabling commands, and it is not clear that they all have the same >> semantics, especially w

Re: [PATCH 20/20] qga: centralize logic for disabling/enabling commands

2024-06-05 Thread Daniel P . Berrangé
On Wed, Jun 05, 2024 at 02:37:24PM +0400, Marc-André Lureau wrote: > Hi > > On Tue, Jun 4, 2024 at 5:51 PM Daniel P. Berrangé > wrote: > > > It is confusing having many different pieces of code enabling and > > disabling commands, and it is not clear that they all have the same > > semantics, es

[PATCH v4 2/5] osdep: Make qemu_madvise() to set errno in all cases

2024-06-05 Thread Michal Privoznik
The unspoken premise of qemu_madvise() is that errno is set on error. And it is mostly the case except for posix_madvise() which is documented to return either zero (on success) or a positive error number. This means, we must set errno ourselves. And while at it, make the function return a negative

[PATCH v4 1/5] meson: Don't even detect posix_madvise() on Darwin

2024-06-05 Thread Michal Privoznik
On Darwin, posix_madvise() has the same return semantics as plain madvise() [1]. That's not really what our usage expects. Fortunately, madvise() is available and preferred anyways so we may stop detecting posix_madvise() on Darwin. 1: https://opensource.apple.com/source/xnu/xnu-7195.81.3/bsd/man

[PATCH v4 5/5] backends/hostmem: Report error when memory size is unaligned

2024-06-05 Thread Michal Privoznik
If memory-backend-{file,ram} has a size that's not aligned to underlying page size it is not only wasteful, but also may lead to hard to debug behaviour. For instance, in case memory-backend-file and hugepages, madvise() and mbind() fail. Rightfully so, page is the smallest unit they can work with.

[PATCH v4 4/5] backends/hostmem: Report error on qemu_madvise() failures

2024-06-05 Thread Michal Privoznik
If user sets .merge or .dump attributes qemu_madvise() is called with corresponding advice. But it is never checked for failure which may mislead users into thinking the attribute is set correctly. Report an appropriate error. Signed-off-by: Michal Privoznik Reviewed-by: Philippe Mathieu-Daudé R

[PATCH v4 0/5] backends/hostmem: Report more errors on failures

2024-06-05 Thread Michal Privoznik
v4 of: https://mail.gnu.org/archive/html/qemu-devel/2024-05/msg06511.html diff to v3: - In 2/5 instead of fixing up posix_madvise() retval at runtime, just don't use posix_madvise() on Darwin at all (resulted in new patch 1/5). Since 2/5 is now the same as 1/4 from v2 I'm including David's

[PATCH v4 3/5] osdep: Make qemu_madvise() return ENOSYS on unsupported OSes

2024-06-05 Thread Michal Privoznik
Not every OS is capable of madvise() or posix_madvise() even. In that case, errno should be set to ENOSYS as it reflects the cause better. Signed-off-by: Michal Privoznik Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: David Hildenbrand --- util/osdep.c | 2 +- 1 file changed, 1 insertion(+),

Re: [PATCH 1/2] qcow2: handle discard-no-unref in measure

2024-06-05 Thread Jean-Louis Dupond
On 5/06/2024 11:06, Jean-Louis Dupond wrote: When doing a measure on an image with a backing file and discard-no-unref is enabled, the code should take this into account. If for example you have a snapshot image with a base, and you do a discard within the snapshot, it will be ZERO and ALLOCATED

Re: linux-user emulation hangs during fork

2024-06-05 Thread Andreas Schwab
6490d9aa62ef3cbbac2bf584fb0f3e737ab05e44 is the first bad commit commit 6490d9aa62ef3cbbac2bf584fb0f3e737ab05e44 Author: Richard Henderson Date: Tue Jan 24 10:10:19 2023 -1000 linux-user: un-parent OBJECT(cpu) when closing thread This reinstates commit 52f0c1607671293afcdb2acc2f83e

Re: [RFC PATCH 0/1] vhost-user: Add SHMEM_MAP/UNMAP requests

2024-06-05 Thread Stefan Hajnoczi
On Wed, Jun 05, 2024 at 09:24:36AM +0200, Albert Esteve wrote: > On Tue, Jun 4, 2024 at 8:16 PM Stefan Hajnoczi wrote: > > > On Thu, May 30, 2024 at 05:22:22PM +0200, Albert Esteve wrote: > > > Hi all, > > > > > > This is an early attempt to have backends > > > support dynamic fd mapping into sha

[PATCH v3 6/7] i386/hvf: Updates API usage to use modern vCPU run function

2024-06-05 Thread Phil Dennis-Jordan
macOS 10.15 introduced the more efficient hv_vcpu_run_until() function to supersede hv_vcpu_run(). According to the documentation, there is no longer any reason to use the latter on modern host OS versions, especially after 11.0 added support for an indefinite deadline. Observed behaviour of the n

[PATCH v3 7/7] hvf: Makes assert_hvf_ok report failed expression

2024-06-05 Thread Phil Dennis-Jordan
When a macOS Hypervisor.framework call fails which is checked by assert_hvf_ok(), Qemu exits printing the error value, but not the location in the code, as regular assert() macro expansions would. This change turns assert_hvf_ok() into a macro similar to other assertions, which expands to a call t

[PATCH v3 5/7] i386/hvf: In kick_vcpu use hv_vcpu_interrupt to force exit

2024-06-05 Thread Phil Dennis-Jordan
When interrupting a vCPU thread, this patch actually tells the hypervisor to stop running guest code on that vCPU. Calling hv_vcpu_interrupt actually forces a vCPU exit, analogously to hv_vcpus_exit on aarch64. Alternatively, if the vCPU thread is not running the VM, it will immediately cause an e

[PATCH v3 0/7] hvf x86 correctness and efficiency improvements

2024-06-05 Thread Phil Dennis-Jordan
This is a series of semi-related patches for the x86 macOS Hypervisor.framework (hvf) accelerator backend. The intention is to (1) fix bugs and (2) move the hvf backend to use more modern and efficient APIs in Hypervisor.framework. The goal is to replace the main hv_vcpu_run() call with hv_vcpu_ru

Re: [PATCH 1/3] gpex-acpi: Support PCI link devices outside the host bridge

2024-06-05 Thread Sunil V L
Hi Michael, Thank you very much for the review! On Wed, Jun 05, 2024 at 04:23:36AM -0400, Michael S. Tsirkin wrote: > On Tue, May 28, 2024 at 01:01:01PM +0530, Sunil V L wrote: > > Currently, PCI link devices (PNP0C0F) are always created within the > > scope of the PCI root complex. However, RISC

Re: [PATCH 0/4] hw/s390x: Alias @dump-skeys -> @dump-s390-skey and deprecate

2024-06-05 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > Philippe Mathieu-Daudé writes: > > > Hi Daniel, Dave, Markus & Thomas. > > > > On 4/6/24 06:58, Markus Armbruster wrote: > >> "Dr. David Alan Gilbert" writes: > >>> * Daniel P. Berrangé (berra...@redhat.com) wrote: > On Fri, May 31, 2024 at 0

Re: [PATCH RFC 4/8] target/riscv: Support generic CSR indirect access

2024-06-05 Thread Jason Chien
The predicate functions should contain the access control by the state-enable CSRs, which is not presented in this patch. Do you mind that I take over the indirect CSR access control part? The Signed-off-by will be kept. Atish Patra 於 2024/2/17 上午 08:01 寫道: From: Kaiwen Xue This adds the in

Re: [RFC PATCH 0/1] vhost-user: Add SHMEM_MAP/UNMAP requests

2024-06-05 Thread Albert Esteve
On Wed, Jun 5, 2024 at 1:16 PM Stefan Hajnoczi wrote: > On Wed, Jun 05, 2024 at 09:24:36AM +0200, Albert Esteve wrote: > > On Tue, Jun 4, 2024 at 8:16 PM Stefan Hajnoczi > wrote: > > > > > On Thu, May 30, 2024 at 05:22:22PM +0200, Albert Esteve wrote: > > > > Hi all, > > > > > > > > This is an e

Re: [PATCH 1/2] util: Add lasx cpuinfo for loongarch64

2024-06-05 Thread Philippe Mathieu-Daudé
On 5/6/24 11:32, Bibo Mao wrote: Lasx is 256bit vector FPU capability, lsx is 128bit vector VFP. lsx is added already, lasx is added here. Signed-off-by: Bibo Mao --- host/include/loongarch64/host/cpuinfo.h | 1 + util/cpuinfo-loongarch.c| 1 + 2 files changed, 2 insertions(

Re: [PATCH] cxl: Get rid of unused cfmw_list

2024-06-05 Thread Jonathan Cameron via
On Fri, 31 May 2024 14:13:17 +0800 Li Zhijian wrote: > There is no user for this member. All '-M cxl-fmw.N' options have > been parsed and saved to CXLState.fixed_windows. > > Signed-off-by: Li Zhijian Hi Li, Applied to my tree with slight change to patch title to hw/cxl: Get rid of unused cf

Re: [PATCH v2 1/3] stdvga: fix screen blanking

2024-06-05 Thread Marc-André Lureau
Hi On Wed, Jun 5, 2024 at 11:36 AM Gerd Hoffmann wrote: > > On Tue, Jun 04, 2024 at 10:27:18AM GMT, Marc-André Lureau wrote: > > Hi > > > > > +if (is_buffer_shared(surface)) { > > > > Perhaps the suggestion to rename the function (in the following patch) > > should instead be surface_is_alloc

[RFC PATCH] migration/savevm: do not schedule snapshot_save_job_bh in qemu_aio_context

2024-06-05 Thread Fiona Ebner
The fact that the snapshot_save_job_bh() is scheduled in the main loop's qemu_aio_context AioContext means that it might get executed during a vCPU thread's aio_poll(). But saving of the VM state cannot happen while the guest or devices are active and can lead to assertion failures. See issue #2111

Re: [PATCH 4/5] s390x: Add boot device fallback infrastructure

2024-06-05 Thread Thomas Huth
On 05/06/2024 10.20, Thomas Huth wrote: On 29/05/2024 17.43, jro...@linux.ibm.com wrote: From: Jared Rossi Add a routine for loading the next IPLB if a device fails to boot. This includes some minor changes to the List-Directed IPL routine so that the failing device may be retried using the l

Re: [PATCH v2 06/18] monitor: Stop removing non-duplicated fds

2024-06-05 Thread Fabiano Rosas
"Dr. David Alan Gilbert" writes: > * Fabiano Rosas (faro...@suse.de) wrote: >> Peter Xu writes: >> >> > On Thu, May 23, 2024 at 04:05:36PM -0300, Fabiano Rosas wrote: >> >> We've been up until now cleaning up any file descriptors that have >> >> been passed into QEMU and never duplicated[1,2].

Re: [PATCH] mips64el-softmmu: Enable MTTCG

2024-06-05 Thread Jiaxun Yang
在2024年6月4日六月 下午1:43,Alex Bennée写道: [...] > > I'm a little uncomfortable about making the success of MTTCG depend on > the user options passed to the kernel. Yes, I agree, it sounds awkward. > > How come a non-icount run depends on how many instructions are being run > on each core? Why is time

[PATCH v3 3/3] ui+display: rename is_buffer_shared() -> surface_is_allocated()

2024-06-05 Thread Gerd Hoffmann
Boolean return value is reversed, to align with QEMU_ALLOCATED_FLAG, so all callers must be adapted. Also rename share_surface variable in vga_draw_graphic() to reduce confusion. No functional change. Suggested-by: Marc-André Lureau Signed-off-by: Gerd Hoffmann --- include/ui/surface.h|

[PATCH v3 0/3] stdvga: fix screen blanking

2024-06-05 Thread Gerd Hoffmann
Gerd Hoffmann (3): stdvga: fix screen blanking ui+display: rename is_placeholder() -> surface_is_placeholder() ui+display: rename is_buffer_shared() -> surface_is_allocated() include/ui/surface.h| 6 +++--- hw/display/qxl-render.c | 2 +- hw/display/vga.c| 24 ++

[PATCH v3 2/3] ui+display: rename is_placeholder() -> surface_is_placeholder()

2024-06-05 Thread Gerd Hoffmann
No functional change. Signed-off-by: Gerd Hoffmann --- include/ui/surface.h | 2 +- ui/console.c | 2 +- ui/sdl2-2d.c | 2 +- ui/sdl2-gl.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/ui/surface.h b/include/ui/surface.h index 4244e0ca4a32

[PATCH v3 1/3] stdvga: fix screen blanking

2024-06-05 Thread Gerd Hoffmann
In case the display surface uses a shared buffer (i.e. uses vga vram directly instead of a shadow) go unshare the buffer before clearing it. This avoids vga memory corruption, which in turn fixes unblanking not working properly with X11. Cc: qemu-sta...@nongnu.org Resolves: https://gitlab.com/qem

[PATCH v2 1/2] qcow2: handle discard-no-unref in measure

2024-06-05 Thread Jean-Louis Dupond
When doing a measure on an image with a backing file and discard-no-unref is enabled, the code should take this into account. If for example you have a snapshot image with a base, and you do a discard within the snapshot, it will be ZERO and ALLOCATED, but without host offset. Now if we commit thi

[PATCH v2 2/2] qcow2: don't allow discard-no-unref when discard is not enabled

2024-06-05 Thread Jean-Louis Dupond
When discard is not set to unmap/on, we should not allow setting discard-no-unref. Signed-off-by: Jean-Louis Dupond --- block/qcow2.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/block/qcow2.c b/block/qcow2.c index 50354e5b98..cead5479e4 100644 --- a/block/qcow2.c +++ b/block/qcow2.

Re: [PATCH v3 0/3] stdvga: fix screen blanking

2024-06-05 Thread Marc-André Lureau
On Wed, Jun 5, 2024 at 5:14 PM Gerd Hoffmann wrote: > > > > Gerd Hoffmann (3): > stdvga: fix screen blanking > ui+display: rename is_placeholder() -> surface_is_placeholder() > ui+display: rename is_buffer_shared() -> surface_is_allocated() > > include/ui/surface.h| 6 +++--- > hw/disp

Re: [PATCH] qtest/x86/numa-test: do not use the obsolete 'pentium' cpu

2024-06-05 Thread Igor Mammedov
On Tue, 4 Jun 2024 11:51:33 +0530 Ani Sinha wrote: > 'pentium' cpu is old and obsolete and should be avoided for running tests if > its not strictly needed. Use 'max' cpu instead for generic non-cpu specific > numa test. > > CC: th...@redhat.com > Signed-off-by: Ani Sinha Reviewed-by: Igor Ma

  1   2   3   4   >