Re: Emulating device configuration / max_virtqueue_pairs in vhost-vdpa and vhost-user

2023-02-01 Thread Jason Wang
On Wed, Feb 1, 2023 at 2:56 PM Eugenio Perez Martin wrote: > > On Wed, Feb 1, 2023 at 4:27 AM Jason Wang wrote: > > > > On Wed, Feb 1, 2023 at 3:10 AM Eugenio Perez Martin > > wrote: > > > > > > Hi, > > > > > > The current approac

Re: Emulating device configuration / max_virtqueue_pairs in vhost-vdpa and vhost-user

2023-01-31 Thread Jason Wang
On Wed, Feb 1, 2023 at 3:11 AM Eugenio Perez Martin wrote: > > On Tue, Jan 31, 2023 at 8:10 PM Eugenio Perez Martin > wrote: > > > > Hi, > > > > The current approach of offering an emulated CVQ to the guest and map > > the commands to vhost-user is not scaling well: > > * Some devices already off

Re: Emulating device configuration / max_virtqueue_pairs in vhost-vdpa and vhost-user

2023-01-31 Thread Jason Wang
On Wed, Feb 1, 2023 at 3:10 AM Eugenio Perez Martin wrote: > > Hi, > > The current approach of offering an emulated CVQ to the guest and map > the commands to vhost-user is not scaling well: > * Some devices already offer it, so the transformation is redundant. > * There is no support for commands

Re: [PATCH v1 2/2] virtio-net: virtio_net_flush_tx() check for per-queue reset

2023-01-30 Thread Jason Wang
On Mon, Jan 30, 2023 at 6:26 PM Xuan Zhuo wrote: > > On Mon, 30 Jan 2023 16:40:08 +0800, Jason Wang wrote: > > On Mon, Jan 30, 2023 at 4:03 PM Xuan Zhuo > > wrote: > > > > > > On Mon, 30 Jan 2023 15:49:36 +0800, Jason Wang > > > wrote: >

Re: [PATCH v1 2/2] virtio-net: virtio_net_flush_tx() check for per-queue reset

2023-01-30 Thread Jason Wang
On Mon, Jan 30, 2023 at 1:50 PM Michael S. Tsirkin wrote: > > On Mon, Jan 30, 2023 at 11:53:18AM +0800, Jason Wang wrote: > > On Mon, Jan 30, 2023 at 11:42 AM Xuan Zhuo > > wrote: > > > > > > On Mon, 30 Jan 2023 11:01:40 +0800, Jason Wang > > > w

Re: [PATCH v1 2/2] virtio-net: virtio_net_flush_tx() check for per-queue reset

2023-01-30 Thread Jason Wang
On Mon, Jan 30, 2023 at 4:03 PM Xuan Zhuo wrote: > > On Mon, 30 Jan 2023 15:49:36 +0800, Jason Wang wrote: > > On Mon, Jan 30, 2023 at 1:32 PM Michael S. Tsirkin wrote: > > > > > > On Mon, Jan 30, 2023 at 10:15:12AM +0800, Xuan Zhuo wrote: > > > > On S

Re: [PATCH v1 2/2] virtio-net: virtio_net_flush_tx() check for per-queue reset

2023-01-29 Thread Jason Wang
On Mon, Jan 30, 2023 at 1:32 PM Michael S. Tsirkin wrote: > > On Mon, Jan 30, 2023 at 10:15:12AM +0800, Xuan Zhuo wrote: > > On Sun, 29 Jan 2023 07:15:47 -0500, "Michael S. Tsirkin" > > wrote: > > > On Sun, Jan 29, 2023 at 08:03:42PM +0800, Xuan Zhuo wrote: > > > > On Sun, 29 Jan 2023 06:57:29 -

Re: [PATCH v1 2/2] virtio-net: virtio_net_flush_tx() check for per-queue reset

2023-01-29 Thread Jason Wang
On Mon, Jan 30, 2023 at 11:42 AM Xuan Zhuo wrote: > > On Mon, 30 Jan 2023 11:01:40 +0800, Jason Wang wrote: > > On Sun, Jan 29, 2023 at 3:44 PM Xuan Zhuo > > wrote: > > > > > > On Sun, 29 Jan 2023 14:23:21 +0800, Jason Wang > > > wrote: >

Re: [PATCH v1 2/2] virtio-net: virtio_net_flush_tx() check for per-queue reset

2023-01-29 Thread Jason Wang
On Sun, Jan 29, 2023 at 3:44 PM Xuan Zhuo wrote: > > On Sun, 29 Jan 2023 14:23:21 +0800, Jason Wang wrote: > > On Sun, Jan 29, 2023 at 10:52 AM Xuan Zhuo > > wrote: > > > > > > Check whether it is per-queue reset state in virtio_net_flush_tx(). > >

Re: [PATCH v1 2/2] virtio-net: virtio_net_flush_tx() check for per-queue reset

2023-01-28 Thread Jason Wang
On Sun, Jan 29, 2023 at 10:52 AM Xuan Zhuo wrote: > > Check whether it is per-queue reset state in virtio_net_flush_tx(). > > Before per-queue reset, we need to recover async tx resources. At this > time, virtio_net_flush_tx() is called, but we should not try to send > new packets, so virtio_net_f

Re: [PATCH] vdpa: fix VHOST_BACKEND_F_IOTLB_ASID flag check

2023-01-28 Thread Jason Wang
F_IOTLB_MSG_V2 and > > VHOST_BACKEND_F_IOTLB_BATCH, this went unnoticed. > > > > Fixes: c1a1008685 ("vdpa: always start CVQ in SVQ mode if possible") > > Signed-off-by: Eugenio Pérez > > Acked-by: Jason Wang > > Reviewed-by: Michael S. Tsirkin > > Jason are you merg

Re: [PATCH 0/3] Fix UNMAP notifier for intel-iommu

