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