Re: [RFC PATCH v5 08/21] hw/arm: Add DEFINE_MACHINE_[ARM_]AARCH64() macros

2025-04-27 Thread Philippe Mathieu-Daudé
On 25/4/25 22:36, Pierrick Bouvier wrote: On 4/25/25 13:29, BALATON Zoltan wrote: On Fri, 25 Apr 2025, Pierrick Bouvier wrote: On 4/25/25 02:43, BALATON Zoltan wrote: On Thu, 24 Apr 2025, Pierrick Bouvier wrote: On 4/24/25 17:16, BALATON Zoltan wrote: On Fri, 25 Apr 2025, Philippe Mathieu-Da

[PATCH v3 10/20] include/glib-compat.h: Poison g_list_sort and g_slist_sort

2025-04-27 Thread Kohei Tokunaga
On Emscripten, function pointer casts can result in runtime failures due to strict function signature checks. This affects the use of g_list_sort and g_slist_sort, which internally perform function pointer casts that are not supported by Emscripten. To avoid these issues, g_list_sort_with_data and

[PATCH v3 13/20] block: Fix type confict of the copy_file_range stub

2025-04-27 Thread Kohei Tokunaga
Emscripten doesn't provide copy_file_range implementation but it declares this function in its headers. Meson correctly detects the missing implementation and unsets HAVE_COPY_FILE_RANGE. However, the stub defined in file-posix.c causes a type conflict with the declaration from Emscripten during co

[PATCH v3 09/20] target/s390x: Fix type conflict of GLib function pointers

2025-04-27 Thread Kohei Tokunaga
On Emscripten, function pointer casts can result in runtime failures due to strict function signature checks. This affects the use of g_list_sort and g_slist_sort, which internally perform function pointer casts that are not supported by Emscripten. To avoid these issues, g_list_sort_with_data and

[PATCH v3 19/20] tests: Add Dockerfile containing dependencies for Emscripten build

2025-04-27 Thread Kohei Tokunaga
The added Dockerfile is based on the emsdk image, which includes the Emscripten toolchain. It also cross-compiles the necessary dependencies (glib, libffi, pixman, and zlib) for the Emscripten target environment. Signed-off-by: Kohei Tokunaga --- MAINTAINERS |

[PATCH v3 17/20] util: Add coroutine backend for emscripten

2025-04-27 Thread Kohei Tokunaga
Emscripten does not support couroutine methods currently used by QEMU but provides a coroutine implementation called "fiber". This commit introduces a coroutine backend using fiber. Note that fiber does not support submitting coroutines to other threads. Signed-off-by: Kohei Tokunaga Acked-by: St

[PATCH v3 20/20] gitlab: Enable CI for wasm build

2025-04-27 Thread Kohei Tokunaga
Add GitLab CI job that builds QEMU using emscripten. The build runs in the container defined in tests/docker/dockerfiles/emsdk-wasm32-cross.docker. Signed-off-by: Kohei Tokunaga --- .gitlab-ci.d/buildtest-template.yml | 27 +++ .gitlab-ci.d/buildtest.yml | 9 +++

[PATCH v3 18/20] meson: Add wasm build in build scripts

2025-04-27 Thread Kohei Tokunaga
has_int128_type is set to false on emscripten as of now to avoid errors by libffi. Tests are disabled on emscripten because they rely on host features that aren't supported by emscripten (e.g. fork and unix socket). Signed-off-by: Kohei Tokunaga --- MAINTAINERS | 1 + configs/

[PATCH v3 03/20] system/vl.c: Fix type conflict of GLib function pointers

2025-04-27 Thread Kohei Tokunaga
On Emscripten, function pointer casts can result in runtime failures due to strict function signature checks. This affects the use of g_list_sort and g_slist_sort, which internally perform function pointer casts that are not supported by Emscripten. To avoid these issues, g_list_sort_with_data and

[PATCH v3 01/20] hw/core/loader.c: Fix type conflict of GLib function pointers