2023-01-28 Thread Jason Wang
On Fri, Jan 27, 2023 at 9:17 PM Michael S. Tsirkin wrote: > > On Mon, Jan 16, 2023 at 03:06:44PM +0800, Jason Wang wrote: > > On Mon, Jan 16, 2023 at 7:30 AM Viktor Prutyanov wrote: > > > > > > On Tue, Nov 29, 2022 at 11:10 AM Jason Wang wrote: > > > >

Re: [PATCH v7] tests/qtest: netdev: test stream and dgram backends

2023-01-28 Thread Jason Wang
On Thu, Jan 26, 2023 at 8:48 PM Thomas Huth wrote: > > On 18/01/2023 13.04, Laurent Vivier wrote: > > Signed-off-by: Laurent Vivier > > Acked-by: Michael S. Tsirkin > > Acked-by: Thomas Huth > > --- > > > > Notes: > > v7: > >- disable test_dgram_mcast() on windows > >- disa

Re: [PATCH v4] net: stream: add a new option to automatically reconnect

2023-01-28 Thread Jason Wang
On Thu, Jan 19, 2023 at 6:16 PM Laurent Vivier wrote: > > In stream mode, if the server shuts down there is currently > no way to reconnect the client to a new server without removing > the NIC device and the netdev backend (or to reboot). > > This patch introduces a reconnect option that specifie

Re: [PATCH v2] hw/net/lan9118: log [read|write]b when mode_16bit is enabled rather than abort

