[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v2 38/82] virtio: core: vq reset feature negotation support
From: |
Michael S. Tsirkin |
Subject: |
[PULL v2 38/82] virtio: core: vq reset feature negotation support |
Date: |
Wed, 2 Nov 2022 12:10:06 -0400 |
From: Kangjie Xu <kangjie.xu@linux.alibaba.com>
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 <kangjie.xu@linux.alibaba.com>
Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20221017092558.111082-5-xuanzhuo@linux.alibaba.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/hw/virtio/virtio.h | 4 +++-
hw/core/machine.c | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h
index 5cd7861aeb..18a8920cc0 100644
--- a/include/hw/virtio/virtio.h
+++ b/include/hw/virtio/virtio.h
@@ -313,7 +313,9 @@ typedef struct VirtIORNGConf VirtIORNGConf;
DEFINE_PROP_BIT64("iommu_platform", _state, _field, \
VIRTIO_F_IOMMU_PLATFORM, false), \
DEFINE_PROP_BIT64("packed", _state, _field, \
- VIRTIO_F_RING_PACKED, false)
+ VIRTIO_F_RING_PACKED, false), \
+ DEFINE_PROP_BIT64("queue_reset", _state, _field, \
+ VIRTIO_F_RING_RESET, true)
hwaddr virtio_queue_get_desc_addr(VirtIODevice *vdev, int n);
bool virtio_queue_enabled_legacy(VirtIODevice *vdev, int n);
diff --git a/hw/core/machine.c b/hw/core/machine.c
index aa520e74a8..907fa78ff0 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -40,7 +40,9 @@
#include "hw/virtio/virtio-pci.h"
#include "qom/object_interfaces.h"
-GlobalProperty hw_compat_7_1[] = {};
+GlobalProperty hw_compat_7_1[] = {
+ { "virtio-device", "queue_reset", "false" },
+};
const size_t hw_compat_7_1_len = G_N_ELEMENTS(hw_compat_7_1);
GlobalProperty hw_compat_7_0[] = {
--
MST
- Re: [PULL v2 31/82] vhost: Change the sequence of device start, (continued)
- Re: [PULL v2 31/82] vhost: Change the sequence of device start, Bernhard Beschow, 2022/11/05
- Re: [PULL v2 31/82] vhost: Change the sequence of device start, Michael S. Tsirkin, 2022/11/05
- Re: [PULL v2 31/82] vhost: Change the sequence of device start, Christian A. Ehrhardt, 2022/11/06
- Re: [PULL v2 31/82] vhost: Change the sequence of device start, Michael S. Tsirkin, 2022/11/07
- Re: [PULL v2 31/82] vhost: Change the sequence of device start, Christian A. Ehrhardt, 2022/11/07
- Re: [PULL v2 31/82] vhost: Change the sequence of device start, Michael S. Tsirkin, 2022/11/07
[PULL v2 34/82] virtio: re-order vm_running and use_started checks, Michael S. Tsirkin, 2022/11/02
[PULL v2 35/82] virtio: introduce __virtio_queue_reset(), Michael S. Tsirkin, 2022/11/02
[PULL v2 33/82] hw/virtio/virtio-iommu-pci: Enforce the device is plugged on the root bus, Michael S. Tsirkin, 2022/11/02
[PULL v2 37/82] virtio: introduce virtio_queue_enable(), Michael S. Tsirkin, 2022/11/02
[PULL v2 38/82] virtio: core: vq reset feature negotation support,
Michael S. Tsirkin <=
[PULL v2 36/82] virtio: introduce virtio_queue_reset(), Michael S. Tsirkin, 2022/11/02
[PULL v2 40/82] virtio-pci: support queue enable, Michael S. Tsirkin, 2022/11/02
[PULL v2 42/82] vhost: expose vhost_virtqueue_stop(), Michael S. Tsirkin, 2022/11/02
[PULL v2 39/82] virtio-pci: support queue reset, Michael S. Tsirkin, 2022/11/02
[PULL v2 41/82] vhost: expose vhost_virtqueue_start(), Michael S. Tsirkin, 2022/11/02
[PULL v2 43/82] vhost-net: vhost-kernel: introduce vhost_net_virtqueue_reset(), Michael S. Tsirkin, 2022/11/02
[PULL v2 44/82] vhost-net: vhost-kernel: introduce vhost_net_virtqueue_restart(), Michael S. Tsirkin, 2022/11/02
[PULL v2 45/82] virtio-net: introduce flush_or_purge_queued_packets(), Michael S. Tsirkin, 2022/11/02
[PULL v2 47/82] virtio-net: support queue_enable, Michael S. Tsirkin, 2022/11/02
[PULL v2 46/82] virtio-net: support queue reset, Michael S. Tsirkin, 2022/11/02