|
|
@@ -600,6 +600,12 @@ static int apply_microcode_early(struct ucode_cpu_info *uci, bool early)
|
|
|
return UCODE_OK;
|
|
|
}
|
|
|
|
|
|
+ /*
|
|
|
+ * Writeback and invalidate caches before updating microcode to avoid
|
|
|
+ * internal issues depending on what the microcode is updating.
|
|
|
+ */
|
|
|
+ native_wbinvd();
|
|
|
+
|
|
|
/* write microcode via MSR 0x79 */
|
|
|
native_wrmsrl(MSR_IA32_UCODE_WRITE, (unsigned long)mc->bits);
|
|
|
|
|
|
@@ -816,6 +822,12 @@ static enum ucode_state apply_microcode_intel(int cpu)
|
|
|
return UCODE_OK;
|
|
|
}
|
|
|
|
|
|
+ /*
|
|
|
+ * Writeback and invalidate caches before updating microcode to avoid
|
|
|
+ * internal issues depending on what the microcode is updating.
|
|
|
+ */
|
|
|
+ native_wbinvd();
|
|
|
+
|
|
|
/* write microcode via MSR 0x79 */
|
|
|
wrmsrl(MSR_IA32_UCODE_WRITE, (unsigned long)mc->bits);
|
|
|
|