2023-01-19 Thread Jason Wang
On Mon, Jan 16, 2023 at 4:31 PM Philippe Mathieu-Daudé wrote: > > On 16/1/23 04:14, Qiang Liu wrote: > > This patch replaces hw_error to guest error log for [read|write]b > > accesses when mode_16bit is enabled. This avoids aborting qemu. > > > > Fixes: 1248f8d4cbc3 ("hw/lan9118: Add basic 16-bit

Re: [PATCH] hw/net/can/xlnx-zynqmp-can: fix assertion failures in transfer_fifo()

2023-01-19 Thread Jason Wang
在 2023/1/9 17:19, Qiang Liu 写道: Check fifos before poping data from and pushing data into it. Fixes: 98e5d7a2b726 ("hw/net/can: Introduce Xilinx ZynqMP CAN controller") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1425 Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1427 Rep

Re: [RFC PATCH for 8.0 10/13] virtio-net: Migrate vhost inflight descriptors

2023-01-16 Thread Jason Wang
On Tue, Jan 17, 2023 at 4:58 AM Michael S. Tsirkin wrote: > > On Wed, Jan 11, 2023 at 01:51:06PM +0800, Jason Wang wrote: > > On Wed, Jan 11, 2023 at 12:40 PM Parav Pandit wrote: > > > > > > > > > > From: Jason Wang > > > > Sent: Tuesday, Ja

Re: [RFC v2 05/13] vdpa net: add migration blocker if cannot migrate cvq

2023-01-16 Thread Jason Wang
在 2023/1/16 17:33, Eugenio Perez Martin 写道: On Mon, Jan 16, 2023 at 6:24 AM Michael S. Tsirkin wrote: On Mon, Jan 16, 2023 at 11:34:20AM +0800, Jason Wang wrote: 在 2023/1/13 15:46, Eugenio Perez Martin 写道: On Fri, Jan 13, 2023 at 5:25 AM Jason Wang wrote: 在 2023/1/13 01:24, Eugenio Pérez

Re: [RFC v2 06/13] vhost: delay set_vring_ready after DRIVER_OK

2023-01-16 Thread Jason Wang
在 2023/1/17 00:16, Eugenio Perez Martin 写道: On Mon, Jan 16, 2023 at 7:37 AM Jason Wang wrote: 在 2023/1/13 16:19, Eugenio Perez Martin 写道: On Fri, Jan 13, 2023 at 5:36 AM Jason Wang wrote: On Fri, Jan 13, 2023 at 1:25 AM Eugenio Pérez wrote: To restore the device at the destination of a

Re: [RFC v2 04/13] vdpa: rewind at get_base, not set_base

2023-01-16 Thread Jason Wang
在 2023/1/16 17:53, Eugenio Perez Martin 写道: On Mon, Jan 16, 2023 at 4:32 AM Jason Wang wrote: 在 2023/1/13 15:40, Eugenio Perez Martin 写道: On Fri, Jan 13, 2023 at 5:10 AM Jason Wang wrote: On Fri, Jan 13, 2023 at 1:24 AM Eugenio Pérez wrote: At this moment it is only possible to migrate

Re: [RFC v2 02/13] vdpa net: move iova tree creation from init to start

2023-01-16 Thread Jason Wang
在 2023/1/16 17:14, Eugenio Perez Martin 写道: On Mon, Jan 16, 2023 at 4:05 AM Jason Wang wrote: 在 2023/1/13 15:28, Eugenio Perez Martin 写道: On Fri, Jan 13, 2023 at 4:53 AM Jason Wang wrote: On Fri, Jan 13, 2023 at 1:24 AM Eugenio Pérez wrote: Only create iova_tree if and when it is

Re: [RFC PATCH for 8.0 10/13] virtio-net: Migrate vhost inflight descriptors

2023-01-16 Thread Jason Wang
On Tue, Jan 17, 2023 at 5:02 AM Michael S. Tsirkin wrote: > > On Wed, Dec 07, 2022 at 09:56:20AM +0100, Eugenio Perez Martin wrote: > > > A dumb question, any reason we need bother with virtio-net? It looks > > > to me it's not a must and would complicate migration compatibility. > > > > > > I gue

Re: [PATCH v2 00/13] Introduce igb

2023-01-16 Thread Jason Wang
On Sat, Jan 14, 2023 at 12:10 PM Akihiko Odaki wrote: > > Based-on: <20230114035919.35251-1-akihiko.od...@daynix.com> > ([PATCH 00/19] e1000x cleanups (preliminary for IGB)) > > igb is a family of Intel's gigabit ethernet controllers. This series > implements > 82576 emulation in particular. You

Re: [PATCH 0/3] Fix UNMAP notifier for intel-iommu

2023-01-15 Thread Jason Wang
On Mon, Jan 16, 2023 at 7:30 AM Viktor Prutyanov wrote: > > On Tue, Nov 29, 2022 at 11:10 AM Jason Wang wrote: > > > > Hi All: > > > > According to ATS, device should work if ATS is disabled. This is not > > correctly implemented in the current intel-iommu s

Re: [RFC v2 12/13] vdpa: preemptive kick at enable

2023-01-15 Thread Jason Wang
在 2023/1/13 17:06, Eugenio Perez Martin 写道: On Fri, Jan 13, 2023 at 4:39 AM Jason Wang wrote: On Fri, Jan 13, 2023 at 11:25 AM Zhu, Lingshan wrote: On 1/13/2023 10:31 AM, Jason Wang wrote: On Fri, Jan 13, 2023 at 1:27 AM Eugenio Pérez wrote: Spuriously kick the destination device&#

Re: [RFC v2 11/13] vdpa: add vdpa net migration state notifier

2023-01-15 Thread Jason Wang
在 2023/1/13 17:00, Eugenio Perez Martin 写道: On Fri, Jan 13, 2023 at 5:55 AM Jason Wang wrote: On Fri, Jan 13, 2023 at 1:25 AM Eugenio Pérez wrote: This allows net to restart the device backend to configure SVQ on it. Ideally, these changes should not be net specific. However, the vdpa net

Re: [RFC v2 08/13] vdpa: Negotiate _F_SUSPEND feature

2023-01-15 Thread Jason Wang
在 2023/1/13 16:45, Eugenio Perez Martin 写道: On Fri, Jan 13, 2023 at 5:39 AM Jason Wang wrote: On Fri, Jan 13, 2023 at 1:25 AM Eugenio Pérez wrote: This is needed for qemu to know it can suspend the device to retrieve its status and enable SVQ with it, so all the process is transparent to

Re: [RFC v2 06/13] vhost: delay set_vring_ready after DRIVER_OK

2023-01-15 Thread Jason Wang
在 2023/1/13 16:19, Eugenio Perez Martin 写道: On Fri, Jan 13, 2023 at 5:36 AM Jason Wang wrote: On Fri, Jan 13, 2023 at 1:25 AM Eugenio Pérez wrote: To restore the device at the destination of a live migration we send the commands through control virtqueue. For a device to read CVQ it must

Re: [RFC v2 05/13] vdpa net: add migration blocker if cannot migrate cvq

2023-01-15 Thread Jason Wang
在 2023/1/13 15:46, Eugenio Perez Martin 写道: On Fri, Jan 13, 2023 at 5:25 AM Jason Wang wrote: 在 2023/1/13 01:24, Eugenio Pérez 写道: A vdpa net device must initialize with SVQ in order to be migratable, and initialization code verifies conditions. If the device is not initialized with the x

Re: [RFC v2 04/13] vdpa: rewind at get_base, not set_base

2023-01-15 Thread Jason Wang
在 2023/1/13 15:40, Eugenio Perez Martin 写道: On Fri, Jan 13, 2023 at 5:10 AM Jason Wang wrote: On Fri, Jan 13, 2023 at 1:24 AM Eugenio Pérez wrote: At this moment it is only possible to migrate to a vdpa device running with x-svq=on. As a protective measure, the rewind of the inflight

Re: [RFC v2 02/13] vdpa net: move iova tree creation from init to start

2023-01-15 Thread Jason Wang
在 2023/1/13 15:28, Eugenio Perez Martin 写道: On Fri, Jan 13, 2023 at 4:53 AM Jason Wang wrote: On Fri, Jan 13, 2023 at 1:24 AM Eugenio Pérez wrote: Only create iova_tree if and when it is needed. The cleanup keeps being responsability of last VQ but this change allows to merge both cleanup

Re: [RFC v2 01/13] vdpa: fix VHOST_BACKEND_F_IOTLB_ASID flag check

2023-01-15 Thread Jason Wang
在 2023/1/13 14:42, Eugenio Perez Martin 写道: On Fri, Jan 13, 2023 at 4:12 AM Jason Wang wrote: On Fri, Jan 13, 2023 at 1:24 AM Eugenio Pérez wrote: VHOST_BACKEND_F_IOTLB_ASID is the feature bit, not the bitmask. Since the device under test also provided VHOST_BACKEND_F_IOTLB_MSG_V2 and

Re: [RFC v2 11/13] vdpa: add vdpa net migration state notifier

2023-01-12 Thread Jason Wang
On Fri, Jan 13, 2023 at 1:25 AM Eugenio Pérez wrote: > > This allows net to restart the device backend to configure SVQ on it. > > Ideally, these changes should not be net specific. However, the vdpa net > backend is the one with enough knowledge to configure everything because > of some reasons:

Re: [RFC v2 10/13] vdpa net: allow VHOST_F_LOG_ALL

2023-01-12 Thread Jason Wang
backend will return _F_LOG_ALL to signal the device is migratable. > > Add VHOST_F_LOG_ALL. HW dirty page tracking can be added on top of this > change if the device supports it in the future. > > Signed-off-by: Eugenio Pérez Acked-by: Jason Wang Thanks > --- > net/vhost-vdpa

Re: [RFC v2 08/13] vdpa: Negotiate _F_SUSPEND feature

2023-01-12 Thread Jason Wang
On Fri, Jan 13, 2023 at 1:25 AM Eugenio Pérez wrote: > > This is needed for qemu to know it can suspend the device to retrieve > its status and enable SVQ with it, so all the process is transparent to > the guest. > > Signed-off-by: Eugenio Pérez Acked-by: Jason Wang We pr

Re: [RFC v2 06/13] vhost: delay set_vring_ready after DRIVER_OK

2023-01-12 Thread Jason Wang
On Fri, Jan 13, 2023 at 1:25 AM Eugenio Pérez wrote: > > To restore the device at the destination of a live migration we send the > commands through control virtqueue. For a device to read CVQ it must > have received the DRIVER_OK status bit. This probably requires the support from the parent dri

Re: [RFC v2 05/13] vdpa net: add migration blocker if cannot migrate cvq

2023-01-12 Thread Jason Wang
在 2023/1/13 01:24, Eugenio Pérez 写道: A vdpa net device must initialize with SVQ in order to be migratable, and initialization code verifies conditions. If the device is not initialized with the x-svq parameter, it will not expose _F_LOG so vhost sybsystem will block VM migration from its initi

Re: [RFC v2 04/13] vdpa: rewind at get_base, not set_base

2023-01-12 Thread Jason Wang
On Fri, Jan 13, 2023 at 1:24 AM Eugenio Pérez wrote: > > At this moment it is only possible to migrate to a vdpa device running > with x-svq=on. As a protective measure, the rewind of the inflight > descriptors was done at the destination. That way if the source sent a > virtqueue with inuse descr

Re: [RFC v2 02/13] vdpa net: move iova tree creation from init to start

2023-01-12 Thread Jason Wang
On Fri, Jan 13, 2023 at 1:24 AM Eugenio Pérez wrote: > > Only create iova_tree if and when it is needed. > > The cleanup keeps being responsability of last VQ but this change allows > to merge both cleanup functions. > > Signed-off-by: Eugenio Pérez > --- > net/vhost-vdpa.c | 101 +++

Re: [RFC v2 12/13] vdpa: preemptive kick at enable

2023-01-12 Thread Jason Wang
On Fri, Jan 13, 2023 at 11:25 AM Zhu, Lingshan wrote: > > > > On 1/13/2023 10:31 AM, Jason Wang wrote: > > On Fri, Jan 13, 2023 at 1:27 AM Eugenio Pérez wrote: > >> Spuriously kick the destination device's queue so it knows in case there > >> are new desc

Re: [RFC v2 01/13] vdpa: fix VHOST_BACKEND_F_IOTLB_ASID flag check

2023-01-12 Thread Jason Wang
;vdpa: always start CVQ in SVQ mode if possible") > Signed-off-by: Eugenio Pérez Acked-by: Jason Wang Do we need this for -stable? Thanks > --- > net/vhost-vdpa.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c

Re: [RFC v2 12/13] vdpa: preemptive kick at enable

2023-01-12 Thread Jason Wang
On Fri, Jan 13, 2023 at 1:27 AM Eugenio Pérez wrote: > > Spuriously kick the destination device's queue so it knows in case there > are new descriptors. > > RFC: This is somehow a gray area. The guest may have placed descriptors > in a virtqueue but not kicked it, so it might be surprised if the d

Re: virtio-iommu issue with VFIO device downstream to a PCIe-to-PCI bridge: VFIO devices are not assigned any iommu group

2023-01-10 Thread Jason Wang
On Tue, Jan 10, 2023 at 5:11 AM Eric Auger wrote: > > Hi, > > On 1/9/23 14:24, Eric Auger wrote: > > Hi, > > > > we have a trouble with virtio-iommu and protected assigned devices > > downstream to a pcie-to-pci bridge. In that use case we observe the > > assigned devices are not put to any group.

Re: [RFC PATCH for 8.0 10/13] virtio-net: Migrate vhost inflight descriptors

2023-01-10 Thread Jason Wang
On Wed, Jan 11, 2023 at 12:40 PM Parav Pandit wrote: > > > > From: Jason Wang > > Sent: Tuesday, January 10, 2023 11:35 PM > > > > On Tue, Jan 10, 2023 at 11:02 AM Parav Pandit wrote: > > > > > > Hi Jason, > > > > > > &

Re: [RFC PATCH for 8.0 10/13] virtio-net: Migrate vhost inflight descriptors

2023-01-10 Thread Jason Wang
On Tue, Jan 10, 2023 at 11:02 AM Parav Pandit wrote: > > Hi Jason, > > > From: Jason Wang > > Sent: Monday, December 5, 2022 10:25 PM > > > > > A dumb question, any reason we need bother with virtio-net? It looks to me > > it's > > no

Re: [PATCH] vmnet: stop recieving events when VM is stopped

2023-01-09 Thread Jason Wang
On Mon, Jan 2, 2023 at 9:08 AM Joelle van Dyne wrote: > > When the VM is stopped using the HMP command "stop", soon the handler will > stop reading from the vmnet interface. This causes a flood of > `VMNET_INTERFACE_PACKETS_AVAILABLE` events to arrive and puts the host CPU > at 100%. We fix this b

Re: [PATCH] net: Increase L2TPv3 buffer to fit jumboframes

2023-01-09 Thread Jason Wang
On Sat, Dec 31, 2022 at 4:27 AM Christian Svensson wrote: > > Increase the allocated buffer size to fit larger packets. > Given that jumboframes can commonly be up to 9000 bytes the closest suitable > value seems to be 16 KiB. > > Tested by running qemu towards a Linux L2TPv3 endpoint and pushing

Re: [PATCH v3] intel-iommu: Document iova_tree

2023-01-09 Thread Jason Wang
On Wed, Jan 4, 2023 at 11:14 PM Peter Xu wrote: > > On Wed, Jan 04, 2023 at 12:15:20PM +0800, Jason Wang wrote: > > On Wed, Jan 4, 2023 at 1:30 AM Peter Xu wrote: > > > > > > On Mon, Dec 26, 2022 at 12:09:52PM +0800, Jason Wang wrote: > > > > On Sat

Re: [PATCH v3] intel-iommu: Document iova_tree

2023-01-03 Thread Jason Wang
On Wed, Jan 4, 2023 at 1:30 AM Peter Xu wrote: > > On Mon, Dec 26, 2022 at 12:09:52PM +0800, Jason Wang wrote: > > On Sat, Dec 24, 2022 at 12:26 AM Peter Xu wrote: > > > > > > On Fri, Dec 23, 2022 at 03:48:01PM +0800, Jason Wang wrote: > > > > On W

Re: [PATCH 0/5] hw/net/igb: emulated network device with SR-IOV

2022-12-29 Thread Jason Wang
On Fri, Dec 30, 2022 at 3:17 AM Sriram Yagnaraman wrote: > > > -Original Message- > > From: Jason Wang > > Sent: Friday, 23 December 2022 04:24 > > To: Sriram Yagnaraman > > Cc: qemu-devel@nongnu.org; Dmitry Fleytman > > ; Michael S . Tsirkin

Re: [PATCH 2/2] vdpa: harden the error path if get_iova_range failed

2022-12-27 Thread Jason Wang
On Sat, Dec 24, 2022 at 7:49 PM Longpeng(Mike) wrote: > > From: Longpeng > > We should stop if the GET_IOVA_RANGE ioctl failed. Acked-by: Jason Wang Thanks > > Signed-off-by: Longpeng > --- > net/vhost-vdpa.c | 8 +++- > 1 file changed, 7 insertions(+), 1 d

Re: [PATCH 1/2] vdpa-dev: get iova range explicitly

2022-12-27 Thread Jason Wang
evice won't work. Let's call > GET_IOVA_RANGE ioctl explicitly. Acked-by: Jason Wang Thanks > > Fixes: a585fad26b2e6ccc ("vdpa: request iova_range only once") > Signed-off-by: Longpeng > --- > hw/virtio/vdpa-dev.c | 9 + > hw/virtio/v

Re: [PATCH v3] intel-iommu: Document iova_tree

2022-12-25 Thread Jason Wang
On Sat, Dec 24, 2022 at 12:26 AM Peter Xu wrote: > > On Fri, Dec 23, 2022 at 03:48:01PM +0800, Jason Wang wrote: > > On Wed, Dec 7, 2022 at 6:13 AM Peter Xu wrote: > > > > > > It seems not super clear on when iova_tree is used, and why. Add a rich > > >

Re: [PATCH 3/3] intel-iommu: build iova tree during IOMMU translation

2022-12-23 Thread Jason Wang
On Tue, Dec 6, 2022 at 9:58 PM Peter Xu wrote: > > On Tue, Dec 06, 2022 at 11:18:03AM +0800, Jason Wang wrote: > > On Tue, Dec 6, 2022 at 7:19 AM Peter Xu wrote: > > > > > > Jason, > > > > > > On Mon, Dec 05, 2022 at 12:12:04PM +0800, Jason Wang

Re: [PATCH v3] intel-iommu: Document iova_tree

2022-12-22 Thread Jason Wang
used and > implications (e.g. unmap can be larger than the mapped ranges). > > Suggested-by: Jason Wang > Signed-off-by: Peter Xu > --- > v3: > - Adjust according to Eric's comment > --- > include/exec/memory.h | 28 +

Re: [PATCH v21 00/10] vhost-vdpa: add support for configure interrupt

2022-12-22 Thread Jason Wang
Because hw/virtio/vhost-user-gpio.c is a new device,So I missed to add the VIRTIO_CONFIG_IRQ_IDX check in notifier_mask changes in v19 fix the crash in qtest rebased the code based on upstream changes in v20 fix the compile issue in mingw32 For the series Acked-by: Jason Wang Thanks Cindy

Re: [PATCH 0/5] hw/net/igb: emulated network device with SR-IOV

2022-12-22 Thread Jason Wang
On Thu, Dec 22, 2022 at 7:43 PM Sriram Yagnaraman wrote: > > A new attempt at adding support for Intel 82576 Gigabit Ethernet adapter > with SR-IOV support. > > Start qemu with the following parameters. >qemu-system-x86_64 -enable-kvm -M q35 \ >... >-device pcie-root-port,slot=3,id=pci

Re: [PATCH v2 1/4] include/hw/virtio: Break inclusion loop

2022-12-22 Thread Jason Wang
by: Philippe Mathieu-Daudé > Reviewed-by: Alistair Francis > Reviewed-by: Stefano Garzarella Acked-by: Jason Wang Thanks > --- > include/hw/virtio/virtio.h | 1 - > hw/virtio/virtio-qmp.c | 1 + > hw/virtio/virtio.c | 1 + > 3 files changed, 2 insertions(+), 1

Re: [PATCH v3 3/4] vdpa: handle VIRTIO_NET_CTRL_ANNOUNCE in vhost_vdpa_net_handle_ctrl_avail

2022-12-21 Thread Jason Wang
On Wed, Dec 21, 2022 at 7:50 PM Eugenio Pérez wrote: > > Since this capability is emulated by qemu shadowed CVQ cannot forward it > to the device. Process all that command within qemu. > > Signed-off-by: Eugenio Pérez Acked-by: Jason Wang Thanks > --- >

Re: [PATCH v3 2/4] virtio_net: copy VIRTIO_NET_S_ANNOUNCE if device model has it

2022-12-21 Thread Jason Wang
On Wed, Dec 21, 2022 at 7:50 PM Eugenio Pérez wrote: > > Status part of the emulated feature. It will follow device model, so we > must copy it as long as NIC device model has it set. > > Signed-off-by: Eugenio Pérez Acked-by: Jason Wang Thanks > --- > v3: Add virtio

Re: [PATCH v9 06/12] vdpa: request iova_range only once

2022-12-21 Thread Jason Wang
On Fri, Dec 16, 2022 at 5:53 PM Eugenio Perez Martin wrote: > > On Fri, Dec 16, 2022 at 8:29 AM Jason Wang wrote: > > > > On Thu, Dec 15, 2022 at 7:32 PM Eugenio Pérez wrote: > > > > > > Currently iova range is requested once per queue pair in the case of &g

Re: [PATCH 0/3] Fix UNMAP notifier for intel-iommu

2022-12-20 Thread Jason Wang
On Tue, Dec 20, 2022 at 9:53 PM Michael S. Tsirkin wrote: > > On Tue, Nov 29, 2022 at 04:10:34PM +0800, Jason Wang wrote: > > Hi All: > > > > According to ATS, device should work if ATS is disabled. This is not > > correctly implemented in the current intel-iommu s

Re: [PATCH v2] hw/net/vmxnet3: allow VMXNET3_MAX_MTU itself as a value

2022-12-15 Thread Jason Wang
On Wed, Dec 14, 2022 at 5:43 PM Fiona Ebner wrote: > > Am 25.08.22 um 11:29 schrieb Fiona Ebner: > > Currently, VMXNET3_MAX_MTU itself (being 9000) is not considered a > > valid value for the MTU, but a guest running ESXi 7.0 might try to > > set it and fail the assert [0]. > > > > In the Linux ke

Re: [PATCH v2 0/3] Fix the "-nic help" option

2022-12-15 Thread Jason Wang
On Thu, Dec 15, 2022 at 11:23 PM Thomas Huth wrote: > > On 10/11/2022 13.52, Thomas Huth wrote: > > Running QEMU with "-nic help" used to work in QEMU 5.2 and earlier > > versions, but since QEMU 6.0 it just complains that "help" is not > > a valid value here. This patch series fixes this problem

Re: [PATCH v9 12/12] vdpa: always start CVQ in SVQ mode if possible

2022-12-15 Thread Jason Wang
On Thu, Dec 15, 2022 at 7:32 PM Eugenio Pérez wrote: > > Isolate control virtqueue in its own group, allowing to intercept control > commands but letting dataplane run totally passthrough to the guest. > > Signed-off-by: Eugenio Pérez Acked-by: Jason Wang Thanks > -

Re: [PATCH v9 06/12] vdpa: request iova_range only once

2022-12-15 Thread Jason Wang
bool svq, > + struct vhost_vdpa_iova_range > iova_range, > + VhostIOVATree *iova_tree) Nit: it's better not mix style changes. Other than this: Acked-by: Jason Wang Thanks > { &g

