Re: [PATCH v9 13/20] virtio-net: Return an error when vhost cannot enable RSS

2024-04-16 Thread Jason Wang
On Tue, Apr 16, 2024 at 5:51 PM Yuri Benditovich wrote: > > On Tue, Apr 16, 2024 at 10:14 AM Jason Wang wrote: > > > > On Tue, Apr 16, 2024 at 1:43 PM Yuri Benditovich > > wrote: > > > > > > On Tue, Apr 16, 2024 at 7:00 AM Jason Wang wrote: > > &

Re: [PATCH v9 13/20] virtio-net: Return an error when vhost cannot enable RSS

2024-04-16 Thread Jason Wang
On Tue, Apr 16, 2024 at 1:43 PM Yuri Benditovich wrote: > > On Tue, Apr 16, 2024 at 7:00 AM Jason Wang wrote: > > > > On Mon, Apr 15, 2024 at 10:05 PM Yuri Benditovich > > wrote: > > > > > > On Wed, Apr 3, 2024 at 2:11 PM Akihiko Odaki > > >

Re: [PATCH v9 13/20] virtio-net: Return an error when vhost cannot enable RSS

2024-04-15 Thread Jason Wang
On Mon, Apr 15, 2024 at 10:05 PM Yuri Benditovich wrote: > > On Wed, Apr 3, 2024 at 2:11 PM Akihiko Odaki wrote: > > > > vhost requires eBPF for RSS. When eBPF is not available, virtio-net > > implicitly disables RSS even if the user explicitly requests it. Return > > an error instead of

Re: [PATCH v8] virtio-pci: fix use of a released vector

2024-04-15 Thread Jason Wang
On Mon, Apr 15, 2024 at 6:41 PM Cindy Lu wrote: > > On Mon, Apr 15, 2024 at 5:34 PM Michael S. Tsirkin wrote: > > > > From: Cindy Lu > > > > During the booting process of the non-standard image, the behavior of the > > called function in qemu is as follows: > > > > 1. vhost_net_stop() was

Re: Discrepancy between mmap call on DPDK/libvduse and rust vm-memory crate

2024-04-15 Thread Jason Wang
On Mon, Apr 15, 2024 at 3:28 PM Yongji Xie wrote: > > On Sun, Apr 14, 2024 at 5:02 PM Michael S. Tsirkin wrote: > > > > On Fri, Apr 12, 2024 at 12:15:40PM +0200, Eugenio Perez Martin wrote: > > > Hi! > > > > > > I'm building a bridge to expose vhost-user devices through VDUSE. The > > > code is

Re: [PATCH v6] virtio-pci: Fix the crash that the vector was used after released.

2024-04-15 Thread Jason Wang
t; ../accel/kvm/kvm-accel-ops.c:51 > 21 0x5606411949f4 in qemu_thread_start (args=0x560642f292b0) at > ../util/qemu-thread-posix.c:541 > 22 0x7fc87148cdcd in start_thread (arg=) at > pthread_create.c:442 > 23 0x7fc871512630 in clone3 () at > ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81 > (gdb) > > Fixes: f9a09ca3ea ("vhost: add support for configure interrupt") > Cc: qemu-sta...@nongnu.org > > Signed-off-by: Cindy Lu Acked-by: Jason Wang Thanks

Re: [RFC 0/2] Identify aliased maps in vdpa SVQ iova_tree

2024-04-12 Thread Jason Wang
On Wed, Apr 10, 2024 at 6:03 PM Eugenio Pérez wrote: > > The guest may have overlapped memory regions, where different GPA leads > to the same HVA. This causes a problem when overlapped regions > (different GPA but same translated HVA) exists in the tree, as looking > them by HVA will return

Re: [RFC QEMU PATCH v8 2/2] virtio-pci: implement No_Soft_Reset bit

2024-04-12 Thread Jason Wang
On Fri, Apr 12, 2024 at 1:59 PM Chen, Jiqian wrote: > > On 2024/4/7 11:20, Jason Wang wrote: > > On Tue, Apr 2, 2024 at 11:03 AM Chen, Jiqian wrote: > >> > >> On 2024/3/29 18:44, Michael S. Tsirkin wrote: > >>> On Fri, Mar 29, 2024 at 03:20:59PM +080

Re: [RFC QEMU PATCH v8 2/2] virtio-pci: implement No_Soft_Reset bit

2024-04-12 Thread Jason Wang
On Fri, Apr 12, 2024 at 2:05 PM Chen, Jiqian wrote: > > On 2024/4/7 19:49, Michael S. Tsirkin wrote: > >>> I will set the default value of No_Soft_Reset bit to true in next version > >>> according to your opinion. > >>> About the compatibility of old machine types, which types should I > >>>

Re: [PATCH v5] virtio-pci: Fix the crash that the vector was used after released.

2024-04-11 Thread Jason Wang
t; ../accel/kvm/kvm-accel-ops.c:51 > 21 0x5606411949f4 in qemu_thread_start (args=0x560642f292b0) at > ../util/qemu-thread-posix.c:541 > 22 0x7fc87148cdcd in start_thread (arg=) at > pthread_create.c:442 > 23 0x7fc871512630 in clone3 () at > ../sysdeps/unix/sysv/l

Re: [PATCH v4] virtio-pci: Fix the crash that the vector was used after released.

2024-04-10 Thread Jason Wang
> ../accel/kvm/kvm-accel-ops.c:51 > 21 0x5606411949f4 in qemu_thread_start (args=0x560642f292b0) at > ../util/qemu-thread-posix.c:541 > 22 0x7fc87148cdcd in start_thread (arg=) at > pthread_create.c:442 > 23 0x7fc871512630 in clone3 () at > ../sysdeps/unix/sysv/lin