2025-04-27 Thread Kohei Tokunaga
On Emscripten, function pointer casts can result in runtime failures due to strict function signature checks. This affects the use of g_list_sort and g_slist_sort, which internally perform function pointer casts that are not supported by Emscripten. To avoid these issues, g_list_sort_with_data and

[PATCH v3 14/20] include/qemu/osdep.h: Add Emscripten-specific OS dependencies

2025-04-27 Thread Kohei Tokunaga
On emscripten, some implementations in os-posix.c can't be used such as daemonizing and changing user. This commit introduces os-wasm.c and os-wasm.h which are forked from os-posix.c and os-posix.h and patched for targetting Emscripten. Signed-off-by: Kohei Tokunaga --- MAINTAINERS

[PATCH v3 16/20] util: exclude mmap-alloc.c from compilation target on Emscripten

2025-04-27 Thread Kohei Tokunaga
Emscripten does not support partial unmapping of mmapped memory regions[1]. This limitation prevents correct implementation of qemu_ram_mmap and qemu_ram_munmap, which rely on partial unmap behavior. As a workaround, this commit excludes mmap-alloc.c from the Emscripten build. Instead, for Emscrip

[PATCH v3 15/20] Disable options unsupported on Emscripten

2025-04-27 Thread Kohei Tokunaga
Daemonizing and run-with aren't supported on Emscripten so disable these flags. Signed-off-by: Kohei Tokunaga Reviewed-by: Philippe Mathieu-Daudé --- qemu-options.hx | 4 ++-- system/vl.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/qemu-options.hx b/qemu-options

[PATCH v3 04/20] target/arm/helper.c: Fix type conflict of GLib function pointers

2025-04-27 Thread Kohei Tokunaga
On Emscripten, function pointer casts can result in runtime failures due to strict function signature checks. This affects the use of g_list_sort and g_slist_sort, which internally perform function pointer casts that are not supported by Emscripten. To avoid these issues, g_list_sort_with_data and

[PATCH v3 12/20] block: Add including of ioctl header for Emscripten build

2025-04-27 Thread Kohei Tokunaga
Including is still required on Emscripten, just like on other platforms, to make the ioctl function available. Signed-off-by: Kohei Tokunaga Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Stefan Hajnoczi --- block/file-posix.c | 4 1 file changed, 4 insertions(+) diff --git a/block/fi

[PATCH v3 11/20] util/cacheflush.c: Update cache flushing mechanism for Emscripten

2025-04-27 Thread Kohei Tokunaga
Although __builtin___clear_cache is used to flush the instruction cache for a specified memory region, this operation doesn't apply to wasm, as its memory isn't executable. Moreover, Emscripten does not support this builtin and fails to compile it with the following error. > fatal error: error in

[PATCH v3 05/20] target/i386/cpu.c: Fix type conflict of GLib function pointers

2025-04-27 Thread Kohei Tokunaga
On Emscripten, function pointer casts can result in runtime failures due to strict function signature checks. This affects the use of g_list_sort and g_slist_sort, which internally perform function pointer casts that are not supported by Emscripten. To avoid these issues, g_list_sort_with_data and

[PATCH v3 02/20] qom/object.c: Fix type conflict of GLib function pointers

2025-04-27 Thread Kohei Tokunaga
On Emscripten, function pointer casts can result in runtime failures due to strict function signature checks. This affects the use of g_list_sort and g_slist_sort, which internally perform function pointer casts that are not supported by Emscripten. To avoid these issues, g_list_sort_with_data and

[PATCH v3 08/20] target/ppc: Fix type conflict of GLib function pointers

2025-04-27 Thread Kohei Tokunaga
On Emscripten, function pointer casts can result in runtime failures due to strict function signature checks. This affects the use of g_list_sort and g_slist_sort, which internally perform function pointer casts that are not supported by Emscripten. To avoid these issues, g_list_sort_with_data and

[PATCH v3 07/20] hw/net/can: Fix type conflict of GLib function pointers

