2fe1fc7b2d
- kvm-virtio-introduce-macro-VIRTIO_CONFIG_IRQ_IDX.patch [bz#1905805] - kvm-virtio-pci-decouple-notifier-from-interrupt-process.patch [bz#1905805] - kvm-virtio-pci-decouple-the-single-vector-from-the-inter.patch [bz#1905805] - kvm-vhost-introduce-new-VhostOps-vhost_set_config_call.patch [bz#1905805] - kvm-vhost-vdpa-add-support-for-config-interrupt.patch [bz#1905805] - kvm-virtio-add-support-for-configure-interrupt.patch [bz#1905805] - kvm-vhost-add-support-for-configure-interrupt.patch [bz#1905805] - kvm-virtio-net-add-support-for-configure-interrupt.patch [bz#1905805] - kvm-virtio-mmio-add-support-for-configure-interrupt.patch [bz#1905805] - kvm-virtio-pci-add-support-for-configure-interrupt.patch [bz#1905805] - kvm-s390x-s390-virtio-ccw-Activate-zPCI-features-on-s390.patch [bz#2159408] - kvm-vhost-fix-vq-dirty-bitmap-syncing-when-vIOMMU-is-ena.patch [bz#2124856] - kvm-block-drop-bdrv_remove_filter_or_cow_child.patch [bz#2155112] - kvm-qed-Don-t-yield-in-bdrv_qed_co_drain_begin.patch [bz#2155112] - kvm-test-bdrv-drain-Don-t-yield-in-.bdrv_co_drained_begi.patch [bz#2155112] - kvm-block-Revert-.bdrv_drained_begin-end-to-non-coroutin.patch [bz#2155112] - kvm-block-Remove-drained_end_counter.patch [bz#2155112] - kvm-block-Inline-bdrv_drain_invoke.patch [bz#2155112] - kvm-block-Fix-locking-for-bdrv_reopen_queue_child.patch [bz#2155112] - kvm-block-Drain-individual-nodes-during-reopen.patch [bz#2155112] - kvm-block-Don-t-use-subtree-drains-in-bdrv_drop_intermed.patch [bz#2155112] - kvm-stream-Replace-subtree-drain-with-a-single-node-drai.patch [bz#2155112] - kvm-block-Remove-subtree-drains.patch [bz#2155112] - kvm-block-Call-drain-callbacks-only-once.patch [bz#2155112] - kvm-block-Remove-ignore_bds_parents-parameter-from-drain.patch [bz#2155112] - kvm-block-Drop-out-of-coroutine-in-bdrv_do_drained_begin.patch [bz#2155112] - kvm-block-Don-t-poll-in-bdrv_replace_child_noperm.patch [bz#2155112] - kvm-block-Remove-poll-parameter-from-bdrv_parent_drained.patch [bz#2155112] - kvm-accel-introduce-accelerator-blocker-API.patch [bz#1979276] - kvm-KVM-keep-track-of-running-ioctls.patch [bz#1979276] - kvm-kvm-Atomic-memslot-updates.patch [bz#1979276] - Resolves: bz#1905805 (support config interrupt in vhost-vdpa qemu) - Resolves: bz#2159408 ([s390x] VMs with ISM passthrough don't autostart after leapp upgrade from RHEL 8) - Resolves: bz#2124856 (VM with virtio interface and iommu=on will crash when try to migrate) - Resolves: bz#2155112 (Qemu coredump after do snapshot of mirrored top image and its converted base image(iothread enabled)) - Resolves: bz#1979276 (SVM: non atomic memslot updates cause boot failure with seabios and cpu-pm=on)
116 lines
3.9 KiB
Diff
116 lines
3.9 KiB
Diff
From 2b8e3409edb8a17d89c3829cfa3d92bdfdd43c53 Mon Sep 17 00:00:00 2001
|
|
From: Cindy Lu <lulu@redhat.com>
|
|
Date: Thu, 22 Dec 2022 15:04:49 +0800
|
|
Subject: [PATCH 08/31] virtio-net: add support for configure interrupt
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
RH-Author: Cindy Lu <lulu@redhat.com>
|
|
RH-MergeRequest: 132: vhost-vdpa: support config interrupt in vhost-vdpa
|
|
RH-Bugzilla: 1905805
|
|
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
|
RH-Acked-by: Eugenio Pérez <eperezma@redhat.com>
|
|
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
RH-Commit: [8/10] 1b125169bea6c81c508b154fa1bae68af153b312 (lulu6/qemu-kvm3)
|
|
|
|
https://bugzilla.redhat.com/show_bug.cgi?id=1905805
|
|
Add functions to support configure interrupt in virtio_net
|
|
Add the functions to support vhost_net_config_pending
|
|
and vhost_net_config_mask.
|
|
|
|
Signed-off-by: Cindy Lu <lulu@redhat.com>
|
|
Message-Id: <20221222070451.936503-9-lulu@redhat.com>
|
|
Acked-by: Jason Wang <jasowang@redhat.com>
|
|
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
|
|
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
(cherry picked from commit 8aab0d1dbe90c7b5ac6672a1a09b0578178f5f4c)
|
|
Signed-off-by: Cindy Lu <lulu@redhat.com>
|
|
---
|
|
hw/net/vhost_net-stub.c | 9 +++++++++
|
|
hw/net/vhost_net.c | 9 +++++++++
|
|
hw/net/virtio-net.c | 4 ++--
|
|
include/net/vhost_net.h | 2 ++
|
|
4 files changed, 22 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/hw/net/vhost_net-stub.c b/hw/net/vhost_net-stub.c
|
|
index 9f7daae99c..c36f258201 100644
|
|
--- a/hw/net/vhost_net-stub.c
|
|
+++ b/hw/net/vhost_net-stub.c
|
|
@@ -82,6 +82,15 @@ void vhost_net_virtqueue_mask(VHostNetState *net, VirtIODevice *dev,
|
|
{
|
|
}
|
|
|
|
+bool vhost_net_config_pending(VHostNetState *net)
|
|
+{
|
|
+ return false;
|
|
+}
|
|
+
|
|
+void vhost_net_config_mask(VHostNetState *net, VirtIODevice *dev, bool mask)
|
|
+{
|
|
+}
|
|
+
|
|
int vhost_net_notify_migration_done(struct vhost_net *net, char* mac_addr)
|
|
{
|
|
return -1;
|
|
diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c
|
|
index 043058ff43..6a55f5a473 100644
|
|
--- a/hw/net/vhost_net.c
|
|
+++ b/hw/net/vhost_net.c
|
|
@@ -478,6 +478,15 @@ void vhost_net_virtqueue_mask(VHostNetState *net, VirtIODevice *dev,
|
|
vhost_virtqueue_mask(&net->dev, dev, idx, mask);
|
|
}
|
|
|
|
+bool vhost_net_config_pending(VHostNetState *net)
|
|
+{
|
|
+ return vhost_config_pending(&net->dev);
|
|
+}
|
|
+
|
|
+void vhost_net_config_mask(VHostNetState *net, VirtIODevice *dev, bool mask)
|
|
+{
|
|
+ vhost_config_mask(&net->dev, dev, mask);
|
|
+}
|
|
VHostNetState *get_vhost_net(NetClientState *nc)
|
|
{
|
|
VHostNetState *vhost_net = 0;
|
|
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
|
|
index bee35d6f9f..ec974f7a76 100644
|
|
--- a/hw/net/virtio-net.c
|
|
+++ b/hw/net/virtio-net.c
|
|
@@ -3323,7 +3323,7 @@ static bool virtio_net_guest_notifier_pending(VirtIODevice *vdev, int idx)
|
|
*/
|
|
|
|
if (idx == VIRTIO_CONFIG_IRQ_IDX) {
|
|
- return false;
|
|
+ return vhost_net_config_pending(get_vhost_net(nc->peer));
|
|
}
|
|
return vhost_net_virtqueue_pending(get_vhost_net(nc->peer), idx);
|
|
}
|
|
@@ -3355,9 +3355,9 @@ static void virtio_net_guest_notifier_mask(VirtIODevice *vdev, int idx,
|
|
*/
|
|
|
|
if (idx == VIRTIO_CONFIG_IRQ_IDX) {
|
|
+ vhost_net_config_mask(get_vhost_net(nc->peer), vdev, mask);
|
|
return;
|
|
}
|
|
-
|
|
vhost_net_virtqueue_mask(get_vhost_net(nc->peer), vdev, idx, mask);
|
|
}
|
|
|
|
diff --git a/include/net/vhost_net.h b/include/net/vhost_net.h
|
|
index 40b9a40074..dbbd0dc04e 100644
|
|
--- a/include/net/vhost_net.h
|
|
+++ b/include/net/vhost_net.h
|
|
@@ -39,6 +39,8 @@ int vhost_net_set_config(struct vhost_net *net, const uint8_t *data,
|
|
bool vhost_net_virtqueue_pending(VHostNetState *net, int n);
|
|
void vhost_net_virtqueue_mask(VHostNetState *net, VirtIODevice *dev,
|
|
int idx, bool mask);
|
|
+bool vhost_net_config_pending(VHostNetState *net);
|
|
+void vhost_net_config_mask(VHostNetState *net, VirtIODevice *dev, bool mask);
|
|
int vhost_net_notify_migration_done(VHostNetState *net, char* mac_addr);
|
|
VHostNetState *get_vhost_net(NetClientState *nc);
|
|
|
|
--
|
|
2.31.1
|
|
|