Re: Dynamic & heterogeneous machines, initial configuration: problems

2024-01-31 Thread Zhao Liu
Hi Markus, On Wed, Jan 31, 2024 at 09:14:21PM +0100, Markus Armbruster wrote: > Date: Wed, 31 Jan 2024 21:14:21 +0100 > From: Markus Armbruster > Subject: Dynamic & heterogeneous machines, initial configuration: problems > > This memo is the fruit of discussions with Philippe Mathieu-Daudé. >

[PULL 1/1] target/loongarch: Fix qtest test-hmp error when KVM-only build

2024-01-31 Thread Song Gao
The cc->sysemu_ops->get_phys_page_debug() is NULL when KVM-only build. this patch fixes it. Signed-off-by: Song Gao Tested-by: Bibo Mao Message-Id: <20240125061401.52526-1-gaos...@loongson.cn> --- target/loongarch/cpu.c| 2 - target/loongarch/cpu_helper.c | 231

[PULL 0/1] loongarch-to-apply queue

2024-01-31 Thread Song Gao
The following changes since commit bd2e12310b18b51aefbf834e6d54989fd175976f: Merge tag 'qga-pull-2024-01-30' of https://github.com/kostyanf14/qemu into staging (2024-01-30 15:53:46 +) are available in the Git repository at: https://gitlab.com/gaosong/qemu.git

[PATCH rfcv2 13/18] intel_iommu: Extract out vtd_cap_init to initialize cap/ecap

2024-01-31 Thread Zhenzhong Duan
This is a prerequisite for host cap/ecap sync. 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 a/hw/i386/intel_iommu.c

[PATCH rfcv2 11/18] intel_iommu: Add set/unset_iommu_device callback

2024-01-31 Thread Zhenzhong Duan
From: Yi Liu This adds set/unset_iommu_device() implementation in Intel vIOMMU. In set call, a pointer to host IOMMU device info is stored in hash table indexed by PCI BDF. Signed-off-by: Yi Liu Signed-off-by: Yi Sun Signed-off-by: Zhenzhong Duan --- hw/i386/intel_iommu_internal.h | 14

[PATCH rfcv2 16/18] intel_iommu: Implement check and sync mechanism in iommufd mode

2024-01-31 Thread Zhenzhong Duan
We use cap_frozen to mark cap/ecap read/writable or read-only, At init stage, we allow to update cap/ecap based on host IOMMU cap/ecap, but when machine create done, cap_frozen is set and we only allow checking cap/ecap for compatibility. Currently only stage-2 translation is supported which is

[PATCH rfcv2 18/18] intel_iommu: Block migration if cap is updated

2024-01-31 Thread Zhenzhong Duan
When there is VFIO device and vIOMMU cap/ecap is updated based on host IOMMU cap/ecap, migration should be blocked. Signed-off-by: Zhenzhong Duan --- hw/i386/intel_iommu.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/hw/i386/intel_iommu.c

[PATCH rfcv2 01/18] Introduce a common abstract struct HostIOMMUDevice

2024-01-31 Thread Zhenzhong Duan
HostIOMMUDevice will be inherited by two sub classes, legacy and iommufd currently. Introduce a helper function host_iommu_base_device_init to initialize it. Suggested-by: Eric Auger Signed-off-by: Zhenzhong Duan --- include/sysemu/host_iommu_device.h | 22 ++ 1 file

[PATCH rfcv2 05/18] vfio: Remove redundant iommufd and devid elements in VFIODevice

2024-01-31 Thread Zhenzhong Duan
iommufd and devid in VFIODevice are redundant with the ones in IOMMUFDDevice, so remove them. Suggested-by: Eric Auger Signed-off-by: Zhenzhong Duan --- include/hw/vfio/vfio-common.h | 2 -- hw/vfio/ap.c | 2 +- hw/vfio/ccw.c | 2 +- hw/vfio/common.c

[PATCH rfcv2 10/18] hw/pci: Introduce pci_device_set/unset_iommu_device()

2024-01-31 Thread Zhenzhong Duan
From: Yi Liu This adds pci_device_set/unset_iommu_device() to set/unset HostIOMMUDevice for a given PCIe device. Caller of set should fail if set operation fails. Extract out pci_device_get_iommu_bus_devfn() to facilitate implementation of pci_device_set/unset_iommu_device(). Signed-off-by: Yi

[PATCH rfcv2 14/18] intel_iommu: Add a framework to check and sync host IOMMU cap/ecap

2024-01-31 Thread Zhenzhong Duan
From: Yi Liu Add a framework to check and synchronize host IOMMU cap/ecap with vIOMMU cap/ecap. The sequence will be: vtd_cap_init() initializes iommu->cap/ecap. vtd_check_hdev() update iommu->cap/ecap based on host cap/ecap. iommu->cap_frozen set when machine create done, iommu->cap/ecap

[PATCH rfcv2 03/18] vfio: Introduce IOMMULegacyDevice

2024-01-31 Thread Zhenzhong Duan
Similar as IOMMUFDDevice, IOMMULegacyDevice represents a device in legacy mode and can be used as a communication interface between devices (i.e., VFIO, VDPA) and vIOMMU. Currently it includes nothing legacy specific, but could be extended with any wanted info of legacy mode when necessary.

[PATCH rfcv2 17/18] intel_iommu: Use mgaw instead of s->aw_bits

