@@ -867,10 +867,23 @@ 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_INFO "Microcode loading disabled due to: %s\n",
+ "rev = ~0");
+ 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();