).
RFC v2:
- Architecture changed based on feedback from Thomas and PeterZ. #DB is
no longer generated for bus lock in ring0.
- Split the one single patch into four patches.
[RFC v1 can be found at:
https://lore.kernel.org/lkml/1595021700-68460-1-git-send-email-fenghua...@intel.com/]
Fenghua
the first #DB is being handled.
So no need to handle #DB for bus lock detected in the kernel.
Signed-off-by: Fenghua Yu
Reviewed-by: Tony Luck
---
Change Log:
RFC v3:
- Remove DR6_RESERVED change (PeterZ).
arch/x86/include/asm/cpu.h | 10 ++-
arch/x86/include/asm/msr-index.h | 1 +
Since #DB for bus lock detect changes the split_lock_detect parameter,
update the documentation for the changes.
Signed-off-by: Fenghua Yu
Reviewed-by: Tony Luck
---
Change Log:
v3:
- Enable Bus Lock Detection when fatal to handle bus lock from non-WB
(PeterZ).
v1:
- Fix a few wording issues
nel by an #DB trap after a user
instruction acquires a bus lock and is executed. This allows the kernel
to enforce user application throttling or mitigations.
The CPU feature flag to be shown in /proc/cpuinfo will be "bus_lock_detect".
Signed-off-by: Fenghua Yu
Reviewed-by: Tony Luck
rom non-WB triggers #DB.
Default option is "warn".
Hardware only generates #DB for bus lock detect when CPL>0 to avoid
nested #DB from multiple bus locks while the first #DB is being handled.
So no need to handle #DB for bus lock detected in the kernel.
Signed-off-by: Fenghua Yu
Review
mentation (Randy).
RFC v2:
- Architecture changed based on feedback from Thomas and PeterZ. #DB is
no longer generated for bus lock in ring0.
- Split the one single patch into four patches.
[RFC v1 can be found at:
https://lore.kernel.org/lkml/1595021700-68460-1-git-send-email-fenghua...@intel.co
To enforce user application throttling or mitigations, extend the
existing split lock detect kernel parameter:
split_lock_detect=ratelimit:N
It limits bus lock rate to N per second for non-root users.
Signed-off-by: Fenghua Yu
Reviewed-by: Tony Luck
---
arch/x86/kernel/cpu/intel.c
Suggested-by: Reinette Chatre
Signed-off-by: Fenghua Yu
---
tools/testing/selftests/resctrl/README| 4 +--
tools/testing/selftests/resctrl/cache.c | 4 +--
.../resctrl/{cqm_test.c => cmt_test.c}| 20 +++---
tools/testing/selftests/resctrl/resctrl.h | 10 +++
selection by taking the provided/default CPU into
account and ensuring a sibling that is a different CPU is selected.
Signed-off-by: Reinette Chatre
Signed-off-by: Fenghua Yu
---
tools/testing/selftests/resctrl/resctrlfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/
presents an iMC counter, else, skip the
directory.
Reported-by: Reinette Chatre
Signed-off-by: Fenghua Yu
---
tools/testing/selftests/resctrl/resctrl_val.c | 22 +--
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/resctrl/resctrl_val.c
b/tool
to the functions where they are used.
To fix issues for other global variables (e.g: bm_pid, ppid, llc_occup_path
and is_amd) that are used across .c files, declare them as extern.
Reported-by: Reinette Chatre
Signed-off-by: Fenghua Yu
---
tools/testing/selftests/resctrl/cat_test.c | 12
Checking resctrl features call strcmp() to compare feature strings
(e.g. "mba", "cat" etc). The checkings are error prone and don't have
good coding style. Define the constant strings in macros and call
strncmp() to solve the potential issues.
Suggested-by: Shuah Khan
Signe
mbm__bytes
Please note that only L3_CAT, L3_CMT, MBA and MBM are supported. CDP and L2
variants can be added later.
Reported-by: Reinette Chatre
Signed-off-by: Fenghua Yu
---
tools/testing/selftests/resctrl/resctrl.h | 6 ++-
tools/testing/selftests/resctrl/resctrlfs.c | 51
at
/proc/mounts
Steps 2 and 3 will fail if the platform does not support resctrl file
system. So, there is no need to check for them if step 1 fails.
Fix this by returning immediately if the platform does not support
resctrl file system.
Signed-off-by: Fenghua Yu
---
tools/testing/selftests
From: Reinette Chatre
Fix one instance where "not" (without a space) is printed on test
failure resulting in output of "notok" on test failure.
Add a missing newline to the printed help text to improve readability.
Signed-off-by: Reinette Chatre
Signed-off-by: Fenghua Yu
value is within 5% (randomly chosen value) of imc_mbm value. If the
difference is greater than 5% of imc_mbm value, treat it is a failure.
Signed-off-by: Fenghua Yu
---
tools/testing/selftests/resctrl/mba_test.c | 20 +++-
tools/testing/selftests/resctrl/mbm_test.c | 13
as invalid options.
Fix this by adding them to the list of characters that getopt() recognizes
as valid arguments. Please note that the main() function already has the
logic to deal with the values passed as part of these arguments and hence
no changes are needed there.
Signed-off-by: Fenghua Yu
https://lore.kernel.org/linux-kselftest/cover.1583657204.git.sai.praneeth.prak...@intel.com/]
Fenghua Yu (15):
selftests/resctrl: Fix compilation issues for global variables
selftests/resctrl: Clean up resctrl features check
selftests/resctrl: Rename CQM test as CMT test
selftests/resctrl: Add
't support resctrl file system.
Fix this by checking for the return value of check_resctrlfs_support() in
the main function. If resctrl file system isn't supported on the platform
then exit the test suite gracefully without attempting to run any of
resctrl unit tests.
Signed-off-by: Fenghua Yu
---
too
no_of_bits is equal to half of the maximum number of bits in
the cbm mask.
Please note that CMT test is still hard coded to 5 bits. It will change in
subsequent patches that change CMT test.
Signed-off-by: Fenghua Yu
---
tools/testing/selftests/resctrl/cat_test.c | 5 -
tools/testing
ter
Signed-off-by: Fenghua Yu
---
tools/testing/selftests/resctrl/resctrl_val.c | 41 +++
1 file changed, 23 insertions(+), 18 deletions(-)
diff --git a/tools/testing/selftests/resctrl/resctrl_val.c
b/tools/testing/selftests/resctrl/resctrl_val.c
index d6f0688182e8..ce8f0ec15f7b 100
s disabled
Suggested-by: Reinette Chatre
Signed-off-by: Fenghua Yu
---
tools/testing/selftests/resctrl/cat_test.c| 3 ---
tools/testing/selftests/resctrl/mba_test.c| 3 ---
tools/testing/selftests/resctrl/mbm_test.c| 3 ---
.../testing/selftests/resctrl/resctrl_te
()
function. Adding these wrapper functions makes it easier to add any logic
to each individual test.
Please note that this is a preparatory patch for the next one and no
functional changes are intended.
Suggested-by: Reinette Chatre
Signed-off-by: Fenghua Yu
---
.../testing/selftests/resctrl
and enable _FORTIFY_SOURCE gcc check to catch any future buffer
overflow errors.
Reported-by: David Binderman
Suggested-by: David Binderman
Signed-off-by: Fenghua Yu
---
tools/testing/selftests/resctrl/Makefile | 2 +-
tools/testing/selftests/resctrl/cmt_test.c | 2 +-
2 files changed, 2 insertions(+), 2
resctrl
FS to check if mba is enabled on the platform or not and finds that the H/W
doesn't support mba and hence will return false to run_mba_test(). This in
turn makes the main() function return without unmounting resctrl FS.
Signed-off-by: Fenghua Yu
---
tools/testing/selftests/resctrl
Since #DB for bus lock detect changes the split_lock_detect parameter,
update the documentation for the changes.
Signed-off-by: Fenghua Yu
Reviewed-by: Tony Luck
Acked-by: Randy Dunlap
---
Change Log:
v4:
- Fix a ratelimit wording issue in the doc (Randy).
- Patch 4 is acked by Randy (Randy
To enforce user application throttling or mitigations, extend the
existing split lock detect kernel parameter:
split_lock_detect=ratelimit:N
It limits bus lock rate to N per second for non-root users.
Signed-off-by: Fenghua Yu
Reviewed-by: Tony Luck
---
arch/x86/kernel/cpu/intel.c
rom non-WB triggers #DB.
Default option is "warn".
Hardware only generates #DB for bus lock detect when CPL>0 to avoid
nested #DB from multiple bus locks while the first #DB is being handled.
So no need to handle #DB for bus lock detected in the kernel.
Signed-off-by: Fenghua Yu
Review
:
https://lore.kernel.org/lkml/1595021700-68460-1-git-send-email-fenghua...@intel.com/]
Fenghua Yu (4):
x86/cpufeatures: Enumerate #DB for bus lock detection
x86/bus_lock: Handle warn and fatal in #DB for bus lock
x86/bus_lock: Set rate limit for bus lock
Documentation/admin-guide: Change
nel by an #DB trap after a user
instruction acquires a bus lock and is executed. This allows the kernel
to enforce user application throttling or mitigations.
The CPU feature flag to be shown in /proc/cpuinfo will be "bus_lock_detect".
Signed-off-by: Fenghua Yu
Reviewed-by: Tony Luck
Hi, Xiaoyao,
On Tue, Nov 03, 2020 at 08:15:27PM +0800, Xiaoyao Li wrote:
> On 10/31/2020 8:27 AM, Fenghua Yu wrote:
> > diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
> > index 3c70fb34028b..1c3442000972 100644
> > --- a/arch/x86/kernel/traps.c
> > ++
To enforce user application throttling or mitigations, extend the
existing split lock detect kernel parameter:
split_lock_detect=ratelimit:N
It limits bus lock rate to N per second for non-root users.
Signed-off-by: Fenghua Yu
Reviewed-by: Tony Luck
---
arch/x86/kernel/cpu/intel.c
B is
no longer generated for bus lock in ring0.
- Split the one single patch into four patches.
[RFC v1 can be found at:
https://lore.kernel.org/lkml/1595021700-68460-1-git-send-email-fenghua...@intel.com/]
Fenghua Yu (4):
x86/cpufeatures: Enumerate #DB for bus lock detection
x86/bus_lock: Ha
Since #DB for bus lock detect changes the split_lock_detect parameter,
update the documentation for the changes.
Signed-off-by: Fenghua Yu
Reviewed-by: Tony Luck
---
Change Log:
- Fix a few wording issues (Randy).
RFC v2:
- Simplify the documentation (Randy).
.../admin-guide/kernel
the first #DB is being handled.
So no need to handle #DB for bus lock detected in the kernel.
Signed-off-by: Fenghua Yu
Reviewed-by: Tony Luck
---
Change Log:
- Check bus lock bit by its positive polarity (Xiaoyao).
RFC v3:
- Remove DR6_RESERVED change (PeterZ).
arch/x86/include/asm/cpu.h
ome CPUs have ability to notify the kernel by an #DB trap after a user
instruction acquires a bus lock and is executed. This allows the kernel
to enforce user application throttling or mitigations.
The CPU feature flag to be shown in /proc/cpuinfo will be "bus_lock_detect".
Signed-off-b
On Thu, Aug 08, 2019 at 10:32:38PM +0200, Thomas Gleixner wrote:
> Valdis,
>
> On Thu, 8 Aug 2019, Valdis Klētnieks wrote:
> > On Thu, 08 Aug 2019 22:04:03 +0200, Thomas Gleixner said: It isn't
> > clear that whatever is doing the device_initcall()s will be able to
> > do any reasonable
doesn't support resctrl now. So it's safe to move the
X86_FEATURE_CQM_* features to scattered features word 11 for KVM.
Signed-off-by: Fenghua Yu
---
arch/x86/include/asm/cpufeature.h | 3 +--
arch/x86/include/asm/cpufeatures.h | 17 ++---
arch/x86/kernel/cpu/common.c | 14
AVX512_BF16.
Detailed information of the CPUID bit and AVX512 BFLOAT16 instructions
can be found in the latest Intel Architecture Instruction Set Extensions
and Future Features Programming Reference.
Signed-off-by: Fenghua Yu
---
arch/x86/include/asm/cpufeature.h | 1 +
arch/x86/include/asm
CPUID in resctrl initialization.
Fenghua Yu (3):
x86/resctrl: Get max rmid and occupancy scale directly from CPUID
instead of cpuinfo_x86
x86/cpufeatures: Combine word 11 and 12 into new scattered features
word 11
x86/cpufeatures: Enumerate new AVX512 BFLOAT16 instructions
arch/x86
CPU is fine.
Signed-off-by: Fenghua Yu
---
arch/x86/include/asm/processor.h | 3 ---
arch/x86/kernel/cpu/common.c | 28 --
arch/x86/kernel/cpu/resctrl/internal.h | 2 +-
arch/x86/kernel/cpu/resctrl/monitor.c | 28 +++---
4 files
On Fri, Jun 14, 2019 at 02:27:50PM +0200, Borislav Petkov wrote:
> On Fri, Jun 14, 2019 at 01:44:10PM +0200, Borislav Petkov wrote:
> > On Thu, Jun 13, 2019 at 01:51:03PM -0700, Fenghua Yu wrote:
> > > It's a waste for the four X86_FEATURE_CQM_* features to occupy two
> > &
On Fri, Jun 14, 2019 at 03:41:23PM +0200, Borislav Petkov wrote:
> + Radim and Paolo. See upthread for context.
>
> On Fri, Jun 14, 2019 at 06:17:02AM -0700, Fenghua Yu wrote:
> > > Alternatively - and what I think is the better solution - would be to
> > >
On Fri, Jun 14, 2019 at 07:14:24AM -0700, Sean Christopherson wrote:
> On Fri, Jun 14, 2019 at 03:41:23PM +0200, Borislav Petkov wrote:
> > + Radim and Paolo. See upthread for context.
> >
> > On Fri, Jun 14, 2019 at 06:17:02AM -0700, Fenghua Yu wrote:
> > > >
On Fri, Jun 14, 2019 at 04:26:11PM +0200, Borislav Petkov wrote:
> On Fri, Jun 14, 2019 at 07:15:20AM -0700, Fenghua Yu wrote:
> > Adding this small patch into patch 0002 will solve the build errors without
> > changing the build checks.
>
> There's no need for that if you re
On Fri, Jun 14, 2019 at 01:16:33PM +0200, Borislav Petkov wrote:
> On Thu, Jun 13, 2019 at 01:51:02PM -0700, Fenghua Yu wrote:
> > Although x86_cache_max_rmid and x86_cache_occ_scale are read only once
> > during resctrl initialization, they are always stored in cpuinfo_x86 on
>
On Fri, Jun 14, 2019 at 07:47:01PM +0200, Borislav Petkov wrote:
> On Fri, Jun 14, 2019 at 09:55:28AM -0700, Fenghua Yu wrote:
> > When this function is called, X86_FEATURE_CQM_LLC must be supported and
> > one of X86_FEATURE_CQM_OCCUP_LLC, X86_FEATUR
On Fri, Jun 14, 2019 at 05:02:19PM +0200, Borislav Petkov wrote:
> On Fri, Jun 14, 2019 at 07:25:51AM -0700, Fenghua Yu wrote:
> > But without this small patch, CPUID_7_EDX is 17 instead of
> > NCAPINTS(19)-1=18 in patch 0002. Of course CPUID_7_EDX is 18 correctly
> > eve
Hi, Thomas, Andy, et al,
On Thu, Aug 27, 2020 at 08:06:34AM -0700, Fenghua Yu wrote:
> A PASID is allocated for an "mm" the first time any thread binds
> to an SVM capable device and is freed from the "mm" when the SVM is
> unbound by the last thread. It's possible f
drm, iommu: Change type ...
>
>
> On Thu, Aug 27, 2020 at 08:06:26AM -0700, Fenghua Yu wrote:
> > PASID is defined as a few different types in iommu including "int",
> > "u32", and "unsigned int". To be consistent and to match with uapi
&
Hi, Boris,
On Fri, Sep 04, 2020 at 09:45:19PM +0200, Borislav Petkov wrote:
> On Fri, Sep 04, 2020 at 04:06:13PM +0000, Fenghua Yu wrote:
> > Thank you very much for your review!
>
> I'm not done with my review yet.
>
> > Could you please consider to commit the series
file to know if the feature is
supported.
Signed-off-by: Fenghua Yu
Reviewed-by: Babu Moger
Reviewed-by: Reinette Chatre
---
arch/x86/include/asm/cpufeatures.h | 1 +
arch/x86/kernel/cpu/cpuid-deps.c | 1 +
arch/x86/kernel/cpu/scattered.c| 1 +
3 files changed, 3 insertions(+)
diff --git
...@amd.com
that AMD bandwidth allocation is already at thread level but that the AMD
implementation does not use a memory delay throttle mode. So to avoid
confusion the thread throttling mode would be UNDEFINED on AMD systems
and the "thread_throttle_mode" file will not be visible.
Originally-by:
tor.
Change Log:
v3:
- Rename "get_rdtgroup_rftype_get_by_name()" to
"rdtgroup_get_rftype_by_name()" (Boris).
- Re-base the patch set to tip:x86/cache (Boris).
v2:
- Rename "arch_throttle_mode" to "throttle_mode" and
"rdtgroup_rftype_by_name()" to "rdtgroup_rftype_g
Hi, X86 maintainers,
On Thu, Jul 16, 2020 at 10:53:12AM -0700, Fenghua Yu wrote:
> This series enumerates Memory Bandwidth Allocation (MBA) per-thread
> feature and introduces a new resctrl file "thread_throttle_mode".
> The file shows either "per-thread" on newer s
Hi, Joerg,
On Wed, Sep 16, 2020 at 10:06:02AM +0200, Joerg Roedel wrote:
> On Tue, Sep 15, 2020 at 09:30:04AM -0700, Fenghua Yu wrote:
> > Ashok Raj (1):
> > Documentation/x86: Add documentation for SVA (Shared Virtual
> > Addressing)
> >
> > Fenghua Yu (
On Thu, Sep 17, 2020 at 07:30:41PM +0200, Borislav Petkov wrote:
> On Thu, Sep 17, 2020 at 10:22:39AM -0700, Raj, Ashok wrote:
> > s/translation again/translation
>
> Ok, last one. Now stop looking at that text because you'll find more.
>
> :-)))
Thank you very much for taking care of the
Since #DB for bus lock detect changes the split_lock_detect parameter,
update the documentation for the changes.
Signed-off-by: Fenghua Yu
Reviewed-by: Tony Luck
---
.../admin-guide/kernel-parameters.txt | 47 +++
1 file changed, 39 insertions(+), 8 deletions(-)
diff
ger generated for bus lock in ring0.
- Split the one single patch into four patches.
[RFC v1 can be found at:
https://lore.kernel.org/lkml/1595021700-68460-1-git-send-email-fenghua...@intel.com/]
Fenghua Yu (4):
x86/cpufeatures: Enumerate #DB for bus lock detection
x86/bus_lock: Handle warn and
/en/documents/specification-updates/xeon-e5-v4-spec-update.pdf
The problem is described in details in "3.6 Intel MBM RMID Imbalance":
https://software.intel.com/content/www/us/en/develop/articles/intel-resource-director-technology-rdt-reference-manual.html
Signed-off-by: Fenghua Yu
Revi
and the correction table in resctrl.rst (Boris).
- Address various comments on patch 2 (Boris).
- Change the documentation URLs to stable archive.org (Tony).
Fenghua Yu (2):
Documentation: x86: Rename resctrl_ui.rst and add two errata to the
file
x86/resctrl: Correct MBM total and local values
Processors Reference Manual:
https://software.intel.com/content/www/us/en/develop/articles/intel-resource-director-technology-rdt-reference-manual.html
Suggested-by: Borislav Petkov
Signed-off-by: Fenghua Yu
---
Change Log:
v2:
- Document the correction factor table and errata in resctrl.rst (Boris
around the errata, MBM total and local readings are corrected
using the correction factor table. If rmid > rmid threshold, MBM total
and local values should be multiplied by the correction factor.
Signed-off-by: Fenghua Yu
Reviewed-by: Tony Luck
---
Change Log:
v2:
- Add "const" for
Hi, Randy,
On Mon, Oct 12, 2020 at 07:54:32PM -0700, Randy Dunlap wrote:
> On 10/12/20 7:46 PM, Fenghua Yu wrote:
> > diff --git a/Documentation/conf.py b/Documentation/conf.py
> > index c50310d9..b5b2be8eec22 100644
> > --- a/Documentation/conf.py
> > +++ b/Documen
around the errata, MBM total and local readings are corrected
using the correction factor table. If rmid > rmid threshold, MBM total
and local values should be multiplied by the correction factor.
Signed-off-by: Fenghua Yu
Reviewed-by: Tony Luck
---
Change Log:
v2:
- Add "const" for
in patch 1 (Randy).
v2:
- Document the errata and the correction table in resctrl.rst (Boris).
- Address various comments on patch 2 (Boris).
- Change the documentation URLs to stable archive.org (Tony).
Fenghua Yu (2):
Documentation: x86: Rename resctrl_ui.rst and add two errata
Processors Reference Manual:
https://software.intel.com/content/www/us/en/develop/articles/intel-resource-director-technology-rdt-reference-manual.html
Suggested-by: Borislav Petkov
Signed-off-by: Fenghua Yu
Reviewed-by: Tony Luck
---
Change Log:
v3:
- Remove unnecessary conf.py change in patch 1 (Randy
Hi, Randy,
On Fri, Oct 30, 2020 at 08:14:15PM -0700, Randy Dunlap wrote:
> On 10/30/20 5:27 PM, Fenghua Yu wrote:
> > diff --git a/Documentation/admin-guide/kernel-parameters.txt
> > b/Documentation/admin-guide/kernel-parameters.txt
> > index 526d65d8573a
From: Fenghua Yu
Define interfaces microcode_sanity_check() and get_matching_microcode(). They
are called both in early boot time and in microcode Intel driver.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/microcode_intel_lib.c | 174 +
1 files changed, 174
From: Fenghua Yu
This updates ucode in 32-bit kernel. At this point, there is no paging and no
virtual address yet.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/head_32.S |6 ++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel
From: Fenghua Yu
Define interfaces load_ucode_bsp() and load_ucode_ap() to load ucode on BSP and
AP in early boot time. These are generic interfaces. Internally they call
vendor specific implementations.
Signed-off-by: Fenghua Yu
---
arch/x86/include/asm/microcode.h | 23
From: Fenghua Yu
Before initrd image is freed, copy valid ucode patches from initrd image
to kernel virtual memory. The saved ucode will be used to update AP in resume.
Signed-off-by: Fenghua Yu
---
arch/x86/mm/init.c | 10 ++
1 files changed, 10 insertions(+), 0 deletions(-)
diff
From: Fenghua Yu
MICROCODE_INTEL_LIB, MICROCODE_INTEL_EARLY, and MICROCODE_EARLY are three new
configurations to enable or disable the feature.
Signed-off-by: Fenghua Yu
---
arch/x86/Kconfig | 18 ++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/arch/x86
From: Fenghua Yu
The problem in current microcode loading method is that we load a microcode way,
way too late; ideally we should load it before turning paging on. This may only
be practical on 32 bits since we can't get to 64-bit mode without paging on,
but we should still do it as early
From: Fenghua Yu
This updates ucode on AP. At this point, BSP should store some valid ucode
patches in memory if it finds the ucode patches in initrd. AP searches the
stored ucode and uploads the ucode.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/smpboot.c |7 +++
1 files changed, 7
From: Fenghua Yu
Implementation of early update ucode on Intel's CPU.
load_ucode_intel_bsp() scans ucode in initrd image file which is a cpio format
ucode followed by ordinary initrd image file. The binary ucode file is stored
in kernel/x86/microcode/GenuineIntel/microcode.hex in the cpio data
From: Fenghua Yu
Define some functions and macros that will be used in early loading ucode. Some
of them are moved from microcode_intel.c driver in order to be called in early
boot phase before module can be called.
Signed-off-by: Fenghua Yu
---
arch/x86/include/asm/microcode_intel.h | 106
From: Fenghua Yu
Documenation for early loading microcode methodology.
Signed-off-by: Fenghua Yu
---
Documentation/x86/early-microcode.txt | 43 +
1 files changed, 43 insertions(+), 0 deletions(-)
create mode 100644 Documentation/x86/early-microcode.txt
From: Fenghua Yu
start_cpu0() is defined in head_32.S for 32-bit. The function sets up stack and
jumps to start_secondary() for CPU0 wake up.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/head_32.S | 13 +
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/arch/x86
From: Fenghua Yu
CONFIG_DEBUG_HOTPLUG_CPU0 is for debugging the CPU0 hotplug feature. The switch
offlines CPU0 as soon as possible and boots userspace up with CPU0 offlined.
User can online CPU0 back after boot time. The default value of the switch is
off.
To debug CPU0 hotplug, you need
From: Fenghua Yu
Because x86 BIOS requires CPU0 to resume from sleep, suspend or hibernate can't
be executed if CPU0 is detected offline. To make suspend or hibernate and
further resume succeed, CPU0 must be online.
Signed-off-by: Fenghua Yu
---
arch/x86/power/cpu.c | 44
From: Fenghua Yu
init_thread_xstate() is only called once to avoid overriding xstate_size during
boot time or during CPU hotplug.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/i387.c |6 +-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kernel/i387.c b/arch
From: Fenghua Yu
The first cpu in irq cfg->domain is likely to be CPU 0 and may not be available
when CPU 0 is offline. Instead of using CPU 0 to handle retriggered irq, we use
first available CPU which is online and in this irq's domain.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/a
From: Fenghua Yu
Previously these functions were not run on the BSP (CPU 0, the boot processor)
since the boot processor init would only be executed before this functionality
was initialized.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/cpu/common.c |5 ++---
1 files changed, 2
From: Fenghua Yu
Ask the first online CPU to save mtrr instead of asking BSP. BSP could be
offline when mtrr_save_state() is called.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/cpu/mtrr/main.c |9 +++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel
From: Fenghua Yu
If CONFIG_BOOTPARAM_HOTPLUG_CPU0 is turned on, CPU0 is hotpluggable. Otherwise,
by default CPU0 is not hotpluggable and kernel parameter cpu0_hotplug enables
CPU0 online/offline feature.
The documentations point out two known CPU0 dependencies. First, resume from
hibernate
From: Fenghua Yu
New config switch CONFIG_BOOTPARAM_HOTPLUG_CPU0 sets default state of whether
the CPU0 hotplug is on or off.
If the switch is off, CPU0 is not hotpluggable by default. But the CPU0 hotplug
feature can still be turned on by kernel parameter cpu0_hotplug at boot.
If the switch
From: Fenghua Yu
Instead of waiting for STARTUP after INITs, BSP will execute the BIOS boot-strap
code which is not a desired behavior for waking up BSP. To avoid the boot-strap
code, wake up CPU0 by NMI instead.
This works to wake up soft offlined CPU0 only. If CPU0 is hard offlined (i.e
From: Fenghua Yu
start_cpu0() is defined in head_64.S for 64-bit. The function sets up stack and
jumps to start_secondary() for CPU0 wake up.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/head_64.S | 16
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/arch
From: Fenghua Yu
cpu_hotplug_pm_callback should have higher priority than
bsp_pm_callback which depends on cpu_hotplug_pm_callback to disable cpu hotplug
to avoid race during bsp online checking.
This is to hightlight the priorities between the two callbacks in case people
may overlook
From: Fenghua Yu
CPU0 or BSP (Bootstrap Processor) has been the last processor that can not be
hot removed on x86. This patchset implements CPU0 or BSP online and offline
and removes this obstacle to CPU hotplug.
RAS needs the feature. If socket0 needs to be hotplugged for any reason (any
From: Fenghua Yu
Add smp_store_boot_cpu_info() to store cpu info for BSP during boot time.
Now smp_store_cpu_info() stores cpu info for bringing up BSP or AP after
it's offline.
Continue to online CPU0 in native_cpu_up().
Continue to offline CPU0 in native_cpu_disable().
Signed-off
From: Fenghua Yu
If CONFIG_BOOTPARAM_HOTPLUG_CPU is turned on, CPU0 hotplug feature is enabled
by default.
If CONFIG_BOOTPARAM_HOTPLUG_CPU is not turned on, CPU0 hotplug feature is not
enabled by default. The kernel parameter cpu0_hotplug can enable CPU0 hotplug
feature at boot.
Currently
From: Fenghua Yu
If CONFIG_BOOTPARAM_HOTPLUG_CPU is turned on, CPU0 hotplug feature is enabled
by default.
If CONFIG_BOOTPARAM_HOTPLUG_CPU is not turned on, CPU0 hotplug feature is not
enabled by default. The kernel parameter cpu0_hotplug can enable CPU0 hotplug
feature at boot.
Currently
From: Fenghua Yu
start_cpu0() is defined in head_64.S for 64-bit. The function sets up stack and
jumps to start_secondary() for CPU0 wake up.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/head_64.S | 15 +++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/arch
From: Fenghua Yu
If CONFIG_BOOTPARAM_HOTPLUG_CPU0 is turned on, CPU0 is hotpluggable. Otherwise,
by default CPU0 is not hotpluggable and kernel parameter cpu0_hotplug enables
CPU0 online/offline feature.
The documentations point out two known CPU0 dependencies. First, resume from
hibernate
From: Fenghua Yu
init_thread_xstate() is only called once to avoid overriding xstate_size during
boot time or during CPU hotplug.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/i387.c |6 +-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kernel/i387.c b/arch
From: Fenghua Yu
Ask the first online CPU to save mtrr instead of asking BSP. BSP could be
offline when mtrr_save_state() is called.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/cpu/mtrr/main.c |9 +++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel
From: Fenghua Yu
Instead of waiting for STARTUP after INITs, BSP will execute the BIOS boot-strap
code which is not a desired behavior for waking up BSP. To avoid the boot-strap
code, wake up CPU0 by NMI instead.
This works to wake up soft offlined CPU0 only. If CPU0 is hard offlined (i.e
From: Fenghua Yu
Previously these functions were not run on the BSP (CPU 0, the boot processor)
since the boot processor init would only be executed before this functionality
was initialized.
Signed-off-by: Fenghua Yu
---
arch/x86/kernel/cpu/common.c |5 ++---
1 files changed, 2
701 - 800 of 1874 matches
Mail list logo