2025-04-27 Thread Kohei Tokunaga
On Emscripten, function pointer casts can result in runtime failures due to strict function signature checks. This affects the use of g_list_sort and g_slist_sort, which internally perform function pointer casts that are not supported by Emscripten. To avoid these issues, g_list_sort_with_data and

[PATCH v3 06/20] contrib/plugins: Fix type conflict of GLib function pointers

2025-04-27 Thread Kohei Tokunaga
On Emscripten, function pointer casts can result in runtime failures due to strict function signature checks. This affects the use of g_list_sort and g_slist_sort, which internally perform function pointer casts that are not supported by Emscripten. To avoid these issues, g_list_sort_with_data and

[PATCH v3 00/20] Enable QEMU TCI to run 32bit guests on browsers

2025-04-27 Thread Kohei Tokunaga
V3: - Fixed the argument type of cpreg_key_compare to use gpointer instead of void*. - Fixed the multiline comment to ensure it starts with "/*" on a separate line. - Fixed the commit message to remove a confusing link in the util/cacheflush.c patch. - Resolved patch conflicts against the la

Re: [PATCH v7 3/4] virtio_net: Add second acceptable configuration for MAC setup

2025-04-27 Thread Cindy Lu
On Mon, Apr 21, 2025 at 11:19 AM Jason Wang wrote: > > On Thu, Apr 17, 2025 at 6:25 PM Cindy Lu wrote: > > > > For VDPA devices, Allow configurations where the hardware MAC address > > is non-zero while the MAC address in the QEMU command line is zero. > > In this case, QEMU will use the hardware

Re: [PATCH v7 4/4] virtio_net: Add third acceptable configuration for MAC setup.

2025-04-27 Thread Cindy Lu
On Mon, Apr 21, 2025 at 11:22 AM Jason Wang wrote: > > On Thu, Apr 17, 2025 at 6:26 PM Cindy Lu wrote: > > > > For VDPA devices, Allow configurations where both the hardware MAC address > > and QEMU command line MAC address are zero. > > In this case, QEMU will automatically generate a random MAC

[PATCH v4 1/3] intel_iommu: Take the bql before registering a new address space

2025-04-27 Thread CLEMENT MATHIEU--DRIF
Address space creation might end up being called without holding the bql as it is exposed through the IOMMU ops. Signed-off-by: Clement Mathieu--Drif --- hw/i386/intel_iommu.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index dffd7ee885

[PATCH v4 2/3] intel_iommu: Use BQL_LOCK_GUARD to manage cleanup automatically

2025-04-27 Thread CLEMENT MATHIEU--DRIF
vtd_switch_address_space needs to take the BQL if not already held. Use BQL_LOCK_GUARD to make the iommu implementation more consistent. Signed-off-by: Clement Mathieu--Drif --- hw/i386/intel_iommu.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/hw/i386/intel_iomm

[PATCH v4 3/3] intel_iommu: Take the VTD lock when looking for and creating address spaces

2025-04-27 Thread CLEMENT MATHIEU--DRIF
vtd_find_add_as can be called by multiple threads which leads to a race condition on address space creation. The IOMMU lock must be taken to avoid such a race. Signed-off-by: Clement Mathieu--Drif --- hw/i386/intel_iommu.c | 28 ++-- 1 file changed, 26 insertions(+), 2 de

[PATCH v4 0/3] intel_iommu: Fix locking issues

2025-04-27 Thread CLEMENT MATHIEU--DRIF
This series introduces 2 fixes and improves locking style consistency in the VT-d device. Clement Mathieu--Drif (3): intel_iommu: Take the bql before registering a new address space intel_iommu: Use BQL_LOCK_GUARD to manage cleanup automatically intel_iommu: Take the VTD lock when looking fo

[PATCH] hw/rdma: Add initial Support for Vhost-User-Rdma Device

2025-04-27 Thread Weimin Xiong
From: xiongweimin Add initial support for vhost-user-rdma device model for qemu, this includes the interaction(e.g feature negotiation, setting vring baseaddr, setting device status) between guest kernel and host vhost-user-rdma backend device Signed-off-by: xiongweimin --- hw/rdma/vhost-user-