[PATCH V3] vhost: fix vq dirty bitmap syncing when vIOMMU is enabled

2022-12-15 Thread Jason Wang
ory. Fixes: c471ad0e9bd46 ("vhost_net: device IOTLB support") Cc: qemu-sta...@nongnu.org Tested-by: Lei Yang Reported-by: Yalan Zhang Signed-off-by: Jason Wang --- Changes since V2: - use "used_iova" instead of "used_phys" in log - store the offset in a local variable

Re: [PATCH v11 5/5] docs: Add generic vhost-vdpa device documentation

2022-12-15 Thread Jason Wang
# modprobe vdpa_sim_blk Nit: it's probably better to add driver binding steps here. > + host# vdpa dev add mgmtdev vdpasim_blk name blk0 > + (...you can see the vhost-vDPA device under /dev directory now...) And then the vhost char dev name could be fetch via ls /sys/bus/vdpa/device/

Re: [PATCH v12 1/1] vhost-vdpa: add support for vIOMMU

2022-12-13 Thread Jason Wang
在 2022/12/9 21:08, Cindy Lu 写道: 1.Skip the check in vhost_vdpa_listener_skipped_section() while MR is IOMMU, Move this check to vhost_vdpa_iommu_map_notify() 2.Add support for vIOMMU. So I think the changlog needs some tweak, we need to explain why you need to do the above. Add the new

