All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] x86/AMD: write PAT after ucode update
@ 2018-09-20  8:40 Jan Beulich
  2018-09-20 13:38 ` Andrew Cooper
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2018-09-20  8:40 UTC (permalink / raw)
  To: xen-devel; +Cc: Andrew Cooper, Brian Woods, Wei Liu, 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 dropped, but still: Preferably to be confirmed by AMD.
---
v2: Re-base.

--- 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, XEN_MSR_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] 2+ messages in thread

* Re: [PATCH v2] x86/AMD: write PAT after ucode update
  2018-09-20  8:40 [PATCH v2] x86/AMD: write PAT after ucode update Jan Beulich
@ 2018-09-20 13:38 ` Andrew Cooper
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Cooper @ 2018-09-20 13:38 UTC (permalink / raw)
  To: Jan Beulich, xen-devel; +Cc: Wei Liu, Brian Woods, Suravee Suthikulpanit

On 20/09/18 09:40, Jan Beulich wrote:
> 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>

From a straight x86 side of things, Acked-by: Andrew Cooper
<andrew.cooper3@citrix.com> but I'd still like to get some feedback from
AMD.

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-09-20 13:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-20  8:40 [PATCH v2] x86/AMD: write PAT after ucode update Jan Beulich
2018-09-20 13:38 ` Andrew Cooper

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.