[PULL 3/8] hw/intc/loongarch_extioi: Replace legacy reset callback with new api

2025-04-27 Thread Bibo Mao
Replace legacy reset callback register device_class_set_legacy_reset() with new function resettable_class_set_parent_phases(). With new API, it will call reset callback of parent object and then itself. Signed-off-by: Bibo Mao Reviewed-by: Song Gao --- hw/intc/loongarch_extioi.c | 12 ++

[PULL 6/8] hw/loongarch/virt: Get physical entry address with elf file

2025-04-27 Thread Bibo Mao
With load_elf() api, image load low address and high address is converted to physical address if parameter translate_fn is provided. However executing entry address is still virtual address. Here convert entry address into physical address, since MMU is disabled when system power on, the first PC i

[PULL 8/8] hw/loongarch/virt: Allow user to customize OEM ID and OEM table ID

2025-04-27 Thread Bibo Mao
On LoongArch virt machine, the default OEM ID and OEM table ID is "BOCHS " and "BXPC". Here property x-oem-id and x-oem-table-id is added on virt machine to set customized OEM ID and OEM table ID. Signed-off-by: Bibo Mao Reviewed-by: Song Gao --- hw/loongarch/virt.c | 58 +++

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

2025-04-27 Thread Bibo Mao
The following changes since commit 019fbfa4bcd2d3a835c241295e22ab2b5b56129b: Merge tag 'pull-misc-2025-04-24' of https://repo.or.cz/qemu/armbru into staging (2025-04-24 13:44:57 -0400) are available in the Git repository at: https://github.com/bibo-mao/qemu.git tags/pull-loongarch-20250428

[PULL 2/8] hw/intc/loongarch_extioi: Add reset support

2025-04-27 Thread Bibo Mao
Add reset support with extioi irqchip, and register reset callback support with new API resettable_class_set_parent_phases(). Clear internal HW registers and SW state when virt machine resets. Signed-off-by: Bibo Mao Reviewed-by: Song Gao --- hw/intc/loongarch_extioi_common.c | 41 +

[PULL 4/8] hw/intc/loongarch_pch: Add reset support

2025-04-27 Thread Bibo Mao
Add reset support with LoongArch pci irqchip, and register reset callback support with new API resettable_class_set_parent_phases(). Clear internal HW registers and SW state when virt machine resets. Signed-off-by: Bibo Mao Reviewed-by: Song Gao --- hw/intc/loongarch_pic_common.c | 25 +

[PULL 7/8] hw/loongarch/virt: Replace RSDT with XSDT table

2025-04-27 Thread Bibo Mao
XSDT table is introduced in ACPI Specification 5.0, it supports 64-bit address in the table. There is LoongArch system support from ACPI Specification 6.4 and later, XSDT is supported by LoongArch system. Here replace RSDT with XSDT table. Signed-off-by: Bibo Mao Reviewed-by: Song Gao --- hw/l

[PULL 5/8] hw/intc/loongarch_pch: Replace legacy reset callback with new api

2025-04-27 Thread Bibo Mao
Replace legacy reset callback register device_class_set_legacy_reset() with new function resettable_class_set_parent_phases(). With new API, it will call reset callback of parent object. The internal state has been cleared in parent object LOONGARCH_PIC_COMMON, here parent_phases.hold() is directl

[PULL 1/8] hw/intc/loongarch_ipi: Add reset support

2025-04-27 Thread Bibo Mao
Add reset support with ipi object, register reset callback and clear internal registers when virt machine resets. Signed-off-by: Bibo Mao Reviewed-by: Song Gao --- hw/intc/loongarch_ipi.c | 29 + include/hw/intc/loongarch_ipi.h | 1 + 2 files changed, 30 ins

Re: [PATCH v2 2/2] hw/loongarch/virt: Allow user to customize OEM ID and OEM table ID

