From c22b42d2defd2c8484c3dd962b5dc86d79e8b34a Mon Sep 17 00:00:00 2001 From: Oliver Anderson Date: Wed, 29 Jul 2026 14:25:32 +0200 Subject: [PATCH] arch: Add compatibility check for CPUID.0x7.0x1:ECX Register ECX of CPUID leaf 0x7 sub-leaf 0x1 (Structured Extended Feature Enumeration Sub-leaf) is currently not checked, but it should be. KVM exposes bit 5 (MSR_IMM: the immediate forms of the RDMSR and WRMSR instructions) when the host does. Live migrating from a source that supports MSR_IMM to a destination that does not is not safe. Signed-off-by: Oliver Anderson On-behalf-of: SAP oliver.anderson@sap.com --- arch/src/x86_64/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/src/x86_64/mod.rs b/arch/src/x86_64/mod.rs index 45edd336a..5dd3fc603 100644 --- a/arch/src/x86_64/mod.rs +++ b/arch/src/x86_64/mod.rs @@ -451,6 +451,12 @@ impl CpuidFeatureEntry { feature_reg: CpuidReg::EAX, compatible_check: CpuidCompatibleCheck::BitwiseSubset, }, + CpuidFeatureEntry { + function: 7, + index: 1, + feature_reg: CpuidReg::ECX, + compatible_check: CpuidCompatibleCheck::BitwiseSubset, + }, // Leaf 0x8000_0001, ECX/EDX, CPUID features bits CpuidFeatureEntry { function: 0x8000_0001,