Re: [PATCH v2 1/1] virtio-pci: Fix the crash that the vector was used after released.

2024-04-10 Thread Jason Wang
Offline: On Wed, Apr 10, 2024 at 2:28 PM Cindy Lu wrote: > > On Wed, Apr 10, 2024 at 1:36 PM Jason Wang wrote: > > > > On Wed, Apr 10, 2024 at 1:29 PM Cindy Lu wrote: > > > > > > When the guest triggers vhost_stop and then virtio_reset, the vector will &

Re: [PATCH-for-9.0? v2] hw/net/net_tx_pkt: Fix overrun in update_sctp_checksum()

2024-04-10 Thread Jason Wang
Fixes: f199b13bc1 ("igb: Implement Tx SCTP CSO") > > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2273 > > Signed-off-by: Philippe Mathieu-Daudé > > Reviewed-by: Akihiko Odaki Fixes: CVE-2024-3567 Acked-by: Jason Wang Peter, would you want to pick this fo

Re: [PATCH v2 1/1] virtio-pci: Fix the crash that the vector was used after released.

2024-04-09 Thread Jason Wang
On Wed, Apr 10, 2024 at 1:29 PM Cindy Lu wrote: > > When the guest triggers vhost_stop and then virtio_reset, the vector will the > IRQFD for this vector will be released and change to VIRTIO_NO_VECTOR. > After that, the guest called vhost_net_start, (at this time, the configure > vector is

Re: [PATCH v2 1/1] virtio-pci: Fix the crash that the vector was used after released.

2024-04-09 Thread Jason Wang
On Wed, Apr 10, 2024 at 1:29 PM Cindy Lu wrote: > > When the guest triggers vhost_stop and then virtio_reset, the vector will the > IRQFD for this vector will be released and change to VIRTIO_NO_VECTOR. > After that, the guest called vhost_net_start, (at this time, the configure > vector is

Re: [PATCH v2] vhost: don't set vring call if guest notifiers is not enabled

2024-04-08 Thread Jason Wang
this > issue, modify the conditional statement. > > Signed-off-by: Yuxue Liu Acked-by: Jason Wang Thanks

Re: [PATCH 1/2] virtio-net: Fix vhost virtqueue notifiers for RSS

2024-04-08 Thread Jason Wang
On Mon, Apr 8, 2024 at 6:13 PM Michael S. Tsirkin wrote: > > On Tue, Mar 26, 2024 at 07:06:29PM +0900, Akihiko Odaki wrote: > > virtio_net_guest_notifier_pending() and virtio_net_guest_notifier_mask() > > checked VIRTIO_NET_F_MQ to know there are multiple queues, but > > VIRTIO_NET_F_RSS also

Re: [PATCH] Revert "hw/virtio: Add support for VDPA network simulation devices"

2024-04-08 Thread Jason Wang
On Mon, Apr 8, 2024 at 5:47 PM Michael S. Tsirkin wrote: > > This reverts commit cd341fd1ffded978b2aa0b5309b00be7c42e347c. > > The patch adds non-upstream code in > include/standard-headers/linux/virtio_pci.h > which would make maintainance harder. > > Revert for now. >

Re: [PATCH] hw/virtio: Add support for VDPA network simulation devices

2024-04-08 Thread Jason Wang
On Mon, Mar 18, 2024 at 8:41 PM Michael S. Tsirkin wrote: > > On Thu, Mar 14, 2024 at 11:24:33AM +0800, Jason Wang wrote: > > On Thu, Mar 14, 2024 at 3:52 AM Michael S. Tsirkin wrote: > > > > > > On Wed, Mar 13, 2024 at 07:51:08PM +0100, Thomas Weißschuh wrote:

Re: [PATCH 1/1] virtio-net: fix bug 1451 aka "assert(!virtio_net_get_subqueue(nc)->async_tx.elem); "

2024-04-08 Thread Jason Wang
On Fri, Apr 5, 2024 at 7:22 PM Alexey Dobriyan wrote: > > Don't send zero length packets in virtio_net_flush_tx(). > > Reproducer from https://gitlab.com/qemu-project/qemu/-/issues/1451 > creates small packet (1 segment, len = 10 == n->guest_hdr_len), > destroys queue. > > "if (n->host_hdr_len !=

Re: [PULL 0/5] Net patches

2024-04-08 Thread Jason Wang
On Mon, Apr 1, 2024 at 3:21 AM Michael Tokarev wrote: > > 29.03.2024 10:10, Jason Wang: > > > Akihiko Odaki (5): > >virtio-net: Fix vhost virtqueue notifiers for RSS > >ebpf: Fix indirections table setting > >hw/net/net_tx_pkt: Fix virtio h

Re: [PATCH 1/1] ebpf: Added traces back. Changed source set for eBPF to 'system'.

2024-04-08 Thread Jason Wang
On Fri, Mar 29, 2024 at 7:30 PM Andrew Melnychenko wrote: > > There was an issue with Qemu build with "--disable-system". > The traces could be generated and the build fails. > The traces were 'cut out' for previous patches, and overall, > the 'system' source set should be used like in pre-'eBPF

Re: [PATCH-for-9.1 1/7] ebpf: Restrict to system emulation

2024-04-08 Thread Jason Wang
On Fri, Apr 5, 2024 at 3:48 AM Philippe Mathieu-Daudé wrote: > > eBPF is not used in user emulation. > > Signed-off-by: Philippe Mathieu-Daudé Queued for 9.1. Thanks > --- > ebpf/meson.build | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/ebpf/meson.build

Re: [PATCH] vhost: don't set vring call if no enabled msix

2024-04-08 Thread Jason Wang
uxue Liu Patch looks good, I would like to do the following tweaks: 1) explain what is not enough since commit: commit 96a3d98d2cdbd897ff5ab33427aa4cfb94077665 Author: Jason Wang Date: Mon Aug 1 16:07:58 2016 +0800 vhost: don't set vring call if no vector 2) tweak the title to "vhost

Re: [PATCH 1/1] virtio-pci: Fix the crash when the vector changes back from VIRTIO_NO_VECTOR

2024-04-07 Thread Jason Wang
On Sun, Apr 7, 2024 at 3:00 PM Cindy Lu wrote: > > On Sun, Apr 7, 2024 at 12:20 PM Jason Wang wrote: > > > > On Tue, Apr 2, 2024 at 11:02 PM Cindy Lu wrote: > > > > > > When the guest calls virtio_stop and then virtio_reset, > > > >

Re: [RFC QEMU PATCH v8 2/2] virtio-pci: implement No_Soft_Reset bit

2024-04-07 Thread Jason Wang
On Sun, Apr 7, 2024 at 7:50 PM Michael S. Tsirkin wrote: > > On Sun, Apr 07, 2024 at 11:20:57AM +0800, Jason Wang wrote: > > On Tue, Apr 2, 2024 at 11:03 AM Chen, Jiqian wrote: > > > > > > On 2024/3/29 18:44, Michael S. Tsirkin wrote: > > > > On Fri, Ma

Re: [PATCH 1/1] virtio-pci: Fix the crash when the vector changes back from VIRTIO_NO_VECTOR

2024-04-07 Thread Jason Wang
On Sun, Apr 7, 2024 at 7:53 PM Michael S. Tsirkin wrote: > > On Sun, Apr 07, 2024 at 12:19:57PM +0800, Jason Wang wrote: > > On Tue, Apr 2, 2024 at 11:02 PM Cindy Lu wrote: > > > > > > When the guest calls virtio_stop and then virtio_reset, > > > > Gues

Re: [PATCH 1/1] virtio-pci: Fix the crash when the vector changes back from VIRTIO_NO_VECTOR

2024-04-06 Thread Jason Wang
On Tue, Apr 2, 2024 at 11:02 PM Cindy Lu wrote: > > When the guest calls virtio_stop and then virtio_reset, Guests could not call those functions directly, it is triggered by for example writing to some of the registers like reset or others. > the vector will change > to VIRTIO_NO_VECTOR and

Re: [PATCH] vdpa-dev: Fix the issue of device status not updating when configuration interruption is triggered

2024-04-06 Thread Jason Wang
eceives the STATUS field as VIRTIO_NET_S_LINK_UP. > > Signed-off-by: Yuxue Liu This aligns with the vhost-net support for vDPA. Acked-by: Jason Wang Thanks > --- > hw/virtio/vdpa-dev.c | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/hw/virtio/vdpa-dev.c b/

Re: [RFC QEMU PATCH v8 2/2] virtio-pci: implement No_Soft_Reset bit

2024-04-06 Thread Jason Wang
On Tue, Apr 2, 2024 at 11:03 AM Chen, Jiqian wrote: > > On 2024/3/29 18:44, Michael S. Tsirkin wrote: > > On Fri, Mar 29, 2024 at 03:20:59PM +0800, Jason Wang wrote: > >> On Fri, Mar 29, 2024 at 3:07 PM Chen, Jiqian wrote: > >>> > >>>

Re: [RFC QEMU PATCH v8 2/2] virtio-pci: implement No_Soft_Reset bit

2024-03-29 Thread Jason Wang
On Fri, Mar 29, 2024 at 4:00 PM Chen, Jiqian wrote: > > On 2024/3/29 15:20, Jason Wang wrote: > > On Fri, Mar 29, 2024 at 3:07 PM Chen, Jiqian wrote: > >> > >> On 2024/3/28 20:36, Michael S. Tsirkin wrote: > >>>>>> +} > >>>&g