2025-04-27 Thread gaosong
在 2025/3/4 下午3:41, Bibo Mao 写道: On LoongArch virt machine, the default OEM ID and OEM table ID is "BOCHS " and "BXPC". Here property x-oem-id and x-oem-table-id is added on virt machine to set customized OEM ID and OEM table ID. Signed-off-by: Bibo Mao --- hw/loongarch/virt.c | 58 +++

Re: [PATCH v2 1/2] hw/loongarch/virt: Replace RSDT with XSDT table

2025-04-27 Thread gaosong
在 2025/3/4 下午3:41, Bibo Mao 写道: XSDT table is introduced in ACPI Specification 5.0, it supports 64-bit address in the table. There is LoongArch system support from ACPI Specification 6.4 and later, XSDT is supported by LoongArch system. Here replace RSDT with XSDT table. Signed-off-by: Bibo Mao

Re: [PATCH v2 14/16] hw/intc/loongarch_pch: Rename memory region iomem32_low with iomem

2025-04-27 Thread gaosong
在 2025/3/24 下午5:37, Bibo Mao 写道: Rename memory region iomem32_low with iomem, also change ops name as follows: loongarch_pch_pic_reg32_low_ops --> loongarch_pch_pic_ops loongarch_pch_pic_low_readw --> loongarch_pch_pic_read loongarch_pch_pic_low_writew --> loongarch_pch_pic_wri

Re: [PATCH v2 13/16] hw/intc/loongarch_pch: Use unified trace event for memory region ops

2025-04-27 Thread gaosong
在 2025/3/24 下午5:37, Bibo Mao 写道: Add trace event trace_loongarch_pch_pic_read(), replaces the following three events: trace_loongarch_pch_pic_low_readw() trace_loongarch_pch_pic_high_readw() trace_loongarch_pch_pic_readb() The similiar with write trace event. Signed-off-by: Bibo Mao --

Re: [PATCH v2 12/16] hw/intc/loongarch_pch: Use generic write callback for iomem8 region

2025-04-27 Thread gaosong
在 2025/3/24 下午5:37, Bibo Mao 写道: Add iomem8 region register write operation emulation in generic write function loongarch_pch_pic_write(), and use this function for iomem8 region. Signed-off-by: Bibo Mao --- hw/intc/loongarch_pch_pic.c | 31 ++- 1 file changed, 10

Re: [PATCH v2 11/16] hw/intc/loongarch_pch: Use generic write callback for iomem32_high region

2025-04-27 Thread gaosong
在 2025/3/24 下午5:37, Bibo Mao 写道: Add iomem32_high region register write operation emulation in generic write function loongarch_pch_pic_write(), and use this function for iomem32_high region. Signed-off-by: Bibo Mao --- hw/intc/loongarch_pch_pic.c | 28 +--- 1 file ch

Re: [RFC PATCH v5 21/21] hw/arm/virt: Get default CPU type at runtime

2025-04-27 Thread Zhang Chen
On Fri, Apr 25, 2025 at 6:23 AM Philippe Mathieu-Daudé wrote: > > Prefer MachineClass::get_default_cpu_type() over > MachineClass::default_cpu_type to get CPU type, > evaluating TCG availability at runtime calling > tcg_enabled(). > > It's worth noting that this is a behavior change: > > - Previou

Re: [PATCH v2 10/16] hw/intc/loongarch_pch: Use generic write callback for iomem32_low region

2025-04-27 Thread gaosong
在 2025/3/24 下午5:37, Bibo Mao 写道: For memory region iomem32_low, generic write callback is used. Signed-off-by: Bibo Mao --- hw/intc/loongarch_pch_pic.c | 140 +++- 1 file changed, 73 insertions(+), 67 deletions(-) Reviewed-by: Song Gao Thanks. Song Gao dif

Re: [PATCH] hw/arm/virt.c: Fix wrong default cpu type in AARCH64

2025-04-27 Thread Zhang Chen
On Thu, Apr 24, 2025 at 5:58 PM Philippe Mathieu-Daudé wrote: > > On 24/4/25 10:56, Zhang Chen wrote: > > On Thu, Apr 3, 2025 at 10:23 AM Zhang Chen wrote: > >> > >> On Thu, Apr 3, 2025 at 2:43 AM Richard Henderson > >> wrote: > >>> > >>> On 4/2/25 06:54, Zhang Chen wrote: > Because of the