Re: [PATCH v11 1/2] vhost-vdpa: Skip the range check while MR is IOMMU

2022-12-07 Thread Jason Wang
On Wed, Nov 30, 2022 at 1:33 PM Cindy Lu wrote: > > Skip the check in vhost_vdpa_listener_skipped_section() while > MR is IOMMU, Move this check to vhost_vdpa_iommu_map_notify() > > Signed-off-by: Cindy Lu > --- > hw/virtio/vhost-vdpa.c | 21 ++--- > 1 file changed, 14 insertion

Re: [RFC PATCH for 8.0 00/13] vDPA-net inflight descriptors migration with SVQ

2022-12-07 Thread Jason Wang
On Wed, Dec 7, 2022 at 5:00 PM Eugenio Perez Martin wrote: > > On Tue, Dec 6, 2022 at 8:08 AM Jason Wang wrote: > > > > On Tue, Dec 6, 2022 at 1:04 AM Eugenio Pérez wrote: > > > > > > The state of the descriptors (avail or used) may not be recoverable ju

Re: [PATCH v2 3/4] vdpa: handle VIRTIO_NET_CTRL_ANNOUNCE in vhost_vdpa_net_handle_ctrl_avail

2022-12-05 Thread Jason Wang
On Mon, Dec 5, 2022 at 9:07 PM Eugenio Perez Martin wrote: > > On Mon, Dec 5, 2022 at 5:27 AM Jason Wang wrote: > > > > On Thu, Dec 1, 2022 at 5:29 PM Eugenio Perez Martin > > wrote: > > > > > > On Thu, Dec 1, 2022 at 9:39 AM Jason Wang wrote: >

