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

2023-05-29 Thread Thomas Huth
On 30/05/2023 03.36, Jeuk Kim wrote: 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

Re: [PATCH] hw/ppc/mac_newworld: Check for the availability of pci-ohci before using it

2023-05-29 Thread Thomas Huth
On 26/05/2023 19.24, Mark Cave-Ayland wrote: On 26/05/2023 14:30, BALATON Zoltan wrote: On Fri, 26 May 2023, Thomas Huth wrote: pci-ohci might habe been disabled in the QEMU binary (e.g. when "configure" has been run with "--without-default-devices"). Thus we should check for its availability

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

2023-05-29 Thread Markus Armbruster
Stefano Garzarella writes: > 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'

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

2023-05-29 Thread Wu, Fei
On 5/30/2023 12:07 PM, Richard Henderson wrote: > On 5/29/23 04:49, Fei Wu wrote: >> +/* >> + * The TCGProfile structure holds data for analysing the quality of >> + * the code generation. The data is split between stuff that is valid >> + * for the lifetime of a single translation and things that

Re: [PATCH] tcg: Add tlb_index_and_entry() function

2023-05-29 Thread Richard Henderson
On 5/29/23 17:05, BALATON Zoltan wrote: 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.

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

2023-05-29 Thread Richard Henderson
On 5/29/23 04:49, Fei Wu wrote: +/* + * The TCGProfile structure holds data for analysing the quality of + * the code generation. The data is split between stuff that is valid + * for the lifetime of a single translation and things that are valid + * for the lifetime of the translator. As the

Re: [PATCH v2 4/4] migration/calc-dirty-rate: tool to predict migration time

2023-05-29 Thread Wang, Lei
On 4/27/2023 20:43, Andrei Gudkov via wrote: > Signed-off-by: Andrei Gudkov > --- > MAINTAINERS | 1 + > scripts/predict_migration.py | 283 +++ > 2 files changed, 284 insertions(+) > create mode 100644 scripts/predict_migration.py > > diff

Re: [PATCH v2 2/4] migration/calc-dirty-rate: detailed stats in sampling mode

2023-05-29 Thread Wang, Lei
On 4/27/2023 20:42, Andrei Gudkov via wrote: > Collect number of dirty pages for progresseively increasing time > periods starting with 125ms up to number of seconds specified with > calc-dirty-rate. Report through qmp and hmp: 1) vector of dirty page > measurements, 2) page size, 3) total number

Re: [PATCH v10 0/7] igb: packet-split descriptors support

2023-05-29 Thread Akihiko Odaki
On 2023/05/29 23:01, Tomasz Dzieciol wrote: Purposes of this series of patches: * introduce packet-split RX descriptors support. This feature is used by Linux VF driver for MTU values from 2048. * refactor RX descriptor handling for introduction of packet-split RX descriptors support * fix

[PATCH 0/2] net: Update MemReentrancyGuard for NIC

2023-05-29 Thread Akihiko Odaki
Recently MemReentrancyGuard was added to DeviceState to record that the device is engaging in I/O. The network device backend needs to update it when delivering a packet to a device. This implementation follows what bottom half does, but it does not add a tracepoint for the case that the network

[PATCH 2/2] net: Update MemReentrancyGuard for NIC

2023-05-29 Thread Akihiko Odaki
Recently MemReentrancyGuard was added to DeviceState to record that the device is engaging in I/O. The network device backend needs to update it when delivering a packet to a device. This implementation follows what bottom half does, but it does not add a tracepoint for the case that the network

[PATCH 1/2] net: Provide MemReentrancyGuard * to qemu_new_nic()

2023-05-29 Thread Akihiko Odaki
Recently MemReentrancyGuard was added to DeviceState to record that the device is engaging in I/O. The network device backend needs to update it when delivering a packet to a device. In preparation for such a change, add MemReentrancyGuard * as a parameter of qemu_new_nic(). Signed-off-by:

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

2023-05-29 Thread Akihiko Odaki
On 2023/05/30 0:07, Cédric Le Goater wrote: 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

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] 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: [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:

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

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 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: [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

[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 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 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 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 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: [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: [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: [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/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 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 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 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:

[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 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: [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 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 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

[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

[PATCH v5 5/5] parallels: Image repairing in parallels_open()

2023-05-29 Thread Alexander Ivanov
Repair an image at opening if the image is unclean or out-of-image corruption was detected. Signed-off-by: Alexander Ivanov --- block/parallels.c | 65 +-- 1 file changed, 35 insertions(+), 30 deletions(-) diff --git a/block/parallels.c

[PATCH v5 1/5] parallels: Incorrect data end calculation in parallels_open()

2023-05-29 Thread Alexander Ivanov
The BDRVParallelsState structure contains data_end field that is measured in sectors. In parallels_open() initially this field is set by data_off field from parallels image header. According to the parallels format documentation, data_off field contains an offset, in sectors, from the start of

[PATCH v5 2/5] parallels: Split image leak handling to separate check and fix helpers

2023-05-29 Thread Alexander Ivanov
We need to fix leak after deduplication in the next patch. Move leak fixing to a separate helper parallels_fix_leak() and add parallels_get_leak_size() helper wich used in parallels_fix_leak() and parallels_check_leak(). Signed-off-by: Alexander Ivanov --- block/parallels.c | 86

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

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

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

2023-05-29 Thread Peter Xu
On Mon, May 29, 2023 at 12:55:30PM +, Wang, Wei W wrote: > 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

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: [PULL 00/10] ppc queue

2023-05-29 Thread Michael Tokarev
29.05.2023 09:30, Nicholas Piggin wrote: On Mon May 29, 2023 at 4:01 PM AEST, Michael Tokarev wrote: .. They certainly fix some parts of target emulation, but what is the guidance for backporting those type of fixes? Most of the patches I sent including 2,3 were just found from inspection or

[PATCH v2] 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 (into meson-log.txt), e.g.: qemu.git/build/meson-private/tmph74x3p38/testfile.c:2:34: \ warning:

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

[PATCH v10 0/7] igb: packet-split descriptors support

2023-05-29 Thread Tomasz Dzieciol
Purposes of this series of patches: * introduce packet-split RX descriptors support. This feature is used by Linux VF driver for MTU values from 2048. * refactor RX descriptor handling for introduction of packet-split RX descriptors support * fix descriptors flags handling Tomasz Dzieciol

[PATCH v10 1/7] igb: remove TCP ACK detection

2023-05-29 Thread Tomasz Dzieciol
TCP ACK detection is no longer present in igb. Signed-off-by: Tomasz Dzieciol --- hw/net/igb_core.c | 5 - 1 file changed, 5 deletions(-) diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c index d00b1caa6a..e927c51061 100644 --- a/hw/net/igb_core.c +++ b/hw/net/igb_core.c @@ -1327,11

[PATCH v10 6/7] igb: packet-split descriptors support

2023-05-29 Thread Tomasz Dzieciol
Packet-split descriptors are used by Linux VF driver for MTU values from 2048 Signed-off-by: Tomasz Dzieciol --- hw/net/igb_core.c | 348 ++-- hw/net/igb_regs.h | 9 ++ hw/net/trace-events | 2 +- 3 files changed, 316 insertions(+), 43

[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 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 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 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 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

[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

[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 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 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

[PATCH] i386/WHPX: Fix error message when fail to set ProcessorCount

2023-05-29 Thread Zhao Liu
From: Zhao Liu 003f230e37d7 ("machine: Tweak the order of topology members in struct CpuTopology") changes the meaning of MachineState.smp.cores from "the number of cores in one package" to "the number of cores in one die" and doesn't fix other uses of MachineState.smp.cores. And because of the

[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 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

[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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 v13 07/10] tb-stats: reset the tracked TBs on a tb_flush

2023-05-29 Thread Fei Wu
From: Alex Bennée We keep track of translations but can only do so up until the translation cache is flushed. At that point we really have no idea if we can re-create a translation because all the active tracking information has been reset. Signed-off-by: Alex Bennée Reviewed-by: Richard

[PATCH v13 02/10] accel/tcg: introduce TBStatistics structure

2023-05-29 Thread Fei Wu
From: "Vanderson M. do Rosario" To store statistics for each TB, we created a TBStatistics structure which is linked with the TBs. TBStatistics can stay alive after tb_flush and be relinked to a regenerated TB. So the statistics can be accumulated even through flushes. The goal is to have all

[PATCH v13 10/10] docs: add tb-stats how to

2023-05-29 Thread Fei Wu
Signed-off-by: Fei Wu --- docs/devel/tcg-tbstats.rst | 129 + 1 file changed, 129 insertions(+) create mode 100644 docs/devel/tcg-tbstats.rst diff --git a/docs/devel/tcg-tbstats.rst b/docs/devel/tcg-tbstats.rst new file mode 100644 index

[PATCH v13 08/10] Adding info [tb-list|tb] commands to HMP (WIP)

2023-05-29 Thread Fei Wu
From: "Vanderson M. do Rosario" These commands allow the exploration of TBs generated by the TCG. Understand which one hotter, with more guest/host instructions... and examine their guest, host and IR code. The goal of this command is to allow the dynamic exploration of TCG behavior and code

[PATCH v13 09/10] tb-stats: dump hot TBs at the end of the execution

2023-05-29 Thread Fei Wu
From: "Vanderson M. do Rosario" Dump the hottest TBs if -d tb_stats,dump_limit=N is used. Example of output for the 3 hottest TBs: TB id:1 | phys:0x34d54 virt:0x00034d54 flags:0xf0 | exec:4828932/0 guest inst cov:16.38% | trans:1 ints: g:3 op:82 op_opt:34 spills:3

[PATCH v13 05/10] debug: add -d tb_stats to control TBStatistics collection:

2023-05-29 Thread Fei Wu
From: "Vanderson M. do Rosario" -d tb_stats[[,level=(+all+jit+exec+time)][,dump_limit=]] "dump_limit" is used to limit the number of dumped TBStats in linux-user mode. [all+jit+exec+time] control the profilling level used by the TBStats. Can be used as follow: -d tb_stats -d

[PATCH v13 06/10] monitor: adding tb_stats hmp command

2023-05-29 Thread Fei Wu
From: "Vanderson M. do Rosario" Adding tb_stats [start|pause|stop|filter] command to hmp. This allows controlling the collection of statistics. It is also possible to set the level of collection: all, jit, or exec. tb_stats filter allow to only collect statistics for the TB in the last_search

[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   >