2024-01-31 Thread Zhenzhong Duan
Because vIOMMU mgaw can be updated based on host IOMMU mgaw, s->aw_bits does't necessarily represent the final mgaw now but the mgaw field in s->cap does. Replace reference to s->aw_bits with a MACRO S_AW_BITS to fetch mgaw from s->cap. There are two exceptions on this, aw_bits value sanity check

[PATCH rfcv2 15/18] backends/iommufd: Introduce helper function iommufd_device_get_info()

2024-01-31 Thread Zhenzhong Duan
Introduce a helper function iommufd_device_get_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 | 4 backends/iommufd.c | 25 - 2 files

[PATCH rfcv2 07/18] vfio/container: Implement host_iommu_device_init callback in legacy mode

2024-01-31 Thread Zhenzhong Duan
This callback will be used to initialize base and public elements in IOMMULegacyDevice. Signed-off-by: Zhenzhong Duan --- hw/vfio/container.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/hw/vfio/container.c b/hw/vfio/container.c index bd25b9fbad..8fafd4b4e5 100644 ---

[PATCH rfcv2 12/18] vfio: Initialize host IOMMU device and pass to vIOMMU

2024-01-31 Thread Zhenzhong Duan
Initialize host IOMMU device in vfio and pass to vIOMMU, so that vIOMMU could get hw IOMMU information. Support both iommufd and legacy backend. Originally-by: Yi Liu Signed-off-by: Nicolin Chen Signed-off-by: Yi Sun Signed-off-by: Zhenzhong Duan --- hw/vfio/pci.c | 20 +++-

[PATCH rfcv2 00/18] Check and sync host IOMMU cap/ecap with vIOMMU

2024-01-31 Thread Zhenzhong Duan
Hi, This enables vIOMMU to get host IOMMU cap/ecap information by introducing a new set/unset_iommu_device interface, then vIOMMU could check or sync with vIOMMU's own cap/ecap config. It works by having device side, i.e. VFIO, register either an IOMMULegacyDevice or IOMMUFDDevice to vIOMMU,

[PATCH rfcv2 08/18] vfio/iommufd: Implement host_iommu_device_init callback in iommufd mode

2024-01-31 Thread Zhenzhong Duan
This callback will be used to initialize base and public elements in IOMMUFDDevice, with the exception of iommufd and devid which are initialized early in attachment. Signed-off-by: Zhenzhong Duan --- hw/vfio/iommufd.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/vfio/iommufd.c

[PATCH rfcv2 09/18] vfio/pci: Initialize host iommu device instance after attachment

2024-01-31 Thread Zhenzhong Duan
Signed-off-by: Zhenzhong Duan --- hw/vfio/pci.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index d1e1b8cb89..dedb64fc08 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -3006,6 +3006,9 @@ static void vfio_realize(PCIDevice *pdev, Error **errp)

[PATCH rfcv2 06/18] vfio: Introduce host_iommu_device_init callback

2024-01-31 Thread Zhenzhong Duan
Introduce host_iommu_device_init callback and a wrapper for it. Signed-off-by: Zhenzhong Duan --- include/hw/vfio/vfio-common.h | 1 + include/hw/vfio/vfio-container-base.h | 1 + hw/vfio/common.c | 8 3 files changed, 10 insertions(+) diff --git

[PATCH rfcv2 02/18] backends/iommufd: Introduce IOMMUFDDevice

2024-01-31 Thread Zhenzhong Duan
IOMMUFDDevice represents a device in iommufd and can be used as a communication interface between devices (i.e., VFIO, VDPA) and vIOMMU. Currently it includes only public iommufd handle and device id which could be used by vIOMMU to get hw IOMMU information. There will also be some elements in

[PATCH rfcv2 04/18] vfio: Add host iommu device instance into VFIODevice

2024-01-31 Thread Zhenzhong Duan
Either IOMMULegacyDevice or IOMMUFDDevice into VFIODevice, neither both. Signed-off-by: Zhenzhong Duan --- include/hw/vfio/vfio-common.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h index 8bfb9cbe94..1bbad003ee

Re: [PULL 13/17] hw/fsi: Aspeed APB2OPB & On-chip peripheral bus

2024-01-31 Thread Cédric Le Goater
Here is an update version with a fix. I will include it in the next PR. Thanks, C. From: Ninad Palsule This is a part of patchset where IBM's Flexible Service Interface is introduced. An APB-to-OPB bridge enabling access to the OPB from the ARM core in the AST2600. Hardware limitations

Re: [PATCH v3 4/4] tests/tcg/s390x: Test CONVERT TO BINARY

2024-01-31 Thread Thomas Huth
On 01/02/2024 00.07, Ilya Leoshkevich wrote: Check the CVB's and CVBG's corner cases. Co-developed-by: Pavel Zbitskiy Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.target | 1 + tests/tcg/s390x/cvb.c | 47 + 2 files changed, 48

Re: [PATCH v3 3/4] target/s390x: implement CVB, CVBY and CVBG

2024-01-31 Thread Thomas Huth
On 01/02/2024 00.07, Ilya Leoshkevich wrote: From: Pavel Zbitskiy Convert to Binary - counterparts of the already implemented Convert to Decimal (CVD*) instructions. Example from the Principles of Operation: 25594C becomes 63FA. [iii: Use separate functions for CVB and CVBG for simplicity].

Re: [PATCH 1/3] ui/gtk: skip drawing guest scanout when associated VC is invisible

