thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone
26ba25
From 8a50b1caa7e56dc2b9a2f4dc8bc9c63e9a064085 Mon Sep 17 00:00:00 2001
26ba25
From: Miroslav Rezanina <mrezanin@redhat.com>
26ba25
Date: Thu, 26 Apr 2018 02:54:04 +0000
26ba25
Subject: Remove rhel6_ctrl_guest_workaround
26ba25
26ba25
As we are not support RHEL 6 compatibility on RHEL 8 removing hack
26ba25
to handle missing ctrl-guest-offload in RHEL 6 machine types.
26ba25
26ba25
This hack was introduced for BZ 1378334 (windows guests migration from
26ba25
rhel6.8-z to rhel7.3 with virtio-net-pci fail) in qemu-kvm-rhev for RHEL 7.4
26ba25
and was backported to qemu-kvm-rhev for RHEL 7.3 as commit 9a30ebb5 (and
26ba25
propagated to RHEL 7.4 with rebase to 2.9.0).
26ba25
26ba25
Singed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
26ba25
---
26ba25
 hw/virtio/virtio.c         | 22 +---------------------
26ba25
 include/hw/virtio/virtio.h |  1 -
26ba25
 2 files changed, 1 insertion(+), 22 deletions(-)
26ba25
26ba25
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
26ba25
index 4bcb4f4..006d3d1 100644
26ba25
--- a/hw/virtio/virtio.c
26ba25
+++ b/hw/virtio/virtio.c
26ba25
@@ -24,7 +24,6 @@
26ba25
 #include "hw/virtio/virtio-access.h"
26ba25
 #include "sysemu/dma.h"
26ba25
 
26ba25
-#include "standard-headers/linux/virtio_net.h"
26ba25
 /*
26ba25
  * The alignment to use between consumer and producer parts of vring.
26ba25
  * x86 pagesize again. This is the default, used by transports like PCI
26ba25
@@ -1992,24 +1991,7 @@ const VMStateInfo  virtio_vmstate_info = {
26ba25
 static int virtio_set_features_nocheck(VirtIODevice *vdev, uint64_t val)
26ba25
 {
26ba25
     VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev);
26ba25
-    bool bad;
26ba25
-    uint64_t ctrl_guest_mask = 1ull << VIRTIO_NET_F_CTRL_GUEST_OFFLOADS;
26ba25
-
26ba25
-    if (vdev->rhel6_ctrl_guest_workaround && (val & ctrl_guest_mask) &&
26ba25
-          !(vdev->host_features & ctrl_guest_mask)) {
26ba25
-        /*
26ba25
-         * This works around a mistake in the definition of the rhel6.[56].0
26ba25
-         * machinetypes, ctrl-guest-offload was not set in qemu-kvm-rhev for
26ba25
-         * those machine types, but is set on the rhel6 qemu-kvm-rhev build.
26ba25
-         * If an incoming rhel6 guest uses it then we need to allow it.
26ba25
-         * Note: There's a small race where a guest read the flag but didn't
26ba25
-         * declare it's useage yet.
26ba25
-         */
26ba25
-        fprintf(stderr, "RHEL6 ctrl_guest_offload workaround\n");
26ba25
-        vdev->host_features |= ctrl_guest_mask;
26ba25
-    }
26ba25
-
26ba25
-    bad = (val & ~(vdev->host_features)) != 0;
26ba25
+    bool bad = (val & ~(vdev->host_features)) != 0;
26ba25
 
26ba25
     val &= vdev->host_features;
26ba25
     if (k->set_features) {
26ba25
@@ -2584,8 +2566,6 @@ static void virtio_device_instance_finalize(Object *obj)
26ba25
 
26ba25
 static Property virtio_properties[] = {
26ba25
     DEFINE_VIRTIO_COMMON_FEATURES(VirtIODevice, host_features),
26ba25
-    DEFINE_PROP_BOOL("__com.redhat_rhel6_ctrl_guest_workaround", VirtIODevice,
26ba25
-                     rhel6_ctrl_guest_workaround, false),
26ba25
     DEFINE_PROP_END_OF_LIST(),
26ba25
 };
26ba25
 
26ba25
diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h
26ba25
index 41e13d2..098bdaa 100644
26ba25
--- a/include/hw/virtio/virtio.h
26ba25
+++ b/include/hw/virtio/virtio.h
26ba25
@@ -95,7 +95,6 @@ struct VirtIODevice
26ba25
     uint8_t device_endian;
26ba25
     bool use_guest_notifier_mask;
26ba25
     AddressSpace *dma_as;
26ba25
-    bool rhel6_ctrl_guest_workaround;
26ba25
     QLIST_HEAD(, VirtQueue) *vector_queues;
26ba25
 };
26ba25
 
26ba25
-- 
26ba25
1.8.3.1
26ba25