Re: [PATCH] hw/sd/sdhci: reset data count in sdhci_buff_access_is_sequential()

2023-05-29 Thread Mauro Matteo Cascella
On Sat, May 27, 2023 at 11:00 AM Michael Tokarev wrote: > > Mon, 7 Nov 2022 11:35:10 +0100, you wrote: > > Make sure to reset data_count if it's equal to (or exceeds) block_size. > > This prevents an off-by-one read / write when accessing s->fifo_buffer > > in sdhci_read_dataport /

Re: [PATCH v4 2/2] qapi: add '@fdset' feature for BlockdevOptionsVirtioBlkVhostVdpa

2023-05-29 Thread Stefano Garzarella
On Sat, May 27, 2023 at 07:56:13AM +0200, Markus Armbruster wrote: Stefano Garzarella writes: The virtio-blk-vhost-vdpa driver in libblkio 1.3.0 supports the fd passing through the new 'fd' property. Since now we are using qemu_open() on '@path' if the virtio-blk driver supports the fd

Re: [PATCH v3 02/14] nbd/client: Add safety check on chunk payload length

2023-05-29 Thread Vladimir Sementsov-Ogievskiy
On 15.05.23 22:53, Eric Blake wrote: Our existing use of structured replies either reads into a qiov capped at 32M (NBD_CMD_READ) or caps allocation to 1000 bytes (see NBD_MAX_MALLOC_PAYLOAD in block/nbd.c). But the existing length checks are rather late; if we encounter a buggy (or malicious)

Re: [PULL 00/10] ppc queue

2023-05-29 Thread Michael Tokarev
29.05.2023 05:18, Nicholas Piggin wrote: .. 01/10 target/ppc: Fix fallback to MFSS for MFFS* instructions on pre 3.0 ISAs 02/10 target/ppc: Fix width of some 32-bit SPRs 03/10 target/ppc: Alignment faults do not set DSISR in ISA v3.0 onward 05/10 hw/ppc/prep: Fix wiring of PIC -> CPU interrupt

Re: [PATCH v4 2/2] qapi: add '@fdset' feature for BlockdevOptionsVirtioBlkVhostVdpa

2023-05-29 Thread Stefano Garzarella
On Fri, May 26, 2023 at 04:20:14PM -0500, Jonathon Jongsma wrote: On 5/26/23 10:03 AM, Stefano Garzarella wrote: The virtio-blk-vhost-vdpa driver in libblkio 1.3.0 supports the fd passing through the new 'fd' property. Since now we are using qemu_open() on '@path' if the virtio-blk driver

Re: [PULL 00/10] ppc queue

2023-05-29 Thread Nicholas Piggin
On Mon May 29, 2023 at 4:01 PM AEST, Michael Tokarev wrote: > 29.05.2023 05:18, Nicholas Piggin wrote: > .. > > >> 01/10 target/ppc: Fix fallback to MFSS for MFFS* instructions on pre 3.0 > >> ISAs > >> 02/10 target/ppc: Fix width of some 32-bit SPRs > >> 03/10 target/ppc: Alignment faults do not

Re: [PATCH] igb: Add Function Level Reset to PF and VF

2023-05-29 Thread Akihiko Odaki
On 2023/05/29 16:01, Cédric Le Goater wrote: On 5/29/23 04:45, Akihiko Odaki wrote: On 2023/05/28 19:50, Sriram Yagnaraman wrote: -Original Message- From: Cédric Le Goater Sent: Friday, 26 May 2023 19:31 To: qemu-devel@nongnu.org Cc: Akihiko Odaki ; Sriram Yagnaraman ; Jason Wang ;

Re: [PULL 00/10] ppc queue

2023-05-29 Thread Richard Purdie
On Mon, 2023-05-29 at 16:30 +1000, Nicholas Piggin wrote: > On Mon May 29, 2023 at 4:01 PM AEST, Michael Tokarev wrote: > > 29.05.2023 05:18, Nicholas Piggin wrote: > > .. > > > > > > 01/10 target/ppc: Fix fallback to MFSS for MFFS* instructions on pre > > > > 3.0 ISAs > > > > 02/10 target/ppc:

[PATCH] hw/clx: Fix CFMW config memory leak

2023-05-29 Thread Li Zhijian
Only 'fw' pointer is marked as g_autofree, so we shoud free other resource manually in error path. Signed-off-by: Li Zhijian --- hw/cxl/cxl-host.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/cxl/cxl-host.c b/hw/cxl/cxl-host.c index 034c7805b3e..dd1a7c83f71

[PATCH] meson: Avoid implicit declaration of functions

2023-05-29 Thread Michal Privoznik
While detecting a presence of a function via 'cc.links()' gives desired result (i.e. detects whether function is present), it also produces a warning on systems where the function is not present, e.g.: qemu.git/build/meson-private/tmph74x3p38/testfile.c:2:34: \ warning: implicit declaration

Re: [PATCH v3 01/14] nbd/client: Use smarter assert

2023-05-29 Thread Vladimir Sementsov-Ogievskiy
On 15.05.23 22:53, Eric Blake wrote: Assigning strlen() to a uint32_t and then asserting that it isn't too large doesn't catch the case of an input string 4G in length. Thankfully, the incoming strings can never be that large: if the export name or query is reflecting a string the client got

Re: [PATCH] igb: Add Function Level Reset to PF and VF

