Tim Chen
a8f76ae41c
x86/speculation: Move STIPB/IBPB string conditionals out of cpu_show_common()
...
The Spectre V2 printout in cpu_show_common() handles conditionals for the
various mitigation methods directly in the sprintf() argument list. That's
hard to read and will become unreadable if more complex decisions need to
be made for a particular method.
Move the conditionals for STIBP and IBPB string selection into helper
functions, so they can be extended later on.
Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com >
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Reviewed-by: Ingo Molnar <mingo@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Andy Lutomirski <luto@kernel.org >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Jiri Kosina <jkosina@suse.cz >
Cc: Tom Lendacky <thomas.lendacky@amd.com >
Cc: Josh Poimboeuf <jpoimboe@redhat.com >
Cc: Andrea Arcangeli <aarcange@redhat.com >
Cc: David Woodhouse <dwmw@amazon.co.uk >
Cc: Andi Kleen <ak@linux.intel.com >
Cc: Dave Hansen <dave.hansen@intel.com >
Cc: Casey Schaufler <casey.schaufler@intel.com >
Cc: Asit Mallick <asit.k.mallick@intel.com >
Cc: Arjan van de Ven <arjan@linux.intel.com >
Cc: Jon Masters <jcm@redhat.com >
Cc: Waiman Long <longman9394@gmail.com >
Cc: Greg KH <gregkh@linuxfoundation.org >
Cc: Dave Stewart <david.c.stewart@intel.com >
Cc: Kees Cook <keescook@chromium.org >
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20181125185003.874479208@linutronix.de
2018-11-28 11:57:05 +01:00
Tim Chen
b86bda0426
x86/speculation: Remove unnecessary ret variable in cpu_show_common()
...
Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com >
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Reviewed-by: Ingo Molnar <mingo@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Andy Lutomirski <luto@kernel.org >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Jiri Kosina <jkosina@suse.cz >
Cc: Tom Lendacky <thomas.lendacky@amd.com >
Cc: Josh Poimboeuf <jpoimboe@redhat.com >
Cc: Andrea Arcangeli <aarcange@redhat.com >
Cc: David Woodhouse <dwmw@amazon.co.uk >
Cc: Andi Kleen <ak@linux.intel.com >
Cc: Dave Hansen <dave.hansen@intel.com >
Cc: Casey Schaufler <casey.schaufler@intel.com >
Cc: Asit Mallick <asit.k.mallick@intel.com >
Cc: Arjan van de Ven <arjan@linux.intel.com >
Cc: Jon Masters <jcm@redhat.com >
Cc: Waiman Long <longman9394@gmail.com >
Cc: Greg KH <gregkh@linuxfoundation.org >
Cc: Dave Stewart <david.c.stewart@intel.com >
Cc: Kees Cook <keescook@chromium.org >
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20181125185003.783903657@linutronix.de
2018-11-28 11:57:05 +01:00
Tim Chen
24848509aa
x86/speculation: Clean up spectre_v2_parse_cmdline()
...
Remove the unnecessary 'else' statement in spectre_v2_parse_cmdline()
to save an indentation level.
Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com >
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Reviewed-by: Ingo Molnar <mingo@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Andy Lutomirski <luto@kernel.org >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Jiri Kosina <jkosina@suse.cz >
Cc: Tom Lendacky <thomas.lendacky@amd.com >
Cc: Josh Poimboeuf <jpoimboe@redhat.com >
Cc: Andrea Arcangeli <aarcange@redhat.com >
Cc: David Woodhouse <dwmw@amazon.co.uk >
Cc: Andi Kleen <ak@linux.intel.com >
Cc: Dave Hansen <dave.hansen@intel.com >
Cc: Casey Schaufler <casey.schaufler@intel.com >
Cc: Asit Mallick <asit.k.mallick@intel.com >
Cc: Arjan van de Ven <arjan@linux.intel.com >
Cc: Jon Masters <jcm@redhat.com >
Cc: Waiman Long <longman9394@gmail.com >
Cc: Greg KH <gregkh@linuxfoundation.org >
Cc: Dave Stewart <david.c.stewart@intel.com >
Cc: Kees Cook <keescook@chromium.org >
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20181125185003.688010903@linutronix.de
2018-11-28 11:57:04 +01:00
Zhenzhong Duan
ef014aae8f
x86/retpoline: Remove minimal retpoline support
...
Now that CONFIG_RETPOLINE hard depends on compiler support, there is no
reason to keep the minimal retpoline support around which only provided
basic protection in the assembly files.
Suggested-by: Peter Zijlstra <peterz@infradead.org >
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com >
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Cc: David Woodhouse <dwmw@amazon.co.uk >
Cc: Borislav Petkov <bp@suse.de >
Cc: H. Peter Anvin <hpa@zytor.com >
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com >
Cc: <srinivas.eeda@oracle.com >
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/f06f0a89-5587-45db-8ed2-0a9d6638d5c0@default
2018-11-28 11:57:03 +01:00
Zhenzhong Duan
4cd24de3a0
x86/retpoline: Make CONFIG_RETPOLINE depend on compiler support
...
Since retpoline capable compilers are widely available, make
CONFIG_RETPOLINE hard depend on the compiler capability.
Break the build when CONFIG_RETPOLINE is enabled and the compiler does not
support it. Emit an error message in that case:
"arch/x86/Makefile:226: *** You are building kernel with non-retpoline
compiler, please update your compiler.. Stop."
[dwmw: Fail the build with non-retpoline compiler]
Suggested-by: Peter Zijlstra <peterz@infradead.org >
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com >
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Cc: David Woodhouse <dwmw@amazon.co.uk >
Cc: Borislav Petkov <bp@suse.de >
Cc: Daniel Borkmann <daniel@iogearbox.net >
Cc: H. Peter Anvin <hpa@zytor.com >
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com >
Cc: Andy Lutomirski <luto@kernel.org >
Cc: Masahiro Yamada <yamada.masahiro@socionext.com >
Cc: Michal Marek <michal.lkml@markovi.net >
Cc: <srinivas.eeda@oracle.com >
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/cca0cb20-f9e2-4094-840b-fb0f8810cd34@default
2018-11-28 11:57:03 +01:00
Borislav Petkov
60c8144afc
x86/MCE/AMD: Fix the thresholding machinery initialization order
...
Currently, the code sets up the thresholding interrupt vector and only
then goes about initializing the thresholding banks. Which is wrong,
because an early thresholding interrupt would cause a NULL pointer
dereference when accessing those banks and prevent the machine from
booting.
Therefore, set the thresholding interrupt vector only *after* having
initialized the banks successfully.
Fixes: 18807ddb7f
("x86/mce/AMD: Reset Threshold Limit after logging error")
Reported-by: Rafał Miłecki <rafal@milecki.pl >
Reported-by: John Clemens <clemej@gmail.com >
Signed-off-by: Borislav Petkov <bp@suse.de >
Tested-by: Rafał Miłecki <rafal@milecki.pl >
Tested-by: John Clemens <john@deater.net >
Cc: Aravind Gopalakrishnan <aravindksg.lkml@gmail.com >
Cc: linux-edac@vger.kernel.org
Cc: stable@vger.kernel.org
Cc: Tony Luck <tony.luck@intel.com >
Cc: x86@kernel.org
Cc: Yazen Ghannam <Yazen.Ghannam@amd.com >
Link: https://lkml.kernel.org/r/20181127101700.2964-1-zajec5@gmail.com
Link: https://bugzilla.kernel.org/show_bug.cgi?id=201291
2018-11-28 10:10:36 +01:00
Reinette Chatre
456824896d
x86/resctrl: Use rdt_last_cmd_puts() where possible
...
The last_cmd_status sequence buffer contains user-visible messages
(accessed via /sys/fs/resctrl/info/last_cmd_status) that detail any
errors encountered while interacting with the resctrl filesystem.
rdt_last_cmd_printf() and rdt_last_cmd_puts() are the two calls
available to respectively print a string with format specifiers or a
simple one (which contains no format specifiers) to the last_cmd_status
buffer.
A few occurrences exist where rdt_last_cmd_printf() is used to print
a simple string. Doing so does not result in incorrect result or
incorrect behavior, but rdt_last_cmd_puts() is the function intended to
be used in these cases, as it is faster and it doesn't need to do the
vsnprintf() formatting.
Fix these occurrences to use rdt_last_cmd_puts() instead. While doing
so, fix two typos that were recently introduced into two of these simple
strings.
[ bp: massage commit message and correct typos. ]
Fixes: 723f1a0dd8
("x86/resctrl: Fixup the user-visible strings")
Fixes: e0bdfe8e36
("x86/intel_rdt: Support creation/removal of pseudo-locked region")
Fixes: 9ab9aa15c3
("x86/intel_rdt: Ensure requested schemata respects mode")
Fixes: d48d7a57f7
("x86/intel_rdt: Introduce resource group's mode resctrl file")
Fixes: dfe9674b04
("x86/intel_rdt: Enable entering of pseudo-locksetup mode")
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com >
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: "H. Peter Anvin" <hpa@zytor.com >
Cc: Fenghua Yu <fenghua.yu@intel.com >
Cc: Ingo Molnar <mingo@redhat.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Tony Luck <tony.luck@intel.com >
Cc: babu.moger@amd.com
Cc: jithu.joseph@intel.com
Cc: x86-ml <x86@kernel.org >
Link: https://lkml.kernel.org/r/f48e46a016d6a5c79f13de8faeca382052189e2e.1543346009.git.reinette.chatre@intel.com
2018-11-27 20:39:02 +01:00
Babu Moger
4d05bf71f1
x86/resctrl: Introduce AMD QOS feature
...
Enable QOS feature on AMD.
Following QoS sub-features are supported on AMD if the underlying
hardware supports it:
- L3 Cache allocation enforcement
- L3 Cache occupancy monitoring
- L3 Code-Data Prioritization support
- Memory Bandwidth Enforcement (Allocation)
The specification is available at:
https://developer.amd.com/wp-content/resources/56375.pdf
There are differences in the way some of the features are implemented.
Separate those functions and add those as vendor specific functions.
The major difference is in MBA feature:
- AMD uses CPUID leaf 0x80000020 to initialize the MBA features.
- AMD uses direct bandwidth value instead of delay based on bandwidth values.
- MSR register base addresses are different for MBA.
- AMD allows non-contiguous L3 cache bit masks.
Signed-off-by: Babu Moger <babu.moger@amd.com >
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: Andrew Morton <akpm@linux-foundation.org >
Cc: Andy Lutomirski <luto@kernel.org >
Cc: Arnd Bergmann <arnd@arndb.de >
Cc: Brijesh Singh <brijesh.singh@amd.com >
Cc: "Chang S. Bae" <chang.seok.bae@intel.com >
Cc: David Miller <davem@davemloft.net >
Cc: David Woodhouse <dwmw2@infradead.org >
Cc: Dmitry Safonov <dima@arista.com >
Cc: Fenghua Yu <fenghua.yu@intel.com >
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Cc: "H. Peter Anvin" <hpa@zytor.com >
Cc: Ingo Molnar <mingo@redhat.com >
Cc: Jann Horn <jannh@google.com >
Cc: Joerg Roedel <jroedel@suse.de >
Cc: Jonathan Corbet <corbet@lwn.net >
Cc: Josh Poimboeuf <jpoimboe@redhat.com >
Cc: Kate Stewart <kstewart@linuxfoundation.org >
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com >
Cc: <linux-doc@vger.kernel.org >
Cc: Mauro Carvalho Chehab <mchehab+samsung@kernel.org >
Cc: Paolo Bonzini <pbonzini@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Philippe Ombredanne <pombredanne@nexb.com >
Cc: Pu Wen <puwen@hygon.cn >
Cc: <qianyue.zj@alibaba-inc.com >
Cc: "Rafael J. Wysocki" <rafael@kernel.org >
Cc: Reinette Chatre <reinette.chatre@intel.com >
Cc: Rian Hunter <rian@alum.mit.edu >
Cc: Sherry Hurwitz <sherry.hurwitz@amd.com >
Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Thomas Lendacky <Thomas.Lendacky@amd.com >
Cc: Tony Luck <tony.luck@intel.com >
Cc: Vitaly Kuznetsov <vkuznets@redhat.com >
Cc: <xiaochen.shen@intel.com >
Link: https://lkml.kernel.org/r/20181121202811.4492-12-babu.moger@amd.com
2018-11-22 20:16:20 +01:00
Babu Moger
723f1a0dd8
x86/resctrl: Fixup the user-visible strings
...
Fix the messages in rdt_last_cmd_printf() and rdt_last_cmd_puts() to
make them more meaningful and consistent.
[ bp: s/cpu/CPU/; s/mem\W/memory ]
Signed-off-by: Babu Moger <babu.moger@amd.com >
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: Andrew Morton <akpm@linux-foundation.org >
Cc: Andy Lutomirski <luto@kernel.org >
Cc: Arnd Bergmann <arnd@arndb.de >
Cc: Brijesh Singh <brijesh.singh@amd.com >
Cc: "Chang S. Bae" <chang.seok.bae@intel.com >
Cc: David Miller <davem@davemloft.net >
Cc: David Woodhouse <dwmw2@infradead.org >
Cc: Dmitry Safonov <dima@arista.com >
Cc: Fenghua Yu <fenghua.yu@intel.com >
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Cc: "H. Peter Anvin" <hpa@zytor.com >
Cc: Ingo Molnar <mingo@redhat.com >
Cc: Jann Horn <jannh@google.com >
Cc: Joerg Roedel <jroedel@suse.de >
Cc: Jonathan Corbet <corbet@lwn.net >
Cc: Josh Poimboeuf <jpoimboe@redhat.com >
Cc: Kate Stewart <kstewart@linuxfoundation.org >
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com >
Cc: <linux-doc@vger.kernel.org >
Cc: Mauro Carvalho Chehab <mchehab+samsung@kernel.org >
Cc: Paolo Bonzini <pbonzini@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Philippe Ombredanne <pombredanne@nexb.com >
Cc: Pu Wen <puwen@hygon.cn >
Cc: <qianyue.zj@alibaba-inc.com >
Cc: "Rafael J. Wysocki" <rafael@kernel.org >
Cc: Reinette Chatre <reinette.chatre@intel.com >
Cc: Rian Hunter <rian@alum.mit.edu >
Cc: Sherry Hurwitz <sherry.hurwitz@amd.com >
Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Thomas Lendacky <Thomas.Lendacky@amd.com >
Cc: Tony Luck <tony.luck@intel.com >
Cc: Vitaly Kuznetsov <vkuznets@redhat.com >
Cc: <xiaochen.shen@intel.com >
Link: https://lkml.kernel.org/r/20181121202811.4492-11-babu.moger@amd.com
2018-11-22 20:16:20 +01:00
Sherry Hurwitz
9f72f855a6
x86/resctrl: Add AMD's X86_FEATURE_MBA to the scattered CPUID features
...
The feature bit X86_FEATURE_MBA is detected via CPUID leaf 0x80000008
EBX Bit 06. This bit indicates the support of AMD's MBA feature.
This feature is supported by both Intel and AMD. But they are detected
in different CPUID leaves.
[ bp: s/cpuid/CPUID/g ]
Signed-off-by: Sherry Hurwitz <sherry.hurwitz@amd.com >
Signed-off-by: Babu Moger <babu.moger@amd.com >
Signed-off-by: Borislav Petkov <bp@suse.de >
Reviewed-by: Borislav Petkov <bp@suse.de >
Cc: Andrew Morton <akpm@linux-foundation.org >
Cc: Andy Lutomirski <luto@kernel.org >
Cc: Arnd Bergmann <arnd@arndb.de >
Cc: Brijesh Singh <brijesh.singh@amd.com >
Cc: "Chang S. Bae" <chang.seok.bae@intel.com >
Cc: David Miller <davem@davemloft.net >
Cc: David Woodhouse <dwmw2@infradead.org >
Cc: Dmitry Safonov <dima@arista.com >
Cc: Fenghua Yu <fenghua.yu@intel.com >
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Cc: "H. Peter Anvin" <hpa@zytor.com >
Cc: Ingo Molnar <mingo@redhat.com >
Cc: Jann Horn <jannh@google.com >
Cc: Joerg Roedel <jroedel@suse.de >
Cc: Jonathan Corbet <corbet@lwn.net >
Cc: Josh Poimboeuf <jpoimboe@redhat.com >
Cc: Kate Stewart <kstewart@linuxfoundation.org >
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com >
Cc: <linux-doc@vger.kernel.org >
Cc: Mauro Carvalho Chehab <mchehab+samsung@kernel.org >
Cc: Paolo Bonzini <pbonzini@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Philippe Ombredanne <pombredanne@nexb.com >
Cc: Pu Wen <puwen@hygon.cn >
Cc: <qianyue.zj@alibaba-inc.com >
Cc: "Rafael J. Wysocki" <rafael@kernel.org >
Cc: Reinette Chatre <reinette.chatre@intel.com >
Cc: Rian Hunter <rian@alum.mit.edu >
Cc: Sherry Hurwitz <sherry.hurwitz@amd.com >
Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Thomas Lendacky <Thomas.Lendacky@amd.com >
Cc: Tony Luck <tony.luck@intel.com >
Cc: Vitaly Kuznetsov <vkuznets@redhat.com >
Cc: <xiaochen.shen@intel.com >
Link: https://lkml.kernel.org/r/20181121202811.4492-10-babu.moger@amd.com
2018-11-22 20:16:19 +01:00
Babu Moger
6fe07ce35e
x86/resctrl: Rename the config option INTEL_RDT to RESCTRL
...
The resource control feature is supported by both Intel and AMD. So,
rename CONFIG_INTEL_RDT to the vendor-neutral CONFIG_RESCTRL.
Now CONFIG_RESCTRL will be used for both Intel and AMD to enable
Resource Control support. Update the texts in config and condition
accordingly.
[ bp: Simplify Kconfig text. ]
Signed-off-by: Babu Moger <babu.moger@amd.com >
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: Andrew Morton <akpm@linux-foundation.org >
Cc: Andy Lutomirski <luto@kernel.org >
Cc: Arnd Bergmann <arnd@arndb.de >
Cc: Brijesh Singh <brijesh.singh@amd.com >
Cc: "Chang S. Bae" <chang.seok.bae@intel.com >
Cc: David Miller <davem@davemloft.net >
Cc: David Woodhouse <dwmw2@infradead.org >
Cc: Dmitry Safonov <dima@arista.com >
Cc: Fenghua Yu <fenghua.yu@intel.com >
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Cc: "H. Peter Anvin" <hpa@zytor.com >
Cc: Ingo Molnar <mingo@redhat.com >
Cc: Jann Horn <jannh@google.com >
Cc: Joerg Roedel <jroedel@suse.de >
Cc: Jonathan Corbet <corbet@lwn.net >
Cc: Josh Poimboeuf <jpoimboe@redhat.com >
Cc: Kate Stewart <kstewart@linuxfoundation.org >
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com >
Cc: <linux-doc@vger.kernel.org >
Cc: Mauro Carvalho Chehab <mchehab+samsung@kernel.org >
Cc: Paolo Bonzini <pbonzini@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Philippe Ombredanne <pombredanne@nexb.com >
Cc: Pu Wen <puwen@hygon.cn >
Cc: <qianyue.zj@alibaba-inc.com >
Cc: "Rafael J. Wysocki" <rafael@kernel.org >
Cc: Reinette Chatre <reinette.chatre@intel.com >
Cc: Rian Hunter <rian@alum.mit.edu >
Cc: Sherry Hurwitz <sherry.hurwitz@amd.com >
Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Thomas Lendacky <Thomas.Lendacky@amd.com >
Cc: Tony Luck <tony.luck@intel.com >
Cc: Vitaly Kuznetsov <vkuznets@redhat.com >
Cc: <xiaochen.shen@intel.com >
Link: https://lkml.kernel.org/r/20181121202811.4492-9-babu.moger@amd.com
2018-11-22 20:16:19 +01:00
Babu Moger
580ebb66cb
x86/resctrl: Add vendor check for the MBA software controller
...
MBA software controller support is available only on Intel.
Suggested-by: Fenghua Yu <fenghua.yu@intel.com >
Signed-off-by: Babu Moger <babu.moger@amd.com >
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: Andrew Morton <akpm@linux-foundation.org >
Cc: Andy Lutomirski <luto@kernel.org >
Cc: Arnd Bergmann <arnd@arndb.de >
Cc: Brijesh Singh <brijesh.singh@amd.com >
Cc: "Chang S. Bae" <chang.seok.bae@intel.com >
Cc: David Miller <davem@davemloft.net >
Cc: David Woodhouse <dwmw2@infradead.org >
Cc: Dmitry Safonov <dima@arista.com >
Cc: Fenghua Yu <fenghua.yu@intel.com >
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Cc: "H. Peter Anvin" <hpa@zytor.com >
Cc: Ingo Molnar <mingo@redhat.com >
Cc: Jann Horn <jannh@google.com >
Cc: Joerg Roedel <jroedel@suse.de >
Cc: Jonathan Corbet <corbet@lwn.net >
Cc: Josh Poimboeuf <jpoimboe@redhat.com >
Cc: Kate Stewart <kstewart@linuxfoundation.org >
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com >
Cc: <linux-doc@vger.kernel.org >
Cc: Mauro Carvalho Chehab <mchehab+samsung@kernel.org >
Cc: Paolo Bonzini <pbonzini@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Philippe Ombredanne <pombredanne@nexb.com >
Cc: Pu Wen <puwen@hygon.cn >
Cc: <qianyue.zj@alibaba-inc.com >
Cc: "Rafael J. Wysocki" <rafael@kernel.org >
Cc: Reinette Chatre <reinette.chatre@intel.com >
Cc: Rian Hunter <rian@alum.mit.edu >
Cc: Sherry Hurwitz <sherry.hurwitz@amd.com >
Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Thomas Lendacky <Thomas.Lendacky@amd.com >
Cc: Tony Luck <tony.luck@intel.com >
Cc: Vitaly Kuznetsov <vkuznets@redhat.com >
Cc: <xiaochen.shen@intel.com >
Link: https://lkml.kernel.org/r/20181121202811.4492-8-babu.moger@amd.com
2018-11-22 20:16:19 +01:00
Babu Moger
a36c5ff560
x86/resctrl: Bring cbm_validate() into the resource structure
...
Bring all the functions that are different between the vendors into the
resource structure and initialize them dynamically. Add _intel suffix to
the Intel-specific functions.
cbm_validate() which does cache bitmask validation, differs between the
vendors as AMD allows non-contiguous masks. So, use separate functions
for Intel and AMD.
[ bp: Massage commit message and fixup rdt_resource members' vertical
alignment. ]
Signed-off-by: Babu Moger <babu.moger@amd.com >
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: Andrew Morton <akpm@linux-foundation.org >
Cc: Andy Lutomirski <luto@kernel.org >
Cc: Arnd Bergmann <arnd@arndb.de >
Cc: Brijesh Singh <brijesh.singh@amd.com >
Cc: "Chang S. Bae" <chang.seok.bae@intel.com >
Cc: David Miller <davem@davemloft.net >
Cc: David Woodhouse <dwmw2@infradead.org >
Cc: Dmitry Safonov <dima@arista.com >
Cc: Fenghua Yu <fenghua.yu@intel.com >
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Cc: "H. Peter Anvin" <hpa@zytor.com >
Cc: Ingo Molnar <mingo@redhat.com >
Cc: Jann Horn <jannh@google.com >
Cc: Joerg Roedel <jroedel@suse.de >
Cc: Jonathan Corbet <corbet@lwn.net >
Cc: Josh Poimboeuf <jpoimboe@redhat.com >
Cc: Kate Stewart <kstewart@linuxfoundation.org >
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com >
Cc: <linux-doc@vger.kernel.org >
Cc: Mauro Carvalho Chehab <mchehab+samsung@kernel.org >
Cc: Paolo Bonzini <pbonzini@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Philippe Ombredanne <pombredanne@nexb.com >
Cc: Pu Wen <puwen@hygon.cn >
Cc: <qianyue.zj@alibaba-inc.com >
Cc: "Rafael J. Wysocki" <rafael@kernel.org >
Cc: Reinette Chatre <reinette.chatre@intel.com >
Cc: Rian Hunter <rian@alum.mit.edu >
Cc: Sherry Hurwitz <sherry.hurwitz@amd.com >
Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Thomas Lendacky <Thomas.Lendacky@amd.com >
Cc: Tony Luck <tony.luck@intel.com >
Cc: Vitaly Kuznetsov <vkuznets@redhat.com >
Cc: <xiaochen.shen@intel.com >
Link: https://lkml.kernel.org/r/20181121202811.4492-7-babu.moger@amd.com
2018-11-22 20:16:19 +01:00
Babu Moger
1ad4fa41d9
x86/resctrl: Initialize the vendor-specific resource functions
...
Initialize the resource functions that are different between the
vendors. Some features are initialized differently between the vendors.
Add _intel suffix to Intel-specific functions.
For example, the MBA feature varies significantly between Intel and AMD.
Separate the initialization of these resource functions. That way we can
easily add AMD's functions later.
Signed-off-by: Babu Moger <babu.moger@amd.com >
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: Andrew Morton <akpm@linux-foundation.org >
Cc: Andy Lutomirski <luto@kernel.org >
Cc: Arnd Bergmann <arnd@arndb.de >
Cc: Brijesh Singh <brijesh.singh@amd.com >
Cc: "Chang S. Bae" <chang.seok.bae@intel.com >
Cc: David Miller <davem@davemloft.net >
Cc: David Woodhouse <dwmw2@infradead.org >
Cc: Dmitry Safonov <dima@arista.com >
Cc: Fenghua Yu <fenghua.yu@intel.com >
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Cc: "H. Peter Anvin" <hpa@zytor.com >
Cc: Ingo Molnar <mingo@redhat.com >
Cc: Jann Horn <jannh@google.com >
Cc: Joerg Roedel <jroedel@suse.de >
Cc: Jonathan Corbet <corbet@lwn.net >
Cc: Josh Poimboeuf <jpoimboe@redhat.com >
Cc: Kate Stewart <kstewart@linuxfoundation.org >
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com >
Cc: <linux-doc@vger.kernel.org >
Cc: Mauro Carvalho Chehab <mchehab+samsung@kernel.org >
Cc: Paolo Bonzini <pbonzini@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Philippe Ombredanne <pombredanne@nexb.com >
Cc: Pu Wen <puwen@hygon.cn >
Cc: <qianyue.zj@alibaba-inc.com >
Cc: "Rafael J. Wysocki" <rafael@kernel.org >
Cc: Reinette Chatre <reinette.chatre@intel.com >
Cc: Rian Hunter <rian@alum.mit.edu >
Cc: Sherry Hurwitz <sherry.hurwitz@amd.com >
Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Thomas Lendacky <Thomas.Lendacky@amd.com >
Cc: Tony Luck <tony.luck@intel.com >
Cc: Vitaly Kuznetsov <vkuznets@redhat.com >
Cc: <xiaochen.shen@intel.com >
Link: https://lkml.kernel.org/r/20181121202811.4492-6-babu.moger@amd.com
2018-11-22 20:16:19 +01:00
Babu Moger
aa50453a44
x86/resctrl: Move all the macros to resctrl/internal.h
...
Move all the macros to resctrl/internal.h and rename the registers with
MSR_ prefix for consistency.
[bp: align MSR definitions vertically ]
Signed-off-by: Babu Moger <babu.moger@amd.com >
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: Andrew Morton <akpm@linux-foundation.org >
Cc: Andy Lutomirski <luto@kernel.org >
Cc: Arnd Bergmann <arnd@arndb.de >
Cc: Brijesh Singh <brijesh.singh@amd.com >
Cc: "Chang S. Bae" <chang.seok.bae@intel.com >
Cc: David Miller <davem@davemloft.net >
Cc: David Woodhouse <dwmw2@infradead.org >
Cc: Dmitry Safonov <dima@arista.com >
Cc: Fenghua Yu <fenghua.yu@intel.com >
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Cc: "H. Peter Anvin" <hpa@zytor.com >
Cc: Ingo Molnar <mingo@redhat.com >
Cc: Jann Horn <jannh@google.com >
Cc: Joerg Roedel <jroedel@suse.de >
Cc: Jonathan Corbet <corbet@lwn.net >
Cc: Josh Poimboeuf <jpoimboe@redhat.com >
Cc: Kate Stewart <kstewart@linuxfoundation.org >
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com >
Cc: <linux-doc@vger.kernel.org >
Cc: Mauro Carvalho Chehab <mchehab+samsung@kernel.org >
Cc: Paolo Bonzini <pbonzini@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Philippe Ombredanne <pombredanne@nexb.com >
Cc: Pu Wen <puwen@hygon.cn >
Cc: <qianyue.zj@alibaba-inc.com >
Cc: "Rafael J. Wysocki" <rafael@kernel.org >
Cc: Reinette Chatre <reinette.chatre@intel.com >
Cc: Rian Hunter <rian@alum.mit.edu >
Cc: Sherry Hurwitz <sherry.hurwitz@amd.com >
Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Thomas Lendacky <Thomas.Lendacky@amd.com >
Cc: Tony Luck <tony.luck@intel.com >
Cc: Vitaly Kuznetsov <vkuznets@redhat.com >
Cc: <xiaochen.shen@intel.com >
Link: https://lkml.kernel.org/r/20181121202811.4492-5-babu.moger@amd.com
2018-11-22 20:16:19 +01:00
Babu Moger
0f00717ecc
x86/resctrl: Re-arrange the RDT init code
...
Separate the call sequence for rdt_quirks and MBA feature. This is in
preparation to handle vendor differences in these call sequences. Rename
the functions to make the flow a bit more meaningful.
Signed-off-by: Babu Moger <babu.moger@amd.com >
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: Andrew Morton <akpm@linux-foundation.org >
Cc: Andy Lutomirski <luto@kernel.org >
Cc: Arnd Bergmann <arnd@arndb.de >
Cc: Brijesh Singh <brijesh.singh@amd.com >
Cc: "Chang S. Bae" <chang.seok.bae@intel.com >
Cc: David Miller <davem@davemloft.net >
Cc: David Woodhouse <dwmw2@infradead.org >
Cc: Dmitry Safonov <dima@arista.com >
Cc: Fenghua Yu <fenghua.yu@intel.com >
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Cc: "H. Peter Anvin" <hpa@zytor.com >
Cc: Ingo Molnar <mingo@redhat.com >
Cc: Jann Horn <jannh@google.com >
Cc: Joerg Roedel <jroedel@suse.de >
Cc: Jonathan Corbet <corbet@lwn.net >
Cc: Josh Poimboeuf <jpoimboe@redhat.com >
Cc: Kate Stewart <kstewart@linuxfoundation.org >
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com >
Cc: <linux-doc@vger.kernel.org >
Cc: Mauro Carvalho Chehab <mchehab+samsung@kernel.org >
Cc: Paolo Bonzini <pbonzini@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Philippe Ombredanne <pombredanne@nexb.com >
Cc: Pu Wen <puwen@hygon.cn >
Cc: <qianyue.zj@alibaba-inc.com >
Cc: "Rafael J. Wysocki" <rafael@kernel.org >
Cc: Reinette Chatre <reinette.chatre@intel.com >
Cc: Rian Hunter <rian@alum.mit.edu >
Cc: Sherry Hurwitz <sherry.hurwitz@amd.com >
Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Thomas Lendacky <Thomas.Lendacky@amd.com >
Cc: Tony Luck <tony.luck@intel.com >
Cc: Vitaly Kuznetsov <vkuznets@redhat.com >
Cc: <xiaochen.shen@intel.com >
Cc: x86-ml <x86@kernel.org >
Link: https://lkml.kernel.org/r/20181121202811.4492-4-babu.moger@amd.com
2018-11-22 20:16:19 +01:00
Babu Moger
352940ecec
x86/resctrl: Rename the RDT functions and definitions
...
As AMD is starting to support RESCTRL features, rename the RDT functions
and definitions to more generic names.
Replace "intel_rdt" with "resctrl" where applicable.
Signed-off-by: Babu Moger <babu.moger@amd.com >
Signed-off-by: Borislav Petkov <bp@suse.de >
Reviewed-by: Borislav Petkov <bp@suse.de >
Cc: Andrew Morton <akpm@linux-foundation.org >
Cc: Andy Lutomirski <luto@kernel.org >
Cc: Arnd Bergmann <arnd@arndb.de >
Cc: Brijesh Singh <brijesh.singh@amd.com >
Cc: "Chang S. Bae" <chang.seok.bae@intel.com >
Cc: David Miller <davem@davemloft.net >
Cc: David Woodhouse <dwmw2@infradead.org >
Cc: Dmitry Safonov <dima@arista.com >
Cc: Fenghua Yu <fenghua.yu@intel.com >
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Cc: "H. Peter Anvin" <hpa@zytor.com >
Cc: Ingo Molnar <mingo@redhat.com >
Cc: Jann Horn <jannh@google.com >
Cc: Joerg Roedel <jroedel@suse.de >
Cc: Jonathan Corbet <corbet@lwn.net >
Cc: Josh Poimboeuf <jpoimboe@redhat.com >
Cc: Kate Stewart <kstewart@linuxfoundation.org >
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com >
Cc: <linux-doc@vger.kernel.org >
Cc: Mauro Carvalho Chehab <mchehab+samsung@kernel.org >
Cc: Paolo Bonzini <pbonzini@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Philippe Ombredanne <pombredanne@nexb.com >
Cc: Pu Wen <puwen@hygon.cn >
Cc: <qianyue.zj@alibaba-inc.com >
Cc: "Rafael J. Wysocki" <rafael@kernel.org >
Cc: Reinette Chatre <reinette.chatre@intel.com >
Cc: Rian Hunter <rian@alum.mit.edu >
Cc: Sherry Hurwitz <sherry.hurwitz@amd.com >
Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Thomas Lendacky <Thomas.Lendacky@amd.com >
Cc: Tony Luck <tony.luck@intel.com >
Cc: Vitaly Kuznetsov <vkuznets@redhat.com >
Cc: <xiaochen.shen@intel.com >
Link: https://lkml.kernel.org/r/20181121202811.4492-3-babu.moger@amd.com
2018-11-22 20:16:18 +01:00
Babu Moger
fa7d949337
x86/resctrl: Rename and move rdt files to a separate directory
...
New generation of AMD processors add support for RDT (or QOS) features.
Together, these features will be called RESCTRL. With more than one
vendors supporting these features, it seems more appropriate to rename
these files.
Create a new directory with the name 'resctrl' and move all the
intel_rdt files to the new directory. This way all the resctrl related
code resides inside one directory.
[ bp: Add SPDX identifier to the Makefile ]
Suggested-by: Borislav Petkov <bp@suse.de >
Signed-off-by: Babu Moger <babu.moger@amd.com >
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: Andrew Morton <akpm@linux-foundation.org >
Cc: Andy Lutomirski <luto@kernel.org >
Cc: Arnd Bergmann <arnd@arndb.de >
Cc: Brijesh Singh <brijesh.singh@amd.com >
Cc: "Chang S. Bae" <chang.seok.bae@intel.com >
Cc: David Miller <davem@davemloft.net >
Cc: David Woodhouse <dwmw2@infradead.org >
Cc: Dmitry Safonov <dima@arista.com >
Cc: Fenghua Yu <fenghua.yu@intel.com >
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Cc: "H. Peter Anvin" <hpa@zytor.com >
Cc: Ingo Molnar <mingo@redhat.com >
Cc: Jann Horn <jannh@google.com >
Cc: Joerg Roedel <jroedel@suse.de >
Cc: Jonathan Corbet <corbet@lwn.net >
Cc: Josh Poimboeuf <jpoimboe@redhat.com >
Cc: Kate Stewart <kstewart@linuxfoundation.org >
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com >
Cc: <linux-doc@vger.kernel.org >
Cc: Mauro Carvalho Chehab <mchehab+samsung@kernel.org >
Cc: Paolo Bonzini <pbonzini@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Philippe Ombredanne <pombredanne@nexb.com >
Cc: Pu Wen <puwen@hygon.cn >
Cc: <qianyue.zj@alibaba-inc.com >
Cc: "Rafael J. Wysocki" <rafael@kernel.org >
Cc: Reinette Chatre <reinette.chatre@intel.com >
Cc: Rian Hunter <rian@alum.mit.edu >
Cc: Sherry Hurwitz <sherry.hurwitz@amd.com >
Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Thomas Lendacky <Thomas.Lendacky@amd.com >
Cc: Tony Luck <tony.luck@intel.com >
Cc: Vitaly Kuznetsov <vkuznets@redhat.com >
Cc: <xiaochen.shen@intel.com >
Link: https://lkml.kernel.org/r/20181121202811.4492-2-babu.moger@amd.com
2018-11-22 20:16:18 +01:00
Borislav Petkov
2ffcbce39e
x86/microcode/AMD: Update copyright
...
Adjust copyright.
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: x86@kernel.org
Link: https://lkml.kernel.org/r/20181107170218.7596-17-bp@alien8.de
2018-11-19 10:55:12 +01:00
Maciej S. Szmigiero
413c89154c
x86/microcode/AMD: Check the equivalence table size when scanning it
...
Currently, the code scanning the CPU equivalence table read from a
microcode container file assumes that it actually contains a terminating
zero entry.
Check also the size of this table to make sure that no reads past its
end happen, in case there's no terminating zero entry at the end of the
table.
[ bp: Adjust to new changes. ]
Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name >
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: x86@kernel.org
Link: https://lkml.kernel.org/r/20181107170218.7596-16-bp@alien8.de
2018-11-19 10:55:12 +01:00
Maciej S. Szmigiero
39cd7c17f9
x86/microcode/AMD: Convert CPU equivalence table variable into a struct
...
Convert the CPU equivalence table into a proper struct in preparation
for tracking also the size of this table.
[ bp: Have functions deal with struct equiv_cpu_table pointers only. Rediff. ]
Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name >
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: x86@kernel.org
Link: https://lkml.kernel.org/r/20181107170218.7596-15-bp@alien8.de
2018-11-19 10:55:12 +01:00
Maciej S. Szmigiero
38673f623d
x86/microcode/AMD: Check microcode container data in the late loader
...
Convert the late loading path to use the newly introduced microcode
container data checking functions as it was previously done for the
early loader.
[ bp: Keep header length addition in install_equiv_cpu_table() and rediff. ]
Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name >
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: x86@kernel.org
Link: https://lkml.kernel.org/r/20181107170218.7596-14-bp@alien8.de
2018-11-19 10:55:11 +01:00
Borislav Petkov
72dc571a3a
x86/microcode/AMD: Fix container size's type
...
Make it size_t everywhere as this is what we get from cpio.
[ bp: Fix a smatch warning. ]
Originally-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name >
Reported-by: kbuild test robot <lkp@intel.com >
Signed-off-by: Borislav Petkov <bp@suse.de >
Link: https://lkml.kernel.org/r/20181107170218.7596-13-bp@alien8.de
2018-11-19 10:55:06 +01:00
Borislav Petkov
c45e80358c
x86/microcode/AMD: Convert early parser to the new verification routines
...
Now that they have the required functionality, use them to verify the
equivalence table and each patch, thus making parse_container() more
readable.
Originally-by: "Maciej S. Szmigiero" <mail@maciej.szmigiero.name >
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: x86@kernel.org
Link: https://lkml.kernel.org/r/20181107170218.7596-12-bp@alien8.de
2018-11-19 10:51:06 +01:00
Borislav Petkov
d430a305b7
x86/microcode/AMD: Change verify_patch()'s return value
...
Have it return 0 on success, positive value when the current patch
should be skipped and negative on error.
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: x86@kernel.org
Link: https://lkml.kernel.org/r/20181107170218.7596-11-bp@alien8.de
2018-11-19 10:51:06 +01:00
Borislav Petkov
c79570205b
x86/microcode/AMD: Move chipset-specific check into verify_patch()
...
... where it belongs.
No functional changes.
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: x86@kernel.org
https://lkml.kernel.org/r/20181107170218.7596-10-bp@alien8.de
2018-11-19 10:51:06 +01:00
Borislav Petkov
51776fb805
x86/microcode/AMD: Move patch family check to verify_patch()
...
... where all the microcode patch verification is being concentrated.
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: x86@kernel.org
Link: https://lkml.kernel.org/r/20181107170218.7596-9-bp@alien8.de
2018-11-19 10:51:05 +01:00
Borislav Petkov
6cdce951f7
x86/microcode/AMD: Simplify patch family detection
...
Instead of traversing the equivalence table, compute the family a patch
is for, from the processor revision ID in the microcode header.
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: x86@kernel.org
Link: https://lkml.kernel.org/r/20181107170218.7596-8-bp@alien8.de
2018-11-19 10:51:05 +01:00
Borislav Petkov
2b8d34b1ec
x86/microcode/AMD: Concentrate patch verification
...
Add a verify_patch() function which tries to sanity-check many aspects
of a microcode patch supplied by an outside container before attempting
a load.
Prepend all sub-functions' names which verify an aspect of a microcode
patch with "__".
Call it in verify_and_add_patch() *before* looking at the microcode
header.
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: x86@kernel.org
Link: https://lkml.kernel.org/r/20181107170218.7596-7-bp@alien8.de
2018-11-19 10:51:05 +01:00
Borislav Petkov
70887cb23e
x86/microcode/AMD: Cleanup verify_patch_size() more
...
Rename the variable which contains the patch size read out from the
section header to sh_psize for better differentiation of all the "sizes"
in that function.
Also, improve the comment above it.
No functional changes.
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: x86@kernel.org
Link: https://lkml.kernel.org/r/20181107170218.7596-6-bp@alien8.de
2018-11-19 10:51:05 +01:00
Borislav Petkov
cfffbfeb42
x86/microcode/AMD: Clean up per-family patch size checks
...
Starting with family 0x15, the patch size verification is not needed
anymore. Thus get rid of the need to update this checking function with
each new family.
Keep the check for older families.
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: Tom Lendacky <thomas.lendacky@amd.com >
Cc: x86@kernel.org
Link: https://lkml.kernel.org/r/20181107170218.7596-5-bp@alien8.de
2018-11-19 10:51:00 +01:00
Borislav Petkov
3974b68114
x86/microcode/AMD: Move verify_patch_size() up in the file
...
... to enable later improvements.
No functional changes.
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: x86@kernel.org
Link: https://lkml.kernel.org/r/20181107170218.7596-4-bp@alien8.de
2018-11-19 10:45:08 +01:00
Maciej S. Szmigiero
f4ff25916c
x86/microcode/AMD: Add microcode container verification
...
Add container and patch verification functions to the AMD microcode
update driver.
These functions check whether a passed buffer contains the relevant
structure, whether it isn't truncated and (for actual microcode patches)
whether the size of a patch is not too large for a particular CPU family.
By adding these checks as separate functions the actual microcode loading
code won't get interspersed with a lot of checks and so will be more
readable.
[ bp: Make all pr_err() calls into pr_debug() and drop the
verify_patch() bits. ]
Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name >
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: x86-ml <x86@kernel.org >
Link: http://lkml.kernel.org/r/3014e96c82cd90761b4601bd2cfe59c4119e46a7.1529424596.git.mail@maciej.szmigiero.name
2018-11-19 10:45:03 +01:00
Maciej S. Szmigiero
479229d160
x86/microcode/AMD: Subtract SECTION_HDR_SIZE from file leftover length
...
verify_patch_size() verifies whether the remaining size of the microcode
container file is large enough to contain a patch of the indicated size.
However, the section header length is not included in this indicated
size but it is present in the leftover file length so it should be
subtracted from the leftover file length before passing this value to
verify_patch_size().
[ bp: Split comment. ]
Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name >
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: x86-ml <x86@kernel.org >
Link: http://lkml.kernel.org/r/6df43f4f6a28186a13a66e8d7e61143c5e1a2324.1529424596.git.mail@maciej.szmigiero.name
2018-11-19 10:44:59 +01:00
Borislav Petkov
68b5e4326e
x86/mce: Fix -Wmissing-prototypes warnings
...
Add the proper includes and make smca_get_name() static.
Fix an actual bug too which the warning triggered:
arch/x86/kernel/cpu/mcheck/therm_throt.c:395:39: error: conflicting \
types for ‘smp_thermal_interrupt’
asmlinkage __visible void __irq_entry smp_thermal_interrupt(struct pt_regs *r)
^~~~~~~~~~~~~~~~~~~~~
In file included from arch/x86/kernel/cpu/mcheck/therm_throt.c:29:
./arch/x86/include/asm/traps.h:107:17: note: previous declaration of \
‘smp_thermal_interrupt’ was here
asmlinkage void smp_thermal_interrupt(void);
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: Yi Wang <wang.yi59@zte.com.cn >
Cc: Michael Matz <matz@suse.de >
Cc: x86@kernel.org
Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1811081633160.1549@nanos.tec.linutronix.de
2018-11-14 13:46:26 +01:00
Steven Rostedt (VMware)
1503538843
x86/cpu/vmware: Do not trace vmware_sched_clock()
...
When running function tracing on a Linux guest running on VMware
Workstation, the guest would crash. This is due to tracing of the
sched_clock internal call of the VMware vmware_sched_clock(), which
causes an infinite recursion within the tracing code (clock calls must
not be traced).
Make vmware_sched_clock() not traced by ftrace.
Fixes: 80e9a4f21f
("x86/vmware: Add paravirt sched clock")
Reported-by: GwanYeong Kim <gy741.kim@gmail.com >
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org >
Signed-off-by: Borislav Petkov <bp@suse.de >
CC: Alok Kataria <akataria@vmware.com >
CC: GwanYeong Kim <gy741.kim@gmail.com >
CC: "H. Peter Anvin" <hpa@zytor.com >
CC: Ingo Molnar <mingo@kernel.org >
Cc: stable@vger.kernel.org
CC: Thomas Gleixner <tglx@linutronix.de >
CC: virtualization@lists.linux-foundation.org
CC: x86-ml <x86@kernel.org >
Link: http://lkml.kernel.org/r/20181109152207.4d3e7d70@gandalf.local.home
2018-11-09 21:39:14 +01:00
Vishal Verma
e8a308e5f4
acpi/nfit, x86/mce: Validate a MCE's address before using it
...
The NFIT machine check handler uses the physical address from the mce
structure, and compares it against information in the ACPI NFIT table
to determine whether that location lies on an NVDIMM. The mce->addr
field however may not always be valid, and this is indicated by the
MCI_STATUS_ADDRV bit in the status field.
Export mce_usable_address() which already performs validation for the
address, and use it in the NFIT handler.
Fixes: 6839a6d96f
("nfit: do an ARS scrub on hitting a latent media error")
Reported-by: Robert Elliott <elliott@hpe.com >
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com >
Signed-off-by: Borislav Petkov <bp@suse.de >
CC: Arnd Bergmann <arnd@arndb.de >
Cc: Dan Williams <dan.j.williams@intel.com >
CC: Dave Jiang <dave.jiang@intel.com >
CC: elliott@hpe.com
CC: "H. Peter Anvin" <hpa@zytor.com >
CC: Ingo Molnar <mingo@redhat.com >
CC: Len Brown <lenb@kernel.org >
CC: linux-acpi@vger.kernel.org
CC: linux-edac <linux-edac@vger.kernel.org >
CC: linux-nvdimm@lists.01.org
CC: Qiuxu Zhuo <qiuxu.zhuo@intel.com >
CC: "Rafael J. Wysocki" <rjw@rjwysocki.net >
CC: Ross Zwisler <zwisler@kernel.org >
CC: stable <stable@vger.kernel.org >
CC: Thomas Gleixner <tglx@linutronix.de >
CC: Tony Luck <tony.luck@intel.com >
CC: x86-ml <x86@kernel.org >
CC: Yazen Ghannam <yazen.ghannam@amd.com >
Link: http://lkml.kernel.org/r/20181026003729.8420-2-vishal.l.verma@intel.com
2018-11-06 19:13:26 +01:00
Vishal Verma
5d96c9342c
acpi/nfit, x86/mce: Handle only uncorrectable machine checks
...
The MCE handler for nfit devices is called for memory errors on a
Non-Volatile DIMM and adds the error location to a 'badblocks' list.
This list is used by the various NVDIMM drivers to avoid consuming known
poison locations during IO.
The MCE handler gets called for both corrected and uncorrectable errors.
Until now, both kinds of errors have been added to the badblocks list.
However, corrected memory errors indicate that the problem has already
been fixed by hardware, and the resulting interrupt is merely a
notification to Linux.
As far as future accesses to that location are concerned, it is
perfectly fine to use, and thus doesn't need to be included in the above
badblocks list.
Add a check in the nfit MCE handler to filter out corrected mce events,
and only process uncorrectable errors.
Fixes: 6839a6d96f
("nfit: do an ARS scrub on hitting a latent media error")
Reported-by: Omar Avelar <omar.avelar@intel.com >
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com >
Signed-off-by: Borislav Petkov <bp@suse.de >
CC: Arnd Bergmann <arnd@arndb.de >
CC: Dan Williams <dan.j.williams@intel.com >
CC: Dave Jiang <dave.jiang@intel.com >
CC: elliott@hpe.com
CC: "H. Peter Anvin" <hpa@zytor.com >
CC: Ingo Molnar <mingo@redhat.com >
CC: Len Brown <lenb@kernel.org >
CC: linux-acpi@vger.kernel.org
CC: linux-edac <linux-edac@vger.kernel.org >
CC: linux-nvdimm@lists.01.org
CC: Qiuxu Zhuo <qiuxu.zhuo@intel.com >
CC: "Rafael J. Wysocki" <rjw@rjwysocki.net >
CC: Ross Zwisler <zwisler@kernel.org >
CC: stable <stable@vger.kernel.org >
CC: Thomas Gleixner <tglx@linutronix.de >
CC: Tony Luck <tony.luck@intel.com >
CC: x86-ml <x86@kernel.org >
CC: Yazen Ghannam <yazen.ghannam@amd.com >
Link: http://lkml.kernel.org/r/20181026003729.8420-1-vishal.l.verma@intel.com
2018-11-06 19:13:10 +01:00
Sean Christopherson
43500e6f29
x86/cpufeatures: Remove get_scattered_cpuid_leaf()
...
get_scattered_cpuid_leaf() was added[1] to help KVM rebuild hardware-
defined leafs that are rearranged by Linux to avoid bloating the
x86_capability array. Eventually, the last consumer of the function was
removed[2], but the function itself was kept, perhaps even intentionally
as a form of documentation.
Remove get_scattered_cpuid_leaf() as it is currently not used by KVM.
Furthermore, simply rebuilding the "real" leaf does not resolve all of
KVM's woes when it comes to exposing a scattered CPUID feature, i.e.
keeping the function as documentation may be counter-productive in some
scenarios, e.g. when KVM needs to do more than simply expose the leaf.
[1] 47bdf3378d
("x86/cpuid: Provide get_scattered_cpuid_leaf()")
[2] b7b27aa011
("KVM/x86: Update the reverse_cpuid list to include CPUID_7_EDX")
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com >
Signed-off-by: Borislav Petkov <bp@suse.de >
CC: "H. Peter Anvin" <hpa@zytor.com >
CC: Ingo Molnar <mingo@redhat.com >
Cc: Paolo Bonzini <pbonzini@redhat.com >
Cc: Radim Krčmář <rkrcmar@redhat.com >
CC: Thomas Gleixner <tglx@linutronix.de >
CC: x86-ml <x86@kernel.org >
Link: http://lkml.kernel.org/r/20181105185725.18679-1-sean.j.christopherson@intel.com
2018-11-05 20:54:20 +01:00
Michael Kelley
1de72c7064
x86/hyper-v: Enable PIT shutdown quirk
...
Hyper-V emulation of the PIT has a quirk such that the normal PIT shutdown
path doesn't work, because clearing the counter register restarts the
timer.
Disable the counter clearing on PIT shutdown.
Signed-off-by: Michael Kelley <mikelley@microsoft.com >
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Cc: "gregkh@linuxfoundation.org " <gregkh@linuxfoundation.org >
Cc: "devel@linuxdriverproject.org " <devel@linuxdriverproject.org >
Cc: "daniel.lezcano@linaro.org " <daniel.lezcano@linaro.org >
Cc: "virtualization@lists.linux-foundation.org " <virtualization@lists.linux-foundation.org >
Cc: "jgross@suse.com " <jgross@suse.com >
Cc: "akataria@vmware.com " <akataria@vmware.com >
Cc: "olaf@aepfle.de " <olaf@aepfle.de >
Cc: "apw@canonical.com " <apw@canonical.com >
Cc: vkuznets <vkuznets@redhat.com >
Cc: "jasowang@redhat.com " <jasowang@redhat.com >
Cc: "marcelo.cerri@canonical.com " <marcelo.cerri@canonical.com >
Cc: KY Srinivasan <kys@microsoft.com >
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/1541303219-11142-3-git-send-email-mikelley@microsoft.com
2018-11-04 11:04:46 +01:00
Ingo Molnar
23a12ddee1
Merge branch 'core/urgent' into x86/urgent, to pick up objtool fix
...
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2018-11-03 23:42:16 +01:00
Mike Rapoport
57c8a661d9
mm: remove include/linux/bootmem.h
...
Move remaining definitions and declarations from include/linux/bootmem.h
into include/linux/memblock.h and remove the redundant header.
The includes were replaced with the semantic patch below and then
semi-automated removal of duplicated '#include <linux/memblock.h>
@@
@@
- #include <linux/bootmem.h>
+ #include <linux/memblock.h>
[sfr@canb.auug.org.au: dma-direct: fix up for the removal of linux/bootmem.h]
Link: http://lkml.kernel.org/r/20181002185342.133d1680@canb.auug.org.au
[sfr@canb.auug.org.au: powerpc: fix up for removal of linux/bootmem.h]
Link: http://lkml.kernel.org/r/20181005161406.73ef8727@canb.auug.org.au
[sfr@canb.auug.org.au: x86/kaslr, ACPI/NUMA: fix for linux/bootmem.h removal]
Link: http://lkml.kernel.org/r/20181008190341.5e396491@canb.auug.org.au
Link: http://lkml.kernel.org/r/1536927045-23536-30-git-send-email-rppt@linux.vnet.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com >
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au >
Acked-by: Michal Hocko <mhocko@suse.com >
Cc: Catalin Marinas <catalin.marinas@arm.com >
Cc: Chris Zankel <chris@zankel.net >
Cc: "David S. Miller" <davem@davemloft.net >
Cc: Geert Uytterhoeven <geert@linux-m68k.org >
Cc: Greentime Hu <green.hu@gmail.com >
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Cc: Guan Xuetao <gxt@pku.edu.cn >
Cc: Ingo Molnar <mingo@redhat.com >
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org >
Cc: Jonas Bonn <jonas@southpole.se >
Cc: Jonathan Corbet <corbet@lwn.net >
Cc: Ley Foon Tan <lftan@altera.com >
Cc: Mark Salter <msalter@redhat.com >
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com >
Cc: Matt Turner <mattst88@gmail.com >
Cc: Michael Ellerman <mpe@ellerman.id.au >
Cc: Michal Simek <monstr@monstr.eu >
Cc: Palmer Dabbelt <palmer@sifive.com >
Cc: Paul Burton <paul.burton@mips.com >
Cc: Richard Kuo <rkuo@codeaurora.org >
Cc: Richard Weinberger <richard@nod.at >
Cc: Rich Felker <dalias@libc.org >
Cc: Russell King <linux@armlinux.org.uk >
Cc: Serge Semin <fancer.lancer@gmail.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Tony Luck <tony.luck@intel.com >
Cc: Vineet Gupta <vgupta@synopsys.com >
Cc: Yoshinori Sato <ysato@users.sourceforge.jp >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2018-10-31 08:54:16 -07:00
Jordan Borgner
0e96f31ea4
x86: Clean up 'sizeof x' => 'sizeof(x)'
...
"sizeof(x)" is the canonical coding style used in arch/x86 most of the time.
Fix the few places that didn't follow the convention.
(Also do some whitespace cleanups in a few places while at it.)
[ mingo: Rewrote the changelog. ]
Signed-off-by: Jordan Borgner <mail@jordan-borgner.de >
Cc: Borislav Petkov <bp@alien8.de >
Cc: H. Peter Anvin <hpa@zytor.com >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Link: http://lkml.kernel.org/r/20181028125828.7rgammkgzep2wpam@JordanDesktop
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2018-10-29 07:13:28 +01:00
Ingo Molnar
4b783dd6a4
Merge branches 'x86/early-printk', 'x86/microcode' and 'core/objtool' into x86/urgent, to pick up simple topic branches
...
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2018-10-29 07:13:09 +01:00
Linus Torvalds
d82924c3b8
Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
...
Pull x86 pti updates from Ingo Molnar:
"The main changes:
- Make the IBPB barrier more strict and add STIBP support (Jiri
Kosina)
- Micro-optimize and clean up the entry code (Andy Lutomirski)
- ... plus misc other fixes"
* 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/speculation: Propagate information about RSB filling mitigation to sysfs
x86/speculation: Enable cross-hyperthread spectre v2 STIBP mitigation
x86/speculation: Apply IBPB more strictly to avoid cross-process data leak
x86/speculation: Add RETPOLINE_AMD support to the inline asm CALL_NOSPEC variant
x86/CPU: Fix unused variable warning when !CONFIG_IA32_EMULATION
x86/pti/64: Remove the SYSCALL64 entry trampoline
x86/entry/64: Use the TSS sp2 slot for SYSCALL/SYSRET scratch space
x86/entry/64: Document idtentry
2018-10-23 18:43:04 +01:00
Linus Torvalds
f682a7920b
Merge branch 'x86-paravirt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
...
Pull x86 paravirt updates from Ingo Molnar:
"Two main changes:
- Remove no longer used parts of the paravirt infrastructure and put
large quantities of paravirt ops under a new config option
PARAVIRT_XXL=y, which is selected by XEN_PV only. (Joergen Gross)
- Enable PV spinlocks on Hyperv (Yi Sun)"
* 'x86-paravirt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/hyperv: Enable PV qspinlock for Hyper-V
x86/hyperv: Add GUEST_IDLE_MSR support
x86/paravirt: Clean up native_patch()
x86/paravirt: Prevent redefinition of SAVE_FLAGS macro
x86/xen: Make xen_reservation_lock static
x86/paravirt: Remove unneeded mmu related paravirt ops bits
x86/paravirt: Move the Xen-only pv_mmu_ops under the PARAVIRT_XXL umbrella
x86/paravirt: Move the pv_irq_ops under the PARAVIRT_XXL umbrella
x86/paravirt: Move the Xen-only pv_cpu_ops under the PARAVIRT_XXL umbrella
x86/paravirt: Move items in pv_info under PARAVIRT_XXL umbrella
x86/paravirt: Introduce new config option PARAVIRT_XXL
x86/paravirt: Remove unused paravirt bits
x86/paravirt: Use a single ops structure
x86/paravirt: Remove clobbers from struct paravirt_patch_site
x86/paravirt: Remove clobbers parameter from paravirt patch functions
x86/paravirt: Make paravirt_patch_call() and paravirt_patch_jmp() static
x86/xen: Add SPDX identifier in arch/x86/xen files
x86/xen: Link platform-pci-unplug.o only if CONFIG_XEN_PVHVM
x86/xen: Move pv specific parts of arch/x86/xen/mmu.c to mmu_pv.c
x86/xen: Move pv irq related functions under CONFIG_XEN_PV umbrella
2018-10-23 17:54:58 +01:00
Linus Torvalds
fec98069fb
Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
...
Pull x86 cpu updates from Ingo Molnar:
"The main changes in this cycle were:
- Add support for the "Dhyana" x86 CPUs by Hygon: these are licensed
based on the AMD Zen architecture, and are built and sold in China,
for domestic datacenter use. The code is pretty close to AMD
support, mostly with a few quirks and enumeration differences. (Pu
Wen)
- Enable CPUID support on Cyrix 6x86/6x86L processors"
* 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
tools/cpupower: Add Hygon Dhyana support
cpufreq: Add Hygon Dhyana support
ACPI: Add Hygon Dhyana support
x86/xen: Add Hygon Dhyana support to Xen
x86/kvm: Add Hygon Dhyana support to KVM
x86/mce: Add Hygon Dhyana support to the MCA infrastructure
x86/bugs: Add Hygon Dhyana to the respective mitigation machinery
x86/apic: Add Hygon Dhyana support
x86/pci, x86/amd_nb: Add Hygon Dhyana support to PCI and northbridge
x86/amd_nb: Check vendor in AMD-only functions
x86/alternative: Init ideal_nops for Hygon Dhyana
x86/events: Add Hygon Dhyana support to PMU infrastructure
x86/smpboot: Do not use BSP INIT delay and MWAIT to idle on Dhyana
x86/cpu/mtrr: Support TOP_MEM2 and get MTRR number
x86/cpu: Get cache info and setup cache cpumap for Hygon Dhyana
x86/cpu: Create Hygon Dhyana architecture support file
x86/CPU: Change query logic so CPUID is enabled before testing
x86/CPU: Use correct macros for Cyrix calls
2018-10-23 16:16:40 +01:00
Linus Torvalds
e1d20beae7
Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
...
Pull x86 asm updates from Ingo Molnar:
"The main changes in this cycle were the fsgsbase related preparatory
patches from Chang S. Bae - but there's also an optimized
memcpy_flushcache() and a cleanup for the __cmpxchg_double() assembly
glue"
* 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/fsgsbase/64: Clean up various details
x86/segments: Introduce the 'CPUNODE' naming to better document the segment limit CPU/node NR trick
x86/vdso: Initialize the CPU/node NR segment descriptor earlier
x86/vdso: Introduce helper functions for CPU and node number
x86/segments/64: Rename the GDT PER_CPU entry to CPU_NUMBER
x86/fsgsbase/64: Factor out FS/GS segment loading from __switch_to()
x86/fsgsbase/64: Convert the ELF core dump code to the new FSGSBASE helpers
x86/fsgsbase/64: Make ptrace use the new FS/GS base helpers
x86/fsgsbase/64: Introduce FS/GS base helper functions
x86/fsgsbase/64: Fix ptrace() to read the FS/GS base accurately
x86/asm: Use CC_SET()/CC_OUT() in __cmpxchg_double()
x86/asm: Optimize memcpy_flushcache()
2018-10-23 15:24:22 +01:00
Linus Torvalds
0d1b82cd8a
Merge branch 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
...
Pull RAS updates from Ingo Molnar:
"Misc smaller fixes and cleanups"
* 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/mcelog: Remove one mce_helper definition
x86/mce: Add macros for the corrected error count bit field
x86/mce: Use BIT_ULL(x) for bit mask definitions
x86/mce-inject: Reset injection struct after injection
2018-10-23 13:46:36 +01:00
Linus Torvalds
c05f3642f4
Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
...
Pull perf updates from Ingo Molnar:
"The main updates in this cycle were:
- Lots of perf tooling changes too voluminous to list (big perf trace
and perf stat improvements, lots of libtraceevent reorganization,
etc.), so I'll list the authors and refer to the changelog for
details:
Benjamin Peterson, Jérémie Galarneau, Kim Phillips, Peter
Zijlstra, Ravi Bangoria, Sangwon Hong, Sean V Kelley, Steven
Rostedt, Thomas Gleixner, Ding Xiang, Eduardo Habkost, Thomas
Richter, Andi Kleen, Sanskriti Sharma, Adrian Hunter, Tzvetomir
Stoyanov, Arnaldo Carvalho de Melo, Jiri Olsa.
... with the bulk of the changes written by Jiri Olsa, Tzvetomir
Stoyanov and Arnaldo Carvalho de Melo.
- Continued intel_rdt work with a focus on playing well with perf
events. This also imported some non-perf RDT work due to
dependencies. (Reinette Chatre)
- Implement counter freezing for Arch Perfmon v4 (Skylake and newer).
This allows to speed up the PMI handler by avoiding unnecessary MSR
writes and make it more accurate. (Andi Kleen)
- kprobes cleanups and simplification (Masami Hiramatsu)
- Intel Goldmont PMU updates (Kan Liang)
- ... plus misc other fixes and updates"
* 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (155 commits)
kprobes/x86: Use preempt_enable() in optimized_callback()
x86/intel_rdt: Prevent pseudo-locking from using stale pointers
kprobes, x86/ptrace.h: Make regs_get_kernel_stack_nth() not fault on bad stack
perf/x86/intel: Export mem events only if there's PEBS support
x86/cpu: Drop pointless static qualifier in punit_dev_state_show()
x86/intel_rdt: Fix initial allocation to consider CDP
x86/intel_rdt: CBM overlap should also check for overlap with CDP peer
x86/intel_rdt: Introduce utility to obtain CDP peer
tools lib traceevent, perf tools: Move struct tep_handler definition in a local header file
tools lib traceevent: Separate out tep_strerror() for strerror_r() issues
perf python: More portable way to make CFLAGS work with clang
perf python: Make clang_has_option() work on Python 3
perf tools: Free temporary 'sys' string in read_event_files()
perf tools: Avoid double free in read_event_file()
perf tools: Free 'printk' string in parse_ftrace_printk()
perf tools: Cleanup trace-event-info 'tdata' leak
perf strbuf: Match va_{add,copy} with va_end
perf test: S390 does not support watchpoints in test 22
perf auxtrace: Include missing asm/bitsperlong.h to get BITS_PER_LONG
tools include: Adopt linux/bits.h
...
2018-10-23 13:32:18 +01:00