Re: [RFC PATCH for 8.0 00/13] vDPA-net inflight descriptors migration with SVQ

2022-12-05 Thread Jason Wang
On Tue, Dec 6, 2022 at 1:04 AM Eugenio Pérez wrote: > > The state of the descriptors (avail or used) may not be recoverable just > looking at the guest memory. Out of order used descriptor may override > previous avail ones in the descriptor table or avail vring. > > Currently we're not migrating

Re: [PATCH] intel-iommu: Document iova_tree

2022-12-05 Thread Jason Wang
On Tue, Dec 6, 2022 at 7:28 AM Peter Xu wrote: > > On Mon, Dec 05, 2022 at 12:23:20PM +0800, Jason Wang wrote: > > On Fri, Dec 2, 2022 at 12:25 AM Peter Xu wrote: > > > > > > It seems not super clear on when iova_tree is used, and why. Add a rich > > >

Re: [RFC PATCH for 8.0 10/13] virtio-net: Migrate vhost inflight descriptors

2022-12-05 Thread Jason Wang
On Tue, Dec 6, 2022 at 1:05 AM Eugenio Pérez wrote: > > There is currently no data to be migrated, since nothing populates or > read the fields on virtio-net. > > The migration of in-flight descriptors is modelled after the migration > of requests in virtio-blk. With some differences: > * virtio-b

Re: [PATCH 3/3] intel-iommu: build iova tree during IOMMU translation

2022-12-05 Thread Jason Wang
On Tue, Dec 6, 2022 at 7:19 AM Peter Xu wrote: > > Jason, > > On Mon, Dec 05, 2022 at 12:12:04PM +0800, Jason Wang wrote: > > I'm fine to go without iova-tree. Would you mind to post patches for > > fix? I can test and include it in this series then. > > One