Re: [RFC QEMU PATCH v8 2/2] virtio-pci: implement No_Soft_Reset bit

2024-03-29 Thread Jason Wang
On Fri, Mar 29, 2024 at 3:07 PM Chen, Jiqian wrote: > > On 2024/3/28 20:36, Michael S. Tsirkin wrote: > +} > + > static void virtio_pci_bus_reset_hold(Object *obj) > { > PCIDevice *dev = PCI_DEVICE(obj); > DeviceState *qdev = DEVICE(obj); > > +

[PULL 2/5] ebpf: Fix indirections table setting

2024-03-29 Thread Jason Wang
y: Akihiko Odaki Acked-by: Andrew Melnychenko Signed-off-by: Jason Wang --- ebpf/ebpf_rss.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ebpf/ebpf_rss.c b/ebpf/ebpf_rss.c index 2e506f9743..d102f3dd09 100644 --- a/ebpf/ebpf_rss.c +++ b/ebpf/ebpf_rss.c @@ -185,13 +

[PULL 3/5] hw/net/net_tx_pkt: Fix virtio header without checksum offloading

2024-03-29 Thread Jason Wang
: ffbd2dbd8e64 ("e1000e: Perform software segmentation for loopback") Buglink: https://issues.redhat.com/browse/RHEL-23067 Signed-off-by: Akihiko Odaki Signed-off-by: Jason Wang --- hw/net/net_tx_pkt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/net/net_tx_pkt.c b/hw/net/net_tx_p

[PULL 4/5] tap-win32: Remove unnecessary stubs

2024-03-29 Thread Jason Wang
From: Akihiko Odaki Some of them are only necessary for POSIX systems. The others are assigned to function pointers in NetClientInfo that can actually be NULL. Signed-off-by: Akihiko Odaki Signed-off-by: Jason Wang --- net/tap-win32.c | 54 - 1

[PULL 1/5] virtio-net: Fix vhost virtqueue notifiers for RSS

2024-03-29 Thread Jason Wang
RSS is enabled. Fixes: 68b0a6395f36 ("virtio-net: align ctrl_vq index for non-mq guest for vhost_vdpa") Signed-off-by: Akihiko Odaki Signed-off-by: Jason Wang --- hw/net/virtio-net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net

[PULL 5/5] Revert "tap: setting error appropriately when calling net_init_tap_one()"

2024-03-29 Thread Jason Wang
Fortunately, commit bf769f742c ("virtio: del net client if net_init_tap_one failed"), mentioned earlier, implements this behavior. Restore the correct semantics and fix the assertion failure for the -netdev command line option by reverting the problematic commit. Signed-off-by: Akihiko Odaki

[PULL 0/5] Net patches

2024-03-29 Thread Jason Wang
The following changes since commit 5012e522aca161be5c141596c66e5cc6082538a9: Update version for v9.0.0-rc1 release (2024-03-26 19:46:55 +) are available in the Git repository at: https://github.com/jasowang/qemu.git tags/net-pull-request for you to fetch changes up to

Re: [RFC 0/2] disable the configuration interrupt for the unsupported device

2024-03-28 Thread Jason Wang
On Fri, Mar 29, 2024 at 11:02 AM Cindy Lu wrote: > > On Thu, Mar 28, 2024 at 12:12 PM Jason Wang wrote: > > > > On Wed, Mar 27, 2024 at 5:33 PM Cindy Lu wrote: > > > > > > On Wed, Mar 27, 2024 at 5:12 PM Jason Wang wrote: > > > > > &g

Re: [PATCH v2] hw/net/net_tx_pkt: Fix virtio header without checksum offloading

2024-03-27 Thread Jason Wang
header when the VIRTIO_NET_HDR_F_NEEDS_CSUM bit is set so the bit must > be cleared in that case. > > Fixes: ffbd2dbd8e64 ("e1000e: Perform software segmentation for loopback") > Buglink: https://issues.redhat.com/browse/RHEL-23067 > Signed-off-by: Akihiko Odaki > --- >

Re: [RFC 0/2] disable the configuration interrupt for the unsupported device

2024-03-27 Thread Jason Wang
On Wed, Mar 27, 2024 at 5:44 PM Cindy Lu wrote: > > On Wed, Mar 27, 2024 at 5:13 PM Jason Wang wrote: > > > > On Wed, Mar 27, 2024 at 5:12 PM Jason Wang wrote: > > > > > > On Wed, Mar 27, 2024 at 4:28 PM Cindy Lu wrote: > > > > > >

Re: [RFC 0/2] disable the configuration interrupt for the unsupported device

2024-03-27 Thread Jason Wang
On Wed, Mar 27, 2024 at 5:33 PM Cindy Lu wrote: > > On Wed, Mar 27, 2024 at 5:12 PM Jason Wang wrote: > > > > On Wed, Mar 27, 2024 at 4:28 PM Cindy Lu wrote: > > > > > > On Wed, Mar 27, 2024 at 3:54 PM Jason Wang wrote: > > > > > &g

Re: [RFC 0/2] disable the configuration interrupt for the unsupported device

2024-03-27 Thread Jason Wang
On Wed, Mar 27, 2024 at 5:12 PM Jason Wang wrote: > > On Wed, Mar 27, 2024 at 4:28 PM Cindy Lu wrote: > > > > On Wed, Mar 27, 2024 at 3:54 PM Jason Wang wrote: > > > > > > On Wed, Mar 27, 2024 at 2:03 PM Cindy Lu wrote: > > > > > >

Re: [RFC 0/2] disable the configuration interrupt for the unsupported device

2024-03-27 Thread Jason Wang
On Wed, Mar 27, 2024 at 4:28 PM Cindy Lu wrote: > > On Wed, Mar 27, 2024 at 3:54 PM Jason Wang wrote: > > > > On Wed, Mar 27, 2024 at 2:03 PM Cindy Lu wrote: > > > > > > On Wed, Mar 27, 2024 at 11:05 AM Jason Wang wrote: > > > > > > > &g

Re: [RFC 0/2] disable the configuration interrupt for the unsupported device

2024-03-27 Thread Jason Wang
On Wed, Mar 27, 2024 at 2:03 PM Cindy Lu wrote: > > On Wed, Mar 27, 2024 at 11:05 AM Jason Wang wrote: > > > > Hi Cindy: > > > > On Wed, Mar 27, 2024 at 9:29 AM Cindy Lu wrote: > > > > > > we need a crash in Non-standard image, here is the jira

Re: [PATCH] hw/net/net_tx_pkt: Fix virtio header without checksum offloading

2024-03-26 Thread Jason Wang
On Wed, Mar 27, 2024 at 11:11 AM Akihiko Odaki wrote: > > On 2024/03/27 12:06, Jason Wang wrote: > > On Wed, Mar 27, 2024 at 11:05 AM Akihiko Odaki > > wrote: > >> > >> On 2024/03/27 11:59, Jason Wang wrote: > >>> On Wed, Mar

Re: [PATCH] hw/net/net_tx_pkt: Fix virtio header without checksum offloading

2024-03-26 Thread Jason Wang
On Wed, Mar 27, 2024 at 11:05 AM Akihiko Odaki wrote: > > On 2024/03/27 11:59, Jason Wang wrote: > > On Wed, Mar 27, 2024 at 10:53 AM Akihiko Odaki > > wrote: > >> > >> On 2024/03/27 11:50, Jason Wang wrote: > >>> On Tue, Mar

Re: [RFC 0/2] disable the configuration interrupt for the unsupported device

2024-03-26 Thread Jason Wang
Hi Cindy: On Wed, Mar 27, 2024 at 9:29 AM Cindy Lu wrote: > > we need a crash in Non-standard image, here is the jira for this > https://issues.redhat.com/browse/RHEL-28522 > The root cause of the issue is that an IRQFD was used without initialization.. > > During the booting process of the

Re: [PATCH] hw/net/net_tx_pkt: Fix virtio header without checksum offloading

2024-03-26 Thread Jason Wang
On Wed, Mar 27, 2024 at 10:53 AM Akihiko Odaki wrote: > > On 2024/03/27 11:50, Jason Wang wrote: > > On Tue, Mar 26, 2024 at 3:04 PM Akihiko Odaki > > wrote: > >> > >> On 2024/03/26 15:51, Jason Wang wrote: > >>> On Sun, Mar

Re: [RFC 1/2] virtio-net: disable the configure interrupt for not support device

2024-03-26 Thread Jason Wang
On Wed, Mar 27, 2024 at 9:29 AM Cindy Lu wrote: > > Only the vdpa device support configure interrupt, we need to disable the > configure interrupt process in all other device. I think we need to tweak the terminology here at least. It's not about configure interrupt, it's about whether or not

Re: [PATCH] hw/net/net_tx_pkt: Fix virtio header without checksum offloading

2024-03-26 Thread Jason Wang
On Tue, Mar 26, 2024 at 3:04 PM Akihiko Odaki wrote: > > On 2024/03/26 15:51, Jason Wang wrote: > > On Sun, Mar 24, 2024 at 4:32 PM Akihiko Odaki > > wrote: > >> > >> It is incorrect to have the VIRTIO_NET_HDR_F_NEEDS_CSUM set when > >> checksum

Re: [PATCH] hw/net/net_tx_pkt: Fix virtio header without checksum offloading

2024-03-26 Thread Jason Wang
On Sun, Mar 24, 2024 at 4:32 PM Akihiko Odaki wrote: > > It is incorrect to have the VIRTIO_NET_HDR_F_NEEDS_CSUM set when > checksum offloading is disabled so clear the bit. Set the > VIRTIO_NET_HDR_F_DATA_VALID bit instead to tell the checksum is valid. > > TCP/UDP checksum is usually offloaded

Re: [PATCH 0/2] tap: Use g_spawn_sync() and g_spawn_check_wait_status()

2024-03-26 Thread Jason Wang
On Tue, Dec 19, 2023 at 7:59 PM Akihiko Odaki wrote: > > g_spawn_sync() gives an informative message if it fails to execute > the script instead of reporting exiting status 1. > > g_spawn_check_wait_status() also gives an message easier to understand > than the raw value returned by waitpid(). >

Re: [PATCH v2] Revert "tap: setting error appropriately when calling net_init_tap_one()"

2024-03-26 Thread Jason Wang
On Thu, Sep 21, 2023 at 5:48 PM Akihiko Odaki wrote: > > This reverts commit 46d4d36d0bf2b24b205f2f604f0905db80264eef. > > The reverted commit changed to emit warnings instead of errors when > vhost is requested but vhost initialization fails if vhostforce option > is not set. > > However,

Re: [PATCH v2] tap-win32: Remove unnecessary stubs

2024-03-26 Thread Jason Wang
On Mon, Feb 12, 2024 at 10:04 PM Akihiko Odaki wrote: > > Some of them are only necessary for POSIX systems. The others are > assigned to function pointers in NetClientInfo that can actually be > NULL. > > Signed-off-by: Akihiko Odaki > --- > Changes in v2: > - Rebased. > - Link to v1: >

Re: [External] : Re: [PATCH v4 2/2] vhost: Perform memory section dirty scans once per iteration

2024-03-25 Thread Jason Wang
On Tue, Mar 26, 2024 at 7:21 AM Si-Wei Liu wrote: > > > > On 3/24/2024 11:13 PM, Jason Wang wrote: > > On Sat, Mar 23, 2024 at 5:14 AM Si-Wei Liu wrote: > >> > >> > >> On 3/21/2024 10:08 PM, Jason Wang wrote: > >>> On Fri, Mar 22, 2024 a

Re: [PATCH v4 2/2] vhost: Perform memory section dirty scans once per iteration

2024-03-25 Thread Jason Wang
On Sat, Mar 23, 2024 at 5:14 AM Si-Wei Liu wrote: > > > > On 3/21/2024 10:08 PM, Jason Wang wrote: > > On Fri, Mar 22, 2024 at 5:43 AM Si-Wei Liu wrote: > >> > >> > >> On 3/20/2024 8:56 PM, Jason Wang wrote: > >>> On Thu, Mar 21, 2024 at 5

Re: [PATCH v4 2/2] vhost: Perform memory section dirty scans once per iteration

2024-03-21 Thread Jason Wang
On Fri, Mar 22, 2024 at 5:43 AM Si-Wei Liu wrote: > > > > On 3/20/2024 8:56 PM, Jason Wang wrote: > > On Thu, Mar 21, 2024 at 5:03 AM Si-Wei Liu wrote: > >> > >> > >> On 3/19/2024 8:27 PM, Jason Wang wrote: > >>> On Tue, Mar 19, 2024 at 6

Re: [PATCH v4 1/2] vhost: dirty log should be per backend type

2024-03-20 Thread Jason Wang
On Thu, Mar 21, 2024 at 4:29 AM Si-Wei Liu wrote: > > > > On 3/19/2024 8:25 PM, Jason Wang wrote: > > On Tue, Mar 19, 2024 at 6:06 AM Si-Wei Liu wrote: > >> > >> > >> On 3/17/2024 8:20 PM, Jason Wang wrote: > >>> On Sat, Mar 16, 2024 at 2

Re: [PATCH v4 2/2] vhost: Perform memory section dirty scans once per iteration

2024-03-20 Thread Jason Wang
On Thu, Mar 21, 2024 at 5:03 AM Si-Wei Liu wrote: > > > > On 3/19/2024 8:27 PM, Jason Wang wrote: > > On Tue, Mar 19, 2024 at 6:16 AM Si-Wei Liu wrote: > >> > >> > >> On 3/17/2024 8:22 PM, Jason Wang wrote: > >>> On Sat, Mar 16, 2024 at 2

Re: [PATCH] vhost-vdpa: check vhost_vdpa_set_vring_ready() return value

2024-03-19 Thread Jason Wang
On Mon, Mar 18, 2024 at 4:27 PM Stefano Garzarella wrote: > > On Mon, Mar 18, 2024 at 12:31:59PM +0800, Jason Wang wrote: > >On Fri, Mar 15, 2024 at 4:23 PM Stefano Garzarella > >wrote: > >> > >> On Thu, Mar 14, 2024 at 11:17:01AM +0800, Jason Wang wrote:

Re: Pending network patches

2024-03-19 Thread Jason Wang
On Wed, Mar 20, 2024 at 11:33 AM Akihiko Odaki wrote: > > Hi Jason, > > I have this and a few other network-related patches not reviewed. Can > you review them? > I have the following patches ready for review: > > https://patchew.org/QEMU/20240212-tap-v2-1-94e2ee18b...@daynix.com/ > ("[PATCH v2]

Re: [PATCH v4 2/2] vhost: Perform memory section dirty scans once per iteration

2024-03-19 Thread Jason Wang
On Tue, Mar 19, 2024 at 6:16 AM Si-Wei Liu wrote: > > > > On 3/17/2024 8:22 PM, Jason Wang wrote: > > On Sat, Mar 16, 2024 at 2:45 AM Si-Wei Liu wrote: > >> > >> > >> On 3/14/2024 9:03 PM, Jason Wang wrote: > >>> On Fri, Mar 15, 202

Re: [PATCH v4 1/2] vhost: dirty log should be per backend type

2024-03-19 Thread Jason Wang
On Tue, Mar 19, 2024 at 6:06 AM Si-Wei Liu wrote: > > > > On 3/17/2024 8:20 PM, Jason Wang wrote: > > On Sat, Mar 16, 2024 at 2:33 AM Si-Wei Liu wrote: > >> > >> > >> On 3/14/2024 8:50 PM, Jason Wang wrote: > >>> On Fri, Mar 15, 2024

Re: [PATCH] vhost-vdpa: check vhost_vdpa_set_vring_ready() return value

2024-03-17 Thread Jason Wang
On Fri, Mar 15, 2024 at 4:23 PM Stefano Garzarella wrote: > > On Thu, Mar 14, 2024 at 11:17:01AM +0800, Jason Wang wrote: > >On Wed, Feb 7, 2024 at 5:27 PM Stefano Garzarella > >wrote: > >> > >> vhost_vdpa_set_vring_ready() could already fail, but if L

Re: [PATCH for-9.0 v3] vdpa-dev: Fix initialisation order to restore VDUSE compatibility

2024-03-17 Thread Jason Wang
On Fri, Mar 15, 2024 at 11:59 PM Kevin Wolf wrote: > > VDUSE requires that virtqueues are first enabled before the DRIVER_OK > status flag is set; with the current API of the kernel module, it is > impossible to enable the opposite order in our block export code because > userspace is not

Re: [PATCH v4 2/2] vhost: Perform memory section dirty scans once per iteration

2024-03-17 Thread Jason Wang
On Sat, Mar 16, 2024 at 2:45 AM Si-Wei Liu wrote: > > > > On 3/14/2024 9:03 PM, Jason Wang wrote: > > On Fri, Mar 15, 2024 at 5:39 AM Si-Wei Liu wrote: > >> On setups with one or more virtio-net devices with vhost on, > >> dirty tracking iteration increases co

Re: [PATCH v4 1/2] vhost: dirty log should be per backend type

2024-03-17 Thread Jason Wang
On Sat, Mar 16, 2024 at 2:33 AM Si-Wei Liu wrote: > > > > On 3/14/2024 8:50 PM, Jason Wang wrote: > > On Fri, Mar 15, 2024 at 5:39 AM Si-Wei Liu wrote: > >> There could be a mix of both vhost-user and vhost-kernel clients > >> in the same QEMU p

Re: [PATCH v4 2/2] vhost: Perform memory section dirty scans once per iteration

2024-03-14 Thread Jason Wang
On Fri, Mar 15, 2024 at 5:39 AM Si-Wei Liu wrote: > > On setups with one or more virtio-net devices with vhost on, > dirty tracking iteration increases cost the bigger the number > amount of queues are set up e.g. on idle guests migration the > following is observed with virtio-net with vhost=on:

Re: [PATCH v4 1/2] vhost: dirty log should be per backend type

2024-03-14 Thread Jason Wang
On Fri, Mar 15, 2024 at 5:39 AM Si-Wei Liu wrote: > > There could be a mix of both vhost-user and vhost-kernel clients > in the same QEMU process, where separate vhost loggers for the > specific vhost type have to be used. Make the vhost logger per > backend type, and have them properly reference

Re: [PATCH] hw/virtio: Add support for VDPA network simulation devices

2024-03-13 Thread Jason Wang
On Thu, Mar 14, 2024 at 3:52 AM Michael S. Tsirkin wrote: > > On Wed, Mar 13, 2024 at 07:51:08PM +0100, Thomas Weißschuh wrote: > > On 2024-02-21 15:38:02+0800, Hao Chen wrote: > > > This patch adds support for VDPA network simulation devices. > > > The device is developed based on virtio-net and

Re: [PATCH] vhost-vdpa: check vhost_vdpa_set_vring_ready() return value

2024-03-13 Thread Jason Wang
On Wed, Feb 7, 2024 at 5:27 PM Stefano Garzarella wrote: > > vhost_vdpa_set_vring_ready() could already fail, but if Linux's > patch [1] will be merged, it may fail with more chance if > userspace does not activate virtqueues before DRIVER_OK when > VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK is not

Re: [PATCH v2 1/6] virtio/virtio-pci: Handle extra notification data

2024-03-13 Thread Jason Wang
On Wed, Mar 13, 2024 at 7:55 PM Jonah Palmer wrote: > > Add support to virtio-pci devices for handling the extra data sent > from the driver to the device when the VIRTIO_F_NOTIFICATION_DATA > transport feature has been negotiated. > > The extra data that's passed to the virtio-pci device when

Re: [PULL 0/8] Net patches

2024-03-13 Thread Jason Wang
On Wed, Mar 13, 2024 at 1:56 AM Michael Tokarev wrote: > > 12.03.2024 14:36, Jason Wang wrote: > ... > > > > Andrew Melnychenko (5): > >ebpf: Added eBPF map update through mmap. > >

Re: [PATCH v9 0/5] eBPF RSS through QMP support.

2024-03-12 Thread Jason Wang
workaround (due to schedule pressure) since yesterday was a soft freeze and I don't want to miss it again. The pull request has been merged. Please fix that on top (add some tracing back probably). Thanks > > On Fri, Mar 8, 2024 at 10:06 AM Jason Wang wrote: > > > > On Fri,

Re: [PATCH v9 4/5] qmp: Added new command to retrieve eBPF blob.

2024-03-12 Thread Jason Wang
On Wed, Mar 13, 2024 at 7:13 AM Andrew Melnichenko wrote: > > Hi all, > I've checked - apparently, qapi/ebpf.json should be added to > MAINTAINERS - I'll fix it. I've fixed this by myself and the pull request has been merged. Thanks > > On Fri, Mar 8, 2024 at 10:14 AM

[PULL 5/8] ebpf: Added eBPF initialization by fds.

2024-03-12 Thread Jason Wang
From: Andrew Melnychenko It allows using file descriptors of eBPF provided outside of QEMU. QEMU may be run without capabilities for eBPF and run RSS program provided by management tool(g.e. libvirt). Signed-off-by: Andrew Melnychenko Signed-off-by: Jason Wang --- ebpf/ebpf_rss-stub.c | 6

[PULL 3/8] Avoid unaligned fetch in ladr_match()

2024-03-12 Thread Jason Wang
://gitlab.com/qemu-project/qemu/-/issues/2143 Signed-off-by: Nick Briggs Reviewed-by: Peter Maydell Signed-off-by: Jason Wang --- hw/net/pcnet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/pcnet.c b/hw/net/pcnet.c index 494eab8479..ad675ab29d 100644 --- a/hw/net

[PULL 8/8] ebpf: Updated eBPF program and skeleton.

2024-03-12 Thread Jason Wang
changed fragmentation flag check - some TCP/UDP packets may be considered fragmented if DF flag is set. Signed-off-by: Andrew Melnychenko Signed-off-by: Jason Wang --- ebpf/rss.bpf.skeleton.h | 1343 --- meson.build | 10 +- tools/ebpf/rss.bpf.c

[PULL 6/8] virtio-net: Added property to load eBPF RSS with fds.

2024-03-12 Thread Jason Wang
From: Andrew Melnychenko eBPF RSS program and maps may now be passed during initialization. Initially was implemented for libvirt to launch qemu without permissions, and initialized eBPF program through the helper. Signed-off-by: Andrew Melnychenko Signed-off-by: Jason Wang --- hw/net/virtio

[PULL 2/8] e1000e: fix link state on resume

2024-03-12 Thread Jason Wang
up": false}} {"execute": "cont" } To fix the problem, merge the content of e1000e_vm_state_change() into e1000e_core_post_load() as e1000 does. Buglink: https://issues.redhat.com/browse/RHEL-21867 Fixes: 6f3fbe4ed06a ("net: Introduce e1000e device emulation") Suggest

[PULL 7/8] qmp: Added new command to retrieve eBPF blob.

2024-03-12 Thread Jason Wang
Signed-off-by: Jason Wang --- ebpf/ebpf.c | 69 +++ ebpf/ebpf.h | 29 ++ ebpf/ebpf_rss.c | 11 --- ebpf/meson.build | 2 +- ebpf/trace.h | 1 - qapi/ebpf.json

[PULL 4/8] ebpf: Added eBPF map update through mmap.

2024-03-12 Thread Jason Wang
From: Andrew Melnychenko Changed eBPF map updates through mmaped array. Mmaped arrays provide direct access to map data. It should omit using bpf_map_update_elem() call, which may require capabilities that are not present. Signed-off-by: Andrew Melnychenko Signed-off-by: Jason Wang --- ebpf

[PULL 1/8] igb: fix link state on resume

2024-03-12 Thread Jason Wang
up": false}} {"execute": "cont" } To fix the problem, merge the content of igb_vm_state_change() into igb_core_post_load() as e1000 does. Buglink: https://issues.redhat.com/browse/RHEL-21867 Fixes: 3a977deebe6b ("Intrdocue igb device emulation") Cc: akihiko.od...@daynix.com Sugg

[PULL 0/8] Net patches

2024-03-12 Thread Jason Wang
The following changes since commit 05ec974671200814fa5c1d5db710e0e4b88a40af: Merge tag 'm68k-for-9.0-pull-request' of https://github.com/vivier/qemu-m68k into staging (2024-03-11 18:42:53 +) are available in the Git repository at: https://github.com/jasowang/qemu.git

Re: [PATCH v9 4/5] qmp: Added new command to retrieve eBPF blob.

2024-03-08 Thread Jason Wang
On Tue, Feb 6, 2024 at 12:55 AM Andrew Melnychenko wrote: > > Now, the binary objects may be retrieved by id. > It would require for future qmp commands that may require specific > eBPF blob. > > Added command "request-ebpf". This command returns > eBPF program encoded base64. The program taken

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

2024-03-08 Thread Jason Wang
On Tue, Mar 5, 2024 at 6:07 PM Laurent Vivier wrote: > > On 2/1/24 06:45, Jason Wang wrote: > > On Wed, Jan 24, 2024 at 6:40 PM Laurent Vivier wrote: > >> > >> On resume e1000e_vm_state_change() always calls e1000e_autoneg_resume() > >> that sets link_dow

Re: [PATCH v9 0/5] eBPF RSS through QMP support.

2024-03-08 Thread Jason Wang
On Fri, Mar 8, 2024 at 2:30 PM Jason Wang wrote: > > On Mon, Feb 26, 2024 at 6:23 PM Andrew Melnichenko wrote: > > > > Hi all, > > Jason, can you please review the patch set, thank you. > > Queued. > > Thanks This seems to fail CI at: https://gitlab.com/jas

Re: [PATCH v9 0/5] eBPF RSS through QMP support.

2024-03-07 Thread Jason Wang
On Mon, Feb 26, 2024 at 6:23 PM Andrew Melnichenko wrote: > > Hi all, > Jason, can you please review the patch set, thank you. Queued. Thanks

Re: [PATCH v1 0/8] virtio, vhost: Add VIRTIO_F_NOTIFICATION_DATA support

2024-03-05 Thread Jason Wang
On Tue, Mar 5, 2024 at 3:46 AM Jonah Palmer wrote: > > The goal of these patches are to add support to a variety of virtio and > vhost devices for the VIRTIO_F_NOTIFICATION_DATA transport feature. This > feature indicates that a driver will pass extra data (instead of just a > virtqueue's index)

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

2024-03-05 Thread Jason Wang
Hi Laurent: On Tue, Mar 5, 2024 at 6:07 PM Laurent Vivier wrote: > > On 2/1/24 06:45, Jason Wang wrote: > > On Wed, Jan 24, 2024 at 6:40 PM Laurent Vivier wrote: > >> > >> On resume e1000e_vm_state_change() always calls e1000e_autoneg_resume() > >>

Re: [PATCH v1 0/6] Check and sync host IOMMU cap/ecap with vIOMMU

2024-03-03 Thread Jason Wang
On Wed, Feb 28, 2024 at 5:46 PM Zhenzhong Duan wrote: > > Hi, > > Based on Joao's suggestion, the iommufd nesting prerequisite series [1] > is further splitted to host IOMMU device abstract part [2] and vIOMMU > check/sync part. This series implements the 2nd part. > > This enables vIOMMU to get

Re: [PATCH v2] virtio-pci: correctly set virtio pci queue mem multiplier

2024-02-25 Thread Jason Wang
On Tue, Feb 20, 2024 at 3:41 PM Michael S. Tsirkin wrote: > > On Tue, Feb 20, 2024 at 12:39:35PM +0530, Srujana Challa wrote: > > Currently, virtio_pci_queue_mem_mult function always returns 4K > > when VIRTIO_PCI_FLAG_PAGE_PER_VQ is set. But this won't > > work for vhost vdpa when host has page

Re: Re: Re: [PATCH] vdpa-dev: Fix initialisation order to restore VDUSE compatibility

2024-02-07 Thread Jason Wang
On Wed, Feb 7, 2024 at 4:47 PM Stefano Garzarella wrote: > > On Wed, Feb 07, 2024 at 11:17:34AM +0800, Jason Wang wrote: > >On Tue, Feb 6, 2024 at 4:31 PM Stefano Garzarella > >wrote: > >> > >> On Tue, Feb 06, 2024 at 10:47:40AM +0800, Jason Wang wrote:

Re: Re: [PATCH] vdpa-dev: Fix initialisation order to restore VDUSE compatibility

2024-02-06 Thread Jason Wang
On Tue, Feb 6, 2024 at 4:31 PM Stefano Garzarella wrote: > > On Tue, Feb 06, 2024 at 10:47:40AM +0800, Jason Wang wrote: > >On Mon, Feb 5, 2024 at 6:51 PM Stefano Garzarella > >wrote: > >> > >> On Fri, Feb 02, 2024 at 02:25:21PM +0100, Kevin Wolf wrote:

Re: [PATCH] vdpa-dev: Fix initialisation order to restore VDUSE compatibility

2024-02-05 Thread Jason Wang
On Mon, Feb 5, 2024 at 6:51 PM Stefano Garzarella wrote: > > On Fri, Feb 02, 2024 at 02:25:21PM +0100, Kevin Wolf wrote: > >VDUSE requires that virtqueues are first enabled before the DRIVER_OK > >status flag is set; with the current API of the kernel module, it is > >impossible to enable the

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

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

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

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

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

2024-01-31 Thread Jason Wang
re-add that device to this or other QEMU instances until > the first instance of QEMU is finished. > > Move the cleanup from qemu_cleanup to the NIC deletion. > > Fixes: a0d7215e33 ("vhost-vdpa: do not cleanup the vdpa/vhost-net structures > if peer nic is present") >

[PULL 1/1] virtio-net: correctly copy vnet header when flushing TX

2024-01-25 Thread Jason Wang
Benditovich Cc: qemu-sta...@nongnu.org Cc: Mauro Matteo Cascella Fixes: CVE-2023-6693 Fixes: e22f0603fb2f ("virtio-net: reference implementation of hash report") Reviewed-by: Michael Tokarev Signed-off-by: Jason Wang --- hw/net/virtio-net.c | 13 + 1 file changed, 9 insert

  1   2   3   4   5   6   7   8   9   10   >