Re: [PATCH v2 09/16] hw/intc/loongarch_pch: Use generic read callback for iomem8 region

2025-04-27 Thread gaosong
在 2025/3/24 下午5:37, Bibo Mao 写道: Add iomem8 region register read operation emulation in generic read function loongarch_pch_pic_read(), and use this function for iomem8 region. Signed-off-by: Bibo Mao --- hw/intc/loongarch_pch_pic.c | 32 +++- 1 file changed, 11 i

Re: [PATCH v2 08/16] hw/intc/loongarch_pch: Use generic read callback for iomem32_high region

2025-04-27 Thread gaosong
在 2025/3/24 下午5:37, Bibo Mao 写道: Add register read operation emulation in generic read function loongarch_pch_pic_read(), and use this function for iomem32_high region. Signed-off-by: Bibo Mao --- hw/intc/loongarch_pch_pic.c | 27 --- 1 file changed, 8 insertions(+),

Re: [PATCH v2 06/16] hw/intc/loongarch_pch: Discard write operation with ISR register

2025-04-27 Thread gaosong
在 2025/3/24 下午5:37, Bibo Mao 写道: With the latest 7A1000 user manual, interrupt status register ISR is read only. Here discard write operation with ISR register. Signed-off-by: Bibo Mao --- hw/intc/loongarch_pch_pic.c | 6 -- 1 file changed, 6 deletions(-) Reviewed-by: Song Gao thanks.

Re: [PATCH v2 05/16] hw/intc/loongarch_pch: Use relative address in MemoryRegionOps

2025-04-27 Thread gaosong
在 2025/3/24 下午5:37, Bibo Mao 写道: Parameter address for read and write callback in MemoryRegionOps is relative offset with base address of this MemoryRegionOps. It can be directly used as offset and offset calculation can be removed. Signed-off-by: Bibo Mao --- hw/intc/loongarch_pch_pic.c | 34

[PATCH] hw/arm/npcm8xx_boards: Correct valid_cpu_types setting of NPCM8XX SoC

2025-04-27 Thread Tim Lee
NPCM8XX SoC is the successor of the NPCM7XX. It features quad-core Cortex-A35 (Armv8, 64-bit) CPUs and some additional peripherals. Correct the `valid_cpu_types` setting to match the NPCM8XX SoC. Signed-off-by: Tim Lee --- hw/arm/npcm8xx_boards.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

Re: [RFC PATCH] target/ppc: Inline most of dcbz helper

2025-04-27 Thread BALATON Zoltan
On Thu, 24 Apr 2025, BALATON Zoltan wrote: The test case I've used came out of a discussion about very slow access to VRAM of a graphics card passed through with vfio the reason for which is still not clear but it was already known that dcbz is often used by MacOS and AmigaOS for clearing memory

[PATCH 1/2] block/null: Report DATA if not reading zeroes