2024-01-31 Thread Marc-André Lureau
Hi On Wed, Jan 31, 2024 at 10:56 PM Kim, Dongwon wrote: > > Hi Marc-André, > > > https://docs.gtk.org/gtk3/method.Widget.is_visible.html > > This is what we had tried first but it didn't seem to work for the case of > window minimization. > I see the visible flag for the GTK widget didn't seem

Re: [PATCH v3 4/4] tests/tcg/s390x: Test CONVERT TO BINARY

2024-01-31 Thread Thomas Huth
On 01/02/2024 00.07, Ilya Leoshkevich wrote: Check the CVB's and CVBG's corner cases. Co-developed-by: Pavel Zbitskiy Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.target | 1 + tests/tcg/s390x/cvb.c | 47 + 2 files changed, 48

Re: [PATCH v3 2/4] tests/tcg/s390x: Test CONVERT TO DECIMAL

2024-01-31 Thread Thomas Huth
On 01/02/2024 00.07, Ilya Leoshkevich wrote: Check the CVD's and CVDG's corner cases. Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.target | 1 + tests/tcg/s390x/cvd.c | 45 + 2 files changed, 46 insertions(+) create mode 100644

Re: [PATCH 14/14] migration/multifd: Forbid spurious wakeups

2024-01-31 Thread Peter Xu
On Wed, Jan 31, 2024 at 06:31:11PM +0800, pet...@redhat.com wrote: > From: Peter Xu > > Now multifd's logic is designed to have no spurious wakeup. I still > remember a talk to Juan and he seems to agree we should drop it now, and if > my memory was right it was there because multifd used to

Re: [PATCH 00/14] migration/multifd: Refactor ->send_prepare() and cleanups

