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