All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC] x86/AMD: write PAT after ucode update
@ 2018-07-03 14:55 Jan Beulich
  0 siblings, 0 replies; only message in thread
From: Jan Beulich @ 2018-07-03 14:55 UTC (permalink / raw)
  To: xen-devel; +Cc: Andrew Cooper, Brian Woods, Suravee Suthikulpanit

The increased number of messages (spec_ctrl.c:print_details()) within a
certain time window made me notice some slowness of boot time screen
output. Experimentally I've narrowed the time window to be from
immediately after the early ucode update on the BSP to the PAT write in
cpu_init(). For that reason, as a workaround, write PAT with its
designated value immediately after the ucode load.

Similar slowness cannot be observed on APs.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
RFC: Preferably to be confirmed by AMD.
---
Will need re-basing on top of Andrew's patch eliminating host_pat, if
that goes in earlier.

--- a/xen/arch/x86/microcode_amd.c
+++ b/xen/arch/x86/microcode_amd.c
@@ -226,6 +226,13 @@ static int apply_microcode(unsigned int
         return -EIO;
     }
 
+    /*
+     * Experimentally this helps with performance issues on at least certain
+     * Fam15 models. Oddly enough only the BSP is affected, but to be on the
+     * safe side, do the write uniformly.
+     */
+    wrmsrl(MSR_IA32_CR_PAT, host_pat);
+
     printk(KERN_WARNING "microcode: CPU%d updated from revision %#x to %#x\n",
            cpu, uci->cpu_sig.rev, hdr->patch_id);
 





_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-07-03 14:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-03 14:55 [PATCH RFC] x86/AMD: write PAT after ucode update Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.