2023-05-29 Thread Cédric Le Goater
On 5/29/23 04:45, Akihiko Odaki wrote: On 2023/05/28 19:50, Sriram Yagnaraman wrote: -Original Message- From: Cédric Le Goater Sent: Friday, 26 May 2023 19:31 To: qemu-devel@nongnu.org Cc: Akihiko Odaki ; Sriram Yagnaraman ; Jason Wang ; Cédric Le Goater Subject: [PATCH] igb: Add

Re: [PATCH] meson: Avoid implicit declaration of functions

2023-05-29 Thread Peter Maydell
On Mon, 29 May 2023 at 08:58, Michal Privoznik wrote: > > While detecting a presence of a function via 'cc.links()' > gives desired result (i.e. detects whether function is present), > it also produces a warning on systems where the function is not > present, e.g.: > >

Re: [PATCH 14/30] audio: add Apple Sound Chip (ASC) emulation

2023-05-29 Thread Volker Rümelin
The Apple Sound Chip was primarily used by the Macintosh II to generate sound in hardware which was previously handled by the toolbox ROM with software interrupts. Implement both the standard ASC and also the enhanced ASC (EASC) functionality which is used in the Quadra 800. Note that whilst

[PATCH v3 2/2] hw/vfio: Add nr of dirty pages to vfio_get_dirty_bitmap tracepoint

2023-05-29 Thread Joao Martins
Include the number of dirty pages on the vfio_get_dirty_bitmap tracepoint. These are fetched from the newly added return value in cpu_physical_memory_set_lebitmap(). Signed-off-by: Joao Martins --- hw/vfio/common.c | 7 --- hw/vfio/trace-events | 2 +- 2 files changed, 5 insertions(+),

[PATCH v3 0/2] hw/vfio: Improve vfio_get_dirty_bitmap() tracepoint

2023-05-29 Thread Joao Martins
Hey, This tiny series changes the tracepoint to include the number of dirty pages via the vfio_get_dirty_bitmap. I find it useful for observability in general to understand the number of dirty pages in an IOVA range. With dirty tracking supported by device or IOMMU it's specially relevant data to

[PATCH v3 1/2] exec/ram_addr: return nr of dirty pages in cpu_physical_memory_set_dirty_lebitmap()

2023-05-29 Thread Joao Martins
In preparation for including the number of dirty pages in the vfio_get_dirty_bitmap() tracepoint, return the number of dirty pages in cpu_physical_memory_set_dirty_lebitmap() similar to cpu_physical_memory_sync_dirty_bitmap(). To avoid counting twice when GLOBAL_DIRTY_RATE is enabled, stash the

[PATCH v2 10/17] i386/cpu: Introduce cluster-id to X86CPU

2023-05-29 Thread Zhao Liu
From: Zhuocheng Ding We introduce cluster-id other than module-id to be consistent with CpuInstanceProperties.cluster-id, and this avoids the confusion of parameter names when hotplugging. Following the legacy smp check rules, also add the cluster_id validity into x86_cpu_pre_plug().

[PATCH v2 07/17] i386: Introduce module-level cpu topology to CPUX86State

2023-05-29 Thread Zhao Liu
From: Zhuocheng Ding smp command has the "clusters" parameter but x86 hasn't supported that level. "cluster" is a CPU topology level concept above cores, in which the cores may share some resources (L2 cache or some others like L3 cache tags, depending on the Archs) [1][2]. For x86, the resource

[PATCH v2 15/17] i386: Fix NumSharingCache for CPUID[0x8000001D].EAX[bits 25:14]

2023-05-29 Thread Zhao Liu
From: Zhao Liu The commit 8f4202fb1080 ("i386: Populate AMD Processor Cache Information for cpuid 0x801D") adds the cache topology for AMD CPU by encoding the number of sharing threads directly. >From AMD's APM, NumSharingCache (CPUID[0x801D].EAX[bits 25:14]) means [1]: The number of

[PATCH v2 05/17] i386/cpu: Use APIC ID offset to encode cache topo in CPUID[4]