Re: [PATCH] net: Fix qemu crash when hot-pluging a vhost-net failed.

2022-12-04 Thread Jason Wang
On Mon, Dec 5, 2022 at 2:23 PM Yangming wrote: > > Dear all: > > > > I found a bug of qemu: hot-pluging a vhost-net may cause virtual machine > crash in following steps: > 1. Starting a vm without any net device. > 2. Hot-pluging 70 memory devices. > 3. Hot-pluging a vhost-net device. > > > > Aft

Re: [PATCH v2 3/4] vdpa: handle VIRTIO_NET_CTRL_ANNOUNCE in vhost_vdpa_net_handle_ctrl_avail

2022-12-04 Thread Jason Wang
On Thu, Dec 1, 2022 at 5:29 PM Eugenio Perez Martin wrote: > > On Thu, Dec 1, 2022 at 9:39 AM Jason Wang wrote: > > > > On Wed, Nov 30, 2022 at 3:07 PM Eugenio Perez Martin > > wrote: > > > > > > On Wed, Nov 30, 2022 at 8:02 AM Jason Wang wrote: >

Re: [PATCH for 8.0 v8 06/12] vdpa: extract vhost_vdpa_svq_allocate_iova_tree

2022-12-04 Thread Jason Wang
On Thu, Dec 1, 2022 at 5:50 PM Eugenio Perez Martin wrote: > > On Thu, Dec 1, 2022 at 9:45 AM Jason Wang wrote: > > > > On Wed, Nov 30, 2022 at 3:40 PM Eugenio Perez Martin > > wrote: > > > > > > On Wed, Nov 30, 2022 at 7:43 AM Jason Wang wrote: > &

Re: [PATCH] intel-iommu: Document iova_tree

2022-12-04 Thread Jason Wang
On Fri, Dec 2, 2022 at 12:25 AM Peter Xu wrote: > > It seems not super clear on when iova_tree is used, and why. Add a rich > comment above iova_tree to track why we needed the iova_tree, and when we > need it. > > Suggested-by: Jason Wang > Signed-off-by: Peter Xu >

Re: [PATCH] vhost: Not return fail while the device does not support send_iotlb_msg

2022-12-04 Thread Jason Wang
On Sat, Dec 3, 2022 at 3:38 PM Cindy Lu wrote: > > On Thu, 1 Dec 2022 at 16:49, Jason Wang wrote: > > > > On Wed, Nov 30, 2022 at 4:11 PM Cindy Lu wrote: > > > > > > Some device does not support vhost_send_device_iotlb_msg() > > > such as vDPA d

Re: [PATCH 3/3] intel-iommu: build iova tree during IOMMU translation