2024-01-31 Thread Peter Xu
On Wed, Jan 31, 2024 at 07:49:51PM -0300, Fabiano Rosas wrote: > pet...@redhat.com writes: > > > From: Peter Xu > > > > This patchset contains quite a few refactorings to current multifd: > > > > - It picked up some patches from an old series of mine [0] (the last > > patches were dropped,

Re: [PATCH v2 2/2] e1000e: fix link state on resume

2024-01-31 Thread Jason Wang
On Wed, Jan 24, 2024 at 6:40 PM Laurent Vivier wrote: > > On resume e1000e_vm_state_change() always calls e1000e_autoneg_resume() > that sets link_down to false, and thus activates the link even > if we have disabled it. > > The problem can be reproduced starting qemu in paused state (-S) and >

Re: [PATCH v2 1/2] igb: fix link state on resume

2024-01-31 Thread Jason Wang
On Wed, Jan 24, 2024 at 6:30 PM Laurent Vivier wrote: > > On resume igb_vm_state_change() always calls igb_autoneg_resume() > that sets link_down to false, and thus activates the link even > if we have disabled it. > > The problem can be reproduced starting qemu in paused state (-S) and > then

Re: [PATCH 0/2] Move net backend cleanup to NIC cleanup

2024-01-31 Thread Jason Wang
On Mon, Jan 29, 2024 at 9:24 PM Eugenio Pérez wrote: > > Commit a0d7215e33 ("vhost-vdpa: do not cleanup the vdpa/vhost-net > structures if peer nic is present") effectively delayed the backend > cleanup, allowing the frontend or the guest to access it resources as > long as the frontend NIC is

Re: [PATCH v3 06/20] util/dsa: Add dependency idxd.

2024-01-31 Thread Peter Xu
On Thu, Jan 04, 2024 at 12:44:38AM +, Hao Xiang wrote: > Idxd is the device driver for DSA (Intel Data Streaming > Accelerator). The driver is fully functioning since Linux > kernel 5.19. This change adds the driver's header file used > for userspace development. > > Signed-off-by: Hao Xiang

Re: [PATCH v2 02/14] plugins: scoreboard API

2024-01-31 Thread Pierrick Bouvier
On 1/31/24 11:44, Pierrick Bouvier wrote: On 1/26/24 19:14, Alex Bennée wrote: +need_realloc = TRUE; +} +plugin.scoreboard_size = cpu->cpu_index + 1; +g_assert(plugin.scoreboard_size <= plugin.scoreboard_alloc_size); + +if (g_hash_table_size(plugin.scoreboards) == 0) { +

Re: [PATCH v3 15/20] migration/multifd: Add test hook to set normal page ratio.

2024-01-31 Thread Peter Xu
On Thu, Jan 04, 2024 at 12:44:47AM +, Hao Xiang wrote: > +# @multifd-normal-page-ratio: Test hook setting the normal page ratio. > +# (Since 8.2) Please remember to touch all of them to 9.0 when repost, thanks. -- Peter Xu

Re: [PATCH v3 03/20] multifd: Zero pages transmission

2024-01-31 Thread Peter Xu
On Thu, Jan 04, 2024 at 12:44:35AM +, Hao Xiang wrote: > From: Juan Quintela > > This implements the zero page dection and handling. > > Signed-off-by: Juan Quintela > --- > migration/multifd.c | 41 +++-- > migration/multifd.h | 5 + > 2 files

Re: [External] Re: [PATCH v3 01/20] multifd: Add capability to enable/disable zero_page

2024-01-31 Thread Peter Xu
On Tue, Jan 23, 2024 at 12:10:55PM -0300, Fabiano Rosas wrote: > Hao Xiang writes: > > > On Sun, Jan 14, 2024 at 10:02 PM Shivam Kumar > > wrote: > >> > >> > >> > >> > On 04-Jan-2024, at 6:14 AM, Hao Xiang wrote: > >> > > >> > From: Juan Quintela > >> > > >> > We have to enable it by default

Re: [PATCH 1/5] migration/multifd: Separate compression ops from non-compression

2024-01-31 Thread Peter Xu
On Wed, Jan 31, 2024 at 10:14:58AM -0300, Fabiano Rosas wrote: > > I am thinking the p->normal is mostly redundant.. at least on the sender > > side that I just read. Since I'll be preparing a new spin of the multifd > > cleanup series I posted, maybe I can append one more to try dropping > >

Re: [PATCH] hw/intc: Handle the error of IOAPICCommonClass.realize()

2024-01-31 Thread Zhao Liu
Hi Philippe, On Wed, Jan 31, 2024 at 05:48:24PM +0100, Philippe Mathieu-Daudé wrote: > Date: Wed, 31 Jan 2024 17:48:24 +0100 > From: Philippe Mathieu-Daudé > Subject: Re: [PATCH] hw/intc: Handle the error of > IOAPICCommonClass.realize() > > Hi Zhao, > > On 31/1/24 15:29, Zhao Liu wrote: > >

Re: [PULL 06/15] tests/qtest/migration: Don't use -cpu max for aarch64

2024-01-31 Thread Peter Xu
On Wed, Jan 31, 2024 at 10:09:16AM -0300, Fabiano Rosas wrote: > If we ask for KVM and it falls back to TCG, we need a cpu that supports > both. We don't have that. I've put some command-line combinations at the > end of the email[1], take a look. Thanks a lot, Fabiano. I think I have a better

Re: [PATCH v8 00/21] Introduce smp.modules for x86 in QEMU

2024-01-31 Thread Zhao Liu
Hi Daniel, On Wed, Jan 31, 2024 at 10:28:42AM +, Daniel P. Berrangé wrote: > Date: Wed, 31 Jan 2024 10:28:42 + > From: "Daniel P. Berrangé" > Subject: Re: [PATCH v8 00/21] Introduce smp.modules for x86 in QEMU > > On Wed, Jan 31, 2024 at 06:13:29PM +0800, Zhao Liu wrote: > > From: Zhao

Re: [PATCH v5 0/6] Pointer Masking update for Zjpm v0.8

2024-01-31 Thread Alistair Francis
On Tue, Jan 30, 2024 at 5:23 AM Alexey Baturo wrote: > > From: Alexey Baturo > > Hi, > > This patch series targets Zjpm v0.8 extension. > The spec itself could be found here: > https://github.com/riscv/riscv-j-extension/blob/8088461d8d66a7676872b61c908cbeb7cf5c5d1d/zjpm-spec.pdf > This patch

答复: Disk migration from qcow2 to SPDK

2024-01-31 Thread 陈孚
can someone help me ? 发件人: 陈孚 发送时间: 2024年1月30日 10:51 收件人: 'qemu-bl...@nongnu.org' 抄送: 'qemu-devel@nongnu.org' 主题: Disk migration from qcow2 to SPDK Hello everyone, Recently, we are looking to switch the VM’s disks from the qemu driver with the qcow2 format to a vhost-user-blk driver based on

Re: [PATCH] tcg: Fixes set const_args[i] wrong value when instructions imm is 0

2024-01-31 Thread gaosong
在 2024/2/1 上午5:16, Richard Henderson 写道: On 1/31/24 17:27, Song Gao wrote: It seems that tcg_reg_alloc_op() set const_args[i] wrong value when instructions imm is 0. The LoongArch tcg_out_vec_op() cmp_vec use the wrong const_args[2]. e.g     The wrong const_args[2] is 0.     IN: vslti.w v5, v4,

Re: [External] Re: [PATCH 0/5] migration/multifd: Prerequisite cleanups for ongoing work

2024-01-31 Thread Hao Xiang
On Wed, Jan 31, 2024 at 5:19 AM Fabiano Rosas wrote: > > Peter Xu writes: > > > On Mon, Jan 29, 2024 at 09:51:06AM -0300, Fabiano Rosas wrote: > >> Peter Xu writes: > >> > >> > On Mon, Jan 29, 2024 at 01:41:01AM +, Liu, Yuan1 wrote: > >> >> Because this change has an impact on the previous

Re: [PATCH v5 6/6] target/riscv: Enable updates for pointer masking variables and thus enable pointer masking extension

2024-01-31 Thread Alistair Francis
On Tue, Jan 30, 2024 at 5:24 AM Alexey Baturo wrote: > > From: Alexey Baturo > > Signed-off-by: Alexey Baturo Reviewed-by: Alistair Francis Alistair > --- > target/riscv/cpu.c | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c > index

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

2024-01-31 Thread Alistair Francis
On Tue, Jan 30, 2024 at 5:24 AM Alexey Baturo wrote: > > From: Alexey Baturo > > Signed-off-by: Alexey Baturo Reviewed-by: Alistair Francis Alistair > --- > target/riscv/cpu.h| 4 +++ > target/riscv/cpu_helper.c | 58 +++ > 2 files changed, 62

Re: [PATCH v4 7/8] STM32L4x5: Use the RCC Sysclk

2024-01-31 Thread Alistair Francis
On Wed, Jan 31, 2024 at 3:21 AM Arnaud Minier wrote: > > Now that we can generate reliable clock frequencies from the RCC, remove > the hacky definition of the sysclk in the b_l475e_iot01a initialisation > code and use the correct RCC clock. > > Signed-off-by: Arnaud Minier > Signed-off-by: Inès

Re: [PATCH v4 3/8] Add an internal PLL Clock object

2024-01-31 Thread Alistair Francis
On Wed, Jan 31, 2024 at 2:09 AM Arnaud Minier wrote: > > This object represents the PLLs and their channels. The PLLs allow for a > more fine-grained control of the clocks frequency. > > Wasn't sure about how to handle the reset and the migration so used the > same appproach as the BCM2835

Re: Call for GSoC/Outreachy internship project ideas

2024-01-31 Thread Stefan Hajnoczi
On Wed, Jan 31, 2024, 18:55 Gurchetan Singh wrote: > > > On Wed, Jan 24, 2024 at 4:51 AM Stefan Hajnoczi > wrote: > >> On Tue, 23 Jan 2024 at 22:47, Gurchetan Singh >> wrote: >> > Title: >> > - Improve display integration for upstream virtualized graphics >> > >> > Summary: >> > - The Rutabaga

Re: [PATCH v4 1/8] Implement STM32L4x5_RCC skeleton

2024-01-31 Thread Alistair Francis
On Wed, Jan 31, 2024 at 2:09 AM Arnaud Minier wrote: > > Add the necessary files to add a simple RCC implementation with just > reads from and writes to registers. Also instanciate the RCC in the > STM32L4x5_SoC. It is needed for accurate emulation of all the SoC > clocks and timers. > >

Re: Call for GSoC/Outreachy internship project ideas

2024-01-31 Thread Gurchetan Singh
On Wed, Jan 24, 2024 at 4:51 AM Stefan Hajnoczi wrote: > On Tue, 23 Jan 2024 at 22:47, Gurchetan Singh > wrote: > > Title: > > - Improve display integration for upstream virtualized graphics > > > > Summary: > > - The Rutabaga Virtual Graphics interface's UI integration upstream is > very

Re: [PATCH 03/10] disas/riscv: Clean up includes

2024-01-31 Thread Alistair Francis
On Fri, Jan 26, 2024 at 4:04 AM Peter Maydell wrote: > > This commit was created with scripts/clean-includes: > ./scripts/clean-includes --git disas/riscv disas/riscv*[ch] > > All .c should include qemu/osdep.h first. The script performs three > related cleanups: > > * Ensure .c files include

[PATCH v3 3/4] target/s390x: implement CVB, CVBY and CVBG

2024-01-31 Thread Ilya Leoshkevich
From: Pavel Zbitskiy Convert to Binary - counterparts of the already implemented Convert to Decimal (CVD*) instructions. Example from the Principles of Operation: 25594C becomes 63FA. [iii: Use separate functions for CVB and CVBG for simplicity]. Signed-off-by: Pavel Zbitskiy ---

[PATCH v3 1/4] target/s390x: Emulate CVDG

2024-01-31 Thread Ilya Leoshkevich
CVDG is the same as CVD, except that it converts 64 bits into 128, rather than 32 into 64. Create a new helper, which uses Int128 wrappers. Reported-by: Ido Plat Reviewed-by: Richard Henderson Signed-off-by: Ilya Leoshkevich --- target/s390x/helper.h| 1 +

[PATCH v3 4/4] tests/tcg/s390x: Test CONVERT TO BINARY

2024-01-31 Thread Ilya Leoshkevich
Check the CVB's and CVBG's corner cases. Co-developed-by: Pavel Zbitskiy Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.target | 1 + tests/tcg/s390x/cvb.c | 47 + 2 files changed, 48 insertions(+) create mode 100644

[PATCH v3 0/4] target/s390x: Emulate CVDG and CVB*

2024-01-31 Thread Ilya Leoshkevich
v2: https://lists.gnu.org/archive/html/qemu-devel/2024-01/msg05048.html v2 -> v3: Resurrect an old CVB* patch (Thomas). Add Richard's R-b. v1: https://lists.gnu.org/archive/html/qemu-devel/2024-01/msg02865.html v1 -> v2: Fix !CONFIG_INT128 builds (Richard). Hi, Ido reported that we

[PATCH v3 2/4] tests/tcg/s390x: Test CONVERT TO DECIMAL

2024-01-31 Thread Ilya Leoshkevich
Check the CVD's and CVDG's corner cases. Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.target | 1 + tests/tcg/s390x/cvd.c | 45 + 2 files changed, 46 insertions(+) create mode 100644 tests/tcg/s390x/cvd.c diff --git

Re: [PATCH v2 09/19] qapi/schema: allow resolve_type to be used for built-in types

2024-01-31 Thread John Snow
On Mon, Jan 22, 2024 at 8:12 AM Markus Armbruster wrote: > > John Snow writes: > > > On Tue, Jan 16, 2024 at 6:09 AM Markus Armbruster wrote: > >> > >> John Snow writes: > >> > >> > allow resolve_type to be used for both built-in and user-specified > >> > type definitions. In the event that

Re: [PATCH 00/14] migration/multifd: Refactor ->send_prepare() and cleanups

2024-01-31 Thread Fabiano Rosas
pet...@redhat.com writes: > From: Peter Xu > > This patchset contains quite a few refactorings to current multifd: > > - It picked up some patches from an old series of mine [0] (the last > patches were dropped, though; I did the cleanup slightly differently): > > I still managed to

Re: [PATCH v2 09/19] qapi/schema: allow resolve_type to be used for built-in types

2024-01-31 Thread John Snow
On Mon, Jan 22, 2024 at 8:12 AM Markus Armbruster wrote: > > John Snow writes: > > > On Tue, Jan 16, 2024 at 6:09 AM Markus Armbruster wrote: > >> > >> John Snow writes: > >> > >> > allow resolve_type to be used for both built-in and user-specified > >> > type definitions. In the event that

[PATCH] tests/tcg: Fix the /proc/self/mem probing in the PROT_NONE gdbstub test

2024-01-31 Thread Ilya Leoshkevich
The `if not probe_proc_self_mem` check never passes, because probe_proc_self_mem is a function object, which is a truthy value. Add parentheses in order to perform a function call. Fixes: dc84d50a7f9b ("tests/tcg: Add the PROT_NONE gdbstub test") Signed-off-by: Ilya Leoshkevich ---

Re: [PATCH 00/22] target/sparc: floating-point cleanup

2024-01-31 Thread Mark Cave-Ayland
On 28/01/2024 06:49, Richard Henderson wrote: On 11/4/23 03:38, Richard Henderson wrote: Major changes: (1) Get rid of the env->qt[01] temporaries and use TCGv_i128 for float128. (2) Perform ieee exception check within the helpers, before any writeback to the floating point registers.

Re: [PATCH 13/14] migration/multifd: Move header prepare/fill into send_prepare()

2024-01-31 Thread Fabiano Rosas
pet...@redhat.com writes: > From: Peter Xu > > This patch redefines the interfacing of ->send_prepare(). It further > simplifies multifd_send_thread() especially on zero copy. > > Now with the new interface, we require the hook to do all the work for > preparing the IOVs to send. After it's

Re: [PATCH 14/14] migration/multifd: Forbid spurious wakeups

2024-01-31 Thread Fabiano Rosas
pet...@redhat.com writes: > From: Peter Xu > > Now multifd's logic is designed to have no spurious wakeup. I still > remember a talk to Juan and he seems to agree we should drop it now, and if > my memory was right it was there because multifd used to hit that when > still debugging. > > Let's

Re: [PATCH 12/14] migration/multifd: multifd_send_prepare_header()

2024-01-31 Thread Fabiano Rosas
pet...@redhat.com writes: > From: Peter Xu > > Introduce a helper multifd_send_prepare_header() to setup the header packet > for multifd sender. > > It's fine to setup the IOV[0] _before_ send_prepare() because the packet > buffer is already ready, even if the content is to be filled in. > >

Re: [PATCH 11/14] migration/multifd: Move trace_multifd_send|recv()

2024-01-31 Thread Fabiano Rosas
pet...@redhat.com writes: > From: Peter Xu > > Move them into fill/unfill of packets. With that, we can further cleanup > the send/recv thread procedure, and remove one more temp var. > > Signed-off-by: Peter Xu Reviewed-by: Fabiano Rosas

Re: [PATCH 10/14] migration/multifd: Move total_normal_pages accounting

2024-01-31 Thread Fabiano Rosas
pet...@redhat.com writes: > From: Peter Xu > > Just like the previous patch, move the accounting for total_normal_pages on > both src/dst sides into the packet fill/unfill procedures. > > Signed-off-by: Peter Xu Reviewed-by: Fabiano Rosas

Re: [PATCH 09/14] migration/multifd: Rename p->num_packets and clean it up

2024-01-31 Thread Fabiano Rosas
pet...@redhat.com writes: > From: Peter Xu > > This field, no matter whether on src or dest, is only used for debugging > purpose. > > They can even be removed already, unless it still more or less provide some > accounting on "how many packets are sent/recved for this thread". The > other more

Re: [PATCH 08/14] migration/multifd: Drop pages->num check in sender thread

2024-01-31 Thread Fabiano Rosas
pet...@redhat.com writes: > From: Peter Xu > > Now with a split SYNC handler, we always have pages->num set for > pending_job==true. Assert it instead. > > Signed-off-by: Peter Xu Reviewed-by: Fabiano Rosas

Re: [PATCH] tcg: Fixes set const_args[i] wrong value when instructions imm is 0

2024-01-31 Thread Richard Henderson
On 1/31/24 17:27, Song Gao wrote: It seems that tcg_reg_alloc_op() set const_args[i] wrong value when instructions imm is 0. The LoongArch tcg_out_vec_op() cmp_vec use the wrong const_args[2]. e.g The wrong const_args[2] is 0. IN: vslti.w v5, v4, 0x0 OUT: vslt.w v1, v1, v0 The

QEMU 8.2.0 aarch64 sve ldff1b returning 1 byte when 16 are expected

2024-01-31 Thread Mark Charney OS
Using QEMU v8.2.0 (and also the HEAD of the git master branch), I encountered an unexpected situation: an ldff1b is returning 1 byte when I run with the QEMU user level plugin (and setting FFR as if there was a fault). However the ldff1b actually loads 16 bytes when: (a) I run this same test

[PATCH 3/3] tests/tcg: Add two follow-fork-mode tests

2024-01-31 Thread Ilya Leoshkevich
Add follow-fork-mode child and and follow-fork-mode parent tests. Check for the obvious pitfalls, such as lingering breakpoints, catchpoints, and single-step mode. Signed-off-by: Ilya Leoshkevich --- tests/tcg/multiarch/Makefile.target | 17 +-

[PATCH 2/3] gdbstub: Implement follow-fork-mode child

2024-01-31 Thread Ilya Leoshkevich
Currently it's not possible to use gdbstub for debugging linux-user code that runs in a forked child, which is normally done using the `set follow-fork-mode child` GDB command. Purely on the protocol level, the missing piece is the fork-events feature. However, a deeper problem is supporting $Hg

[PATCH 0/3] gdbstub: Implement follow-fork-mode child

2024-01-31 Thread Ilya Leoshkevich
Based-on: <20240116094411.216665-1-...@linux.ibm.com> Hi, I needed to debug a linux-user crash between fork() and exec() [1] and realized that gdbstub does not allow this. This series lifts this restriction (one still cannot debug past exec() though). Patch 1 is a preliminary refactoring, I can

[PATCH 1/3] gdbstub: Refactor fork() handling

2024-01-31 Thread Ilya Leoshkevich
Prepare for implementing follow-fork-mode child: * Introduce gdbserver_fork_start(), which for now is a no-op. * Rename gdbserver_fork() to gdbserver_fork_end(), call it in both parent and child processes, and pass the fork()'s return value to it. * Factor out disable_gdbstub(). * Update ts_tid

Re: [PULL 11/33] scsi: only access SCSIDevice->requests from one thread

2024-01-31 Thread Stefan Hajnoczi
On Fri, Jan 26, 2024 at 04:24:49PM +0100, Hanna Czenczek wrote: > On 26.01.24 14:18, Kevin Wolf wrote: > > Am 25.01.2024 um 18:32 hat Hanna Czenczek geschrieben: > > > On 23.01.24 18:10, Kevin Wolf wrote: > > > > Am 23.01.2024 um 17:40 hat Hanna Czenczek geschrieben: > > > > > On 21.12.23 22:23,

Re: [PATCH 07/14] migration/multifd: Simplify locking in sender thread

2024-01-31 Thread Fabiano Rosas
pet...@redhat.com writes: > From: Peter Xu > > The sender thread will yield the p->mutex before IO starts, trying to not > block the requester thread. This may be unnecessary lock optimizations, > because the requester can already read pending_job safely even without the > lock, because the

Dynamic & heterogeneous machines, initial configuration: problems

2024-01-31 Thread Markus Armbruster
This memo is the fruit of discussions with Philippe Mathieu-Daudé. Its errors are mine. QEMU defines machines statically in C code. We've long wished we could define them dynamically in some suitable DSL. This is what we call "dynamic machines". There's a need for machines that contain more

Re: [PATCH] blkio: Respect memory-alignment for bounce buffer allocations

2024-01-31 Thread Stefan Hajnoczi
On Wed, Jan 31, 2024 at 06:31:40PM +0100, Kevin Wolf wrote: > blkio_alloc_mem_region() requires that the requested buffer size is a > multiple of the memory-alignment property. If it isn't, the allocation > fails with a return value of -EINVAL. > > Fix the call in blkio_resize_bounce_pool() to

Re: [PATCH 0/2] Enable -Wvla, forbidding use of variable length arrays

2024-01-31 Thread Peter Maydell
On Wed, 31 Jan 2024 at 14:56, Thomas Huth wrote: > There's still a vla left in the ppc kvm code: > > https://gitlab.com/thuth/qemu/-/jobs/6063230079#L2005 > > ../target/ppc/kvm.c: In function ‘kvmppc_save_htab’: > ../target/ppc/kvm.c:2691:5: error: ISO C90 forbids variable length array > ‘buf’

Re: [PULL 0/4] Misc changes guest agent

2024-01-31 Thread Peter Maydell
On Tue, 30 Jan 2024 at 10:59, Konstantin Kostiuk wrote: > > The following changes since commit 11be70677c70fdccd452a3233653949b79e97908: > > Merge tag 'pull-vfio-20240129' of https://github.com/legoater/qemu into > staging (2024-01-29 10:53:56 +) > > are available in the Git repository at:

Re: [PULL 00/31] tcg patch queue

2024-01-31 Thread Peter Maydell
On Mon, 29 Jan 2024 at 23:01, Richard Henderson wrote: > > The following changes since commit 7a1dc45af581d2b643cdbf33c01fd96271616fbd: > > Merge tag 'pull-target-arm-20240126' of > https://git.linaro.org/people/pmaydell/qemu-arm into staging (2024-01-26 > 18:16:35 +) > > are available in

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

2024-01-31 Thread Daniel Henrique Barboza
On 1/29/24 22:10, Alistair Francis wrote: On Fri, Jan 26, 2024 at 5:54 AM 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

RE: [PATCH 2/3] ui/gtk: set the ui size to 0 when invisible

2024-01-31 Thread Kim, Dongwon
Hi Marc-André, > -Original Message- > From: Marc-André Lureau > Sent: Tuesday, January 30, 2024 11:13 PM > To: Kim, Dongwon > Cc: qemu-devel@nongnu.org > Subject: Re: [PATCH 2/3] ui/gtk: set the ui size to 0 when invisible > > Hi > > On Wed, Jan 31, 2024 at 3:50 AM wrote: > > > >

RE: [PATCH 1/3] ui/gtk: skip drawing guest scanout when associated VC is invisible

2024-01-31 Thread Kim, Dongwon
Hi Marc-André, > https://docs.gtk.org/gtk3/method.Widget.is_visible.html This is what we had tried first but it didn't seem to work for the case of window minimization. I see the visible flag for the GTK widget didn't seem to be toggled for some reason. And when closing window, vc->window

Re: [PATCH] target/riscv: Use RISCVException as return type for all csr ops

2024-01-31 Thread Daniel Henrique Barboza
On 1/30/24 08:08, LIU Zhiwei wrote: The real return value type has been converted to RISCVException, but some function declarations still not. This patch makes all csr operation declarations use RISCVExcetion. Signed-off-by: LIU Zhiwei --- There's a trivial conflict down there due to the

Re: [PATCH 2/2] target/riscv: Support xtheadmaee for thead-c906

2024-01-31 Thread Conor Dooley
On Tue, Jan 30, 2024 at 12:43:25PM +0100, Christoph Müllner wrote: > On Tue, Jan 30, 2024 at 12:12 PM LIU Zhiwei > wrote: > > > > thead-c906 uses some flags in pte [60-63] bits. It has history reasons that > > SVPBMT didn't exist when thead-c906 came to world. > > > > We named this feature as

Re: [PATCH 06/14] migration/multifd: Separate SYNC request with normal jobs

2024-01-31 Thread Fabiano Rosas
pet...@redhat.com writes: > From: Peter Xu > > Multifd provide a threaded model for processing jobs. On sender side, > there can be two kinds of job: (1) a list of pages to send, or (2) a sync > request. > > The sync request is a very special kind of job. It never contains a page > array, but

[PATCH] RISC-V: Report the QEMU vendor/arch IDs on virtual CPUs

2024-01-31 Thread Palmer Dabbelt
Right now we just report 0 for marchid/mvendorid in QEMU. That's legal, but it's tricky for users that want to check if they're running on QEMU to do so. This sets marchid to 42, which I've proposed as the QEMU architecture ID (mvendorid remains 0, just explicitly set, as that's how the ISA

Re: [PATCH v4 1/1] oslib-posix: initialize backend memory objects in parallel

2024-01-31 Thread David Hildenbrand
On 31.01.24 17:53, Mark Kanda wrote: QEMU initializes preallocated backend memory as the objects are parsed from the command line. This is not optimal in some cases (e.g. memory spanning multiple NUMA nodes) because the memory objects are initialized in series. Allow the initialization to occur

Re: Call for GSoC/Outreachy internship project ideas

2024-01-31 Thread Stefan Hajnoczi
On Wed, 31 Jan 2024 at 10:59, Palmer Dabbelt wrote: > > On Wed, 31 Jan 2024 06:39:25 PST (-0800), stefa...@gmail.com wrote: > > On Tue, 30 Jan 2024 at 14:40, Palmer Dabbelt wrote: > >> On Mon, 15 Jan 2024 08:32:59 PST (-0800), stefa...@gmail.com wrote: > >> I'm not 100% sure this is a sane GSoC

Re: [PATCH] blkio: Respect memory-alignment for bounce buffer allocations

2024-01-31 Thread Stefano Garzarella
On Wed, Jan 31, 2024 at 06:31:40PM +0100, Kevin Wolf wrote: blkio_alloc_mem_region() requires that the requested buffer size is a multiple of the memory-alignment property. If it isn't, the allocation fails with a return value of -EINVAL. Fix the call in blkio_resize_bounce_pool() to make sure

Re: [PATCH] hw/pci: migration: Skip config space check for vendor specific capability during restore/load

2024-01-31 Thread Alex Williamson
On Wed, 31 Jan 2024 15:22:59 +0530 Vinayak Kale wrote: > On 31/01/24 12:28 am, Alex Williamson wrote: > > > > On Tue, 30 Jan 2024 23:32:26 +0530 > > Vinayak Kale wrote: > > > >> Missed adding Michael, Marcel, Alex and Avihai earlier, apologies. > >> > >> Regards, > >> Vinayak > >> > >> On

Re: [PATCH 0/5] buses: switch to 3-phase-reset

2024-01-31 Thread Cédric Le Goater
On 1/22/24 15:19, Cédric Le Goater wrote: Hello, On 1/22/24 03:06, Peter Xu wrote: Hi, Peter, On Fri, Jan 19, 2024 at 04:35:07PM +, Peter Maydell wrote: I wrote this ages ago and recently picked it back up because of a recent PCI related reset ordering problem noted by Peter Xu.  I'm not

[PATCH] blkio: Respect memory-alignment for bounce buffer allocations

2024-01-31 Thread Kevin Wolf
blkio_alloc_mem_region() requires that the requested buffer size is a multiple of the memory-alignment property. If it isn't, the allocation fails with a return value of -EINVAL. Fix the call in blkio_resize_bounce_pool() to make sure the requested size is properly aligned. I observed this

[PATCH] seccomp: report EPERM instead of killing process for spawn set

2024-01-31 Thread Daniel P . Berrangé
When something tries to run one of the spawn syscalls (eg clone), our seccomp deny filter is set to cause a fatal trap which kills the process. This is found to be unhelpful when QEMU has loaded the nvidia GL library. This tries to spawn a process to modprobe the nvidia kmod. This is a dubious

[PATCH v4 1/1] oslib-posix: initialize backend memory objects in parallel

2024-01-31 Thread Mark Kanda
QEMU initializes preallocated backend memory as the objects are parsed from the command line. This is not optimal in some cases (e.g. memory spanning multiple NUMA nodes) because the memory objects are initialized in series. Allow the initialization to occur in parallel (asynchronously). In order

[PATCH v4 0/1] Initialize backend memory objects in parallel

2024-01-31 Thread Mark Kanda
v4: - remove unneeded async check from host_memory_backend_set_prealloc() - rename qemu_finish_async_mem_prealloc -> qemu_finish_async_prealloc_mem - use new phase PHASE_LATE_BACKENDS_CREATED for async v3: - squash into a single patch - use global context list for async handling only (MT

  1   2   3   >