2023-05-29 Thread Zhao Liu
From: Zhao Liu Refer to the fixes of cache_info_passthrough ([1], [2]) and SDM, the CPUID.04H:EAX[bits 25:14] and CPUID.04H:EAX[bits 31:26] should use the nearest power-of-2 integer. The nearest power-of-2 integer can be caculated by pow2ceil() or by using APIC ID offset (like L3 topology using

[PATCH v2 08/17] i386: Support modules_per_die in X86CPUTopoInfo

2023-05-29 Thread Zhao Liu
From: Zhuocheng Ding Support module level in i386 cpu topology structure "X86CPUTopoInfo". Since x86 does not yet support the "clusters" parameter in "-smp", X86CPUTopoInfo.modules_per_die is currently always 1. Therefore, the module level width in APIC ID, which can be calculated by

[PATCH v2 13/17] i386: Add cache topology info in CPUCacheInfo

2023-05-29 Thread Zhao Liu
From: Zhao Liu Currently, by default, the cache topology is encoded as: 1. i/d cache is shared in one core. 2. L2 cache is shared in one core. 3. L3 cache is shared in one die. This default general setting has caused a misunderstanding, that is, the cache topology is completely equated with a

[PATCH v2 12/17] hw/i386/pc: Support smp.clusters for x86 PC machine

2023-05-29 Thread Zhao Liu
From: Zhuocheng Ding As module-level topology support is added to X86CPU, now we can enable the support for the cluster parameter on PC machines. With this support, we can define a 5-level x86 CPU topology with "-smp": -smp cpus=*,maxcpus=*,sockets=*,dies=*,clusters=*,cores=*,threads=*.

[PATCH v2 11/17] tests: Add test case of APIC ID for module level parsing

2023-05-29 Thread Zhao Liu
From: Zhuocheng Ding After i386 supports module level, it's time to add the test for module level's parsing. Signed-off-by: Zhuocheng Ding Co-developed-by: Zhao Liu Signed-off-by: Zhao Liu Reviewed-by: Yanan Wang --- tests/unit/test-x86-topo.c | 19 +++ 1 file changed, 15

[PATCH v2 09/17] i386: Support module_id in X86CPUTopoIDs

2023-05-29 Thread Zhao Liu
From: Zhuocheng Ding Add module_id member in X86CPUTopoIDs. module_id can be parsed from APIC ID, so also update APIC ID parsing rule to support module level. With this support, the conversions with module level between X86CPUTopoIDs, X86CPUTopoInfo and APIC ID are completed. module_id can be

[PATCH v2 14/17] i386: Use CPUCacheInfo.share_level to encode CPUID[4]

2023-05-29 Thread Zhao Liu
From: Zhao Liu CPUID[4].EAX[bits 25:14] is used to represent the cache topology for intel CPUs. After cache models have topology information, we can use CPUCacheInfo.share_level to decide which topology level to be encoded into CPUID[4].EAX[bits 25:14]. And since maximum_processor_id (original

RE: [PATCH v1] migration: fix migrate_params_test_apply to set the dest param correctly

2023-05-29 Thread Wang, Wei W
On Saturday, May 27, 2023 5:49 AM, Peter Xu wrote: > On Wed, May 24, 2023 at 04:01:57PM +0800, Wei Wang wrote: > > qmp_migrate_set_parameters expects to use tmp for parameters check, so > > migrate_params_test_apply is expected to copy the related fields from > > params to tmp. So fix

Re: [PATCH v3 03/14] nbd/server: Prepare for alternate-size headers

2023-05-29 Thread Vladimir Sementsov-Ogievskiy
On 15.05.23 22:53, Eric Blake wrote: Upstream NBD now documents[1] an extension that supports 64-bit effect lengths in requests. As part of that extension, the size of the reply headers will change in order to permit a 64-bit length in the reply for symmetry[2]. Additionally, where the reply

Re: [PATCH v4 2/9] migration: Implement switchover ack logic

2023-05-29 Thread Peter Xu
On Sun, May 28, 2023 at 05:06:45PM +0300, Avihai Horon wrote: > Implement switchover ack logic. This prevents the source from stopping > the VM and completing the migration until an ACK is received from the > destination that it's OK to do so. > > To achieve this, a new SaveVMHandlers handler

[PATCH 1/3] hw/smbios: Fix smbios_smp_sockets caculation

2023-05-29 Thread Zhao Liu
From: Zhao Liu Here're 2 mistakes: 1. 003f230e37d7 ("machine: Tweak the order of topology members in struct CpuTopology") changes the meaning of smp.cores but doesn't fix original smp.cores uses. And because of the introduction of cluster, now smp.cores means the number of cores in one

[PATCH 2/3] hw/smbios: Fix thread count in type4

2023-05-29 Thread Zhao Liu
From: Zhao Liu >From SMBIOS 3.0 specification, thread count field means: Thread Count is the total number of threads detected by the BIOS for this processor socket. It is a processor-wide count, not a thread-per-core count. [1] So here we should use threads per socket other than threads per

Re: [RFC] cxl: Multi-headed device design

2023-05-29 Thread Gregory Price
On Wed, May 17, 2023 at 03:18:59PM +0100, Jonathan Cameron wrote: > > > > i.e. an SLD does not require an FM-Owned LD for management, but an MHD, > > MLD, and DCD all do (at least in theory). > > DCD 'might' though I don't think anything in the spec rules that you 'must' > control the SLD/MLD

Re: [PATCH v13 01/10] accel/tcg: remove CONFIG_PROFILER

2023-05-29 Thread Richard Henderson
On 5/29/23 04:49, Fei Wu wrote: TBStats will be introduced to replace CONFIG_PROFILER totally, here remove all CONFIG_PROFILER related stuffs first. Signed-off-by: Vanderson M. do Rosario Signed-off-by: Alex Bennée Signed-off-by: Fei Wu --- accel/tcg/monitor.c | 25

Re: [RFC PATCH 5/6] block: Allow bdrv_get_allocated_file_size to run in bdrv context

2023-05-29 Thread Fabiano Rosas
Kevin Wolf writes: > Am 23.05.2023 um 23:39 hat Fabiano Rosas geschrieben: >> We're about to move calls to 'fstat' into the thread-pool to avoid >> blocking VCPU threads should the system call take too long. >> >> To achieve that we first need to make sure none of its callers is >> holding the

Re: [PULL 00/19] Ui patches

2023-05-29 Thread Richard Henderson
On 5/28/23 06:19, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau The following changes since commit ac84b57b4d74606f7f83667a0606deef32b2049d: Merge tag 'for-upstream' ofhttps://gitlab.com/bonzini/qemu into staging (2023-05-26 14:40:55 -0700) are available in the Git

[PATCH] tcg: Add tlb_index_and_entry() function

2023-05-29 Thread BALATON Zoltan
The tlb index and entry are often retrieved together and tlb_entry() already calls tlb_index() so it could easily return it. Add a tlb_index_and_entry() function that does that to simplify callers and maybe avoid some duplicate calculations. Signed-off-by: BALATON Zoltan --- accel/tcg/cputlb.c

Re: [PATCH 0/2] Vhost-vdpa Shadow Virtqueue Offloads support

2023-05-29 Thread Eugenio Perez Martin
On Mon, May 29, 2023 at 3:18 PM Hawkins Jiawei wrote: > > This series enables shadowed CVQ to intercept Offloads commands > through shadowed CVQ, update the virtio NIC device model so qemu > send it in a migration, and the restore of that Offloads state > in the destination. > > Hawkins Jiawei

Re: [PATCH] intel_iommu: Optimize out some unnecessary UNMAP calls

2023-05-29 Thread Jason Gunthorpe
On Fri, May 26, 2023 at 08:44:29AM +, Liu, Yi L wrote: > > > >> In fact, the other purpose of this patch is to eliminate noisy error > > > >> log when we work with IOMMUFD. It looks the duplicate UNMAP call will > > > >> fail with IOMMUFD while always succeed with legacy container. This > > >

Re: [PATCH 0/4] Add Intel Data Streaming Accelerator offloading

2023-05-29 Thread Hao Xiang
Hi all, this is meant to be an RFC. Sorry I didn't put that in the email subject correctly. From: "Hao Xiang" Date: Mon, May 29, 2023, 11:20 Subject: [PATCH 0/4] Add Intel Data Streaming Accelerator offloading To: , , Cc: "Hao Xiang" * Idea: Intel Data Streaming Accelerator(DSA) is introduced

Re: [PATCH 1/3] hw/ufs: Initial commit for emulated Universal-Flash-Storage

2023-05-29 Thread Jeuk Kim
On 26/05/2023 15:37, Thomas Huth wrote: >On 26/05/2023 07.05, Jeuk Kim wrote: >> Universal Flash Storage (UFS) is a high-performance mass storage device >> with a serial interface. It is primarily used as a high-performance >> data storage device for embedded applications. >> >> This commit

[PATCH 3/3] hw/smbios: Fix core count in type4

2023-05-29 Thread Zhao Liu
From: Zhao Liu >From SMBIOS 3.0 specification, core count field means: Core Count is the number of cores detected by the BIOS for this processor socket. [1] Before 003f230e37d7 ("machine: Tweak the order of topology members in struct CpuTopology"), MachineState.smp.cores means "the number of

[PATCH 0/3] hw/smbios: Cleanup topology related variables

2023-05-29 Thread Zhao Liu
From: Zhao Liu Hi all, This patchset is split from my previous hybrid topology RFC [1] for easier review. There are three places for topology-related cleanup: 1. Fix the use of smp.cores. The meaning of CPU topology members in MachineState.smp has changed since 003f230e37d7 ("machine:

stable-8.0: block/export: call blk_set_dev_ops and Fix null pointer dereference in error path

2023-05-29 Thread Michael Tokarev
Hi! For some reason I picked up this commit: commit de79b52604e43fdeba6cee4f5af600b62169f2d2 Author: Stefan Hajnoczi Date: Tue May 2 17:11:19 2023 -0400 block/export: call blk_set_dev_ops(blk, NULL, NULL) for stable-8.0.1. However it turned out it fails iotests, up until the fix,

Re: [PATCH v1 5/9] KVM: x86: Add new hypercall to lock control registers

2023-05-29 Thread Mickaël Salaün
On 08/05/2023 23:11, Wei Liu wrote: On Fri, May 05, 2023 at 05:20:42PM +0200, Mickaël Salaün wrote: This enables guests to lock their CR0 and CR4 registers with a subset of X86_CR0_WP, X86_CR4_SMEP, X86_CR4_SMAP, X86_CR4_UMIP, X86_CR4_FSGSBASE and X86_CR4_CET flags. The new

[PATCH 3/4] Implement zero page checking using DSA.

2023-05-29 Thread Hao Xiang
1. Adds a memory comparison function by submitting the work to the idxd driver. 2. Add interface to set bufferiszero accel function to DSA offloading. 3. Fallback to use CPU accel function if DSA offloading fails due to page fault. Signed-off-by: Hao Xiang --- include/qemu/cutils.h | 6 +

[PATCH 1/4] Introduce new instruction set enqcmd/mmovdir64b to the build system.

2023-05-29 Thread Hao Xiang
1. Enable instruction set enqcmd in build. 2. Enable instruction set movdir64b in build. Signed-off-by: Hao Xiang --- meson.build | 3 +++ meson_options.txt | 4 scripts/meson-buildoptions.sh | 6 ++ 3 files changed, 13 insertions(+) diff --git

[PATCH 4/4] Add QEMU command line argument to enable DSA offloading.

2023-05-29 Thread Hao Xiang
This change adds a new argument --dsa-accelerate to qemu. Signed-off-by: Hao Xiang --- qemu-options.hx | 10 ++ softmmu/runstate.c | 4 softmmu/vl.c | 22 ++ storage-daemon/qemu-storage-daemon.c |

[PATCH 2/4] Add dependency idxd.

2023-05-29 Thread Hao Xiang
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 --- linux-headers/linux/idxd.h | 356

[PATCH 0/4] Add Intel Data Streaming Accelerator offloading

2023-05-29 Thread Hao Xiang
* Idea: Intel Data Streaming Accelerator(DSA) is introduced in Intel's 4th generation Xeon server, aka Sapphire Rapids. https://01.org/blogs/2019/introducing-intel-data-streaming-accelerator One of the things DSA can do is to offload memory comparison workload from CPU to DSA accelerator

Re: [PULL 00/10] ppc queue

2023-05-29 Thread Richard Henderson
On 5/28/23 09:49, Daniel Henrique Barboza wrote: The following changes since commit ac84b57b4d74606f7f83667a0606deef32b2049d: Merge tag 'for-upstream' ofhttps://gitlab.com/bonzini/qemu into staging (2023-05-26 14:40:55 -0700) are available in the Git repository at:

[PATCH 3/4] target/riscv: Support MSTATUS.MPV/GVA only when RVH is enabled

2023-05-29 Thread Weiwei Li
MPV and GVA bits are added by hypervisor extension to mstatus and mstatush (if MXLEN=32). Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/csr.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/target/riscv/csr.c b/target/riscv/csr.c index

[PATCH 0/4] target/riscv: Fix mstatus related problems

2023-05-29 Thread Weiwei Li
This patchset tries to fix some problems in the fields of mstatus, such as make MPV only work when MPP != PRM. The port is available here: https://github.com/plctlab/plct-qemu/tree/plct-mpv-upstream Weiwei Li (4): target/riscv: Make MPV only work when MPP != PRV_M target/riscv: Remove check

[PATCH 1/4] target/riscv: Make MPV only work when MPP != PRV_M

2023-05-29 Thread Weiwei Li
Upon MRET or explicit memory access with MPRV=1, MPV should be ignored when MPP=PRV_M. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/cpu_helper.c | 3 ++- target/riscv/op_helper.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git

[PATCH 4/4] target/riscv: Remove redundant assignment to SXL

2023-05-29 Thread Weiwei Li
SXL is initialized as env->misa_mxl which is also the mxl value. So we can just remain it unchanged to keep it read-only. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/csr.c | 4 1 file changed, 4 deletions(-) diff --git a/target/riscv/csr.c b/target/riscv/csr.c

[PATCH 2/4] target/riscv: Remove check on mode for MPRV

2023-05-29 Thread Weiwei Li
Normally, MPRV can be set to 1 only in M mode (It will be cleared when returning to lower-privilege mode by MRET/SRET). Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/cpu_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 1/2] vdpa: Add vhost_vdpa_net_load_offloads

2023-05-29 Thread Hawkins Jiawei
This patch introduces vhost_vdpa_net_load_offloads() to restore offloads state at device's startup. Signed-off-by: Hawkins Jiawei --- net/vhost-vdpa.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index 37cdc84562..682c749b19

[PATCH 2/2] vdpa: Allow VIRTIO_NET_F_CTRL_GUEST_OFFLOADS in SVQ

2023-05-29 Thread Hawkins Jiawei
Enable SVQ with VIRTIO_NET_F_CTRL_GUEST_OFFLOADS feature. Signed-off-by: Hawkins Jiawei --- net/vhost-vdpa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index 682c749b19..cc52b7f0ad 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c @@ -85,6 +85,7

Re: [PATCH v2 5/6] block/linux-aio: convert to blk_io_plug_call() API

2023-05-29 Thread Stefano Garzarella
On Wed, May 24, 2023 at 03:36:34PM -0400, Stefan Hajnoczi wrote: On Wed, May 24, 2023 at 10:52:03AM +0200, Stefano Garzarella wrote: On Tue, May 23, 2023 at 01:12:59PM -0400, Stefan Hajnoczi wrote: > Stop using the .bdrv_co_io_plug() API because it is not multi-queue > block layer friendly. Use

Re: [PULL 00/10] ppc queue

2023-05-29 Thread Daniel Henrique Barboza
On 5/28/23 14:36, Michael Tokarev wrote: 28.05.2023 19:49, Daniel Henrique Barboza wrote:    https://gitlab.com/danielhb/qemu.git tags/pull-ppc-20230528 ppc patch queue for 2023-05-28: This queue includes several assorted fixes for PowerPC SPR emulation, a change in the default Pegasos2

Re: [PATCH] meson: Avoid implicit declaration of functions

2023-05-29 Thread Michael Tokarev
29.05.2023 10:56, Michal Privoznik пишет: While detecting a presence of a function via 'cc.links()' gives desired result (i.e. detects whether function is present), it also produces a warning on systems where the function is not present, e.g.:

Re: [PATCH v7 0/1] arm: enable MTE for QEMU + kvm

2023-05-29 Thread Peter Maydell
On Mon, 29 May 2023 at 11:15, Andrea Bolognani wrote: > > On Mon, May 22, 2023 at 02:04:28PM +0200, Cornelia Huck wrote: > > On Fri, Apr 28 2023, Cornelia Huck wrote: > > > Another open problem is mte vs mte3: tcg emulates mte3, kvm gives the > > > guest > > > whatever the host supports.

Re: [PATCH] igb: Add Function Level Reset to PF and VF

2023-05-29 Thread Cédric Le Goater
On 5/29/23 09:45, Akihiko Odaki wrote: On 2023/05/29 16:01, Cédric Le Goater wrote: On 5/29/23 04:45, Akihiko Odaki wrote: On 2023/05/28 19:50, Sriram Yagnaraman wrote: -Original Message- From: Cédric Le Goater Sent: Friday, 26 May 2023 19:31 To: qemu-devel@nongnu.org Cc: Akihiko

Re: [PATCH v2 2/2] vhost: release virtqueue objects in error path

2023-05-29 Thread Peter Xu
On Mon, May 29, 2023 at 05:13:33PM +0530, P J P wrote: > From: Prasad Pandit > > vhost_dev_start function does not release virtqueue objects when > event_notifier_init() function fails. Release virtqueue objects > and log a message about function failure. > > Signed-off-by: Prasad Pandit

Re: [PATCH v2 1/2] vhost: release memory_listener object in error path

2023-05-29 Thread Peter Xu
On Mon, May 29, 2023 at 05:13:32PM +0530, P J P wrote: > From: Prasad Pandit > > vhost_dev_start function does not release memory_listener object > in case of an error. This may crash the guest when vhost is unable > to set memory table: > > stack trace of thread 125653: > Program

[PATCH v5 4/5] parallels: Replace fprintf by qemu_log in check

2023-05-29 Thread Alexander Ivanov
If the check is called during normal work, tracking of the check must be present in VM logs to have some clues if something going wrong with user's data. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev --- block/parallels.c | 18 +- 1 file changed, 9 insertions(+),

[PATCH v5 3/5] parallels: Add checking and repairing duplicate offsets in BAT

2023-05-29 Thread Alexander Ivanov
Cluster offsets must be unique among all the BAT entries. Find duplicate offsets in the BAT and fix it by copying the content of the relevant cluster to a newly allocated cluster and set the new cluster offset to the duplicated entry. Add host_cluster_index() helper to deduplicate the code. Move

[PATCH v5 0/5] parallels: Add duplication check, repair at open, fix bugs

2023-05-29 Thread Alexander Ivanov
This patchset should be applied on the top of [PATCH v11 00/12] parallels: Refactor the code of images checks and fix a bug. Fix incorrect data end calculation in parallels_open(). Split image leak handling to separate check and fix helpers. Add checking and repairing duplicate offsets in BAT

Re: [PATCH v4 2/2] qapi: add '@fdset' feature for BlockdevOptionsVirtioBlkVhostVdpa

2023-05-29 Thread Stefan Hajnoczi
On Fri, May 26, 2023 at 05:03:04PM +0200, Stefano Garzarella wrote: > The virtio-blk-vhost-vdpa driver in libblkio 1.3.0 supports the fd > passing through the new 'fd' property. > > Since now we are using qemu_open() on '@path' if the virtio-blk driver > supports the fd passing, let's announce

Re: [PATCH v4 1/2] block/blkio: use qemu_open() to support fd passing for virtio-blk

2023-05-29 Thread Stefan Hajnoczi
On Fri, May 26, 2023 at 05:03:03PM +0200, Stefano Garzarella wrote: > Some virtio-blk drivers (e.g. virtio-blk-vhost-vdpa) supports the fd > passing. Let's expose this to the user, so the management layer > can pass the file descriptor of an already opened path. > > If the libblkio virtio-blk

Re: [PATCH v1] hw/pvrdma: Protect against buggy or malicious guest driver

2023-05-29 Thread Mauro Matteo Cascella
On Mon, May 15, 2023 at 6:13 PM Michael Tokarev wrote: > > 01.03.2023 17:29, Yuval Shaia wrote: > > Guest driver allocates and initialize page tables to be used as a ring > > of descriptors for CQ and async events. > > The page table that represents the ring, along with the number of pages > > in

[PATCH v2 03/17] softmmu: Fix CPUSTATE.nr_cores' calculation

2023-05-29 Thread Zhao Liu
From: Zhuocheng Ding >From CPUState.nr_cores' comment, it represents "number of cores within this CPU package". After 003f230e37d7 ("machine: Tweak the order of topology members in struct CpuTopology"), the meaning of smp.cores changed to "the number of cores in one die", but this commit missed

[PATCH v2 01/17] i386: Fix comment style in topology.h

2023-05-29 Thread Zhao Liu
From: Zhao Liu For function comments in this file, keep the comment style consistent with other places. Signed-off-by: Zhao Liu Reviewed-by: Philippe Mathieu-Daudé --- include/hw/i386/topology.h | 33 + 1 file changed, 17 insertions(+), 16 deletions(-) diff

[PATCH v10 3/7] igb: RX descriptors guest writting refactoring

2023-05-29 Thread Tomasz Dzieciol
Refactoring is done in preparation for support of multiple advanced descriptors RX modes, especially packet-split modes. Signed-off-by: Tomasz Dzieciol --- hw/net/igb_core.c | 170 +++- hw/net/igb_regs.h | 10 +-- hw/net/trace-events | 4 +- 3

[PATCH v10 5/7] igb: add IPv6 extended headers traffic detection

2023-05-29 Thread Tomasz Dzieciol
Signed-off-by: Tomasz Dzieciol --- hw/net/igb_core.c | 4 +++- hw/net/igb_regs.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c index 8c248683c3..b54d7af8d8 100644 --- a/hw/net/igb_core.c +++ b/hw/net/igb_core.c @@ -1420,7 +1420,9 @@

[PATCH v10 4/7] igb: RX payload guest writting refactoring

2023-05-29 Thread Tomasz Dzieciol
Refactoring is done in preparation for support of multiple advanced descriptors RX modes, especially packet-split modes. Signed-off-by: Tomasz Dzieciol --- hw/net/e1000e_core.c | 18 ++-- hw/net/igb_core.c| 213 +-- tests/qtest/libqos/igb.c | 5

[PATCH v10 2/7] igb: rename E1000E_RingInfo_st

2023-05-29 Thread Tomasz Dzieciol
Rename E1000E_RingInfo_st and E1000E_RingInfo according to qemu typdefs guide. Signed-off-by: Tomasz Dzieciol --- hw/net/e1000e_core.c | 34 +- hw/net/igb_core.c| 42 +- 2 files changed, 38 insertions(+), 38

[PATCH v10 7/7] e1000e: rename e1000e_ba_state and e1000e_write_hdr_to_rx_buffers

2023-05-29 Thread Tomasz Dzieciol
Rename e1000e_ba_state according and e1000e_write_hdr_to_rx_buffers for consistency with IGB. Signed-off-by: Tomasz Dzieciol --- hw/net/e1000e_core.c | 28 +++- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/hw/net/e1000e_core.c b/hw/net/e1000e_core.c

Re: [PATCH v5 6/9] migration: modified migration QAPIs to accept 'channels' argument for migration

2023-05-29 Thread Het Gala
On 25/05/23 11:20 pm, Markus Armbruster wrote: Het Gala writes: MigrateChannelList allows to connect accross multiple interfaces. Added MigrateChannelList struct as argument to migration QAPIs. Future patchset series plans to include multiple MigrateChannels for multiple interfaces to be

[PATCH v2 00/17] Support smp.clusters for x86

2023-05-29 Thread Zhao Liu
From: Zhao Liu Hi list, This is the our v2 patch series, rebased on the master branch at the commit ac84b57b4d74 ("Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging"). Comparing with v1 [1], v2 mainly reorganizes patches and does some cleanup. This series add the

[PATCH v2 02/17] tests: Rename test-x86-cpuid.c to test-x86-topo.c

2023-05-29 Thread Zhao Liu
From: Zhao Liu In fact, this unit tests APIC ID other than CPUID. Rename to test-x86-topo.c to make its name more in line with its actual content. Signed-off-by: Zhao Liu --- Changes since v1: * Rename test-x86-apicid.c to test-x86-topo.c. (Yanan) --- MAINTAINERS

[PATCH v2 06/17] i386/cpu: Consolidate the use of topo_info in cpu_x86_cpuid()

2023-05-29 Thread Zhao Liu
From: Zhao Liu In cpu_x86_cpuid(), there are many variables in representing the cpu topology, e.g., topo_info, cs->nr_cores/cs->nr_threads. Since the names of cs->nr_cores/cs->nr_threads does not accurately represent its meaning, the use of cs->nr_cores/cs->nr_threads is prone to confusion and

[PATCH v2 04/17] i386/cpu: Fix i/d-cache topology to core level for Intel CPU

2023-05-29 Thread Zhao Liu
From: Zhao Liu For i-cache and d-cache, the maximum IDs for CPUs sharing cache ( CPUID.04H.00H:EAX[bits 25:14] and CPUID.04H.01H:EAX[bits 25:14]) are both 0, and this means i-cache and d-cache are shared in the SMT level. This is correct if there's single thread per core, but is wrong for the

[PATCH v2 17/17] i386: Add new property to control L2 cache topo in CPUID.04H

2023-05-29 Thread Zhao Liu
From: Zhao Liu The property x-l2-cache-topo will be used to change the L2 cache topology in CPUID.04H. Now it allows user to set the L2 cache is shared in core level or cluster level. If user passes "-cpu x-l2-cache-topo=[core|cluster]" then older L2 cache topology will be overrided by the new

[PATCH v2 16/17] i386: Use CPUCacheInfo.share_level to encode CPUID[0x8000001D].EAX[bits 25:14]

2023-05-29 Thread Zhao Liu
From: Zhao Liu CPUID[0x801D].EAX[bits 25:14] is used to represent the cache topology for amd CPUs. After cache models have topology information, we can use CPUCacheInfo.share_level to decide which topology level to be encoded into CPUID[0x801D].EAX[bits 25:14]. Signed-off-by: Zhao Liu

[PATCH 0/2] Vhost-vdpa Shadow Virtqueue Offloads support

2023-05-29 Thread Hawkins Jiawei
This series enables shadowed CVQ to intercept Offloads commands through shadowed CVQ, update the virtio NIC device model so qemu send it in a migration, and the restore of that Offloads state in the destination. Hawkins Jiawei (2): vdpa: Add vhost_vdpa_net_load_offloads vdpa: Allow

Re: [PATCH v3] target: ppc: Use MSR_HVB bit to get the target endianness for memory dump

2023-05-29 Thread Fabiano Rosas
"Nicholas Piggin" writes: > On Tue May 23, 2023 at 2:02 AM AEST, Narayana Murty N wrote: >> Changes since V2: >> commit message modified as per feedbak from Nicholas Piggin. >> Changes since V1: >> https://lore.kernel.org/qemu-devel/20230420145055.10196-1-nnmli...@linux.ibm.com/ >> The approach

Re: [PATCH v1 3/9] virt: Implement Heki common code

2023-05-29 Thread Mickaël Salaün
On 17/05/2023 14:47, Madhavan T. Venkataraman wrote: Sorry for the delay. See inline... On 5/8/23 12:29, Wei Liu wrote: On Fri, May 05, 2023 at 05:20:40PM +0200, Mickaël Salaün wrote: From: Madhavan T. Venkataraman Hypervisor Enforced Kernel Integrity (Heki) is a feature that will use the

Re: [PATCH 1/2] vdpa: Add vhost_vdpa_net_load_offloads

2023-05-29 Thread Eugenio Perez Martin
On Mon, May 29, 2023 at 3:18 PM Hawkins Jiawei wrote: > > This patch introduces vhost_vdpa_net_load_offloads() to > restore offloads state at device's startup. > > Signed-off-by: Hawkins Jiawei > --- > net/vhost-vdpa.c | 26 ++ > 1 file changed, 26 insertions(+) > > diff

Re: [PATCH v5 1/9] migration: introduced 'MigrateAddress' in QAPI for migration wire protocol.

2023-05-29 Thread Het Gala
On 25/05/23 11:04 pm, Markus Armbruster wrote: Het Gala writes: This patch introduces well defined MigrateAddress struct and its related child objects. The existing argument of 'migrate' and 'migrate-incoming' QAPI - 'uri' is of string type. The current migration flow follows double

Re: [PATCH] meson: Avoid implicit declaration of functions

2023-05-29 Thread Paolo Bonzini
On 5/29/23 12:24, Peter Maydell wrote: On Mon, 29 May 2023 at 08:58, Michal Privoznik wrote: While detecting a presence of a function via 'cc.links()' gives desired result (i.e. detects whether function is present), it also produces a warning on systems where the function is not present,

Re: [PATCH v1] hw/loongarch: Add numa support

2023-05-29 Thread Song Gao
在 2023/5/29 上午11:12, Tianrui Zhao 写道: 在 2023年05月18日 17:06, Song Gao 写道: 1. Implement some functions for LoongArch numa support; 2. Implement fdt_add_memory_node() for fdt; 3. build_srat() fills node_id and adds build numa memory. Base-on:

[PATCH v2 1/2] vhost: release memory_listener object in error path

2023-05-29 Thread P J P
From: Prasad Pandit vhost_dev_start function does not release memory_listener object in case of an error. This may crash the guest when vhost is unable to set memory table: stack trace of thread 125653: Program terminated with signal SIGSEGV, Segmentation fault #0

[PATCH v2 2/2] vhost: release virtqueue objects in error path

2023-05-29 Thread P J P
From: Prasad Pandit vhost_dev_start function does not release virtqueue objects when event_notifier_init() function fails. Release virtqueue objects and log a message about function failure. Signed-off-by: Prasad Pandit --- hw/virtio/vhost.c | 3 ++- 1 file changed, 2 insertions(+), 1

Re: [PATCH 15/30] asc: generate silence if FIFO empty but engine still running

2023-05-29 Thread Volker Rümelin
MacOS (un)helpfully leaves the FIFO engine running even when all the samples have been written to the hardware, and expects the FIFO status flags and IRQ to be updated continuously. Since not all audio backends guarantee an all-zero output when no data is provided, explicitly generate an

[PATCH v2 0/2] vhost: release memory objects in an error path

2023-05-29 Thread P J P
From: Prasad Pandit Hi, vhost_dev_start function does not release memory objects in case of an error. These couple of patches fix this glitch. Thank you. --- Prasad Pandit (2): vhost: release memory_listener object in error path vhost: release virtqueue objects in error path

[PATCH v13 03/10] accel: collecting TB execution count

2023-05-29 Thread Fei Wu
From: "Vanderson M. do Rosario" If a TB has a TBS (TBStatistics) with the TB_EXEC_STATS enabled, then we instrument the start code of this TB to atomically count the number of times it is executed. We count both the number of "normal" executions and atomic executions of a TB. The execution

[PATCH v13 04/10] accel/tcg: add jit stats and time to TBStatistics

2023-05-29 Thread Fei Wu
This collects all the statistics for TBStatistics, not only for the whole emulation but for each TB. Signed-off-by: Vanderson M. do Rosario Signed-off-by: Alex Bennée Signed-off-by: Fei Wu --- accel/tcg/monitor.c | 20 - accel/tcg/tb-stats.c | 146

[PATCH v13 00/10] TCG code quality tracking

2023-05-29 Thread Fei Wu
v12 --- * remove CONFIG_PROFILER completely at the first * squash original patches 3-8 into one * use Richard's inline version gen_tb_exec_count * convert how-to to rst format as suggested by Thomas * small change to patch 6 of hmp command Alex Bennée (1): tb-stats: reset the tracked TBs on a

[PATCH v13 01/10] accel/tcg: remove CONFIG_PROFILER

2023-05-29 Thread Fei Wu
TBStats will be introduced to replace CONFIG_PROFILER totally, here remove all CONFIG_PROFILER related stuffs first. Signed-off-by: Vanderson M. do Rosario Signed-off-by: Alex Bennée Signed-off-by: Fei Wu --- accel/tcg/monitor.c | 25 accel/tcg/tcg-accel-ops.c | 10 --

  1   2   >