Blame SOURCES/kvm-RHEL-disable-seqpacket-for-vhost-vsock-device-in-rhe.patch

4841a6
From e0e4f01c6f4fb5881960f72ae4e80951b711131e Mon Sep 17 00:00:00 2001
6443c2
From: Stefano Garzarella <sgarzare@redhat.com>
6443c2
Date: Thu, 24 Mar 2022 16:04:57 +0100
4841a6
Subject: [PATCH 1/5] RHEL: disable "seqpacket" for "vhost-vsock-device" in
6443c2
 rhel8.6.0
6443c2
MIME-Version: 1.0
6443c2
Content-Type: text/plain; charset=UTF-8
6443c2
Content-Transfer-Encoding: 8bit
6443c2
6443c2
RH-Author: Stefano Garzarella <sgarzare@redhat.com>
4841a6
RH-MergeRequest: 136: RHEL: disable "seqpacket" for "vhost-vsock-device" in rhel8.6.0 [rhel-8.7.0]
4841a6
RH-Commit: [1/1] d82ea09e123679521503689f7d9af1c03dc71bfc
4841a6
RH-Bugzilla: 2068202
4841a6
RH-Acked-by: Jason Wang <None>
4841a6
RH-Acked-by: Eugenio PĂ©rez <None>
6443c2
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
4841a6
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
6443c2
6443c2
vhost-vsock device in RHEL 8 kernels doesn't support seqpacket.
6443c2
To avoid problems when migrating a VM from RHEL 9 host, we need to
6443c2
disable it in rhel8-* machine types.
6443c2
6443c2
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
6443c2
---
6443c2
 hw/core/machine.c          | 10 ++++++++++
6443c2
 hw/i386/pc_piix.c          |  2 ++
6443c2
 hw/i386/pc_q35.c           |  2 ++
6443c2
 hw/s390x/s390-virtio-ccw.c |  1 +
6443c2
 include/hw/boards.h        |  3 +++
6443c2
 5 files changed, 18 insertions(+)
6443c2
6443c2
diff --git a/hw/core/machine.c b/hw/core/machine.c
6443c2
index 024b025fc2..76fcabec7a 100644
6443c2
--- a/hw/core/machine.c
6443c2
+++ b/hw/core/machine.c
6443c2
@@ -37,6 +37,16 @@
6443c2
 #include "hw/virtio/virtio.h"
6443c2
 #include "hw/virtio/virtio-pci.h"
6443c2
 
6443c2
+GlobalProperty hw_compat_rhel_8_6[] = {
6443c2
+    /* hw_compat_rhel_8_6 bz 2068202 */
6443c2
+    /*
6443c2
+     * vhost-vsock device in RHEL 8 kernels doesn't support seqpacket, so
6443c2
+     * we need do disable it downstream on the latest hw_compat_rhel_8.
6443c2
+     */
6443c2
+    { "vhost-vsock-device", "seqpacket", "off" },
6443c2
+};
6443c2
+const size_t hw_compat_rhel_8_6_len = G_N_ELEMENTS(hw_compat_rhel_8_6);
6443c2
+
6443c2
 /*
6443c2
  * Mostly the same as hw_compat_6_0 and hw_compat_6_1
6443c2
  */
6443c2
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
6443c2
index f03a8f0db8..ab6d03e07a 100644
6443c2
--- a/hw/i386/pc_piix.c
6443c2
+++ b/hw/i386/pc_piix.c
6443c2
@@ -998,6 +998,8 @@ static void pc_machine_rhel760_options(MachineClass *m)
6443c2
     pcmc->kvmclock_create_always = false;
6443c2
     /* From pc_i440fx_5_1_machine_options() */
6443c2
     pcmc->pci_root_uid = 1;
6443c2
+    compat_props_add(m->compat_props, hw_compat_rhel_8_6,
6443c2
+                     hw_compat_rhel_8_6_len);
6443c2
     compat_props_add(m->compat_props, hw_compat_rhel_8_5,
6443c2
                      hw_compat_rhel_8_5_len);
6443c2
     compat_props_add(m->compat_props, pc_rhel_8_5_compat,
6443c2
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
6443c2
index 5559261d9e..882fe7a68d 100644
6443c2
--- a/hw/i386/pc_q35.c
6443c2
+++ b/hw/i386/pc_q35.c
6443c2
@@ -658,6 +658,8 @@ static void pc_q35_machine_rhel860_options(MachineClass *m)
6443c2
     m->desc = "RHEL-8.6.0 PC (Q35 + ICH9, 2009)";
6443c2
     pcmc->smbios_stream_product = "RHEL-AV";
6443c2
     pcmc->smbios_stream_version = "8.6.0";
6443c2
+    compat_props_add(m->compat_props, hw_compat_rhel_8_6,
6443c2
+                     hw_compat_rhel_8_6_len);
6443c2
 }
6443c2
 
6443c2
 DEFINE_PC_MACHINE(q35_rhel860, "pc-q35-rhel8.6.0", pc_q35_init_rhel860,
6443c2
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
6443c2
index 9795eb9406..bec270598b 100644
6443c2
--- a/hw/s390x/s390-virtio-ccw.c
6443c2
+++ b/hw/s390x/s390-virtio-ccw.c
6443c2
@@ -1109,6 +1109,7 @@ static void ccw_machine_rhel860_instance_options(MachineState *machine)
6443c2
 
6443c2
 static void ccw_machine_rhel860_class_options(MachineClass *mc)
6443c2
 {
6443c2
+    compat_props_add(mc->compat_props, hw_compat_rhel_8_6, hw_compat_rhel_8_6_len);
6443c2
 }
6443c2
 DEFINE_CCW_MACHINE(rhel860, "rhel8.6.0", true);
6443c2
 
6443c2
diff --git a/include/hw/boards.h b/include/hw/boards.h
6443c2
index 04e8759815..4ddb798144 100644
6443c2
--- a/include/hw/boards.h
6443c2
+++ b/include/hw/boards.h
6443c2
@@ -443,6 +443,9 @@ extern const size_t hw_compat_2_2_len;
6443c2
 extern GlobalProperty hw_compat_2_1[];
6443c2
 extern const size_t hw_compat_2_1_len;
6443c2
 
6443c2
+extern GlobalProperty hw_compat_rhel_8_6[];
6443c2
+extern const size_t hw_compat_rhel_8_6_len;
6443c2
+
6443c2
 extern GlobalProperty hw_compat_rhel_8_5[];
6443c2
 extern const size_t hw_compat_rhel_8_5_len;
6443c2
 
6443c2
-- 
6443c2
2.27.0
6443c2