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