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

f79135
From 5688fdb9a3ed192b85dca84c47a7ddfd325778d9 Mon Sep 17 00:00:00 2001
f79135
From: Stefano Garzarella <sgarzare@redhat.com>
f79135
Date: Thu, 24 Mar 2022 16:04:57 +0100
f79135
Subject: [PATCH 1/3] RHEL: disable "seqpacket" for "vhost-vsock-device" in
f79135
 rhel8.6.0
f79135
MIME-Version: 1.0
f79135
Content-Type: text/plain; charset=UTF-8
f79135
Content-Transfer-Encoding: 8bit
f79135
f79135
RH-Author: Stefano Garzarella <sgarzare@redhat.com>
f79135
RH-MergeRequest: 135: RHEL: disable "seqpacket" for "vhost-vsock-device" in rhel8.6.0  [rhel-9.0.0.z]
f79135
RH-Commit: [1/1] 5ee0de3110deaa0222c9783c00168b536b0c8934
f79135
RH-Bugzilla: 2071102
f79135
RH-Acked-by: Jason Wang <jasowang@redhat.com>
f79135
RH-Acked-by: Eugenio PĂ©rez <eperezma@redhat.com>
f79135
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
f79135
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
f79135
f79135
vhost-vsock device in RHEL 8 kernels doesn't support seqpacket.
f79135
To avoid problems when migrating a VM from RHEL 9 host, we need to
f79135
disable it in rhel8-* machine types.
f79135
f79135
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
f79135
---
f79135
 hw/core/machine.c          | 10 ++++++++++
f79135
 hw/i386/pc_piix.c          |  2 ++
f79135
 hw/i386/pc_q35.c           |  2 ++
f79135
 hw/s390x/s390-virtio-ccw.c |  1 +
f79135
 include/hw/boards.h        |  3 +++
f79135
 5 files changed, 18 insertions(+)
f79135
f79135
diff --git a/hw/core/machine.c b/hw/core/machine.c
f79135
index 5fae55d6cd..7dcceb904a 100644
f79135
--- a/hw/core/machine.c
f79135
+++ b/hw/core/machine.c
f79135
@@ -43,6 +43,16 @@
f79135
 const char *rhel_old_machine_deprecation =
f79135
     "machine types for previous major releases are deprecated";
f79135
 
f79135
+GlobalProperty hw_compat_rhel_8_6[] = {
f79135
+    /* hw_compat_rhel_8_6 bz 2065589 */
f79135
+    /*
f79135
+     * vhost-vsock device in RHEL 8 kernels doesn't support seqpacket, so
f79135
+     * we need do disable it downstream on the latest hw_compat_rhel_8.
f79135
+     */
f79135
+    { "vhost-vsock-device", "seqpacket", "off" },
f79135
+};
f79135
+const size_t hw_compat_rhel_8_6_len = G_N_ELEMENTS(hw_compat_rhel_8_6);
f79135
+
f79135
 /*
f79135
  * Mostly the same as hw_compat_6_0 and hw_compat_6_1
f79135
  */
f79135
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
f79135
index cf68d7498c..08579366b6 100644
f79135
--- a/hw/i386/pc_piix.c
f79135
+++ b/hw/i386/pc_piix.c
f79135
@@ -998,6 +998,8 @@ static void pc_machine_rhel760_options(MachineClass *m)
f79135
     pcmc->kvmclock_create_always = false;
f79135
     /* From pc_i440fx_5_1_machine_options() */
f79135
     pcmc->pci_root_uid = 1;
f79135
+    compat_props_add(m->compat_props, hw_compat_rhel_8_6,
f79135
+                     hw_compat_rhel_8_6_len);
f79135
     compat_props_add(m->compat_props, hw_compat_rhel_8_5,
f79135
                      hw_compat_rhel_8_5_len);
f79135
     compat_props_add(m->compat_props, pc_rhel_8_5_compat,
f79135
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
f79135
index c8e06da084..23dacdd923 100644
f79135
--- a/hw/i386/pc_q35.c
f79135
+++ b/hw/i386/pc_q35.c
f79135
@@ -680,6 +680,8 @@ static void pc_q35_machine_rhel860_options(MachineClass *m)
f79135
 
f79135
     pcmc->smbios_stream_product = "RHEL-AV";
f79135
     pcmc->smbios_stream_version = "8.6.0";
f79135
+    compat_props_add(m->compat_props, hw_compat_rhel_8_6,
f79135
+                     hw_compat_rhel_8_6_len);
f79135
 }
f79135
 
f79135
 DEFINE_PC_MACHINE(q35_rhel860, "pc-q35-rhel8.6.0", pc_q35_init_rhel860,
f79135
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
f79135
index cc78a315e3..13bfa4253e 100644
f79135
--- a/hw/s390x/s390-virtio-ccw.c
f79135
+++ b/hw/s390x/s390-virtio-ccw.c
f79135
@@ -1121,6 +1121,7 @@ static void ccw_machine_rhel860_instance_options(MachineState *machine)
f79135
 static void ccw_machine_rhel860_class_options(MachineClass *mc)
f79135
 {
f79135
     ccw_machine_rhel900_class_options(mc);
f79135
+    compat_props_add(mc->compat_props, hw_compat_rhel_8_6, hw_compat_rhel_8_6_len);
f79135
 
f79135
     /* All RHEL machines for prior major releases are deprecated */
f79135
     mc->deprecation_reason = rhel_old_machine_deprecation;
f79135
diff --git a/include/hw/boards.h b/include/hw/boards.h
f79135
index 21d8d5528e..b9c12c4bf2 100644
f79135
--- a/include/hw/boards.h
f79135
+++ b/include/hw/boards.h
f79135
@@ -443,6 +443,9 @@ extern const size_t hw_compat_2_2_len;
f79135
 extern GlobalProperty hw_compat_2_1[];
f79135
 extern const size_t hw_compat_2_1_len;
f79135
 
f79135
+extern GlobalProperty hw_compat_rhel_8_6[];
f79135
+extern const size_t hw_compat_rhel_8_6_len;
f79135
+
f79135
 extern GlobalProperty hw_compat_rhel_8_5[];
f79135
 extern const size_t hw_compat_rhel_8_5_len;
f79135
 
f79135
-- 
f79135
2.31.1
f79135