he
> vitio is broken at QEMU side.
>
> Fix it by not sending RSS commands if the feature is not available in
> the device.
>
> Fixes: c7114b1249fa ("drivers/net/virtio_net: Added basic RSS support.")
> Cc: sta...@vger.kernel.org
> Cc: qemu-devel@nongnu.org
> Sig
On Mon, 25 Mar 2024 04:26:08 -0700, Breno Leitao wrote:
> Hello Xuan,
>
> On Mon, Mar 25, 2024 at 01:57:53PM +0800, Xuan Zhuo wrote:
> > On Fri, 22 Mar 2024 03:21:21 -0700, Breno Leitao wrote:
> > > Hello Xuan,
> > >
> > > On Fri, Mar 22, 2024 at 10:00:2
On Fri, 22 Mar 2024 03:21:21 -0700, Breno Leitao wrote:
> Hello Xuan,
>
> On Fri, Mar 22, 2024 at 10:00:22AM +0800, Xuan Zhuo wrote:
> > On Thu, 21 Mar 2024 09:54:30 -0700, Breno Leitao wrote:
>
> > > 4) Since the command above does not have a key, then the last
&g
On Wed, 20 Mar 2024 00:24:37 +0300, "Vladimir Sementsov-Ogievskiy"
wrote:
> Hi all!
>
> From fuzzing I've got a fuzz-data, which produces the following crash:
>
> qemu-fuzz-x86_64: ../hw/net/virtio-net.c:134: void
> flush_or_purge_queued_packets(NetClientState *): Assertion
>
On Thu, 21 Mar 2024 09:54:30 -0700, Breno Leitao wrote:
> There is a bug when setting the RSS options in virtio_net that can break
> the whole machine, getting the kernel into an infinite loop.
>
> Running the following command in any QEMU virtual machine with virtionet
> will reproduce this
On Mon, 8 May 2023 11:09:46 +0200, Eugenio Perez Martin
wrote:
> On Sat, May 6, 2023 at 4:25 AM Xuan Zhuo wrote:
> >
> > On Thu, 4 May 2023 12:14:47 +0200, =?utf-8?q?Eugenio_P=C3=A9rez?=
> > wrote:
> > > The commit 93a97dc5200a ("virtio-net
On Mon, 8 May 2023 14:44:21 +0800, Jason Wang wrote:
> On Sun, May 7, 2023 at 2:01 PM Michael S. Tsirkin wrote:
> >
> > On Sat, May 06, 2023 at 10:13:36AM +0800, Xuan Zhuo wrote:
> > > On Thu, 4 May 2023 12:14:47 +0200, =?utf-8?q?Eugenio_P=C3=A9rez?=
> >
On Thu, 4 May 2023 12:14:47 +0200, =?utf-8?q?Eugenio_P=C3=A9rez?=
wrote:
> The commit 93a97dc5200a ("virtio-net: enable vq reset feature") enables
> unconditionally vq reset feature as long as the device is emulated.
> This makes impossible to actually disable the feature, and it causes
>
Cc: LIU Zhiwei
> Cc: Xuan Zhuo
> Cc: Guo Ren
Reviewed-by: Xuan Zhuo
Thanks.
> ---
> contrib/gitdm/domain-map| 1 +
> contrib/gitdm/group-map-alibaba | 7 +++
> gitdm.config| 1 +
> 3 files changed, 9 insertions(+)
> create mode 10
For async tx, virtio_net_tx_complete() is called when purge or flush
operation is done. But for purge operation, we should not try to flush
new packet from tx queue. The purge operation means we will stop the
queue soon.
Signed-off-by: Xuan Zhuo
---
hw/net/virtio-net.c | 32
ent again. This leads to asserted.
assert(!virtio_net_get_subqueue(nc)->async_tx.elem);
v2:
1. fix by stop flush inside virtio_net_tx_complete() when purge packets.
v1:
1. rename "reset" to disabled_by_reset
2. add api: virtio_queue_reset_state()
Xuan Zhuo (
mu-project/qemu/-/issues/1451
Reported-by: Alexander Bulekov
Signed-off-by: Xuan Zhuo
---
hw/net/virtio-net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index 6daa1e5ac1..2ac6d3dad9 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/vi
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 Sun, 29 Jan 2023 07:15:47 -0500, "Michael S. Tsirkin"
> > > w
On Tue, 31 Jan 2023 11:27:42 +0800, Jason Wang wrote:
> 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 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:
> > > On Mon, Jan 30, 2023 at 1:32 PM Michael S. Tsirkin
> > > 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 Sun, 29 Jan 2023 07:15:47 -0500, "Michael S. Tsirkin"
> > > w
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:
> > > On Sun, Jan 29, 2023 at 10:52 AM 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 -0500, "Michael S. Tsirkin"
> > wrote:
> > > On Sun, Jan 29, 2023 at 04:23:08PM +0800, Xua
On Sun, 29 Jan 2023 06:57:29 -0500, "Michael S. Tsirkin"
wrote:
> On Sun, Jan 29, 2023 at 04:23:08PM +0800, Xuan Zhuo wrote:
> > On Sun, 29 Jan 2023 03:12:12 -0500, "Michael S. Tsirkin"
> > wrote:
> > > On Sun, Jan 29, 2023 at 03:28:28PM +0800, Xua
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 -0500, "Michael S. Tsirkin"
> > wrote:
> > > On Sun, Jan 29, 2023 at 04:23:08PM +0800, Xua
On Sun, 29 Jan 2023 03:12:12 -0500, "Michael S. Tsirkin"
wrote:
> On Sun, Jan 29, 2023 at 03:28:28PM +0800, Xuan Zhuo wrote:
> > On Sun, 29 Jan 2023 02:25:43 -0500, "Michael S. Tsirkin"
> > wrote:
> > > On Sun, Jan 29, 2023 at 10:51:50AM +0800, Xuan
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().
> >
> > Before per-queue reset, we need to recover async tx resources. At this
&g
On Sun, 29 Jan 2023 02:37:22 -0500, "Michael S. Tsirkin"
wrote:
> On Sun, Jan 29, 2023 at 03:15:16PM +0800, Xuan Zhuo wrote:
> > On Sun, 29 Jan 2023 02:12:36 -0500, "Michael S. Tsirkin"
> > wrote:
> > >
> > > subject seems wrong.
> >
On Sun, 29 Jan 2023 02:25:43 -0500, "Michael S. Tsirkin"
wrote:
> On Sun, Jan 29, 2023 at 10:51:50AM +0800, 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
On Sun, 29 Jan 2023 02:12:36 -0500, "Michael S. Tsirkin"
wrote:
>
> subject seems wrong.
Will fix.
>
> On Sun, Jan 29, 2023 at 10:51:49AM +0800, Xuan Zhuo wrote:
> > In the current design, we stop the device from operating on the vring
> > during per-queu
ed_by_reset
2. add api: virtio_queue_reset_state()
Xuan Zhuo (2):
virtio: struct VirtQueue introduce reset
virtio-net: virtio_net_flush_tx() check for per-queue reset
hw/net/virtio-net.c| 3 ++-
hw/virtio/virtio.c | 15 +++
include/hw/virtio/virtio.h | 1 +
3 files changed, 18
sending resources, virtio-net should be able
to perceive that the current queue is in the per-queue reset state, and
stop sending new packets from the tx queue.
Signed-off-by: Xuan Zhuo
---
hw/virtio/virtio.c | 15 +++
include/hw/virtio/virtio.h | 1 +
2 files changed, 16
.
Fixes: 7dc6be52 ("virtio-net: support queue reset")
Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1451
Reported-by: Alexander Bulekov
Signed-off-by: Xuan Zhuo
---
hw/net/virtio-net.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/net/virtio-net.c b/hw/
On Sat, 28 Jan 2023 05:22:05 -0500, "Michael S. Tsirkin"
wrote:
> On Sat, Jan 28, 2023 at 03:17:23PM +0800, Xuan Zhuo wrote:
> > In the current design, we stop the device from operating on the vring
> > during per-queue reset by resetting the structure VirtQueue.
>
On Sat, 28 Jan 2023 05:23:46 -0500, "Michael S. Tsirkin"
wrote:
> On Sat, Jan 28, 2023 at 03:17:22PM +0800, Xuan Zhuo wrote:
> > This patch move struct VirtQueue into virtio.h.
> >
> > In order to implement Queue Reset, we have to record the queue reset
&g
This patch move struct VirtQueue into virtio.h.
In order to implement Queue Reset, we have to record the queue reset
status of in struct VirtQueue and provide it to device.
Signed-off-by: Xuan Zhuo
---
hw/virtio/virtio.c | 49 ---
include/hw/virtio
ent again. This leads to asserted.
assert(!virtio_net_get_subqueue(nc)->async_tx.elem);
This patch set introduce new item "reset" into struct VirtQueue, then device can
know this virtqueue is per-queue reset state.
Xuan Zhuo (3):
virtio: move struct VirtQueue to include file
.
Fixes: 7dc6be52 ("virtio-net: support queue reset")
Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1451
Reported-by: Alexander Bulekov
Signed-off-by: Xuan Zhuo
---
hw/net/virtio-net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/net/virtio-net.c b/hw/net/vi
asynchronous sending resources, virtio-net should be able
to perceive that the current queue is in the per-queue reset state, and
stop sending new packets from the tx queue.
Signed-off-by: Xuan Zhuo
---
hw/virtio/virtio.c | 8
include/hw/virtio/virtio.h | 3 +++
2 files changed, 11
VIRTIO_QUEUE_MAX but greater or equal
than cvq index could hit this. Other devices are similar.
Signed-off-by: Xuan Zhuo
---
hw/net/virtio-net.c| 18 --
include/hw/virtio/virtio.h | 2 ++
2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/hw/net/virtio-net.c b/hw/
On Thu, 10 Nov 2022 17:18:23 +0800, Jason Wang wrote:
> On Thu, Nov 10, 2022 at 4:28 PM Xuan Zhuo wrote:
> >
> > Run shell script:
> >
> > cat << EOF | valgrind qemu-system-i386 -display none -machine
> > accel=qtest, -m \
> > 512M -M q
tps://gitlab.com/qemu-project/qemu/-/issues/1309
Here, the queue_index is the index of the cvq, but cvq does not have the
corresponding NetClientState, so overflow appears.
I add a check here, ignore illegal queue_index and cvq queue_index.
Signed-off-by: Xuan Zhuo
---
hw/net/v
On Thu, 10 Nov 2022 13:18:54 +0800, Jason Wang wrote:
> On Thu, Nov 10, 2022 at 1:12 PM Michael S. Tsirkin wrote:
> >
> > Xuan Zhuo pls take a look ASAP.
> >
> > On Thu, Nov 10, 2022 at 03:04:41AM +, Alexander Bulekov (@a1xndr) wrote:
> > Alexande
On Thu, 10 Nov 2022 00:11:00 -0500, "Michael S. Tsirkin"
wrote:
> Xuan Zhuo pls take a look ASAP.
>
> On Thu, Nov 10, 2022 at 03:04:41AM +, Alexander Bulekov (@a1xndr) wrote:
> Alexander Bulekov created an issue: #1309
>
> Hello,
>
> I bisected this
On Wed, 9 Nov 2022 09:46:18 -0500, "Michael S. Tsirkin" wrote:
> On Wed, Nov 09, 2022 at 07:10:21PM +0800, Xuan Zhuo wrote:
> > In virtio_queue_enable(), we checked virtio feature VIRTIO_F_VERSION_1.
> >
> > This check is not necessary, and conflict with Se
In virtio_queue_enable(), we checked virtio feature VIRTIO_F_VERSION_1.
This check is not necessary, and conflict with SeaBIOS. The problem
appeared in SeaBIOS. But we also remove this check.
Link: https://www.mail-archive.com/qemu-devel@nongnu.org/msg920538.html
Signed-off-by: Xuan Zhuo
On Wed, 9 Nov 2022 02:04:17 -0500, "Michael S. Tsirkin" wrote:
> On Wed, Nov 09, 2022 at 02:56:01PM +0800, Xuan Zhuo wrote:
> > On Wed, 9 Nov 2022 14:55:03 +0800, Jason Wang wrote:
> > >
> > > 在 2022/11/9 14:51, Michael S. Tsirkin 写道:
> > > > On
On Wed, 9 Nov 2022 02:01:38 -0500, "Michael S. Tsirkin" wrote:
> On Wed, Nov 09, 2022 at 02:48:29PM +0800, Xuan Zhuo wrote:
> > On Wed, 9 Nov 2022 01:39:32 -0500, "Michael S. Tsirkin"
> > wrote:
> > > On Wed, Nov 09, 2022 at 11:31:23AM +0800, Jason
ON_Q_ENABLE is written and related virtqueue can be
> >>>> started. It only supports the devices of virtio 1 or later. The
> >>>> not-supported devices can only start the virtqueue when DRIVER_OK.
> >>>>
> >>>> Signed-off-by: Kangjie Xu
>
LE is written and related virtqueue can be
> > > > started. It only supports the devices of virtio 1 or later. The
> > > > not-supported devices can only start the virtqueue when DRIVER_OK.
> > > >
> > > > Signed-off-by: Kangjie Xu
> > > >
From: Kangjie Xu
PCI devices support device specific vq enable.
Based on this function, the driver can re-enable the virtqueue after the
virtqueue is reset.
Signed-off-by: Kangjie Xu
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
hw/virtio/virtio-pci.c | 1 +
1 file changed, 1 insertion
needs the lock. As a result, when migration of virtio
devices starts, the 'reset' status of VirtIOPCIQueue will always be 0.
Thus, we do not need to add it in vmstate_virtio_pci_modern_queue_state.
Signed-off-by: Xuan Zhuo
Signed-off-by: Kangjie Xu
Acked-by: Jason Wang
---
hw/virtio/virtio-pci.c
From: Kangjie Xu
Add virtqueue reset feature for vhost-kernel.
Signed-off-by: Kangjie Xu
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
hw/net/vhost_net.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c
index d2926e2ed6..53b2fac4f6 100644
() and virtio_net_flush_tx() will not receive
or send packets.
For vhost-net, the datapath will be disabled in vhost_net_virtqueue_reset().
Signed-off-by: Xuan Zhuo
Signed-off-by: Kangjie Xu
Acked-by: Jason Wang
---
hw/net/virtio-net.c | 18 ++
1 file changed, 18 insertions(+)
diff --git a/hw/net
at queue pair level. The mem table and features
do not change, so we can call the vhost_virtqueue_start() to
restart a specific queue.
This patch only considers the case of vhost-kernel, when
NetClientDriver is NET_CLIENT_DRIVER_TAP.
Signed-off-by: Kangjie Xu
Signed-off-by: Xuan Zhuo
Acked-by: Jason
his reset virtqueue here.
Signed-off-by: Kangjie Xu
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
hw/net/vhost_net-stub.c | 6 ++
hw/net/vhost_net.c | 25 +
include/net/vhost_net.h | 2 ++
3 files changed, 33 insertions(+)
diff --git a/hw/net/vhost_net-stub.c
devices can only start the virtqueue when DRIVER_OK.
Signed-off-by: Kangjie Xu
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
hw/virtio/virtio.c | 14 ++
include/hw/virtio/virtio.h | 2 ++
2 files changed, 16 insertions(+)
diff --git a/hw/virtio/virtio.c b/hw/virtio
_net_virtqueue_reset()
vhost-net: vhost-kernel: introduce vhost_net_virtqueue_restart()
virtio-net: introduce flush_or_purge_queued_packets()
virtio-net: support queue_enable
vhost: vhost-kernel: enable vq reset feature
Xuan Zhuo (5):
virtio: introduce __virtio_queue_reset()
vir
From: Kangjie Xu
A a new command line parameter "queue_reset" is added.
Meanwhile, the vq reset feature is disabled for pre-7.2 machines.
Signed-off-by: Kangjie Xu
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
hw/core/machine.c | 4 +++-
include/hw/virtio/virtio.h |
Introduce a new interface function virtio_queue_reset() to implement
reset for vq.
Add a new callback to VirtioDeviceClass for queue reset operation for
each child device.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
hw/virtio/virtio.c | 11 +++
include/hw/virtio/virtio.h
and all vqs are not initalized until VIRTIO_PCI_COMMON_STATUS
is written. Thus, we should use vhost_started to differentiate the
two cases: vq reset and device start.
Currently it only supports vhost-kernel.
Signed-off-by: Kangjie Xu
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
hw/net/virtio
From: Kangjie Xu
Expose vhost_virtqueue_stop(), we need to use it when resetting a
virtqueue.
Signed-off-by: Kangjie Xu
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
hw/virtio/vhost.c | 8
include/hw/virtio/vhost.h | 2 ++
2 files changed, 6 insertions(+), 4 deletions
From: Kangjie Xu
Introduce the fucntion flush_or_purge_queued_packets(), it will be
used in device reset and virtqueue reset. Therefore, we extract the
common logic as a new function.
Signed-off-by: Kangjie Xu
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
hw/net/virtio-net.c | 17
Add virtqueue reset feature for virtio-net
Signed-off-by: Xuan Zhuo
---
hw/net/virtio-net.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index f5adba45d5..975bbc22f9 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -788,6 +788,7
From: Kangjie Xu
Expose vhost_virtqueue_start(), we need to use it when restarting a
virtqueue.
Signed-off-by: Kangjie Xu
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
hw/virtio/vhost.c | 8
include/hw/virtio/vhost.h | 3 +++
2 files changed, 7 insertions(+), 4
Separate the logic of vq reset. This logic will be called directly
later.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
hw/virtio/virtio.c | 37 +
1 file changed, 21 insertions(+), 16 deletions(-)
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
On Thu, 15 Sep 2022 10:12:11 +0800, Jason Wang wrote:
> On Wed, Sep 14, 2022 at 2:21 PM Xuan Zhuo wrote:
> >
> > On Wed, 14 Sep 2022 11:13:29 +0800, Jason Wang wrote:
> > >
> > > 在 2022/9/12 11:10, Kangjie Xu 写道:
> > > > Update vhost_
On Thu, 15 Sep 2022 10:12:11 +0800, Jason Wang wrote:
> On Wed, Sep 14, 2022 at 2:21 PM Xuan Zhuo wrote:
> >
> > On Wed, 14 Sep 2022 11:13:29 +0800, Jason Wang wrote:
> > >
> > > 在 2022/9/12 11:10, Kangjie Xu 写道:
> > > > Update vhost_
q_index behave
> > differently for vhost-user.
> >
> > Signed-off-by: Kangjie Xu
> > Signed-off-by: Xuan Zhuo
> > ---
> > hw/net/vhost_net.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net
and all vqs are not initalized until VIRTIO_PCI_COMMON_STATUS
is written. Thus, we should use vhost_started to differentiate the
two cases: vq reset and device start.
Currently it only supports vhost-kernel.
Signed-off-by: Kangjie Xu
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
hw/net/virtio
From: Kangjie Xu
Expose vhost_virtqueue_stop(), we need to use it when resetting a
virtqueue.
Signed-off-by: Kangjie Xu
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
hw/virtio/vhost.c | 8
include/hw/virtio/vhost.h | 2 ++
2 files changed, 6 insertions(+), 4 deletions
ue_enable
vhost: vhost-kernel: enable vq reset feature
Xuan Zhuo (5):
virtio: sync relevant definitions with linux
virtio: introduce __virtio_queue_reset()
virtio: introduce virtio_queue_reset()
virtio-pci: support queue reset
virtio-net: support queue reset
hw/core/machine.c
() and virtio_net_flush_tx() will not receive
or send packets.
For vhost-net, the datapath will be disabled in vhost_net_virtqueue_reset().
Signed-off-by: Xuan Zhuo
Signed-off-by: Kangjie Xu
Acked-by: Jason Wang
---
hw/net/virtio-net.c | 18 ++
1 file changed, 18 insertions(+)
diff --git a/hw/net
at queue pair level. The mem table and features
do not change, so we can call the vhost_virtqueue_start() to
restart a specific queue.
This patch only considers the case of vhost-kernel, when
NetClientDriver is NET_CLIENT_DRIVER_TAP.
Signed-off-by: Kangjie Xu
Signed-off-by: Xuan Zhuo
---
hw/net
From: Kangjie Xu
PCI devices support device specific vq enable.
Based on this function, the driver can re-enable the virtqueue after the
virtqueue is reset.
Signed-off-by: Kangjie Xu
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
hw/virtio/virtio-pci.c | 1 +
1 file changed, 1 insertion
://github.com/oasis-tcs/virtio-spec/issues/89
Signed-off-by: Xuan Zhuo
Signed-off-by: Kangjie Xu
Acked-by: Jason Wang
---
include/standard-headers/linux/virtio_config.h | 5 +
include/standard-headers/linux/virtio_pci.h| 2 ++
2 files changed, 7 insertions(+)
diff --git a/include/standard
Introduce a new interface function virtio_queue_reset() to implement
reset for vq.
Add a new callback to VirtioDeviceClass for queue reset operation for
each child device.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
hw/virtio/virtio.c | 11 +++
include/hw/virtio/virtio.h
needs the lock. As a result, when migration of virtio
devices starts, the 'reset' status of VirtIOPCIQueue will always be 0.
Thus, we do not need to add it in vmstate_virtio_pci_modern_queue_state.
Signed-off-by: Xuan Zhuo
Signed-off-by: Kangjie Xu
Acked-by: Jason Wang
---
hw/virtio/virtio-pci.c
From: Kangjie Xu
Add virtqueue reset feature for vhost-kernel.
Signed-off-by: Kangjie Xu
Signed-off-by: Xuan Zhuo
---
hw/net/vhost_net.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c
index d2926e2ed6..53b2fac4f6 100644
--- a/hw/net/vhost_net.c
From: Kangjie Xu
Introduce the fucntion flush_or_purge_queued_packets(), it will be
used in device reset and virtqueue reset. Therefore, we extract the
common logic as a new function.
Signed-off-by: Kangjie Xu
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
hw/net/virtio-net.c | 17
From: Kangjie Xu
Expose vhost_virtqueue_start(), we need to use it when restarting a
virtqueue.
Signed-off-by: Kangjie Xu
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
hw/virtio/vhost.c | 8
include/hw/virtio/vhost.h | 3 +++
2 files changed, 7 insertions(+), 4
From: Kangjie Xu
A a new command line parameter "queue_reset" is added.
Meanwhile, the vq reset feature is disabled for pre-7.2 machines.
Signed-off-by: Kangjie Xu
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
hw/core/machine.c | 4 +++-
include/hw/virtio/virtio.h |
his reset virtqueue here.
Signed-off-by: Kangjie Xu
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
hw/net/vhost_net.c | 25 +
include/net/vhost_net.h | 2 ++
2 files changed, 27 insertions(+)
diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c
index d28f8b974b..8
devices can only start the virtqueue when DRIVER_OK.
Signed-off-by: Kangjie Xu
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
hw/virtio/virtio.c | 14 ++
include/hw/virtio/virtio.h | 2 ++
2 files changed, 16 insertions(+)
diff --git a/hw/virtio/virtio.c b/hw/virtio
Separate the logic of vq reset. This logic will be called directly
later.
Signed-off-by: Xuan Zhuo
Acked-by: Jason Wang
---
hw/virtio/virtio.c | 37 +
1 file changed, 21 insertions(+), 16 deletions(-)
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
On Tue, 16 Aug 2022 02:22:16 -0400, "Michael S. Tsirkin"
wrote:
> On Tue, Aug 16, 2022 at 02:15:57PM +0800, Xuan Zhuo wrote:
> > On Tue, 16 Aug 2022 02:14:10 -0400, "Michael S. Tsirkin"
> > wrote:
> > > On Tue, Aug 16, 2022 at 09:06:12AM +0800, Kang
eue enable
> > vhost: extract the logic of unmapping the vrings and desc
> > vhost: introduce vhost_dev_virtqueue_stop()
> > vhost: introduce vhost_dev_virtqueue_restart()
> > vhost-net: vhost-kernel: introduce vhost_net_virtqueue_stop()
> > vhost-net: vhost-
82 matches
Mail list logo