On 03/05/2018 05:26 AM, Joerg Roedel wrote: > From: Joerg Roedel <jroedel@xxxxxxx> > > Warn the user in case the performance can be significantly > improved by switching to a 64-bit kernel. > > Suggested-by: Andy Lutomirski <luto@xxxxxxxxxx> > Signed-off-by: Joerg Roedel <jroedel@xxxxxxx> > --- > arch/x86/mm/pti.c | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > > diff --git a/arch/x86/mm/pti.c b/arch/x86/mm/pti.c > index 3ffd923..8f5aa0d 100644 > --- a/arch/x86/mm/pti.c > +++ b/arch/x86/mm/pti.c > @@ -385,6 +385,22 @@ void __init pti_init(void) > > pr_info("enabled\n"); > > +#ifdef CONFIG_X86_32 > + if (boot_cpu_has(X86_FEATURE_PCID)) { > + /* Use printk to work around pr_fmt() */ > + printk(KERN_WARNING "\n"); > + printk(KERN_WARNING "************************************************************\n"); > + printk(KERN_WARNING "** WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! **\n"); > + printk(KERN_WARNING "** **\n"); > + printk(KERN_WARNING "** You are using 32-bit PTI on a 64-bit PCID-capable CPU. **\n"); > + printk(KERN_WARNING "** Your performance will increase dramatically if you **\n"); > + printk(KERN_WARNING "** switch to a 64-bit kernel! **\n"); > + printk(KERN_WARNING "** **\n"); > + printk(KERN_WARNING "** WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! **\n"); > + printk(KERN_WARNING "************************************************************\n"); > + } > +#endif > + > pti_clone_user_shared(); > pti_clone_entry_text(); > pti_setup_espfix64(); Typo in the patch title: PCIE => PCID. -Longman -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>