|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v5 2/4] x86/microcode: Ignore microcode loading interface for revision = -1
Some hypervisors report ~0 as the microcode revision to mean "don't issue
microcode updates". Ignore the microcode loading interface in that case.
Signed-off-by: Alejandro Vallejo <alejandro.vallejo@xxxxxxxxx>
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
---
v5:
* Style fix. Brace position.
---
xen/arch/x86/cpu/microcode/core.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/xen/arch/x86/cpu/microcode/core.c
b/xen/arch/x86/cpu/microcode/core.c
index bec8b55db2..b620e3bfa6 100644
--- a/xen/arch/x86/cpu/microcode/core.c
+++ b/xen/arch/x86/cpu/microcode/core.c
@@ -867,10 +867,22 @@ int __init early_microcode_init(unsigned long *module_map,
return -ENODEV;
}
- microcode_grab_module(module_map, mbi);
-
ucode_ops.collect_cpu_info();
+ /*
+ * Some hypervisors deliberately report a microcode revision of -1 to
+ * mean that they will not accept microcode updates. We take the hint
+ * and ignore the microcode interface in that case.
+ */
+ if ( this_cpu(cpu_sig).rev == ~0 )
+ {
+ printk(XENLOG_WARNING "Microcode loading disabled\n");
+ ucode_ops.apply_microcode = NULL;
+ return -ENODEV;
+ }
+
+ microcode_grab_module(module_map, mbi);
+
if ( ucode_mod.mod_end || ucode_blob.size )
rc = early_microcode_update_cpu();
--
2.34.1
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |