x86: Enable a few new instructions
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest7 patches 11 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | x86/cpufeatures: Enumerate MOVDIRI instructionarch/ | +1 | 0 replies | |
| 2/7 | x86/cpufeatures: Enumerate MOVDIR64B instructionarch/ | +1 | 0 replies | |
| 3/7 | x86/cpufeatures: Enumerate UMONITOR, UMWAIT, and TPAUSE instructionsarch/ | +1 | 0 replies | |
| 4/7 | x86/umwait_contro: Set global umwait maximum time limit and umwait C0.2 statearch/ arch/ arch/ | +121 | 2 replies | |
| 5/7 | x86/vdso: Add vDSO functions for direct store instructionsarch/ arch/ arch/ +3 more | +193 | 4 replies | |
| 6/7 | x86/vdso: Add vDSO functions for user wait instructionsarch/ arch/ arch/ +2 more | +256 | 5 replies | |
| 7/7 | selftests/vDSO: Add selftest to test vDSO functions for direct store and user wait instructionstools/ tools/ | +408 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/7] x86: Enable a few new instructions
A few new instructions including direct stores (movdiri and movdir64b) and user wait (umwait, umonitor, and tpause) and IA32_MWAIT_CONTROL MSR to control umwait/umonitor/tpause behaviors will be available in Tremont and other future x86 processors.
This patch set enumerates the instructions, adds a sysfs interface for user to configure the umwait/umonitor/tpause instructions, and provides APIs for user to call the instructions.
The sysfs interface file are in /sys/devices/system/cpu/umwait_control/ umwait_enable_c0_2 because it's hard to find an existing place to host the files.
The user APIs for the instructions are implemented as vDSO functions.
Detailed information on the instructions and the MSR can be found in the latest Intel Architecture Instruction Set Extensions and Future Features Programming Reference at
https://software.intel.com/sites/default/files/managed/c5/15/architecture-instruction-set-extensions-programming-reference.pdf
Changelog:
Based on comments from Thomas:
- Change user APIs to vDSO functions
- Change sysfs to positive logic and enable file name
- Change patch descriptions etc
Fenghua Yu (7):
x86/cpufeatures: Enumerate MOVDIRI instruction x86/cpufeatures: Enumerate MOVDIR64B instruction x86/cpufeatures: Enumerate UMONITOR, UMWAIT, and TPAUSE instructions x86/umwait_contro: Set global umwait maximum time limit and umwait
C0.2 state
x86/vdso: Add vDSO functions for direct store instructions x86/vdso: Add vDSO functions for user wait instructions selftests/vDSO: Add selftest to test vDSO functions for direct store
and user wait instructions
arch/x86/entry/vdso/Makefile | 2 +- arch/x86/entry/vdso/vdirectstore.c | 152 ++++++++ arch/x86/entry/vdso/vdso.lds.S | 20 ++ arch/x86/entry/vdso/vma.c | 21 ++ arch/x86/entry/vdso/vuserwait.c | 233 +++++++++++++ arch/x86/include/asm/cpufeatures.h | 3 + arch/x86/include/asm/msr-index.h | 4 + arch/x86/include/asm/vdso_funcs_data.h | 20 ++ arch/x86/include/asm/vvar.h | 1 + arch/x86/power/Makefile | 1 + arch/x86/power/umwait.c | 116 +++++++ tools/testing/selftests/vDSO/Makefile | 4 +- tools/testing/selftests/vDSO/vdso_inst_test_x86.c | 405 ++++++++++++++++++++++ 13 files changed, 980 insertions(+), 2 deletions(-) create mode 100644 arch/x86/entry/vdso/vdirectstore.c create mode 100644 arch/x86/entry/vdso/vuserwait.c create mode 100644 arch/x86/include/asm/vdso_funcs_data.h create mode 100644 arch/x86/power/umwait.c create mode 100644 tools/testing/selftests/vDSO/vdso_inst_test_x86.c
Signature · 1 line
2.5.0