2022-12-04 Thread Jason Wang
` On Thu, Dec 1, 2022 at 10:59 PM Peter Xu wrote: > > On Thu, Dec 01, 2022 at 04:35:48PM +0800, Jason Wang wrote: > > On Wed, Nov 30, 2022 at 11:17 PM Peter Xu wrote: > > > > > > On Wed, Nov 30, 2022 at 02:33:51PM +0800, Jason Wang wrote: > > > >

Re: [PATCH] vhost: Not return fail while the device does not support send_iotlb_msg

2022-12-01 Thread Jason Wang
On Wed, Nov 30, 2022 at 4:11 PM Cindy Lu wrote: > > Some device does not support vhost_send_device_iotlb_msg() > such as vDPA device, which is as expected. So we should not > return fail here. Please explain in which case you may hit the -ENODEV and what's the side effect of this. Thanks > > Si

Re: [PATCH for 7.2? V2] vhost: fix vq dirty bitmap syncing when vIOMMU is enabled

2022-12-01 Thread Jason Wang
On Wed, Nov 30, 2022 at 12:08 AM Eric Auger wrote: > > Hi Michael, > > On 11/29/22 16:44, Michael S. Tsirkin wrote: > > On Tue, Nov 29, 2022 at 10:52:29AM +0100, Eric Auger wrote: > >> Hi Jason, > >> > >> On 11/29/22 05:02, Jason Wang wrote: >

Re: [PATCH 1/3] intel-iommu: fail MAP notifier without caching mode

2022-12-01 Thread Jason Wang
On Wed, Nov 30, 2022 at 11:06 PM Peter Xu wrote: > > On Wed, Nov 30, 2022 at 02:23:06PM +0800, Jason Wang wrote: > > On Tue, Nov 29, 2022 at 11:35 PM Peter Xu wrote: > > > > > > On Tue, Nov 29, 2022 at 04:10:35PM +0800, Jason Wang wrote: > > > > Wit

Re: [PATCH for 8.0 v8 06/12] vdpa: extract vhost_vdpa_svq_allocate_iova_tree

2022-12-01 Thread Jason Wang
On Wed, Nov 30, 2022 at 3:40 PM Eugenio Perez Martin wrote: > > On Wed, Nov 30, 2022 at 7:43 AM Jason Wang wrote: > > > > On Thu, Nov 24, 2022 at 11:52 PM Eugenio Pérez wrote: > > > > > > It can be allocated either if all virtqueues must be shadowed or if

Re: [PATCH v2 3/4] vdpa: handle VIRTIO_NET_CTRL_ANNOUNCE in vhost_vdpa_net_handle_ctrl_avail

2022-12-01 Thread Jason Wang
On Wed, Nov 30, 2022 at 3:07 PM Eugenio Perez Martin wrote: > > On Wed, Nov 30, 2022 at 8:02 AM Jason Wang wrote: > > > > On Fri, Nov 25, 2022 at 1:33 AM Eugenio Pérez wrote: > > > > > > Since this capability is emulated by qemu shadowed CVQ cannot forward

Re: [PATCH 3/3] intel-iommu: build iova tree during IOMMU translation

2022-12-01 Thread Jason Wang
On Wed, Nov 30, 2022 at 11:17 PM Peter Xu wrote: > > On Wed, Nov 30, 2022 at 02:33:51PM +0800, Jason Wang wrote: > > On Tue, Nov 29, 2022 at 11:57 PM Peter Xu wrote: > > > > > > On Tue, Nov 29, 2022 at 04:10:37PM +0800, Jason Wang wrote: > > > > The IOV

Re: [PATCH 0/3] Fix UNMAP notifier for intel-iommu

2022-12-01 Thread Jason Wang
On Thu, Dec 1, 2022 at 12:38 AM Michael S. Tsirkin wrote: > > On Tue, Nov 29, 2022 at 04:10:34PM +0800, Jason Wang wrote: > > Hi All: > > > > According to ATS, device should work if ATS is disabled. This is not > > correctly implemented in the current intel-iommu s

Re: [PATCH v2 4/4] vdpa: do not handle VIRTIO_NET_F_GUEST_ANNOUNCE in vhost-vdpa

2022-11-29 Thread Jason Wang
On Fri, Nov 25, 2022 at 1:33 AM Eugenio Pérez wrote: > > So qemu emulates it even in case the device does not support it. > > Signed-off-by: Eugenio Pérez Acked-by: Jason Wang Thanks > --- > net/vhost-vdpa.c | 1 - > 1 file changed, 1 deletion(-) > > diff --g

Re: [PATCH v2 3/4] vdpa: handle VIRTIO_NET_CTRL_ANNOUNCE in vhost_vdpa_net_handle_ctrl_avail

2022-11-29 Thread Jason Wang
On Fri, Nov 25, 2022 at 1:33 AM Eugenio Pérez wrote: > > Since this capability is emulated by qemu shadowed CVQ cannot forward it > to the device. Process all that command within qemu. > > Signed-off-by: Eugenio Pérez > --- > net/vhost-vdpa.c | 15 --- > 1 file changed, 12 insertions

Re: [PATCH v2 2/4] virtio_net: copy VIRTIO_NET_S_ANNOUNCE if device model has it

2022-11-29 Thread Jason Wang
On Fri, Nov 25, 2022 at 1:33 AM Eugenio Pérez wrote: > > Status part of the emulated feature. It will follow device model, so we > must copy it as long as NIC device model has it set. > > Signed-off-by: Eugenio Pérez > --- > hw/net/virtio-net.c | 1 + > 1 file changed, 1 insertion(+) > > diff --

Re: [PATCH v2 1/4] virtio_net: Modify virtio_net_get_config to early return

2022-11-29 Thread Jason Wang
On Fri, Nov 25, 2022 at 1:33 AM Eugenio Pérez wrote: > > Next patches introduce more code on vhost-vdpa branch, with already have > too much indentation. > > Signed-off-by: Eugenio Pérez > Reviewed-by: Philippe Mathieu-Daudé > Reviewed-by: Michael S. Tsirkin Acked-by

Re: [PATCH for 8.0 v8 12/12] vdpa: always start CVQ in SVQ mode if possible

2022-11-29 Thread Jason Wang
On Thu, Nov 24, 2022 at 11:52 PM Eugenio Pérez wrote: > > Isolate control virtqueue in its own group, allowing to intercept control > commands but letting dataplane run totally passthrough to the guest. > > Signed-off-by: Eugenio Pérez > --- > v8: > * Do not allocate iova_tree on net_init_vhost_v

Re: [PATCH for 8.0 v8 06/12] vdpa: extract vhost_vdpa_svq_allocate_iova_tree

2022-11-29 Thread Jason Wang
On Thu, Nov 24, 2022 at 11:52 PM Eugenio Pérez wrote: > > It can be allocated either if all virtqueues must be shadowed or if > vdpa-net detects it can shadow only cvq. > > Extract in its own function so we can reuse it. > > Signed-off-by: Eugenio Pérez > --- > net/vhost-vdpa.c | 29

Re: [PATCH for 8.0 v8 04/12] vhost: move iova_tree set to vhost_svq_start

2022-11-29 Thread Jason Wang
device does not support SVQ. > > Signed-off-by: Eugenio Pérez Acked-by: Jason Wang Thanks > --- > hw/virtio/vhost-shadow-virtqueue.h | 5 ++--- > hw/virtio/vhost-shadow-virtqueue.c | 9 - > hw/virtio/vhost-vdpa.c | 5 ++--- > 3 files changed, 8 insertions(+),

Re: [PATCH 3/3] intel-iommu: build iova tree during IOMMU translation

2022-11-29 Thread Jason Wang
On Tue, Nov 29, 2022 at 11:57 PM Peter Xu wrote: > > On Tue, Nov 29, 2022 at 04:10:37PM +0800, Jason Wang wrote: > > The IOVA tree is only built during page walk this breaks the device > > that tries to use UNMAP notifier only. One example is vhost-net, it > > tries to

Re: [PATCH 1/3] intel-iommu: fail MAP notifier without caching mode

2022-11-29 Thread Jason Wang
On Tue, Nov 29, 2022 at 11:35 PM Peter Xu wrote: > > On Tue, Nov 29, 2022 at 04:10:35PM +0800, Jason Wang wrote: > > Without caching mode, MAP notifier won't work correctly since guest > > won't send IOTLB update event when it establishes new mappings in the > &g

[PATCH 0/3] Fix UNMAP notifier for intel-iommu

2022-11-29 Thread Jason Wang
miss (note that it's not specific to PCI so it can work without ATS), Qemu doesn't build the IOVA tree, so when guest start an IOTLB invalidation, Qemu won't trigger the UNMAP notifier. Fixing by build IOVA tree during IOMMU translsation. Thanks Jason Wang (3): intel-iommu: fail MAP

[PATCH 2/3] intel-iommu: fail DEVIOTLB_UNMAP without dt mode

2022-11-29 Thread Jason Wang
Without dt mode, device IOTLB notifier won't work since guest won't send device IOTLB invalidation descriptor in this case. Let's fail early instead of misbehaving silently. Signed-off-by: Jason Wang --- hw/i386/intel_iommu.c | 8 1 file changed, 8 insertions(+) diff

<    4   5   6   7   8   9   10   11   12   13   >