From 664e672182e39516f26e5f6b10784e42c9dd9864 Mon Sep 17 00:00:00 2001 From: Sebastian Ott Date: Wed, 22 Jan 2025 06:01:21 -0500 Subject: [PATCH 10/11] arm: disable pauth for virt-rhel9* RH-Author: Sebastian Ott RH-MergeRequest: 330: arm: disable pauth for virt-rhel9* RH-Jira: RHEL-75782 RH-Acked-by: Eric Auger RH-Acked-by: Kashyap Chamarthy RH-Acked-by: Gavin Shan RH-Commit: [1/2] 6b30d9a755f06d6823b8a874babf12a1b5fc3295 (seott1/cos-qemu-kvm) RHEL9 kernels have pauth disabled while RHEL10 has it enabled, since qemu will setup the VM/VCPU with pauth when KVM supports it the guest visible ID registers will change when a RHEL9 qemu is used on a RHEL10 kernel (e.g. in a container on a host with pauth support). Make sure that virt-rhel9* machine types in RHEL9 stay the same independent of the kernel. Signed-off-by: Sebastian Ott JIRA: https://issues.redhat.com/browse/RHEL-75782 --- hw/arm/virt.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index c50bff2a6c..c5270a5abc 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -90,6 +90,16 @@ static GlobalProperty arm_virt_compat[] = { }; static const size_t arm_virt_compat_len = G_N_ELEMENTS(arm_virt_compat); +/* + * RHEL9 kernels have pauth disabled while RHEL10 has it enabled, + * since qemu will setup the VM with pauth when KVM supports it we + * have to disable it for virt-rhel9* to support upgrades / migration. + */ +GlobalProperty arm_rhel9_compat[] = { + {TYPE_ARM_CPU, "pauth", "off", .optional = true}, +}; +const size_t arm_rhel9_compat_len = G_N_ELEMENTS(arm_rhel9_compat); + /* * This variable is for changes to properties that are RHEL specific, * different to the current upstream and to be applied to the latest @@ -3589,6 +3599,7 @@ DEFINE_VIRT_MACHINE(2, 6) static void virt_rhel_machine_9_6_0_options(MachineClass *mc) { + compat_props_add(mc->compat_props, arm_rhel9_compat, arm_rhel9_compat_len); } DEFINE_VIRT_MACHINE_AS_LATEST(9, 6, 0) -- 2.48.0