2025-04-27 Thread Nir Soffer
If read-zeroes is not set, we did not report BDRV_BLOCK_DATA or BDRV_BLOCK_ZERO. This is not consistent with other drivers and can confuse users or other programs: % qemu-img map --output json "json:{'driver': 'raw', 'file': {'driver': 'null-co', 'size': '1g'}}" [{ "start": 0, "length": 1

[PATCH 2/2] block/null: Add read-pattern option

2025-04-27 Thread Nir Soffer
When the `read-zeroes` is set, reads produce zeroes, and block status return BDRV_BLOCK_ZERO, emulating a sparse image. If we don't set `read-zeros` we report BDRV_BLOCK_DATA, but image data is undefined; posix_memalign, _aligned_malloc, valloc, or memalign do not promise to zero allocated memory.

[PATCH 0/2] block/null: Add read-pattern

2025-04-27 Thread Nir Soffer
The null driver is very usefull for testing and benchmarking, but it can not emulate an image full of zeroes or an image full of non-zero bytes. Such images are needed for testing computing a blkhash via qemu-nbd or qemu-storage-daemon. This change adds `read-pattern` option allowing emulution of

[PATCH v3 0/2] io: Increase unix stream socket buffer size

2025-04-27 Thread Nir Soffer
On both macOS and Linux, the default send buffer size too small causing poor performance when reading and writing to qemu-nbd. A simple way to experience this is to compare TCP and unix sockets, showing that TCP socket is much faster. Programs like nbdcopy partly mitigate this by using multiple NBD

[PATCH v3 2/2] io: Increase unix socket buffers on Linux

2025-04-27 Thread Nir Soffer
Like macOS we have similar issue on Linux. For TCP socket the send buffer size is 2626560 bytes (~2.5 MiB) and we get good performance. However for unix socket the default and maximum buffer size is 212992 bytes (208 KiB) and we see poor performance when using one NBD connection, up to 4 times slow

[PATCH v3 1/2] io: Increase unix socket buffers size on macOS

2025-04-27 Thread Nir Soffer
On macOS we need to increase unix stream socket buffers size on the client and server to get good performance. We set socket buffers on macOS after connecting or accepting a client connection. For unix datagram socket we need different configuration that can be done later. Testing shows that sett

[PATCH] target/riscv: add satp mode for kvm host cpu

2025-04-27 Thread Meng Zhuo
This patch adds host satp mode while kvm/host cpu satp mode is not set. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2931 Signed-off-by: Meng Zhuo --- target/riscv/kvm/kvm-cpu.c | 27 ++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/target/risc

Re: [PATCH v11 04/10] virtio-gpu: Support asynchronous fencing

2025-04-27 Thread Dmitry Osipenko
On 4/27/25 14:53, 刘聪 wrote: > Hi Dmitry, > > The virglrender patch can fix the virgl issue, but the native context still > fails to run on my machine. > I'm not sure if anyone has successfully run it on an ARM64 machine before. Thanks for the testing! > When running with Venus, the virtual mach

Re: [PATCH v11 04/10] virtio-gpu: Support asynchronous fencing

2025-04-27 Thread Alex Bennée
刘聪 writes: > Hi Dmitry, > > The virglrender patch can fix the virgl issue, but the native context still > fails to run on my machine. > I'm not sure if anyone has successfully run it on an ARM64 machine before. > > When running with Venus, the virtual machine can successfully run vkcube. > Howe

Re: Re: [PATCH v11 04/10] virtio-gpu: Support asynchronous fencing

2025-04-27 Thread 刘聪
Hi Dmitry, The virglrender patch can fix the virgl issue, but the native context still fails to run on my machine. I'm not sure if anyone has successfully run it on an ARM64 machine before. When running with Venus, the virtual machine can successfully run vkcube. However, when using the native

Re: [PATCH 3/3] target/i386: Support VMX_VM_EXIT_SAVE_IA32_PERF_GLOBAL_CTRL

2025-04-27 Thread Mi, Dapeng
On 4/27/2025 4:54 PM, Zhao Liu wrote: >> @@ -4212,7 +4213,8 @@ static const X86CPUDefinition builtin_x86_defs[] = { >> VMX_VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL | >> VMX_VM_EXIT_ACK_INTR_ON_EXIT | VMX_VM_EXIT_SAVE_IA32_PAT | >> VMX_VM_EXIT_LOAD_IA32_PAT | VMX_V

Re: [PATCH v8 27/55] i386/tdx: Enable user exit on KVM_HC_MAP_GPA_RANGE

2025-04-27 Thread Zhao Liu
On Tue, Apr 01, 2025 at 09:01:37AM -0400, Xiaoyao Li wrote: > Date: Tue, 1 Apr 2025 09:01:37 -0400 > From: Xiaoyao Li > Subject: [PATCH v8 27/55] i386/tdx: Enable user exit on KVM_HC_MAP_GPA_RANGE > X-Mailer: git-send-email 2.34.1 > > KVM translates TDG.VP.VMCALL to KVM_HC_MAP_GPA_RANGE, and QEM

Re: [PATCH v8 26/55] i386/tdx: Finalize TDX VM

2025-04-27 Thread Zhao Liu
On Tue, Apr 01, 2025 at 09:01:36AM -0400, Xiaoyao Li wrote: > Date: Tue, 1 Apr 2025 09:01:36 -0400 > From: Xiaoyao Li > Subject: [PATCH v8 26/55] i386/tdx: Finalize TDX VM > X-Mailer: git-send-email 2.34.1 > > Invoke KVM_TDX_FINALIZE_VM to finalize the TD's measurement and make > the TD vCPUs ru

Re: [PATCH v2] hw/loongarch/virt: Get physical entry address with elf file

2025-04-27 Thread bibo mao
On 2025/4/25 下午11:33, Richard Henderson wrote: On 4/24/25 19:16, Bibo Mao wrote: With load_elf() api, image load low address and high address is converted to physical address if parameter translate_fn is provided. However executing entry address is still virtual address. Here convert entry ad

Re: [PATCH 3/3] target/i386: Support VMX_VM_EXIT_SAVE_IA32_PERF_GLOBAL_CTRL

2025-04-27 Thread Zhao Liu
> @@ -4212,7 +4213,8 @@ static const X86CPUDefinition builtin_x86_defs[] = { > VMX_VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL | > VMX_VM_EXIT_ACK_INTR_ON_EXIT | VMX_VM_EXIT_SAVE_IA32_PAT | > VMX_VM_EXIT_LOAD_IA32_PAT | VMX_VM_EXIT_SAVE_IA32_EFER | > -VMX_V

Re: [PATCH 2/5] i386/kvm: Support basic KVM PMU filter

2025-04-27 Thread Zhao Liu
... > > diff --git a/qemu-options.hx b/qemu-options.hx > > index dc694a99a30a..51a7c61ce0b0 100644 > > --- a/qemu-options.hx > > +++ b/qemu-options.hx > > @@ -232,7 +232,8 @@ DEF("accel", HAS_ARG, QEMU_OPTION_accel, > > "eager-split-size=n (KVM Eager Page Split chunk size, >

Re: [PATCH 5/5] i386/kvm: Support fixed counter in KVM PMU filter

2025-04-27 Thread Zhao Liu
> > static void kvm_pmu_filter_class_init(ObjectClass *oc, void *data) > > { > > object_class_property_add_enum(oc, "action", "KvmPmuFilterAction", > > @@ -116,6 +139,14 @@ static void kvm_pmu_filter_class_init(ObjectClass *oc, > > void *data) > > NULL, NU

Re: [PATCH v2 07/16] hw/intc/loongarch_pch: Use generic read callback for iomem32_low region

2025-04-27 Thread bibo mao
On 2025/4/25 下午5:53, Philippe Mathieu-Daudé wrote: On 24/3/25 10:37, Bibo Mao wrote: For memory region iomem32_low, generic read callback is used. Signed-off-by: Bibo Mao ---   hw/intc/loongarch_pch_pic.c | 71 +   1 file changed, 48 insertions(+), 23 dele

Re: [PATCH 1/5] qapi/qom: Introduce kvm-pmu-filter object

2025-04-27 Thread Zhao Liu
Hi Philip and Markus, Let's discuss how to handle compilation for different architectures as well as different accelerators here. > > And "raw" format as a lower level format can be used for other arches > > (e.g., ARM). > > Since you provide the ability to use a raw format, are we sure other >

Re: [PATCH v2 04/16] hw/intc/loongarch_pch: Set version information at initial stage

2025-04-27 Thread bibo mao
On 2025/4/25 下午5:57, Philippe Mathieu-Daudé wrote: On 24/3/25 10:37, Bibo Mao wrote: Register PCH_PIC_INT_ID constains version and supported irq number information, and it is read only register. The detailed value can be set at initial stage, rather than read callback. Signed-off-by: Bibo Ma