x86: enable FRED for x86-64
Subsystems (15)
v13 cover x86: enable FRED for x86-64
This patch set enables the Intel flexible return and event delivery (FRED) architecture for x86-64.
The FRED architecture defines simple new transitions that change privilege level (ring transitions). The FRED architecture was designed with the following goals:
1) Improve overall performance and response time by replacing event delivery through the interrupt descriptor table (IDT event delivery) and event return by the IRET instruction with lower latency transitions.
2) Improve software robustness by ensuring that event delivery establishes the full supervisor context and that event return establishes the full user context.
The new transitions defined by the FRED architecture are FRED event delivery and, for returning from events, two FRED return instructions. FRED event delivery can effect a transition from ring 3 to ring 0, but it is used also to deliver events incident to ring 0. One FRED instruction (ERETU) effects a return from ring 0 to ring 3, while the other (ERETS) returns while remaining in ring 0. Collectively, FRED event delivery and the FRED return instructions are FRED transitions.
Search for the latest FRED spec in most search engines with this search pattern:
site:intel.com FRED (flexible return and event delivery) specification
As of now there is no publicly avaiable CPU supporting FRED, thus the Intel Simics® Simulator is used as software development and testing vehicles. And it can be downloaded from:
https://www.intel.com/content/www/us/en/developer/articles/tool/simics-simulator.html
To enable FRED, the Simics package 8112 QSP-CPU needs to be installed with CPU model configured as:
$cpu_comp_class = "x86-experimental-fred"
Changes since v12:
* Merge the 3 WRMSRNS patches into one (Borislav Petkov).
* s/cpu/CPU/g (Borislav Petkov).
* Shorten the WRMSRNS description (Borislav Petkov).
* Put comments ontop, not on the side (Borislav Petkov).
* Use the ASCII char ' (char number 0x27), instead of its unicode char (Borislav Petkov).
* No "we" in a commit message, use passive voice (Borislav Petkov).
* Fix confusing Signed-off-by chains (Borislav Petkov).
Changes since v11:
* Add a new structure fred_cs to denote the FRED flags above CS selector as what is done for SS (H. Peter Anvin).
Changes since v10:
* No need to invalidate SYSCALL and SYSENTER MSRs (Thomas Gleixner).
* Better explain the reason why no need to check current stack level (Paolo Bonzini).
* Replace "IS_ENABLED(CONFIG_IA32_EMULATION)" with the new ia32_enabled() API (Nikolay Borisov).
* FRED feature is defined in cpuid word 12, not 13 (Nikolay Borisov).
* Reword a sentence in the new FRED documentation to improve readability (Nikolay Borisov).
* A few comment fixes and improvements to event type definitions (Andrew Cooper).
Changes since v9:
* Set unused sysvec table entries to fred_handle_spurious_interrupt() in fred_complete_exception_setup() (Thomas Gleixner).
* Shove the whole thing into arch/x86/entry/entry_64_fred.S for invoking external_interrupt() and fred_exc_nmi() (Sean Christopherson).
* Correct and improve a few comments (Sean Christopherson).
* Merge the two IRQ/NMI asm entries into one as it's fine to invoke noinstr code from regular code (Thomas Gleixner).
* Setup the long mode and NMI flags in the augmented SS field of FRED stack frame in C instead of asm (Thomas Gleixner).
* Don't use jump tables, indirect jumps are expensive (Thomas Gleixner).
* Except #NMI/#DB/#MCE, FRED really can share the exception handlers with IDT (Thomas Gleixner).
* Avoid the sysvec_* idt_entry muck, do it at a central place, reuse code instead of blindly copying it, which breaks the performance optimized sysvec entries like reschedule_ipi (Thomas Gleixner).
* Add asm_ prefix to FRED asm entry points (Thomas Gleixner).
* Disable #DB to avoid endless recursion and stack overflow when a watchpoint/breakpoint is set in the code path which is executed by #DB handler (Thomas Gleixner).
* Introduce a new structure fred_ss to denote the FRED flags above SS selector, which avoids FRED_SSX_ macros and makes the code simpler and easier to read (Thomas Gleixner).
* Use type u64 to define FRED bit fields instead of type unsigned int (Thomas Gleixner).
* Avoid a type cast by defining X86_CR4_FRED as 0 on 32-bit (Thomas Gleixner).
* Add the WRMSRNS instruction support (Thomas Gleixner).
Changes since v8:
* Move the FRED initialization patch after all required changes are in place (Thomas Gleixner).
* Don't do syscall early out in fred_entry_from_user() before there are proper performance numbers and justifications (Thomas Gleixner).
* Add the control exception handler to the FRED exception handler table (Thomas Gleixner).
* Introduce a macro sysvec_install() to derive the asm handler name from a C handler, which simplifies the code and avoids an ugly typecast (Thomas Gleixner).
* Remove junk code that assumes no local APIC on x86_64 (Thomas Gleixner).
* Put IDTENTRY changes in a separate patch (Thomas Gleixner).
* Use high-order 48 bits above the lowest 16 bit SS only when FRED is enabled (Thomas Gleixner).
* Explain why writing directly to the IA32_KERNEL_GS_BASE MSR is doing the right thing (Thomas Gleixner).
* Reword some patch descriptions (Thomas Gleixner).
* Add a new macro VMX_DO_FRED_EVENT_IRQOFF for FRED instead of refactoring VMX_DO_EVENT_IRQOFF (Sean Christopherson).
* Do NOT use a trampoline, just LEA+PUSH the return RIP, PUSH the error code, and jump to the FRED kernel entry point for NMI or call external_interrupt() for IRQs (Sean Christopherson).
* Call external_interrupt() only when FRED is enabled, and convert the non-FRED handling to external_interrupt() after FRED lands (Sean Christopherson).
* Use __packed instead of __attribute__((__packed__)) (Borislav Petkov).
* Put all comments above the members, like the rest of the file does (Borislav Petkov).
* Reflect the FRED spec 5.0 change that ERETS and ERETU add 8 to %rsp before popping the return context from the stack.
* Reflect stack frame definition changes from FRED spec 3.0 to 5.0.
* Add ENDBR to the FRED_ENTER asm macro after kernel IBT is added to FRED base line in FRED spec 5.0.
* Add a document which briefly introduces FRED features.
* Remove 2 patches, "allow FRED systems to use interrupt vectors 0x10-0x1f" and "allow dynamic stack frame size", from this patch set, as they are "optimizations" only.
* Send 2 patches, "header file for event types" and "do not modify the DPL bits for a null selector", as pre-FRED patches.
Changes since v7:
* Always call external_interrupt() for VMX IRQ handling on x86_64, thus avoid re-entering the noinstr code.
* Create a FRED stack frame when FRED is compiled-in but not enabled, which uses some extra stack space but simplifies the code.
* Add a log message when FRED is enabled.
Changes since v6:
* Add a comment to explain why it is safe to write to a previous FRED stack frame. (Lai Jiangshan).
* Export fred_entrypoint_kernel(), required when kvm-intel built as a module.
* Reserve a REDZONE for CALL emulation and Align RSP to a 64-byte boundary before pushing a new FRED stack frame.
* Replace pt_regs csx flags prefix FRED_CSL_ with FRED_CSX_.
Changes since v5:
* Initialize system_interrupt_handlers with dispatch_table_spurious_interrupt() instead of NULL to get rid of a branch (Peter Zijlstra).
* Disallow #DB inside #MCE for robustness sake (Peter Zijlstra).
* Add a comment for FRED stack level settings (Lai Jiangshan).
* Move the NMI bit from an invalid stack frame, which caused ERETU to fault, to the fault handler's stack frame, thus to unblock NMI ASAP if NMI is blocked (Lai Jiangshan).
* Refactor VMX_DO_EVENT_IRQOFF to handle IRQ/NMI in IRQ/NMI induced VM exits when FRED is enabled (Sean Christopherson).
Changes since v4:
* Do NOT use the term "injection", which in the KVM context means to reinject an event into the guest (Sean Christopherson).
* Add the explanation of why to execute "int $2" to invoke the NMI handler in NMI caused VM exits (Sean Christopherson).
* Use cs/ss instead of csx/ssx when initializing the pt_regs structure for calling external_interrupt(), otherwise it breaks i386 build.
Changes since v3:
* Call external_interrupt() to handle IRQ in IRQ caused VM exits.
* Execute "int $2" to handle NMI in NMI caused VM exits.
* Rename csl/ssl of the pt_regs structure to csx/ssx (x for extended) (Andrew Cooper).
Changes since v2:
* Improve comments for changes in arch/x86/include/asm/idtentry.h.
Changes since v1:
* call irqentry_nmi_{enter,exit}() in both IDT and FRED debug fault kernel handler (Peter Zijlstra).
* Initialize a FRED exception handler to fred_bad_event() instead of NULL if no FRED handler defined for an exception vector (Peter Zijlstra).
* Push calling irqentry_{enter,exit}() and instrumentation_{begin,end}() down into individual FRED exception handlers, instead of in the dispatch framework (Peter Zijlstra).
H. Peter Anvin (Intel) (20):
x86/fred: Add Kconfig option for FRED (CONFIG_X86_FRED) x86/cpufeatures: Add the CPU feature bit for FRED x86/fred: Disable FRED support if CONFIG_X86_FRED is disabled x86/opcode: Add ERET[US] instructions to the x86 opcode map x86/objtool: Teach objtool about ERET[US]
x86/cpu: Add X86_CR4_FRED macro
x86/cpu: Add MSR numbers for FRED configuration
x86/fred: Add a new header file for FRED definitions x86/fred: Reserve space for the FRED stack frame
x86/fred: Update MSR_IA32_FRED_RSP0 during task switch x86/fred: Disallow the swapgs instruction when FRED is enabled x86/fred: No ESPFIX needed when FRED is enabled
x86/fred: Allow single-step trap and NMI when starting a new task x86/fred: Make exc_page_fault() work for FRED
x86/fred: Add a debug fault entry stub for FRED
x86/fred: Add a NMI entry stub for FRED
x86/fred: FRED entry/exit and dispatch code
x86/fred: Let ret_from_fork_asm() jmp to asm_fred_exit_user when FRED
is enabled
x86/fred: Add FRED initialization functions
x86/fred: Invoke FRED initialization code to enable FRED
Peter Zijlstra (Intel) (1):
x86/entry/calling: Allow PUSH_AND_CLEAR_REGS being used beyond actual
entry code
Xin Li (14):
x86/cpufeatures,opcode,msr: Add the WRMSRNS instruction support x86/entry: Remove idtentry_sysvec from entry_{32,64}.S x86/trapnr: Add event type macros to <asm/trapnr.h> Documentation/x86/64: Add a documentation for FRED x86/fred: Disable FRED by default in its early stage x86/ptrace: Cleanup the definition of the pt_regs structure x86/ptrace: Add FRED additional information to the pt_regs structure x86/idtentry: Incorporate definitions/declarations of the FRED entries x86/fred: Add a machine check entry stub for FRED x86/traps: Add sysvec_install() to install a system interrupt handler x86/fred: Fixup fault on ERETU by jumping to fred_entrypoint_user x86/entry: Add fred_entry_from_kvm() for VMX to handle IRQ/NMI
KVM: VMX: Call fred_entry_from_kvm() for IRQ/NMI handling x86/syscall: Split IDT syscall setup code into idt_syscall_init()
.../admin-guide/kernel-parameters.txt | 3 + Documentation/arch/x86/x86_64/fred.rst | 96 ++++++ Documentation/arch/x86/x86_64/index.rst | 1 + arch/x86/Kconfig | 9 + arch/x86/entry/Makefile | 5 +- arch/x86/entry/calling.h | 15 +- arch/x86/entry/entry_32.S | 4 - arch/x86/entry/entry_64.S | 14 +- arch/x86/entry/entry_64_fred.S | 133 +++++++++ arch/x86/entry/entry_fred.c | 279 ++++++++++++++++++ arch/x86/entry/vsyscall/vsyscall_64.c | 2 +- arch/x86/include/asm/asm-prototypes.h | 1 + arch/x86/include/asm/cpufeatures.h | 2 + arch/x86/include/asm/desc.h | 2 - arch/x86/include/asm/disabled-features.h | 8 +- arch/x86/include/asm/extable_fixup_types.h | 4 +- arch/x86/include/asm/fred.h | 97 ++++++ arch/x86/include/asm/idtentry.h | 88 +++++- arch/x86/include/asm/msr-index.h | 13 +- arch/x86/include/asm/msr.h | 18 ++ arch/x86/include/asm/ptrace.h | 104 ++++++- arch/x86/include/asm/switch_to.h | 8 +- arch/x86/include/asm/thread_info.h | 12 +- arch/x86/include/asm/trapnr.h | 12 + arch/x86/include/asm/vmx.h | 17 +- arch/x86/include/uapi/asm/processor-flags.h | 7 + arch/x86/kernel/Makefile | 1 + arch/x86/kernel/cpu/acrn.c | 4 +- arch/x86/kernel/cpu/common.c | 41 ++- arch/x86/kernel/cpu/cpuid-deps.c | 2 + arch/x86/kernel/cpu/mce/core.c | 26 ++ arch/x86/kernel/cpu/mshyperv.c | 15 +- arch/x86/kernel/espfix_64.c | 8 + arch/x86/kernel/fred.c | 59 ++++ arch/x86/kernel/idt.c | 4 +- arch/x86/kernel/irqinit.c | 7 +- arch/x86/kernel/kvm.c | 2 +- arch/x86/kernel/nmi.c | 28 ++ arch/x86/kernel/process_64.c | 67 ++++- arch/x86/kernel/traps.c | 48 ++- arch/x86/kvm/vmx/vmx.c | 12 +- arch/x86/lib/x86-opcode-map.txt | 4 +- arch/x86/mm/extable.c | 79 +++++ arch/x86/mm/fault.c | 5 +- drivers/xen/events/events_base.c | 2 +- tools/arch/x86/include/asm/cpufeatures.h | 2 + .../arch/x86/include/asm/disabled-features.h | 8 +- tools/arch/x86/include/asm/msr-index.h | 13 +- tools/arch/x86/lib/x86-opcode-map.txt | 4 +- tools/objtool/arch/x86/decode.c | 19 +- 50 files changed, 1300 insertions(+), 114 deletions(-) create mode 100644 Documentation/arch/x86/x86_64/fred.rst create mode 100644 arch/x86/entry/entry_64_fred.S create mode 100644 arch/x86/entry/entry_fred.c create mode 100644 arch/x86/include/asm/fred.h create mode 100644 arch/x86/kernel/fred.c
base-commit: 5d868f6ec314aaee65ec5d12c03f18d79e632043
Signature · 1 line
2.43.0
PATCH v13 1/35 x86/cpufeatures,opcode,msr: Add the WRMSRNS instruction support
WRMSRNS is an instruction that behaves exactly like WRMSR, with the only difference being that it is not a serializing instruction by default. Under certain conditions, WRMSRNS may replace WRMSR to improve performance.
Add its CPU feature bit, opcode to the x86 opcode map, and an always inline API __wrmsrns() to embed WRMSRNS into the code.
---
Changes since v12:
* Merge the 3 WRMSRNS patches into one (Borislav Petkov).
* s/cpu/CPU/g (Borislav Petkov).
* Shorten the WRMSRNS description (Borislav Petkov).
--- arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/include/asm/msr.h | 18 ++++++++++++++++++ arch/x86/lib/x86-opcode-map.txt | 2 +- tools/arch/x86/include/asm/cpufeatures.h | 1 + tools/arch/x86/lib/x86-opcode-map.txt | 2 +- 5 files changed, 22 insertions(+), 2 deletions(-)
arch/x86/include/asm/cpufeatures.h +1 -0
@@ -325,6 +325,7 @@#define X86_FEATURE_FSRS (12*32+11)/* "" Fast short REP STOSB */ #define X86_FEATURE_FSRC (12*32+12)/* "" Fast short REP {CMPSB,SCASB} */ #define X86_FEATURE_LKGS (12*32+18)/* "" Load "kernel" (userspace) GS */ +#define X86_FEATURE_WRMSRNS (12*32+19)/* "" Non-serializing WRMSR */ #define X86_FEATURE_AMX_FP16 (12*32+21)/* "" AMX fp16 Support */ #define X86_FEATURE_AVX_IFMA (12*32+23)/* "" Support for VPMADD52[H,L]UQ */ #define X86_FEATURE_LAM (12*32+26)/* Linear Address Masking */
arch/x86/include/asm/msr.h +18 -0
@@ -97,6 +97,19 @@ static __always_inline void __wrmsr(unsigned int msr, u32 low, u32 high) : : "c" (msr), "a"(low), "d" (high) : "memory"); } +/* +* WRMSRNS behaves exactly like WRMSR with the only difference being +* that it is not a serializing instruction by default. +*/ +static __always_inline void __wrmsrns(u32 msr, u32 low, u32 high) +{ +/* Instruction opcode for WRMSRNS; supported in binutils >= 2.40. */ + asm volatile("1: .byte 0x0f,0x01,0xc6\n" + "2:\n" + _ASM_EXTABLE_TYPE(1b, 2b, EX_TYPE_WRMSR) + : : "c" (msr), "a"(low), "d" (high)); +} +#define native_rdmsr (msr, val1, val2) \ do { \ u64 __val = __rdmsr((msr)); \
@@ -297,6 +310,11 @@ do { \#endif /* !CONFIG_PARAVIRT_XXL */ +static __always_inline void wrmsrns(u32 msr, u64 val) +{ +__wrmsrns (msr, val, val >>32 ); +} +/* * 64-bit version of wrmsr_safe(): */
arch/x86/lib/x86-opcode-map.txt +1 -1
@@ -1051,7 +1051,7 @@ GrpTable: Grp6 EndTable GrpTable: Grp7 -0: SGDT Ms | VMCALL (001),(11B) | VMLAUNCH (010),(11B) | VMRESUME (011),(11B) | VMXOFF (100),(11B) | PCONFIG (101),(11B) | ENCLV (000),(11B) +0: SGDT Ms | VMCALL (001),(11B) | VMLAUNCH (010),(11B) | VMRESUME (011),(11B) | VMXOFF (100),(11B) | PCONFIG (101),(11B) | ENCLV (000),(11B) | WRMSRNS (110),(11B) 1: SIDT Ms | MONITOR (000),(11B) | MWAIT (001),(11B) | CLAC (010),(11B) | STAC (011),(11B) | ENCLS (111),(11B) 2: LGDT Ms | XGETBV (000),(11B) | XSETBV (001),(11B) | VMFUNC (100),(11B) | XEND (101)(11B) | XTEST (110)(11B) | ENCLU (111),(11B) 3: LIDT Ms
tools/arch/x86/include/asm/cpufeatures.h +1 -0
@@ -322,6 +322,7 @@#define X86_FEATURE_FSRS (12*32+11)/* "" Fast short REP STOSB */ #define X86_FEATURE_FSRC (12*32+12)/* "" Fast short REP {CMPSB,SCASB} */ #define X86_FEATURE_LKGS (12*32+18)/* "" Load "kernel" (userspace) GS */ +#define X86_FEATURE_WRMSRNS (12*32+19)/* "" Non-serializing WRMSR */ #define X86_FEATURE_AMX_FP16 (12*32+21)/* "" AMX fp16 Support */ #define X86_FEATURE_AVX_IFMA (12*32+23)/* "" Support for VPMADD52[H,L]UQ */ #define X86_FEATURE_LAM (12*32+26)/* Linear Address Masking */
tools/arch/x86/lib/x86-opcode-map.txt +1 -1
@@ -1051,7 +1051,7 @@ GrpTable: Grp6 EndTable GrpTable: Grp7 -0: SGDT Ms | VMCALL (001),(11B) | VMLAUNCH (010),(11B) | VMRESUME (011),(11B) | VMXOFF (100),(11B) | PCONFIG (101),(11B) | ENCLV (000),(11B) +0: SGDT Ms | VMCALL (001),(11B) | VMLAUNCH (010),(11B) | VMRESUME (011),(11B) | VMXOFF (100),(11B) | PCONFIG (101),(11B) | ENCLV (000),(11B) | WRMSRNS (110),(11B) 1: SIDT Ms | MONITOR (000),(11B) | MWAIT (001),(11B) | CLAC (010),(11B) | STAC (011),(11B) | ENCLS (111),(11B) 2: LGDT Ms | XGETBV (000),(11B) | XSETBV (001),(11B) | VMFUNC (100),(11B) | XEND (101)(11B) | XTEST (110)(11B) | ENCLU (111),(11B) 3: LIDT Ms
Signature · 1 line
2.43.0
Re: [PATCH v13 01/35] x86/cpufeatures,opcode,msr: Add the WRMSRNS instruction support
Quoted 10 lines · On Tue, 5 Dec 2023 02:49:50 -0800 Xin Li <[email protected]> wrote:
WRMSRNS is an instruction that behaves exactly like WRMSR, with the only difference being that it is not a serializing instruction by default. Under certain conditions, WRMSRNS may replace WRMSR to improve performance.
Add its CPU feature bit, opcode to the x86 opcode map, and an always inline API
__wrmsrns()to embed WRMSRNS into the code.Tested-by Shan Kang <[email protected]>Signed-off-by Xin Li <[email protected]>
Looks good to me.
Thanks,
Quoted 103 lines
---
Changes since v12:
* Merge the 3 WRMSRNS patches into one (Borislav Petkov).
* s/cpu/CPU/g (Borislav Petkov).
* Shorten the WRMSRNS description (Borislav Petkov).--- arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/include/asm/msr.h | 18 ++++++++++++++++++ arch/x86/lib/x86-opcode-map.txt | 2 +- tools/arch/x86/include/asm/cpufeatures.h | 1 + tools/arch/x86/lib/x86-opcode-map.txt | 2 +- 5 files changed, 22 insertions(+), 2 deletions(-)arch/x86/include/asm/cpufeatures.h +1
-0@@ -325,6 +325,7 @@#define X86_FEATURE_FSRS (12*32+11)/* "" Fast short REP STOSB */ #define X86_FEATURE_FSRC (12*32+12)/* "" Fast short REP {CMPSB,SCASB} */ #define X86_FEATURE_LKGS (12*32+18)/* "" Load "kernel" (userspace) GS */ +#define X86_FEATURE_WRMSRNS (12*32+19)/* "" Non-serializing WRMSR */ #define X86_FEATURE_AMX_FP16 (12*32+21)/* "" AMX fp16 Support */ #define X86_FEATURE_AVX_IFMA (12*32+23)/* "" Support for VPMADD52[H,L]UQ */ #define X86_FEATURE_LAM (12*32+26)/* Linear Address Masking */ arch/x86/include/asm/msr.h +18
-0@@ -97,6 +97,19 @@ static __always_inline void __wrmsr(unsigned int msr, u32 low, u32 high) : : "c" (msr), "a"(low), "d" (high) : "memory"); } +/* +* WRMSRNS behaves exactly like WRMSR with the only difference being +* that it is not a serializing instruction by default. +*/ +static __always_inline void __wrmsrns(u32 msr, u32 low, u32 high) +{ +/* Instruction opcode for WRMSRNS; supported in binutils >= 2.40. */ + asm volatile("1: .byte 0x0f,0x01,0xc6\n" + "2:\n" + _ASM_EXTABLE_TYPE(1b, 2b, EX_TYPE_WRMSR) + : : "c" (msr), "a"(low), "d" (high)); +} +#define native_rdmsr (msr, val1, val2) \ do { \ u64 __val = __rdmsr((msr)); \@@ -297,6 +310,11 @@ do { \#endif /* !CONFIG_PARAVIRT_XXL */ +static __always_inline void wrmsrns(u32 msr, u64 val) +{ +__wrmsrns (msr, val, val >>32 ); +} +/* * 64-bit version of wrmsr_safe(): */ arch/x86/lib/x86-opcode-map.txt +1
-1@@ -1051,7 +1051,7 @@ GrpTable: Grp6 EndTable GrpTable: Grp7 -0: SGDT Ms | VMCALL (001),(11B) | VMLAUNCH (010),(11B) | VMRESUME (011),(11B) | VMXOFF (100),(11B) | PCONFIG (101),(11B) | ENCLV (000),(11B) +0: SGDT Ms | VMCALL (001),(11B) | VMLAUNCH (010),(11B) | VMRESUME (011),(11B) | VMXOFF (100),(11B) | PCONFIG (101),(11B) | ENCLV (000),(11B) | WRMSRNS (110),(11B) 1: SIDT Ms | MONITOR (000),(11B) | MWAIT (001),(11B) | CLAC (010),(11B) | STAC (011),(11B) | ENCLS (111),(11B) 2: LGDT Ms | XGETBV (000),(11B) | XSETBV (001),(11B) | VMFUNC (100),(11B) | XEND (101)(11B) | XTEST (110)(11B) | ENCLU (111),(11B) 3: LIDT Mstools/arch/x86/include/asm/cpufeatures.h +1
-0@@ -322,6 +322,7 @@#define X86_FEATURE_FSRS (12*32+11)/* "" Fast short REP STOSB */ #define X86_FEATURE_FSRC (12*32+12)/* "" Fast short REP {CMPSB,SCASB} */ #define X86_FEATURE_LKGS (12*32+18)/* "" Load "kernel" (userspace) GS */ +#define X86_FEATURE_WRMSRNS (12*32+19)/* "" Non-serializing WRMSR */ #define X86_FEATURE_AMX_FP16 (12*32+21)/* "" AMX fp16 Support */ #define X86_FEATURE_AVX_IFMA (12*32+23)/* "" Support for VPMADD52[H,L]UQ */ #define X86_FEATURE_LAM (12*32+26)/* Linear Address Masking */ tools/arch/x86/lib/x86-opcode-map.txt +1
-1@@ -1051,7 +1051,7 @@ GrpTable: Grp6 EndTable GrpTable: Grp7 -0: SGDT Ms | VMCALL (001),(11B) | VMLAUNCH (010),(11B) | VMRESUME (011),(11B) | VMXOFF (100),(11B) | PCONFIG (101),(11B) | ENCLV (000),(11B) +0: SGDT Ms | VMCALL (001),(11B) | VMLAUNCH (010),(11B) | VMRESUME (011),(11B) | VMXOFF (100),(11B) | PCONFIG (101),(11B) | ENCLV (000),(11B) | WRMSRNS (110),(11B) 1: SIDT Ms | MONITOR (000),(11B) | MWAIT (001),(11B) | CLAC (010),(11B) | STAC (011),(11B) | ENCLS (111),(11B) 2: LGDT Ms | XGETBV (000),(11B) | XSETBV (001),(11B) | VMFUNC (100),(11B) | XEND (101)(11B) | XTEST (110)(11B) | ENCLU (111),(11B) 3: LIDT MsSignature · 1 line
2.43.0
Signature · 1 line
Masami Hiramatsu (Google) <[email protected]>
Re: [PATCH v13 01/35] x86/cpufeatures,opcode,msr: Add the WRMSRNS instruction support
In reply to Xin LiQuoted 1 line · Xin Li
Subject: Re: [PATCH v13 01/35] x86/cpufeatures,opcode,msr: Add the WRMSRNS instruction support
Or simply "x86/fred: Add ... "
Other than that,
Signature · 4 lines
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquetteRE: [PATCH v13 01/35] x86/cpufeatures,opcode,msr: Add the WRMSRNS instruction support
Quoted 4 lines
Quoted 1 line
Subject: Re: [PATCH v13 01/35] x86/cpufeatures,opcode,msr: Add the
WRMSRNS instruction support
Or simply "x86/fred: Add ... "
Do I need to send an updated patch?
Or just leave it to the maintainer who is going to take care of it?
Quoted 4 lines
Other than that,
Thanks a lot!
-Xin
Quoted 6 lines
--
Regards/Gruss,
Boris.
Borislav Petkov
maintainerRe: [PATCH v13 01/35] x86/cpufeatures,opcode,msr: Add the WRMSRNS instruction support
Quoted 3 lines · On Tue, Jan 02, 2024 at 10:06:27PM +0000, Li, Xin3 wrote:
Do I need to send an updated patch?
Or just leave it to the maintainer who is going to take care of it?
While waiting, please take a look at this:
Might want to read the whole doc too.
But to answer your question: you wait a few weeks and collect all comments and review feedback that you've received and incorporate them into the patchset.
Then, after the time passes you send a new revision and explain in the 0th message what has changed.
Ok?
Thx.
Signature · 4 lines
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette[tip: x86/fred] x86/cpufeatures,opcode,msr: Add the WRMSRNS instruction support
In reply to Xin LiThe following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: a4cb5ece145828cae35503857debf3d49c9d1c5f Gitweb: https://git.kernel.org/tip/a4cb5ece145828cae35503857debf3d49c9d1c5f Author: Xin Li <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:49:50 -08:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 25 Jan 2024 19:10:29 +01:00
x86/cpufeatures,opcode,msr: Add the WRMSRNS instruction support
WRMSRNS is an instruction that behaves exactly like WRMSR, with the only difference being that it is not a serializing instruction by default. Under certain conditions, WRMSRNS may replace WRMSR to improve performance.
Add its CPU feature bit, opcode to the x86 opcode map, and an always inline API __wrmsrns() to embed WRMSRNS into the code.
--- arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/include/asm/msr.h | 18 ++++++++++++++++++ arch/x86/lib/x86-opcode-map.txt | 2 +- tools/arch/x86/include/asm/cpufeatures.h | 1 + tools/arch/x86/lib/x86-opcode-map.txt | 2 +- 5 files changed, 22 insertions(+), 2 deletions(-)
arch/x86/include/asm/cpufeatures.h +1 -0
@@ -327,6 +327,7 @@#define X86_FEATURE_FSRS (12*32+11)/* "" Fast short REP STOSB */ #define X86_FEATURE_FSRC (12*32+12)/* "" Fast short REP {CMPSB,SCASB} */ #define X86_FEATURE_LKGS (12*32+18)/* "" Load "kernel" (userspace) GS */ +#define X86_FEATURE_WRMSRNS (12*32+19)/* "" Non-serializing WRMSR */ #define X86_FEATURE_AMX_FP16 (12*32+21)/* "" AMX fp16 Support */ #define X86_FEATURE_AVX_IFMA (12*32+23)/* "" Support for VPMADD52[H,L]UQ */ #define X86_FEATURE_LAM (12*32+26)/* Linear Address Masking */
arch/x86/include/asm/msr.h +18 -0
@@ -97,6 +97,19 @@ static __always_inline void __wrmsr(unsigned int msr, u32 low, u32 high) : : "c" (msr), "a"(low), "d" (high) : "memory"); } +/* +* WRMSRNS behaves exactly like WRMSR with the only difference being +* that it is not a serializing instruction by default. +*/ +static __always_inline void __wrmsrns(u32 msr, u32 low, u32 high) +{ +/* Instruction opcode for WRMSRNS; supported in binutils >= 2.40. */ + asm volatile("1: .byte 0x0f,0x01,0xc6\n" + "2:\n" + _ASM_EXTABLE_TYPE(1b, 2b, EX_TYPE_WRMSR) + : : "c" (msr), "a"(low), "d" (high)); +} +#define native_rdmsr (msr, val1, val2) \ do { \ u64 __val = __rdmsr((msr)); \
@@ -297,6 +310,11 @@ do { \#endif /* !CONFIG_PARAVIRT_XXL */ +static __always_inline void wrmsrns(u32 msr, u64 val) +{ +__wrmsrns (msr, val, val >>32 ); +} +/* * 64-bit version of wrmsr_safe(): */
arch/x86/lib/x86-opcode-map.txt +1 -1
@@ -1051,7 +1051,7 @@ GrpTable: Grp6 EndTable GrpTable: Grp7 -0: SGDT Ms | VMCALL (001),(11B) | VMLAUNCH (010),(11B) | VMRESUME (011),(11B) | VMXOFF (100),(11B) | PCONFIG (101),(11B) | ENCLV (000),(11B) +0: SGDT Ms | VMCALL (001),(11B) | VMLAUNCH (010),(11B) | VMRESUME (011),(11B) | VMXOFF (100),(11B) | PCONFIG (101),(11B) | ENCLV (000),(11B) | WRMSRNS (110),(11B) 1: SIDT Ms | MONITOR (000),(11B) | MWAIT (001),(11B) | CLAC (010),(11B) | STAC (011),(11B) | ENCLS (111),(11B) 2: LGDT Ms | XGETBV (000),(11B) | XSETBV (001),(11B) | VMFUNC (100),(11B) | XEND (101)(11B) | XTEST (110)(11B) | ENCLU (111),(11B) 3: LIDT Ms
tools/arch/x86/include/asm/cpufeatures.h +1 -0
@@ -322,6 +322,7 @@#define X86_FEATURE_FSRS (12*32+11)/* "" Fast short REP STOSB */ #define X86_FEATURE_FSRC (12*32+12)/* "" Fast short REP {CMPSB,SCASB} */ #define X86_FEATURE_LKGS (12*32+18)/* "" Load "kernel" (userspace) GS */ +#define X86_FEATURE_WRMSRNS (12*32+19)/* "" Non-serializing WRMSR */ #define X86_FEATURE_AMX_FP16 (12*32+21)/* "" AMX fp16 Support */ #define X86_FEATURE_AVX_IFMA (12*32+23)/* "" Support for VPMADD52[H,L]UQ */ #define X86_FEATURE_LAM (12*32+26)/* Linear Address Masking */
tools/arch/x86/lib/x86-opcode-map.txt +1 -1
@@ -1051,7 +1051,7 @@ GrpTable: Grp6 EndTable GrpTable: Grp7 -0: SGDT Ms | VMCALL (001),(11B) | VMLAUNCH (010),(11B) | VMRESUME (011),(11B) | VMXOFF (100),(11B) | PCONFIG (101),(11B) | ENCLV (000),(11B) +0: SGDT Ms | VMCALL (001),(11B) | VMLAUNCH (010),(11B) | VMRESUME (011),(11B) | VMXOFF (100),(11B) | PCONFIG (101),(11B) | ENCLV (000),(11B) | WRMSRNS (110),(11B) 1: SIDT Ms | MONITOR (000),(11B) | MWAIT (001),(11B) | CLAC (010),(11B) | STAC (011),(11B) | ENCLS (111),(11B) 2: LGDT Ms | XGETBV (000),(11B) | XSETBV (001),(11B) | VMFUNC (100),(11B) | XEND (101)(11B) | XTEST (110)(11B) | ENCLU (111),(11B) 3: LIDT Ms
PATCH v13 2/35 x86/entry: Remove idtentry_sysvec from entry_{32,64}.S
In reply to Xin Liidtentry_sysvec is really just DECLARE_IDTENTRY defined in <asm/idtentry.h>, no need to define it separately.
--- arch/x86/entry/entry_32.S | 4 ---- arch/x86/entry/entry_64.S | 8 -------- arch/x86/include/asm/idtentry.h | 2 +- 3 files changed, 1 insertion(+), 13 deletions(-)
arch/x86/entry/entry_32.S +0 -4
@@ -649,10 +649,6 @@ SYM_CODE_START_LOCAL(asm_\cfunc) SYM_CODE_END(asm_\cfunc) .endm -.macro idtentry_sysvec vector cfunc - idtentry \vector asm_\cfunc \cfunc has_error_code=0 -.endm - /* * Include the defines which emit the idt entries which are shared * shared between 32 and 64 bit and emit the __irqentry_text_* markers
arch/x86/entry/entry_64.S +0 -8
@@ -370,14 +370,6 @@ SYM_CODE_END(\asmsym) idtentry \vector asm_\cfunc \cfunc has_error_code=1 .endm -/* - * System vectors which invoke their handlers directly and are not - * going through the regular common device interrupt handling code. - */ -.macro idtentry_sysvec vector cfunc - idtentry \vector asm_\cfunc \cfunc has_error_code=0 -.endm - /** * idtentry_mce_db - Macro to generate entry stubs for #MC and #DB * @vector: Vector number
arch/x86/include/asm/idtentry.h +1 -1
@@ -447,7 +447,7 @@ __visible noinstr void func(struct pt_regs *regs, \/* System vector entries */ #define DECLARE_IDTENTRY_SYSVEC (vector, func) \ - idtentry_sysvec vector func + DECLARE_IDTENTRY(vector, func)#ifdef CONFIG_X86_64 # define DECLARE_IDTENTRY_MCE (vector, func) \
Signature · 1 line
2.43.0
[tip: x86/fred] x86/entry: Remove idtentry_sysvec from entry_{32,64}.S
The following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: 3167b37f82ea8f9da156ff4edf100756bbc9277e Gitweb: https://git.kernel.org/tip/3167b37f82ea8f9da156ff4edf100756bbc9277e Author: Xin Li <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:49:51 -08:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 25 Jan 2024 19:10:29 +01:00
x86/entry: Remove idtentry_sysvec from entry_{32,64}.S
idtentry_sysvec is really just DECLARE_IDTENTRY defined in <asm/idtentry.h>, no need to define it separately.
--- arch/x86/entry/entry_32.S | 4 ---- arch/x86/entry/entry_64.S | 8 -------- arch/x86/include/asm/idtentry.h | 2 +- 3 files changed, 1 insertion(+), 13 deletions(-)
arch/x86/entry/entry_32.S +0 -4
@@ -649,10 +649,6 @@ SYM_CODE_START_LOCAL(asm_\cfunc) SYM_CODE_END(asm_\cfunc) .endm -.macro idtentry_sysvec vector cfunc - idtentry \vector asm_\cfunc \cfunc has_error_code=0 -.endm - /* * Include the defines which emit the idt entries which are shared * shared between 32 and 64 bit and emit the __irqentry_text_* markers
arch/x86/entry/entry_64.S +0 -8
@@ -370,14 +370,6 @@ SYM_CODE_END(\asmsym) idtentry \vector asm_\cfunc \cfunc has_error_code=1 .endm -/* - * System vectors which invoke their handlers directly and are not - * going through the regular common device interrupt handling code. - */ -.macro idtentry_sysvec vector cfunc - idtentry \vector asm_\cfunc \cfunc has_error_code=0 -.endm - /** * idtentry_mce_db - Macro to generate entry stubs for #MC and #DB * @vector: Vector number
arch/x86/include/asm/idtentry.h +1 -1
@@ -447,7 +447,7 @@ __visible noinstr void func(struct pt_regs *regs, \/* System vector entries */ #define DECLARE_IDTENTRY_SYSVEC (vector, func) \ - idtentry_sysvec vector func + DECLARE_IDTENTRY(vector, func)#ifdef CONFIG_X86_64 # define DECLARE_IDTENTRY_MCE (vector, func) \
PATCH v13 3/35 x86/trapnr: Add event type macros to <asm/trapnr.h>
In reply to Xin LiIntel VT-x classifies events into eight different types, which is inherited by FRED for event identification. As such, event type becomes a common x86 concept, and should be defined in a common x86 header.
Add event type macros to <asm/trapnr.h>, and use it in <asm/vmx.h>.
---
Changes since v10:
* A few comment fixes and improvements (Andrew Cooper).
--- arch/x86/include/asm/trapnr.h | 12 ++++++++++++ arch/x86/include/asm/vmx.h | 17 +++++++++-------- 2 files changed, 21 insertions(+), 8 deletions(-)
arch/x86/include/asm/trapnr.h +12 -0
@@ -2,6 +2,18 @@#ifndef _ASM_X86_TRAPNR_H#define _ASM_X86_TRAPNR_H +/* +* Event type codes used by FRED, Intel VT-x and AMD SVM +*/ +#define EVENT_TYPE_EXTINT 0 // External interrupt +#define EVENT_TYPE_RESERVED 1 +#define EVENT_TYPE_NMI 2 // NMI +#define EVENT_TYPE_HWEXC 3 // Hardware originated traps, exceptions +#define EVENT_TYPE_SWINT 4 // INT n +#define EVENT_TYPE_PRIV_SWEXC 5 // INT1 +#define EVENT_TYPE_SWEXC 6 // INTO, INT3 +#define EVENT_TYPE_OTHER 7 // FRED SYSCALL/SYSENTER, VT-x MTF +/* Interrupts/Exceptions */ #define X86_TRAP_DE 0/* Divide-by-zero */
arch/x86/include/asm/vmx.h +9 -8
@@ -17,6 +17,7 @@#include <linux/types.h> #include <uapi/asm/vmx.h> +#include <asm/trapnr.h> #include <asm/vmxfeatures.h> #define VMCS_CONTROL_BIT (x) BIT(VMX_FEATURE_##x & 0x1f)
@@ -374,14 +375,14 @@ enum vmcs_field {#define VECTORING_INFO_DELIVER_CODE_MASK INTR_INFO_DELIVER_CODE_MASK#define VECTORING_INFO_VALID_MASK INTR_INFO_VALID_MASK -#define INTR_TYPE_EXT_INTR (0 << 8)/* external interrupt */ -#define INTR_TYPE_RESERVED (1 << 8)/* reserved */ -#define INTR_TYPE_NMI_INTR (2 << 8)/* NMI */ -#define INTR_TYPE_HARD_EXCEPTION (3 << 8)/* processor exception */ -#define INTR_TYPE_SOFT_INTR (4 << 8)/* software interrupt */ -#define INTR_TYPE_PRIV_SW_EXCEPTION (5 << 8)/* ICE breakpoint - undocumented */ -#define INTR_TYPE_SOFT_EXCEPTION (6 << 8)/* software exception */ -#define INTR_TYPE_OTHER_EVENT (7 << 8)/* other event */ +#define INTR_TYPE_EXT_INTR (EVENT_TYPE_EXTINT << 8)/* external interrupt */ +#define INTR_TYPE_RESERVED (EVENT_TYPE_RESERVED << 8)/* reserved */ +#define INTR_TYPE_NMI_INTR (EVENT_TYPE_NMI << 8)/* NMI */ +#define INTR_TYPE_HARD_EXCEPTION (EVENT_TYPE_HWEXC << 8)/* processor exception */ +#define INTR_TYPE_SOFT_INTR (EVENT_TYPE_SWINT << 8)/* software interrupt */ +#define INTR_TYPE_PRIV_SW_EXCEPTION (EVENT_TYPE_PRIV_SWEXC << 8)/* ICE breakpoint */ +#define INTR_TYPE_SOFT_EXCEPTION (EVENT_TYPE_SWEXC << 8)/* software exception */ +#define INTR_TYPE_OTHER_EVENT (EVENT_TYPE_OTHER << 8)/* other event */ /* GUEST_INTERRUPTIBILITY_INFO flags. */ #define GUEST_INTR_STATE_STI 0x00000001
Signature · 1 line
2.43.0
[tip: x86/fred] x86/trapnr: Add event type macros to <asm/trapnr.h>
The following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: 8df719341e8556f1e2bfa0f78fc433db6eba110b Gitweb: https://git.kernel.org/tip/8df719341e8556f1e2bfa0f78fc433db6eba110b Author: Xin Li <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:49:52 -08:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 25 Jan 2024 19:10:29 +01:00
x86/trapnr: Add event type macros to <asm/trapnr.h>
Intel VT-x classifies events into eight different types, which is inherited by FRED for event identification. As such, event types becomes a common x86 concept, and should be defined in a common x86 header.
Add event type macros to <asm/trapnr.h>, and use them in <asm/vmx.h>.
--- arch/x86/include/asm/trapnr.h | 12 ++++++++++++ arch/x86/include/asm/vmx.h | 17 +++++++++-------- 2 files changed, 21 insertions(+), 8 deletions(-)
arch/x86/include/asm/trapnr.h +12 -0
@@ -2,6 +2,18 @@#ifndef _ASM_X86_TRAPNR_H#define _ASM_X86_TRAPNR_H +/* +* Event type codes used by FRED, Intel VT-x and AMD SVM +*/ +#define EVENT_TYPE_EXTINT 0 // External interrupt +#define EVENT_TYPE_RESERVED 1 +#define EVENT_TYPE_NMI 2 // NMI +#define EVENT_TYPE_HWEXC 3 // Hardware originated traps, exceptions +#define EVENT_TYPE_SWINT 4 // INT n +#define EVENT_TYPE_PRIV_SWEXC 5 // INT1 +#define EVENT_TYPE_SWEXC 6 // INTO, INT3 +#define EVENT_TYPE_OTHER 7 // FRED SYSCALL/SYSENTER, VT-x MTF +/* Interrupts/Exceptions */ #define X86_TRAP_DE 0/* Divide-by-zero */
arch/x86/include/asm/vmx.h +9 -8
@@ -17,6 +17,7 @@#include <linux/types.h> #include <uapi/asm/vmx.h> +#include <asm/trapnr.h> #include <asm/vmxfeatures.h> #define VMCS_CONTROL_BIT (x) BIT(VMX_FEATURE_##x & 0x1f)
@@ -374,14 +375,14 @@ enum vmcs_field {#define VECTORING_INFO_DELIVER_CODE_MASK INTR_INFO_DELIVER_CODE_MASK#define VECTORING_INFO_VALID_MASK INTR_INFO_VALID_MASK -#define INTR_TYPE_EXT_INTR (0 << 8)/* external interrupt */ -#define INTR_TYPE_RESERVED (1 << 8)/* reserved */ -#define INTR_TYPE_NMI_INTR (2 << 8)/* NMI */ -#define INTR_TYPE_HARD_EXCEPTION (3 << 8)/* processor exception */ -#define INTR_TYPE_SOFT_INTR (4 << 8)/* software interrupt */ -#define INTR_TYPE_PRIV_SW_EXCEPTION (5 << 8)/* ICE breakpoint - undocumented */ -#define INTR_TYPE_SOFT_EXCEPTION (6 << 8)/* software exception */ -#define INTR_TYPE_OTHER_EVENT (7 << 8)/* other event */ +#define INTR_TYPE_EXT_INTR (EVENT_TYPE_EXTINT << 8)/* external interrupt */ +#define INTR_TYPE_RESERVED (EVENT_TYPE_RESERVED << 8)/* reserved */ +#define INTR_TYPE_NMI_INTR (EVENT_TYPE_NMI << 8)/* NMI */ +#define INTR_TYPE_HARD_EXCEPTION (EVENT_TYPE_HWEXC << 8)/* processor exception */ +#define INTR_TYPE_SOFT_INTR (EVENT_TYPE_SWINT << 8)/* software interrupt */ +#define INTR_TYPE_PRIV_SW_EXCEPTION (EVENT_TYPE_PRIV_SWEXC << 8)/* ICE breakpoint */ +#define INTR_TYPE_SOFT_EXCEPTION (EVENT_TYPE_SWEXC << 8)/* software exception */ +#define INTR_TYPE_OTHER_EVENT (EVENT_TYPE_OTHER << 8)/* other event */ /* GUEST_INTERRUPTIBILITY_INFO flags. */ #define GUEST_INTR_STATE_STI 0x00000001
PATCH v13 4/35 Documentation/x86/64: Add a documentation for FRED
In reply to Xin LiBriefly introduce FRED, and its advantages compared to IDT.
---
Changes since v10:
* Reword a sentence to improve readability (Nikolay Borisov).
--- Documentation/arch/x86/x86_64/fred.rst | 96 +++++++++++++++++++++++++ Documentation/arch/x86/x86_64/index.rst | 1 + 2 files changed, 97 insertions(+) create mode 100644 Documentation/arch/x86/x86_64/fred.rst
Documentation/arch/x86/x86_64/fred.rst new file +96 -0
@@ -0,0 +1,96 @@ +.. SPDX-License-Identifier: GPL-2.0 + +========================================= +Flexible Return and Event Delivery (FRED) +========================================= + +Overview +======== + +The FRED architecture defines simple new transitions that change +privilege level (ring transitions). The FRED architecture was +designed with the following goals: + +1) Improve overall performance and response time by replacing event + delivery through the interrupt descriptor table (IDT event + delivery) and event return by the IRET instruction with lower + latency transitions. + +2) Improve software robustness by ensuring that event delivery + establishes the full supervisor context and that event return + establishes the full user context. + +The new transitions defined by the FRED architecture are FRED event +delivery and, for returning from events, two FRED return instructions. +FRED event delivery can effect a transition from ring 3 to ring 0, but +it is used also to deliver events incident to ring 0. One FRED +instruction (ERETU) effects a return from ring 0 to ring 3, while the +other (ERETS) returns while remaining in ring 0. Collectively, FRED +event delivery and the FRED return instructions are FRED transitions. + +In addition to these transitions, the FRED architecture defines a new +instruction (LKGS) for managing the state of the GS segment register. +The LKGS instruction can be used by 64-bit operating systems that do +not use the new FRED transitions. + +Furthermore, the FRED architecture is easy to extend for future CPU +architectures. + +Software based event dispatching +================================ + +FRED operates differently from IDT in terms of event handling. Instead +of directly dispatching an event to its handler based on the event +vector, FRED requires the software to dispatch an event to its handler +based on both the event's type and vector. Therefore, an event dispatch +framework must be implemented to facilitate the event-to-handler +dispatch process. The FRED event dispatch framework takes control +once an event is delivered, and employs a two-level dispatch. + +The first level dispatching is event type based, and the second level +dispatching is event vector based. + +Full supervisor/user context +============================ + +FRED event delivery atomically save and restore full supervisor/user +context upon event delivery and return. Thus it avoids the problem of +transient states due to %cr2 and/or %dr6, and it is no longer needed +to handle all the ugly corner cases caused by half baked entry states. + +FRED allows explicit unblock of NMI with new event return instructions +ERETS/ERETU, avoiding the mess caused by IRET which unconditionally +unblocks NMI, e.g., when an exception happens during NMI handling. + +FRED always restores the full value of %rsp, thus ESPFIX is no longer +needed when FRED is enabled. + +LKGS +==== + +LKGS behaves like the MOV to GS instruction except that it loads the +base address into the IA32_KERNEL_GS_BASE MSR instead of the GS +segment’s descriptor cache. With LKGS, it ends up with avoiding +mucking with kernel GS, i.e., an operating system can always operate +with its own GS base address. + +Because FRED event delivery from ring 3 and ERETU both swap the value +of the GS base address and that of the IA32_KERNEL_GS_BASE MSR, plus +the introduction of LKGS instruction, the SWAPGS instruction is no +longer needed when FRED is enabled, thus is disallowed (#UD). + +Stack levels +============ + +4 stack levels 0~3 are introduced to replace the nonreentrant IST for +event handling, and each stack level should be configured to use a +dedicated stack. + +The current stack level could be unchanged or go higher upon FRED +event delivery. If unchanged, the CPU keeps using the current event +stack. If higher, the CPU switches to a new event stack specified by +the MSR of the new stack level, i.e., MSR_IA32_FRED_RSP[123]. + +Only execution of a FRED return instruction ERET[US], could lower the +current stack level, causing the CPU to switch back to the stack it was +on before a previous event delivery that promoted the stack level.
Documentation/arch/x86/x86_64/index.rst +1 -0
@@ -15,3 +15,4 @@ x86_64 Support cpu-hotplug-spec machinecheck fsgs + fred
Signature · 1 line
2.43.0
[tip: x86/fred] Documentation/x86/64: Add documentation for FRED
The following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: 51383e741b41748ee80140233ab98ca6b56918b3 Gitweb: https://git.kernel.org/tip/51383e741b41748ee80140233ab98ca6b56918b3 Author: Xin Li <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:49:53 -08:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 25 Jan 2024 19:10:29 +01:00
Documentation/x86/64: Add documentation for FRED
Briefly introduce FRED, and its advantages compared to IDT.
--- Documentation/arch/x86/x86_64/fred.rst | 96 ++++++++++++++++++++++++- Documentation/arch/x86/x86_64/index.rst | 1 +- 2 files changed, 97 insertions(+) create mode 100644 Documentation/arch/x86/x86_64/fred.rst
Documentation/arch/x86/x86_64/fred.rst new file +96 -0
@@ -0,0 +1,96 @@ +.. SPDX-License-Identifier: GPL-2.0 + +========================================= +Flexible Return and Event Delivery (FRED) +========================================= + +Overview +======== + +The FRED architecture defines simple new transitions that change +privilege level (ring transitions). The FRED architecture was +designed with the following goals: + +1) Improve overall performance and response time by replacing event + delivery through the interrupt descriptor table (IDT event + delivery) and event return by the IRET instruction with lower + latency transitions. + +2) Improve software robustness by ensuring that event delivery + establishes the full supervisor context and that event return + establishes the full user context. + +The new transitions defined by the FRED architecture are FRED event +delivery and, for returning from events, two FRED return instructions. +FRED event delivery can effect a transition from ring 3 to ring 0, but +it is used also to deliver events incident to ring 0. One FRED +instruction (ERETU) effects a return from ring 0 to ring 3, while the +other (ERETS) returns while remaining in ring 0. Collectively, FRED +event delivery and the FRED return instructions are FRED transitions. + +In addition to these transitions, the FRED architecture defines a new +instruction (LKGS) for managing the state of the GS segment register. +The LKGS instruction can be used by 64-bit operating systems that do +not use the new FRED transitions. + +Furthermore, the FRED architecture is easy to extend for future CPU +architectures. + +Software based event dispatching +================================ + +FRED operates differently from IDT in terms of event handling. Instead +of directly dispatching an event to its handler based on the event +vector, FRED requires the software to dispatch an event to its handler +based on both the event's type and vector. Therefore, an event dispatch +framework must be implemented to facilitate the event-to-handler +dispatch process. The FRED event dispatch framework takes control +once an event is delivered, and employs a two-level dispatch. + +The first level dispatching is event type based, and the second level +dispatching is event vector based. + +Full supervisor/user context +============================ + +FRED event delivery atomically save and restore full supervisor/user +context upon event delivery and return. Thus it avoids the problem of +transient states due to %cr2 and/or %dr6, and it is no longer needed +to handle all the ugly corner cases caused by half baked entry states. + +FRED allows explicit unblock of NMI with new event return instructions +ERETS/ERETU, avoiding the mess caused by IRET which unconditionally +unblocks NMI, e.g., when an exception happens during NMI handling. + +FRED always restores the full value of %rsp, thus ESPFIX is no longer +needed when FRED is enabled. + +LKGS +==== + +LKGS behaves like the MOV to GS instruction except that it loads the +base address into the IA32_KERNEL_GS_BASE MSR instead of the GS +segment’s descriptor cache. With LKGS, it ends up with avoiding +mucking with kernel GS, i.e., an operating system can always operate +with its own GS base address. + +Because FRED event delivery from ring 3 and ERETU both swap the value +of the GS base address and that of the IA32_KERNEL_GS_BASE MSR, plus +the introduction of LKGS instruction, the SWAPGS instruction is no +longer needed when FRED is enabled, thus is disallowed (#UD). + +Stack levels +============ + +4 stack levels 0~3 are introduced to replace the nonreentrant IST for +event handling, and each stack level should be configured to use a +dedicated stack. + +The current stack level could be unchanged or go higher upon FRED +event delivery. If unchanged, the CPU keeps using the current event +stack. If higher, the CPU switches to a new event stack specified by +the MSR of the new stack level, i.e., MSR_IA32_FRED_RSP[123]. + +Only execution of a FRED return instruction ERET[US], could lower the +current stack level, causing the CPU to switch back to the stack it was +on before a previous event delivery that promoted the stack level.
Documentation/arch/x86/x86_64/index.rst +1 -0
@@ -15,3 +15,4 @@ x86_64 Support cpu-hotplug-spec machinecheck fsgs + fred
PATCH v13 5/35 x86/fred: Add Kconfig option for FRED (CONFIG_X86_FRED)
In reply to Xin LiFrom: "H. Peter Anvin (Intel)" <[email protected]>
Add the configuration option CONFIG_X86_FRED to enable FRED.
--- arch/x86/Kconfig | 9 +++++++++ 1 file changed, 9 insertions(+)
arch/x86/Kconfig +9 -0
@@ -492,6 +492,15 @@ config X86_CPU_RESCTRL Say N if unsure. +config X86_FRED + bool "Flexible Return and Event Delivery" + depends on X86_64 + help + When enabled, try to use Flexible Return and Event Delivery + instead of the legacy SYSCALL/SYSENTER/IDT architecture for + ring transitions and exception/interrupt handling if the + system supports. + if X86_32 config X86_BIGSMP bool "Support for big SMP systems with more than 8 CPUs"
Signature · 1 line
2.43.0
[tip: x86/fred] x86/fred: Add Kconfig option for FRED (CONFIG_X86_FRED)
The following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: 2cce95918d635126098d784c040b59333c464b20 Gitweb: https://git.kernel.org/tip/2cce95918d635126098d784c040b59333c464b20 Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:49:54 -08:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 25 Jan 2024 19:10:30 +01:00
x86/fred: Add Kconfig option for FRED (CONFIG_X86_FRED)
Add the configuration option CONFIG_X86_FRED to enable FRED.
--- arch/x86/Kconfig | 9 +++++++++ 1 file changed, 9 insertions(+)
arch/x86/Kconfig +9 -0
@@ -496,6 +496,15 @@ config X86_CPU_RESCTRL Say N if unsure. +config X86_FRED + bool "Flexible Return and Event Delivery" + depends on X86_64 + help + When enabled, try to use Flexible Return and Event Delivery + instead of the legacy SYSCALL/SYSENTER/IDT architecture for + ring transitions and exception/interrupt handling if the + system supports. + if X86_32 config X86_BIGSMP bool "Support for big SMP systems with more than 8 CPUs"
PATCH v13 6/35 x86/cpufeatures: Add the CPU feature bit for FRED
In reply to Xin LiFrom: "H. Peter Anvin (Intel)" <[email protected]>
Any FRED CPU will always have the following features as its baseline:
1) LKGS, load attributes of the GS segment but the base address into the IA32_KERNEL_GS_BASE MSR instead of the GS segment’s descriptor cache.
2) WRMSRNS, non-serializing WRMSR for faster MSR writes.
---
Change since v12:
* s/cpu/CPU/g (Borislav Petkov).
--- arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/kernel/cpu/cpuid-deps.c | 2 ++ tools/arch/x86/include/asm/cpufeatures.h | 1 + 3 files changed, 4 insertions(+)
arch/x86/include/asm/cpufeatures.h +1 -0
@@ -324,6 +324,7 @@#define X86_FEATURE_FZRM (12*32+10)/* "" Fast zero-length REP MOVSB */ #define X86_FEATURE_FSRS (12*32+11)/* "" Fast short REP STOSB */ #define X86_FEATURE_FSRC (12*32+12)/* "" Fast short REP {CMPSB,SCASB} */ +#define X86_FEATURE_FRED (12*32+17)/* Flexible Return and Event Delivery */ #define X86_FEATURE_LKGS (12*32+18)/* "" Load "kernel" (userspace) GS */ #define X86_FEATURE_WRMSRNS (12*32+19)/* "" Non-serializing WRMSR */ #define X86_FEATURE_AMX_FP16 (12*32+21)/* "" AMX fp16 Support */
arch/x86/kernel/cpu/cpuid-deps.c +2 -0
@@ -82,6 +82,8 @@ static const struct cpuid_dep cpuid_deps[] = { { X86_FEATURE_XFD, X86_FEATURE_XGETBV1 }, { X86_FEATURE_AMX_TILE, X86_FEATURE_XFD }, { X86_FEATURE_SHSTK, X86_FEATURE_XSAVES }, + { X86_FEATURE_FRED, X86_FEATURE_LKGS }, + { X86_FEATURE_FRED, X86_FEATURE_WRMSRNS }, {} };
tools/arch/x86/include/asm/cpufeatures.h +1 -0
@@ -321,6 +321,7 @@#define X86_FEATURE_FZRM (12*32+10)/* "" Fast zero-length REP MOVSB */ #define X86_FEATURE_FSRS (12*32+11)/* "" Fast short REP STOSB */ #define X86_FEATURE_FSRC (12*32+12)/* "" Fast short REP {CMPSB,SCASB} */ +#define X86_FEATURE_FRED (12*32+17)/* Flexible Return and Event Delivery */ #define X86_FEATURE_LKGS (12*32+18)/* "" Load "kernel" (userspace) GS */ #define X86_FEATURE_WRMSRNS (12*32+19)/* "" Non-serializing WRMSR */ #define X86_FEATURE_AMX_FP16 (12*32+21)/* "" AMX fp16 Support */
Signature · 1 line
2.43.0
[tip: x86/fred] x86/cpufeatures: Add the CPU feature bit for FRED
The following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: 51c158f7aaccc6f6423a61a1df4a0d4c0d9d22a9 Gitweb: https://git.kernel.org/tip/51c158f7aaccc6f6423a61a1df4a0d4c0d9d22a9 Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:49:55 -08:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 25 Jan 2024 19:10:30 +01:00
x86/cpufeatures: Add the CPU feature bit for FRED
Any FRED enabled CPU will always have the following features as its baseline:
1) LKGS, load attributes of the GS segment but the base address into the IA32_KERNEL_GS_BASE MSR instead of the GS segment’s descriptor cache.
2) WRMSRNS, non-serializing WRMSR for faster MSR writes.
--- arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/kernel/cpu/cpuid-deps.c | 2 ++ tools/arch/x86/include/asm/cpufeatures.h | 1 + 3 files changed, 4 insertions(+)
arch/x86/include/asm/cpufeatures.h +1 -0
@@ -326,6 +326,7 @@#define X86_FEATURE_FZRM (12*32+10)/* "" Fast zero-length REP MOVSB */ #define X86_FEATURE_FSRS (12*32+11)/* "" Fast short REP STOSB */ #define X86_FEATURE_FSRC (12*32+12)/* "" Fast short REP {CMPSB,SCASB} */ +#define X86_FEATURE_FRED (12*32+17)/* Flexible Return and Event Delivery */ #define X86_FEATURE_LKGS (12*32+18)/* "" Load "kernel" (userspace) GS */ #define X86_FEATURE_WRMSRNS (12*32+19)/* "" Non-serializing WRMSR */ #define X86_FEATURE_AMX_FP16 (12*32+21)/* "" AMX fp16 Support */
arch/x86/kernel/cpu/cpuid-deps.c +2 -0
@@ -82,6 +82,8 @@ static const struct cpuid_dep cpuid_deps[] = { { X86_FEATURE_XFD, X86_FEATURE_XGETBV1 }, { X86_FEATURE_AMX_TILE, X86_FEATURE_XFD }, { X86_FEATURE_SHSTK, X86_FEATURE_XSAVES }, + { X86_FEATURE_FRED, X86_FEATURE_LKGS }, + { X86_FEATURE_FRED, X86_FEATURE_WRMSRNS }, {} };
tools/arch/x86/include/asm/cpufeatures.h +1 -0
@@ -321,6 +321,7 @@#define X86_FEATURE_FZRM (12*32+10)/* "" Fast zero-length REP MOVSB */ #define X86_FEATURE_FSRS (12*32+11)/* "" Fast short REP STOSB */ #define X86_FEATURE_FSRC (12*32+12)/* "" Fast short REP {CMPSB,SCASB} */ +#define X86_FEATURE_FRED (12*32+17)/* Flexible Return and Event Delivery */ #define X86_FEATURE_LKGS (12*32+18)/* "" Load "kernel" (userspace) GS */ #define X86_FEATURE_WRMSRNS (12*32+19)/* "" Non-serializing WRMSR */ #define X86_FEATURE_AMX_FP16 (12*32+21)/* "" AMX fp16 Support */
PATCH v13 7/35 x86/fred: Disable FRED support if CONFIG_X86_FRED is disabled
In reply to Xin LiFrom: "H. Peter Anvin (Intel)" <[email protected]>
Add CONFIG_X86_FRED to <asm/disabled-features.h> to make cpu_feature_enabled() work correctly with FRED.
---
Changes since v10:
* FRED feature is defined in cpuid word 12, not 13 (Nikolay Borisov).
--- arch/x86/include/asm/disabled-features.h | 8 +++++++- tools/arch/x86/include/asm/disabled-features.h | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-)
arch/x86/include/asm/disabled-features.h +7 -1
@@ -117,6 +117,12 @@#define DISABLE_IBT (1 << (X86_FEATURE_IBT & 31))#endif +#ifdef CONFIG_X86_FRED +# define DISABLE_FRED 0 +#else +# define DISABLE_FRED (1 << (X86_FEATURE_FRED & 31)) +#endif +/* * Make sure to add features to the correct mask */
@@ -133,7 +139,7 @@#define DISABLED_MASK10 0#define DISABLED_MASK11 (DISABLE_RETPOLINE|DISABLE_RETHUNK|DISABLE_UNRET| \ DISABLE_CALL_DEPTH_TRACKING|DISABLE_USER_SHSTK) -#define DISABLED_MASK12 (DISABLE_LAM) +#define DISABLED_MASK12 (DISABLE_FRED|DISABLE_LAM)#define DISABLED_MASK13 0#define DISABLED_MASK14 0#define DISABLED_MASK15 0
tools/arch/x86/include/asm/disabled-features.h +7 -1
@@ -117,6 +117,12 @@#define DISABLE_IBT (1 << (X86_FEATURE_IBT & 31))#endif +#ifdef CONFIG_X86_FRED +# define DISABLE_FRED 0 +#else +# define DISABLE_FRED (1 << (X86_FEATURE_FRED & 31)) +#endif +/* * Make sure to add features to the correct mask */
@@ -133,7 +139,7 @@#define DISABLED_MASK10 0#define DISABLED_MASK11 (DISABLE_RETPOLINE|DISABLE_RETHUNK|DISABLE_UNRET| \ DISABLE_CALL_DEPTH_TRACKING|DISABLE_USER_SHSTK) -#define DISABLED_MASK12 (DISABLE_LAM) +#define DISABLED_MASK12 (DISABLE_FRED|DISABLE_LAM)#define DISABLED_MASK13 0#define DISABLED_MASK14 0#define DISABLED_MASK15 0
Signature · 1 line
2.43.0
Borislav Petkov
maintainerRe: [PATCH v13 07/35] x86/fred: Disable FRED support if CONFIG_X86_FRED is disabled
Quoted 9 lines · Xin Li
From: "H. Peter Anvin (Intel)" <[email protected]>
Add
CONFIG_X86_FREDto <asm/disabled-features.h> to makecpu_feature_enabled()work correctly with FRED.Originally-by Megha Dey <[email protected]>Signed-off-by H. Peter Anvin (Intel) <[email protected]>Tested-by Shan Kang <[email protected]>Signed-off-by Xin Li <[email protected]>
Quoted 8 lines
---
Changes since v10:
* FRED feature is defined in cpuid word 12, not 13 (Nikolay Borisov).--- arch/x86/include/asm/disabled-features.h | 8 +++++++- tools/arch/x86/include/asm/disabled-features.h | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-)
Whoever applies this: this one and the previous one can be merged into one patch.
Thx.
Signature · 4 lines
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette[tip: x86/fred] x86/fred: Disable FRED support if CONFIG_X86_FRED is disabled
In reply to Xin LiThe following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: e554a8ca49d6d6d782f546ae4d7f036946e7dd87 Gitweb: https://git.kernel.org/tip/e554a8ca49d6d6d782f546ae4d7f036946e7dd87 Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:49:56 -08:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 25 Jan 2024 19:10:30 +01:00
x86/fred: Disable FRED support if CONFIG_X86_FRED is disabled
Add CONFIG_X86_FRED to <asm/disabled-features.h> to make cpu_feature_enabled() work correctly with FRED.
--- arch/x86/include/asm/disabled-features.h | 8 +++++++- tools/arch/x86/include/asm/disabled-features.h | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-)
arch/x86/include/asm/disabled-features.h +7 -1
@@ -117,6 +117,12 @@#define DISABLE_IBT (1 << (X86_FEATURE_IBT & 31))#endif +#ifdef CONFIG_X86_FRED +# define DISABLE_FRED 0 +#else +# define DISABLE_FRED (1 << (X86_FEATURE_FRED & 31)) +#endif +/* * Make sure to add features to the correct mask */
@@ -133,7 +139,7 @@#define DISABLED_MASK10 0#define DISABLED_MASK11 (DISABLE_RETPOLINE|DISABLE_RETHUNK|DISABLE_UNRET| \ DISABLE_CALL_DEPTH_TRACKING|DISABLE_USER_SHSTK) -#define DISABLED_MASK12 (DISABLE_LAM) +#define DISABLED_MASK12 (DISABLE_FRED|DISABLE_LAM)#define DISABLED_MASK13 0#define DISABLED_MASK14 0#define DISABLED_MASK15 0
tools/arch/x86/include/asm/disabled-features.h +7 -1
@@ -117,6 +117,12 @@#define DISABLE_IBT (1 << (X86_FEATURE_IBT & 31))#endif +#ifdef CONFIG_X86_FRED +# define DISABLE_FRED 0 +#else +# define DISABLE_FRED (1 << (X86_FEATURE_FRED & 31)) +#endif +/* * Make sure to add features to the correct mask */
@@ -133,7 +139,7 @@#define DISABLED_MASK10 0#define DISABLED_MASK11 (DISABLE_RETPOLINE|DISABLE_RETHUNK|DISABLE_UNRET| \ DISABLE_CALL_DEPTH_TRACKING|DISABLE_USER_SHSTK) -#define DISABLED_MASK12 (DISABLE_LAM) +#define DISABLED_MASK12 (DISABLE_FRED|DISABLE_LAM)#define DISABLED_MASK13 0#define DISABLED_MASK14 0#define DISABLED_MASK15 0
PATCH v13 8/35 x86/fred: Disable FRED by default in its early stage
In reply to Xin LiTo enable FRED, a new kernel command line option "fred" needs to be added.
--- Documentation/admin-guide/kernel-parameters.txt | 3 +++ arch/x86/kernel/cpu/common.c | 3 +++ 2 files changed, 6 insertions(+)
Documentation/admin-guide/kernel-parameters.txt +3 -0
@@ -1526,6 +1526,9 @@ Warning: use of this parameter will taint the kernel and may cause unknown problems. + fred [X86-64] + Enable flexible return and event delivery + ftrace=[tracer] [FTRACE] will set and start the specified tracer as early as possible in order to facilitate early
arch/x86/kernel/cpu/common.c +3 -0
@@ -1491,6 +1491,9 @@ static void __init cpu_parse_early_param(void)char *argptr = arg, *opt;int arglen, taint =0 ; +if (!cmdline_find_option_bool (boot_command_line,"fred" )) +setup_clear_cpu_cap (X86_FEATURE_FRED ); +#ifdef CONFIG_X86_32 if (cmdline_find_option_bool (boot_command_line,"no387" )) #ifdef CONFIG_MATH_EMULATION
Signature · 1 line
2.43.0
Borislav Petkov
maintainerRe: [PATCH v13 08/35] x86/fred: Disable FRED by default in its early stage
Documentation/admin-guide/kernel-parameters.txt line 1530
Quoted 5 lines · Xin Li
Documentation/admin-guide/kernel-parameters.txt +2
-0Warning: use of this parameter will taint the kernel and may cause unknown problems. + fred [X86-64] + Enable flexible return and event delivery
Let's make it accept multiple options from the get-go:
fred=on,disable-when,foo,bar,bla...
in case we need to tweak its behavior.
If it is only "fred" it will propagate this way downstream and it'll lead to confusion later when people have to update their scripts and config files when "fred" alone doesn't do what they're expecting anymore.
Thx.
Signature · 4 lines
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette[tip: x86/fred] x86/fred: Disable FRED by default in its early stage
In reply to Xin LiThe following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: 7a1d75084df087dcae703d70a49274a3982e3681 Gitweb: https://git.kernel.org/tip/7a1d75084df087dcae703d70a49274a3982e3681 Author: Xin Li <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:49:57 -08:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 25 Jan 2024 19:10:30 +01:00
x86/fred: Disable FRED by default in its early stage
To enable FRED, a new kernel command line option "fred" needs to be added.
--- Documentation/admin-guide/kernel-parameters.txt | 3 +++ arch/x86/kernel/cpu/common.c | 3 +++ 2 files changed, 6 insertions(+)
Documentation/admin-guide/kernel-parameters.txt +3 -0
@@ -1539,6 +1539,9 @@ Warning: use of this parameter will taint the kernel and may cause unknown problems. + fred [X86-64] + Enable flexible return and event delivery + ftrace=[tracer] [FTRACE] will set and start the specified tracer as early as possible in order to facilitate early
arch/x86/kernel/cpu/common.c +3 -0
@@ -1484,6 +1484,9 @@ static void __init cpu_parse_early_param(void)char *argptr = arg, *opt;int arglen, taint =0 ; +if (!cmdline_find_option_bool (boot_command_line,"fred" )) +setup_clear_cpu_cap (X86_FEATURE_FRED ); +#ifdef CONFIG_X86_32 if (cmdline_find_option_bool (boot_command_line,"no387" )) #ifdef CONFIG_MATH_EMULATION
[tip: x86/fred] x86/fred: Add a fred= cmdline param
In reply to Xin LiThe following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: 3810da12710aaa05c6101418675c923642a80c0c Gitweb: https://git.kernel.org/tip/3810da12710aaa05c6101418675c923642a80c0c Author: Xin Li <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:49:57 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Tue, 30 Jan 2024 18:19:20 +01:00
x86/fred: Add a fred= cmdline param
Let command line option "fred" accept multiple options to make it easier to tweak its behavior.
Currently, two options 'on' and 'off' are allowed, and the default behavior is to disable FRED. To enable FRED, append "fred=on" to the kernel command line.
[ bp: Use cpu_feature_enabled(), touch ups. ]
--- Documentation/admin-guide/kernel-parameters.txt | 6 ++++- arch/x86/kernel/traps.c | 26 ++++++++++++++++- 2 files changed, 32 insertions(+)
Documentation/admin-guide/kernel-parameters.txt +6 -0
@@ -1539,6 +1539,12 @@ Warning: use of this parameter will taint the kernel and may cause unknown problems. + fred= [X86-64] + Enable/disable Flexible Return and Event Delivery. + Format: { on | off } + on: enable FRED when it's present. + off: disable FRED, the default setting. + ftrace=[tracer] [FTRACE] will set and start the specified tracer as early as possible in order to facilitate early
arch/x86/kernel/traps.c +26 -0
@@ -1369,8 +1369,34 @@ DEFINE_IDTENTRY_SW(iret_error) }#endif +/* Do not enable FRED by default yet. */ +static bool enable_fred__ro_after_init = false; + +#ifdef CONFIG_X86_FRED +static int __init fred_setup (char *str) +{ +if (!str) +return -EINVAL ; + +if (!cpu_feature_enabled (X86_FEATURE_FRED )) +return 0 ; + +if (!strcmp (str,"on" )) + enable_fred = true; +else if (!strcmp (str,"off" )) + enable_fred = false; +else +pr_warn ("invalid FRED option: 'fred=%s'\n" , str); +return 0 ; +} +early_param ("fred" , fred_setup); +#endif +void __init trap_init (void ) { +if (cpu_feature_enabled (X86_FEATURE_FRED ) && !enable_fred) +setup_clear_cpu_cap (X86_FEATURE_FRED ); +/* Init cpu_entry_area before IST entries are set up */ setup_cpu_entry_areas ();
PATCH v13 9/35 x86/opcode: Add ERET[US] instructions to the x86 opcode map
In reply to Xin LiFrom: "H. Peter Anvin (Intel)" <[email protected]>
ERETU returns from an event handler while making a transition to ring 3, and ERETS returns from an event handler while staying in ring 0.
Add instruction opcodes used by ERET[US] to the x86 opcode map; opcode numbers are per FRED spec v5.0.
--- arch/x86/lib/x86-opcode-map.txt | 2 +- tools/arch/x86/lib/x86-opcode-map.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/lib/x86-opcode-map.txt +1 -1
@@ -1052,7 +1052,7 @@ EndTable GrpTable: Grp7 0: SGDT Ms | VMCALL (001),(11B) | VMLAUNCH (010),(11B) | VMRESUME (011),(11B) | VMXOFF (100),(11B) | PCONFIG (101),(11B) | ENCLV (000),(11B) | WRMSRNS (110),(11B) -1: SIDT Ms | MONITOR (000),(11B) | MWAIT (001),(11B) | CLAC (010),(11B) | STAC (011),(11B) | ENCLS (111),(11B) +1: SIDT Ms | MONITOR (000),(11B) | MWAIT (001),(11B) | CLAC (010),(11B) | STAC (011),(11B) | ENCLS (111),(11B) | ERETU (F3),(010),(11B) | ERETS (F2),(010),(11B) 2: LGDT Ms | XGETBV (000),(11B) | XSETBV (001),(11B) | VMFUNC (100),(11B) | XEND (101)(11B) | XTEST (110)(11B) | ENCLU (111),(11B) 3: LIDT Ms 4: SMSW Mw/Rv
tools/arch/x86/lib/x86-opcode-map.txt +1 -1
@@ -1052,7 +1052,7 @@ EndTable GrpTable: Grp7 0: SGDT Ms | VMCALL (001),(11B) | VMLAUNCH (010),(11B) | VMRESUME (011),(11B) | VMXOFF (100),(11B) | PCONFIG (101),(11B) | ENCLV (000),(11B) | WRMSRNS (110),(11B) -1: SIDT Ms | MONITOR (000),(11B) | MWAIT (001),(11B) | CLAC (010),(11B) | STAC (011),(11B) | ENCLS (111),(11B) +1: SIDT Ms | MONITOR (000),(11B) | MWAIT (001),(11B) | CLAC (010),(11B) | STAC (011),(11B) | ENCLS (111),(11B) | ERETU (F3),(010),(11B) | ERETS (F2),(010),(11B) 2: LGDT Ms | XGETBV (000),(11B) | XSETBV (001),(11B) | VMFUNC (100),(11B) | XEND (101)(11B) | XTEST (110)(11B) | ENCLU (111),(11B) 3: LIDT Ms 4: SMSW Mw/Rv
Signature · 1 line
2.43.0
[tip: x86/fred] x86/opcode: Add ERET[US] instructions to the x86 opcode map
The following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: decaf17d456db9546063999c3a38344a56a2e903 Gitweb: https://git.kernel.org/tip/decaf17d456db9546063999c3a38344a56a2e903 Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:49:58 -08:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 25 Jan 2024 19:10:30 +01:00
x86/opcode: Add ERET[US] instructions to the x86 opcode map
ERETU returns from an event handler while making a transition to ring 3, and ERETS returns from an event handler while staying in ring 0.
Add instruction opcodes used by ERET[US] to the x86 opcode map; opcode numbers are per FRED spec v5.0.
--- arch/x86/lib/x86-opcode-map.txt | 2 +- tools/arch/x86/lib/x86-opcode-map.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/lib/x86-opcode-map.txt +1 -1
@@ -1052,7 +1052,7 @@ EndTable GrpTable: Grp7 0: SGDT Ms | VMCALL (001),(11B) | VMLAUNCH (010),(11B) | VMRESUME (011),(11B) | VMXOFF (100),(11B) | PCONFIG (101),(11B) | ENCLV (000),(11B) | WRMSRNS (110),(11B) -1: SIDT Ms | MONITOR (000),(11B) | MWAIT (001),(11B) | CLAC (010),(11B) | STAC (011),(11B) | ENCLS (111),(11B) +1: SIDT Ms | MONITOR (000),(11B) | MWAIT (001),(11B) | CLAC (010),(11B) | STAC (011),(11B) | ENCLS (111),(11B) | ERETU (F3),(010),(11B) | ERETS (F2),(010),(11B) 2: LGDT Ms | XGETBV (000),(11B) | XSETBV (001),(11B) | VMFUNC (100),(11B) | XEND (101)(11B) | XTEST (110)(11B) | ENCLU (111),(11B) 3: LIDT Ms 4: SMSW Mw/Rv
tools/arch/x86/lib/x86-opcode-map.txt +1 -1
@@ -1052,7 +1052,7 @@ EndTable GrpTable: Grp7 0: SGDT Ms | VMCALL (001),(11B) | VMLAUNCH (010),(11B) | VMRESUME (011),(11B) | VMXOFF (100),(11B) | PCONFIG (101),(11B) | ENCLV (000),(11B) | WRMSRNS (110),(11B) -1: SIDT Ms | MONITOR (000),(11B) | MWAIT (001),(11B) | CLAC (010),(11B) | STAC (011),(11B) | ENCLS (111),(11B) +1: SIDT Ms | MONITOR (000),(11B) | MWAIT (001),(11B) | CLAC (010),(11B) | STAC (011),(11B) | ENCLS (111),(11B) | ERETU (F3),(010),(11B) | ERETS (F2),(010),(11B) 2: LGDT Ms | XGETBV (000),(11B) | XSETBV (001),(11B) | VMFUNC (100),(11B) | XEND (101)(11B) | XTEST (110)(11B) | ENCLU (111),(11B) 3: LIDT Ms 4: SMSW Mw/Rv
[tip: x86/fred] x86/opcode: Add ERET[US] instructions to the x86 opcode map
In reply to Xin LiThe following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: 567f7205dd7a0e168314b480e4bd80c77cbe71cb Gitweb: https://git.kernel.org/tip/567f7205dd7a0e168314b480e4bd80c77cbe71cb Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:49:58 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Tue, 30 Jan 2024 18:20:34 +01:00
x86/opcode: Add ERET[US] instructions to the x86 opcode map
ERETU returns from an event handler while making a transition to ring 3, and ERETS returns from an event handler while staying in ring 0.
Add instruction opcodes used by ERET[US] to the x86 opcode map; opcode numbers are per FRED spec v5.0.
--- arch/x86/lib/x86-opcode-map.txt | 2 +- tools/arch/x86/lib/x86-opcode-map.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/lib/x86-opcode-map.txt +1 -1
@@ -1052,7 +1052,7 @@ EndTable GrpTable: Grp7 0: SGDT Ms | VMCALL (001),(11B) | VMLAUNCH (010),(11B) | VMRESUME (011),(11B) | VMXOFF (100),(11B) | PCONFIG (101),(11B) | ENCLV (000),(11B) | WRMSRNS (110),(11B) -1: SIDT Ms | MONITOR (000),(11B) | MWAIT (001),(11B) | CLAC (010),(11B) | STAC (011),(11B) | ENCLS (111),(11B) +1: SIDT Ms | MONITOR (000),(11B) | MWAIT (001),(11B) | CLAC (010),(11B) | STAC (011),(11B) | ENCLS (111),(11B) | ERETU (F3),(010),(11B) | ERETS (F2),(010),(11B) 2: LGDT Ms | XGETBV (000),(11B) | XSETBV (001),(11B) | VMFUNC (100),(11B) | XEND (101)(11B) | XTEST (110)(11B) | ENCLU (111),(11B) 3: LIDT Ms 4: SMSW Mw/Rv
tools/arch/x86/lib/x86-opcode-map.txt +1 -1
@@ -1052,7 +1052,7 @@ EndTable GrpTable: Grp7 0: SGDT Ms | VMCALL (001),(11B) | VMLAUNCH (010),(11B) | VMRESUME (011),(11B) | VMXOFF (100),(11B) | PCONFIG (101),(11B) | ENCLV (000),(11B) | WRMSRNS (110),(11B) -1: SIDT Ms | MONITOR (000),(11B) | MWAIT (001),(11B) | CLAC (010),(11B) | STAC (011),(11B) | ENCLS (111),(11B) +1: SIDT Ms | MONITOR (000),(11B) | MWAIT (001),(11B) | CLAC (010),(11B) | STAC (011),(11B) | ENCLS (111),(11B) | ERETU (F3),(010),(11B) | ERETS (F2),(010),(11B) 2: LGDT Ms | XGETBV (000),(11B) | XSETBV (001),(11B) | VMFUNC (100),(11B) | XEND (101)(11B) | XTEST (110)(11B) | ENCLU (111),(11B) 3: LIDT Ms 4: SMSW Mw/Rv
[tip: x86/fred] x86/opcode: Add ERET[US] instructions to the x86 opcode map
In reply to Xin LiThe following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: 0115f8b1a26ef49338cdb0bd98ad374b8586d0fd Gitweb: https://git.kernel.org/tip/0115f8b1a26ef49338cdb0bd98ad374b8586d0fd Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:49:58 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Wed, 31 Jan 2024 22:00:18 +01:00
x86/opcode: Add ERET[US] instructions to the x86 opcode map
ERETU returns from an event handler while making a transition to ring 3, and ERETS returns from an event handler while staying in ring 0.
Add instruction opcodes used by ERET[US] to the x86 opcode map; opcode numbers are per FRED spec v5.0.
--- arch/x86/lib/x86-opcode-map.txt | 2 +- tools/arch/x86/lib/x86-opcode-map.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/lib/x86-opcode-map.txt +1 -1
@@ -1052,7 +1052,7 @@ EndTable GrpTable: Grp7 0: SGDT Ms | VMCALL (001),(11B) | VMLAUNCH (010),(11B) | VMRESUME (011),(11B) | VMXOFF (100),(11B) | PCONFIG (101),(11B) | ENCLV (000),(11B) | WRMSRNS (110),(11B) -1: SIDT Ms | MONITOR (000),(11B) | MWAIT (001),(11B) | CLAC (010),(11B) | STAC (011),(11B) | ENCLS (111),(11B) +1: SIDT Ms | MONITOR (000),(11B) | MWAIT (001),(11B) | CLAC (010),(11B) | STAC (011),(11B) | ENCLS (111),(11B) | ERETU (F3),(010),(11B) | ERETS (F2),(010),(11B) 2: LGDT Ms | XGETBV (000),(11B) | XSETBV (001),(11B) | VMFUNC (100),(11B) | XEND (101)(11B) | XTEST (110)(11B) | ENCLU (111),(11B) 3: LIDT Ms 4: SMSW Mw/Rv
tools/arch/x86/lib/x86-opcode-map.txt +1 -1
@@ -1052,7 +1052,7 @@ EndTable GrpTable: Grp7 0: SGDT Ms | VMCALL (001),(11B) | VMLAUNCH (010),(11B) | VMRESUME (011),(11B) | VMXOFF (100),(11B) | PCONFIG (101),(11B) | ENCLV (000),(11B) | WRMSRNS (110),(11B) -1: SIDT Ms | MONITOR (000),(11B) | MWAIT (001),(11B) | CLAC (010),(11B) | STAC (011),(11B) | ENCLS (111),(11B) +1: SIDT Ms | MONITOR (000),(11B) | MWAIT (001),(11B) | CLAC (010),(11B) | STAC (011),(11B) | ENCLS (111),(11B) | ERETU (F3),(010),(11B) | ERETS (F2),(010),(11B) 2: LGDT Ms | XGETBV (000),(11B) | XSETBV (001),(11B) | VMFUNC (100),(11B) | XEND (101)(11B) | XTEST (110)(11B) | ENCLU (111),(11B) 3: LIDT Ms 4: SMSW Mw/Rv
PATCH v13 10/35 x86/objtool: Teach objtool about ERET[US]
In reply to Xin LiFrom: "H. Peter Anvin (Intel)" <[email protected]>
Update the objtool decoder to know about the ERET[US] instructions (type INSN_CONTEXT_SWITCH).
--- tools/objtool/arch/x86/decode.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-)
tools/objtool/arch/x86/decode.c +14 -5
@@ -509,11 +509,20 @@ int arch_decode_instruction(struct objtool_file *file, const struct section *secif (op2 ==0x01 ) { -if (modrm ==0xca ) - insn->type =INSN_CLAC ; -else if (modrm ==0xcb ) - insn->type =INSN_STAC ; - +switch (insn_last_prefix_id (&ins)) { +case INAT_PFX_REPE : +case INAT_PFX_REPNE : +if (modrm ==0xca ) +/* eretu/erets */ + insn->type =INSN_CONTEXT_SWITCH ; +break ; +default : +if (modrm ==0xca ) + insn->type =INSN_CLAC ; +else if (modrm ==0xcb ) + insn->type =INSN_STAC ; +break ; + } }else if (op2 >=0x80 && op2 <=0x8f ) { insn->type =INSN_JUMP_CONDITIONAL ;
Signature · 1 line
2.43.0
[tip: x86/fred] x86/objtool: Teach objtool about ERET[US]
The following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: 12c4be1f0ed9bcdc2f2f578f6101e6f4af2ee039 Gitweb: https://git.kernel.org/tip/12c4be1f0ed9bcdc2f2f578f6101e6f4af2ee039 Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:49:59 -08:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 25 Jan 2024 19:10:30 +01:00
x86/objtool: Teach objtool about ERET[US]
Update the objtool decoder to know about the ERET[US] instructions (type INSN_CONTEXT_SWITCH).
--- tools/objtool/arch/x86/decode.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-)
tools/objtool/arch/x86/decode.c +14 -5
@@ -509,11 +509,20 @@ int arch_decode_instruction(struct objtool_file *file, const struct section *secif (op2 ==0x01 ) { -if (modrm ==0xca ) - insn->type =INSN_CLAC ; -else if (modrm ==0xcb ) - insn->type =INSN_STAC ; - +switch (insn_last_prefix_id (&ins)) { +case INAT_PFX_REPE : +case INAT_PFX_REPNE : +if (modrm ==0xca ) +/* eretu/erets */ + insn->type =INSN_CONTEXT_SWITCH ; +break ; +default : +if (modrm ==0xca ) + insn->type =INSN_CLAC ; +else if (modrm ==0xcb ) + insn->type =INSN_STAC ; +break ; + } }else if (op2 >=0x80 && op2 <=0x8f ) { insn->type =INSN_JUMP_CONDITIONAL ;
[tip: x86/fred] x86/objtool: Teach objtool about ERET[US]
In reply to Xin LiThe following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: 379ae086a73c804df39866d28eb4ce693e7af486 Gitweb: https://git.kernel.org/tip/379ae086a73c804df39866d28eb4ce693e7af486 Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:49:59 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Tue, 30 Jan 2024 18:20:34 +01:00
x86/objtool: Teach objtool about ERET[US]
Update the objtool decoder to know about the ERET[US] instructions (type INSN_CONTEXT_SWITCH).
--- tools/objtool/arch/x86/decode.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-)
tools/objtool/arch/x86/decode.c +14 -5
@@ -509,11 +509,20 @@ int arch_decode_instruction(struct objtool_file *file, const struct section *secif (op2 ==0x01 ) { -if (modrm ==0xca ) - insn->type =INSN_CLAC ; -else if (modrm ==0xcb ) - insn->type =INSN_STAC ; - +switch (insn_last_prefix_id (&ins)) { +case INAT_PFX_REPE : +case INAT_PFX_REPNE : +if (modrm ==0xca ) +/* eretu/erets */ + insn->type =INSN_CONTEXT_SWITCH ; +break ; +default : +if (modrm ==0xca ) + insn->type =INSN_CLAC ; +else if (modrm ==0xcb ) + insn->type =INSN_STAC ; +break ; + } }else if (op2 >=0x80 && op2 <=0x8f ) { insn->type =INSN_JUMP_CONDITIONAL ;
[tip: x86/fred] x86/objtool: Teach objtool about ERET[US]
In reply to Xin LiThe following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: cd19bab825bda5bb192ef1d22e67d069daf2efb8 Gitweb: https://git.kernel.org/tip/cd19bab825bda5bb192ef1d22e67d069daf2efb8 Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:49:59 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Wed, 31 Jan 2024 22:00:30 +01:00
x86/objtool: Teach objtool about ERET[US]
Update the objtool decoder to know about the ERET[US] instructions (type INSN_CONTEXT_SWITCH).
--- tools/objtool/arch/x86/decode.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-)
tools/objtool/arch/x86/decode.c +14 -5
@@ -509,11 +509,20 @@ int arch_decode_instruction(struct objtool_file *file, const struct section *secif (op2 ==0x01 ) { -if (modrm ==0xca ) - insn->type =INSN_CLAC ; -else if (modrm ==0xcb ) - insn->type =INSN_STAC ; - +switch (insn_last_prefix_id (&ins)) { +case INAT_PFX_REPE : +case INAT_PFX_REPNE : +if (modrm ==0xca ) +/* eretu/erets */ + insn->type =INSN_CONTEXT_SWITCH ; +break ; +default : +if (modrm ==0xca ) + insn->type =INSN_CLAC ; +else if (modrm ==0xcb ) + insn->type =INSN_STAC ; +break ; + } }else if (op2 >=0x80 && op2 <=0x8f ) { insn->type =INSN_JUMP_CONDITIONAL ;
PATCH v13 11/35 x86/cpu: Add X86_CR4_FRED macro
In reply to Xin LiFrom: "H. Peter Anvin (Intel)" <[email protected]>
Add X86_CR4_FRED macro for the FRED bit in %cr4. This bit must not be changed after initialization, so add it to the pinned CR4 bits.
---
Changes since v9:
* Avoid a type cast by defining X86_CR4_FRED as 0 on 32-bit (Thomas Gleixner).
--- arch/x86/include/uapi/asm/processor-flags.h | 7 +++++++ arch/x86/kernel/cpu/common.c | 5 ++--- 2 files changed, 9 insertions(+), 3 deletions(-)
arch/x86/include/uapi/asm/processor-flags.h +7 -0
@@ -139,6 +139,13 @@#define X86_CR4_LAM_SUP_BIT 28/* LAM for supervisor pointers */ #define X86_CR4_LAM_SUP _BITUL(X86_CR4_LAM_SUP_BIT) +#ifdef __x86_64__ +#define X86_CR4_FRED_BIT 32/* enable FRED kernel entry */ +#define X86_CR4_FRED _BITUL(X86_CR4_FRED_BIT) +#else +#define X86_CR4_FRED (0) +#endif +/* * x86-64 Task Priority Register, CR8 */
arch/x86/kernel/cpu/common.c +2 -3
@@ -389,9 +389,8 @@ static __always_inline void setup_umip(struct cpuinfo_x86 *c) }/* These bits should not change their value after CPU init is finished. */ -static const unsigned long cr4_pinned_mask = -X86_CR4_SMEP |X86_CR4_SMAP |X86_CR4_UMIP | -X86_CR4_FSGSBASE |X86_CR4_CET ; +static const unsigned long cr4_pinned_mask =X86_CR4_SMEP |X86_CR4_SMAP |X86_CR4_UMIP | +X86_CR4_FSGSBASE |X86_CR4_CET |X86_CR4_FRED ;static DEFINE_STATIC_KEY_FALSE_RO (cr_pinning);static unsigned long cr4_pinned_bits__ro_after_init ;
Signature · 1 line
2.43.0
[tip: x86/fred] x86/cpu: Add X86_CR4_FRED macro
The following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: 22a5d8d8daf22e98eb472be6c4c9f3a195ed6025 Gitweb: https://git.kernel.org/tip/22a5d8d8daf22e98eb472be6c4c9f3a195ed6025 Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:00 -08:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 25 Jan 2024 19:10:30 +01:00
x86/cpu: Add X86_CR4_FRED macro
Add X86_CR4_FRED macro for the FRED bit in %cr4. This bit must not be changed after initialization, so add it to the pinned CR4 bits.
--- arch/x86/include/uapi/asm/processor-flags.h | 7 +++++++ arch/x86/kernel/cpu/common.c | 5 ++--- 2 files changed, 9 insertions(+), 3 deletions(-)
arch/x86/include/uapi/asm/processor-flags.h +7 -0
@@ -139,6 +139,13 @@#define X86_CR4_LAM_SUP_BIT 28/* LAM for supervisor pointers */ #define X86_CR4_LAM_SUP _BITUL(X86_CR4_LAM_SUP_BIT) +#ifdef __x86_64__ +#define X86_CR4_FRED_BIT 32/* enable FRED kernel entry */ +#define X86_CR4_FRED _BITUL(X86_CR4_FRED_BIT) +#else +#define X86_CR4_FRED (0) +#endif +/* * x86-64 Task Priority Register, CR8 */
arch/x86/kernel/cpu/common.c +2 -3
@@ -382,9 +382,8 @@ out: }/* These bits should not change their value after CPU init is finished. */ -static const unsigned long cr4_pinned_mask = -X86_CR4_SMEP |X86_CR4_SMAP |X86_CR4_UMIP | -X86_CR4_FSGSBASE |X86_CR4_CET ; +static const unsigned long cr4_pinned_mask =X86_CR4_SMEP |X86_CR4_SMAP |X86_CR4_UMIP | +X86_CR4_FSGSBASE |X86_CR4_CET |X86_CR4_FRED ;static DEFINE_STATIC_KEY_FALSE_RO (cr_pinning);static unsigned long cr4_pinned_bits__ro_after_init ;
[tip: x86/fred] x86/cpu: Add X86_CR4_FRED macro
In reply to Xin LiThe following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: 95d34efac1a0aff6da00ad177168d99c60a3b7cd Gitweb: https://git.kernel.org/tip/95d34efac1a0aff6da00ad177168d99c60a3b7cd Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:00 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Tue, 30 Jan 2024 18:20:34 +01:00
x86/cpu: Add X86_CR4_FRED macro
Add X86_CR4_FRED macro for the FRED bit in %cr4. This bit must not be changed after initialization, so add it to the pinned CR4 bits.
--- arch/x86/include/uapi/asm/processor-flags.h | 7 +++++++ arch/x86/kernel/cpu/common.c | 5 ++--- 2 files changed, 9 insertions(+), 3 deletions(-)
arch/x86/include/uapi/asm/processor-flags.h +7 -0
@@ -139,6 +139,13 @@#define X86_CR4_LAM_SUP_BIT 28/* LAM for supervisor pointers */ #define X86_CR4_LAM_SUP _BITUL(X86_CR4_LAM_SUP_BIT) +#ifdef __x86_64__ +#define X86_CR4_FRED_BIT 32/* enable FRED kernel entry */ +#define X86_CR4_FRED _BITUL(X86_CR4_FRED_BIT) +#else +#define X86_CR4_FRED (0) +#endif +/* * x86-64 Task Priority Register, CR8 */
arch/x86/kernel/cpu/common.c +2 -3
@@ -382,9 +382,8 @@ out: }/* These bits should not change their value after CPU init is finished. */ -static const unsigned long cr4_pinned_mask = -X86_CR4_SMEP |X86_CR4_SMAP |X86_CR4_UMIP | -X86_CR4_FSGSBASE |X86_CR4_CET ; +static const unsigned long cr4_pinned_mask =X86_CR4_SMEP |X86_CR4_SMAP |X86_CR4_UMIP | +X86_CR4_FSGSBASE |X86_CR4_CET |X86_CR4_FRED ;static DEFINE_STATIC_KEY_FALSE_RO (cr_pinning);static unsigned long cr4_pinned_bits__ro_after_init ;
[tip: x86/fred] x86/cpu: Add X86_CR4_FRED macro
In reply to Xin LiThe following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: ff45746fbf005f96e42bea466698e3fdbf926013 Gitweb: https://git.kernel.org/tip/ff45746fbf005f96e42bea466698e3fdbf926013 Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:00 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Wed, 31 Jan 2024 22:00:38 +01:00
x86/cpu: Add X86_CR4_FRED macro
Add X86_CR4_FRED macro for the FRED bit in %cr4. This bit must not be changed after initialization, so add it to the pinned CR4 bits.
--- arch/x86/include/uapi/asm/processor-flags.h | 7 +++++++ arch/x86/kernel/cpu/common.c | 5 ++--- 2 files changed, 9 insertions(+), 3 deletions(-)
arch/x86/include/uapi/asm/processor-flags.h +7 -0
@@ -139,6 +139,13 @@#define X86_CR4_LAM_SUP_BIT 28/* LAM for supervisor pointers */ #define X86_CR4_LAM_SUP _BITUL(X86_CR4_LAM_SUP_BIT) +#ifdef __x86_64__ +#define X86_CR4_FRED_BIT 32/* enable FRED kernel entry */ +#define X86_CR4_FRED _BITUL(X86_CR4_FRED_BIT) +#else +#define X86_CR4_FRED (0) +#endif +/* * x86-64 Task Priority Register, CR8 */
arch/x86/kernel/cpu/common.c +2 -3
@@ -382,9 +382,8 @@ out: }/* These bits should not change their value after CPU init is finished. */ -static const unsigned long cr4_pinned_mask = -X86_CR4_SMEP |X86_CR4_SMAP |X86_CR4_UMIP | -X86_CR4_FSGSBASE |X86_CR4_CET ; +static const unsigned long cr4_pinned_mask =X86_CR4_SMEP |X86_CR4_SMAP |X86_CR4_UMIP | +X86_CR4_FSGSBASE |X86_CR4_CET |X86_CR4_FRED ;static DEFINE_STATIC_KEY_FALSE_RO (cr_pinning);static unsigned long cr4_pinned_bits__ro_after_init ;
PATCH v13 12/35 x86/cpu: Add MSR numbers for FRED configuration
In reply to Xin LiFrom: "H. Peter Anvin (Intel)" <[email protected]>
Add MSR numbers for the FRED configuration registers per FRED spec 5.0.
--- arch/x86/include/asm/msr-index.h | 13 ++++++++++++- tools/arch/x86/include/asm/msr-index.h | 13 ++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-)
arch/x86/include/asm/msr-index.h +12 -1
@@ -36,8 +36,19 @@#define EFER_FFXSR (1<<_EFER_FFXSR)#define EFER_AUTOIBRS (1<<_EFER_AUTOIBRS) -/* Intel MSRs. Some also available on other CPUs */ +/* FRED MSRs */ +#define MSR_IA32_FRED_RSP0 0x1cc/* Level 0 stack pointer */ +#define MSR_IA32_FRED_RSP1 0x1cd/* Level 1 stack pointer */ +#define MSR_IA32_FRED_RSP2 0x1ce/* Level 2 stack pointer */ +#define MSR_IA32_FRED_RSP3 0x1cf/* Level 3 stack pointer */ +#define MSR_IA32_FRED_STKLVLS 0x1d0/* Exception stack levels */ +#define MSR_IA32_FRED_SSP0 MSR_IA32_PL0_SSP/* Level 0 shadow stack pointer */ +#define MSR_IA32_FRED_SSP1 0x1d1/* Level 1 shadow stack pointer */ +#define MSR_IA32_FRED_SSP2 0x1d2/* Level 2 shadow stack pointer */ +#define MSR_IA32_FRED_SSP3 0x1d3/* Level 3 shadow stack pointer */ +#define MSR_IA32_FRED_CONFIG 0x1d4/* Entrypoint and interrupt stack level */ +/* Intel MSRs. Some also available on other CPUs */ #define MSR_TEST_CTRL 0x00000033#define MSR_TEST_CTRL_SPLIT_LOCK_DETECT_BIT 29#define MSR_TEST_CTRL_SPLIT_LOCK_DETECT BIT(MSR_TEST_CTRL_SPLIT_LOCK_DETECT_BIT)
tools/arch/x86/include/asm/msr-index.h +12 -1
@@ -36,8 +36,19 @@#define EFER_FFXSR (1<<_EFER_FFXSR)#define EFER_AUTOIBRS (1<<_EFER_AUTOIBRS) -/* Intel MSRs. Some also available on other CPUs */ +/* FRED MSRs */ +#define MSR_IA32_FRED_RSP0 0x1cc/* Level 0 stack pointer */ +#define MSR_IA32_FRED_RSP1 0x1cd/* Level 1 stack pointer */ +#define MSR_IA32_FRED_RSP2 0x1ce/* Level 2 stack pointer */ +#define MSR_IA32_FRED_RSP3 0x1cf/* Level 3 stack pointer */ +#define MSR_IA32_FRED_STKLVLS 0x1d0/* Exception stack levels */ +#define MSR_IA32_FRED_SSP0 MSR_IA32_PL0_SSP/* Level 0 shadow stack pointer */ +#define MSR_IA32_FRED_SSP1 0x1d1/* Level 1 shadow stack pointer */ +#define MSR_IA32_FRED_SSP2 0x1d2/* Level 2 shadow stack pointer */ +#define MSR_IA32_FRED_SSP3 0x1d3/* Level 3 shadow stack pointer */ +#define MSR_IA32_FRED_CONFIG 0x1d4/* Entrypoint and interrupt stack level */ +/* Intel MSRs. Some also available on other CPUs */ #define MSR_TEST_CTRL 0x00000033#define MSR_TEST_CTRL_SPLIT_LOCK_DETECT_BIT 29#define MSR_TEST_CTRL_SPLIT_LOCK_DETECT BIT(MSR_TEST_CTRL_SPLIT_LOCK_DETECT_BIT)
Signature · 1 line
2.43.0
[tip: x86/fred] x86/cpu: Add MSR numbers for FRED configuration
The following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: ddac193611e57d194328ebb0439ebd5ae4025b9d Gitweb: https://git.kernel.org/tip/ddac193611e57d194328ebb0439ebd5ae4025b9d Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:01 -08:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 25 Jan 2024 19:10:30 +01:00
x86/cpu: Add MSR numbers for FRED configuration
Add MSR numbers for the FRED configuration registers per FRED spec 5.0.
--- arch/x86/include/asm/msr-index.h | 13 ++++++++++++- tools/arch/x86/include/asm/msr-index.h | 13 ++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-)
arch/x86/include/asm/msr-index.h +12 -1
@@ -36,8 +36,19 @@#define EFER_FFXSR (1<<_EFER_FFXSR)#define EFER_AUTOIBRS (1<<_EFER_AUTOIBRS) -/* Intel MSRs. Some also available on other CPUs */ +/* FRED MSRs */ +#define MSR_IA32_FRED_RSP0 0x1cc/* Level 0 stack pointer */ +#define MSR_IA32_FRED_RSP1 0x1cd/* Level 1 stack pointer */ +#define MSR_IA32_FRED_RSP2 0x1ce/* Level 2 stack pointer */ +#define MSR_IA32_FRED_RSP3 0x1cf/* Level 3 stack pointer */ +#define MSR_IA32_FRED_STKLVLS 0x1d0/* Exception stack levels */ +#define MSR_IA32_FRED_SSP0 MSR_IA32_PL0_SSP/* Level 0 shadow stack pointer */ +#define MSR_IA32_FRED_SSP1 0x1d1/* Level 1 shadow stack pointer */ +#define MSR_IA32_FRED_SSP2 0x1d2/* Level 2 shadow stack pointer */ +#define MSR_IA32_FRED_SSP3 0x1d3/* Level 3 shadow stack pointer */ +#define MSR_IA32_FRED_CONFIG 0x1d4/* Entrypoint and interrupt stack level */ +/* Intel MSRs. Some also available on other CPUs */ #define MSR_TEST_CTRL 0x00000033#define MSR_TEST_CTRL_SPLIT_LOCK_DETECT_BIT 29#define MSR_TEST_CTRL_SPLIT_LOCK_DETECT BIT(MSR_TEST_CTRL_SPLIT_LOCK_DETECT_BIT)
tools/arch/x86/include/asm/msr-index.h +12 -1
@@ -36,8 +36,19 @@#define EFER_FFXSR (1<<_EFER_FFXSR)#define EFER_AUTOIBRS (1<<_EFER_AUTOIBRS) -/* Intel MSRs. Some also available on other CPUs */ +/* FRED MSRs */ +#define MSR_IA32_FRED_RSP0 0x1cc/* Level 0 stack pointer */ +#define MSR_IA32_FRED_RSP1 0x1cd/* Level 1 stack pointer */ +#define MSR_IA32_FRED_RSP2 0x1ce/* Level 2 stack pointer */ +#define MSR_IA32_FRED_RSP3 0x1cf/* Level 3 stack pointer */ +#define MSR_IA32_FRED_STKLVLS 0x1d0/* Exception stack levels */ +#define MSR_IA32_FRED_SSP0 MSR_IA32_PL0_SSP/* Level 0 shadow stack pointer */ +#define MSR_IA32_FRED_SSP1 0x1d1/* Level 1 shadow stack pointer */ +#define MSR_IA32_FRED_SSP2 0x1d2/* Level 2 shadow stack pointer */ +#define MSR_IA32_FRED_SSP3 0x1d3/* Level 3 shadow stack pointer */ +#define MSR_IA32_FRED_CONFIG 0x1d4/* Entrypoint and interrupt stack level */ +/* Intel MSRs. Some also available on other CPUs */ #define MSR_TEST_CTRL 0x00000033#define MSR_TEST_CTRL_SPLIT_LOCK_DETECT_BIT 29#define MSR_TEST_CTRL_SPLIT_LOCK_DETECT BIT(MSR_TEST_CTRL_SPLIT_LOCK_DETECT_BIT)
[tip: x86/fred] x86/cpu: Add MSR numbers for FRED configuration
In reply to Xin LiThe following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: 0b2e6c1c724fc7b72c86a72d49b16c7617d6f5f9 Gitweb: https://git.kernel.org/tip/0b2e6c1c724fc7b72c86a72d49b16c7617d6f5f9 Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:01 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Tue, 30 Jan 2024 18:20:34 +01:00
x86/cpu: Add MSR numbers for FRED configuration
Add MSR numbers for the FRED configuration registers per FRED spec 5.0.
--- arch/x86/include/asm/msr-index.h | 13 ++++++++++++- tools/arch/x86/include/asm/msr-index.h | 13 ++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-)
arch/x86/include/asm/msr-index.h +12 -1
@@ -36,8 +36,19 @@#define EFER_FFXSR (1<<_EFER_FFXSR)#define EFER_AUTOIBRS (1<<_EFER_AUTOIBRS) -/* Intel MSRs. Some also available on other CPUs */ +/* FRED MSRs */ +#define MSR_IA32_FRED_RSP0 0x1cc/* Level 0 stack pointer */ +#define MSR_IA32_FRED_RSP1 0x1cd/* Level 1 stack pointer */ +#define MSR_IA32_FRED_RSP2 0x1ce/* Level 2 stack pointer */ +#define MSR_IA32_FRED_RSP3 0x1cf/* Level 3 stack pointer */ +#define MSR_IA32_FRED_STKLVLS 0x1d0/* Exception stack levels */ +#define MSR_IA32_FRED_SSP0 MSR_IA32_PL0_SSP/* Level 0 shadow stack pointer */ +#define MSR_IA32_FRED_SSP1 0x1d1/* Level 1 shadow stack pointer */ +#define MSR_IA32_FRED_SSP2 0x1d2/* Level 2 shadow stack pointer */ +#define MSR_IA32_FRED_SSP3 0x1d3/* Level 3 shadow stack pointer */ +#define MSR_IA32_FRED_CONFIG 0x1d4/* Entrypoint and interrupt stack level */ +/* Intel MSRs. Some also available on other CPUs */ #define MSR_TEST_CTRL 0x00000033#define MSR_TEST_CTRL_SPLIT_LOCK_DETECT_BIT 29#define MSR_TEST_CTRL_SPLIT_LOCK_DETECT BIT(MSR_TEST_CTRL_SPLIT_LOCK_DETECT_BIT)
tools/arch/x86/include/asm/msr-index.h +12 -1
@@ -36,8 +36,19 @@#define EFER_FFXSR (1<<_EFER_FFXSR)#define EFER_AUTOIBRS (1<<_EFER_AUTOIBRS) -/* Intel MSRs. Some also available on other CPUs */ +/* FRED MSRs */ +#define MSR_IA32_FRED_RSP0 0x1cc/* Level 0 stack pointer */ +#define MSR_IA32_FRED_RSP1 0x1cd/* Level 1 stack pointer */ +#define MSR_IA32_FRED_RSP2 0x1ce/* Level 2 stack pointer */ +#define MSR_IA32_FRED_RSP3 0x1cf/* Level 3 stack pointer */ +#define MSR_IA32_FRED_STKLVLS 0x1d0/* Exception stack levels */ +#define MSR_IA32_FRED_SSP0 MSR_IA32_PL0_SSP/* Level 0 shadow stack pointer */ +#define MSR_IA32_FRED_SSP1 0x1d1/* Level 1 shadow stack pointer */ +#define MSR_IA32_FRED_SSP2 0x1d2/* Level 2 shadow stack pointer */ +#define MSR_IA32_FRED_SSP3 0x1d3/* Level 3 shadow stack pointer */ +#define MSR_IA32_FRED_CONFIG 0x1d4/* Entrypoint and interrupt stack level */ +/* Intel MSRs. Some also available on other CPUs */ #define MSR_TEST_CTRL 0x00000033#define MSR_TEST_CTRL_SPLIT_LOCK_DETECT_BIT 29#define MSR_TEST_CTRL_SPLIT_LOCK_DETECT BIT(MSR_TEST_CTRL_SPLIT_LOCK_DETECT_BIT)
[tip: x86/fred] x86/cpu: Add MSR numbers for FRED configuration
In reply to Xin LiThe following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: cd6df3f378f63f5d6dce0987169b182be1cb427c Gitweb: https://git.kernel.org/tip/cd6df3f378f63f5d6dce0987169b182be1cb427c Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:01 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Wed, 31 Jan 2024 22:01:05 +01:00
x86/cpu: Add MSR numbers for FRED configuration
Add MSR numbers for the FRED configuration registers per FRED spec 5.0.
--- arch/x86/include/asm/msr-index.h | 13 ++++++++++++- tools/arch/x86/include/asm/msr-index.h | 13 ++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-)
arch/x86/include/asm/msr-index.h +12 -1
@@ -36,8 +36,19 @@#define EFER_FFXSR (1<<_EFER_FFXSR)#define EFER_AUTOIBRS (1<<_EFER_AUTOIBRS) -/* Intel MSRs. Some also available on other CPUs */ +/* FRED MSRs */ +#define MSR_IA32_FRED_RSP0 0x1cc/* Level 0 stack pointer */ +#define MSR_IA32_FRED_RSP1 0x1cd/* Level 1 stack pointer */ +#define MSR_IA32_FRED_RSP2 0x1ce/* Level 2 stack pointer */ +#define MSR_IA32_FRED_RSP3 0x1cf/* Level 3 stack pointer */ +#define MSR_IA32_FRED_STKLVLS 0x1d0/* Exception stack levels */ +#define MSR_IA32_FRED_SSP0 MSR_IA32_PL0_SSP/* Level 0 shadow stack pointer */ +#define MSR_IA32_FRED_SSP1 0x1d1/* Level 1 shadow stack pointer */ +#define MSR_IA32_FRED_SSP2 0x1d2/* Level 2 shadow stack pointer */ +#define MSR_IA32_FRED_SSP3 0x1d3/* Level 3 shadow stack pointer */ +#define MSR_IA32_FRED_CONFIG 0x1d4/* Entrypoint and interrupt stack level */ +/* Intel MSRs. Some also available on other CPUs */ #define MSR_TEST_CTRL 0x00000033#define MSR_TEST_CTRL_SPLIT_LOCK_DETECT_BIT 29#define MSR_TEST_CTRL_SPLIT_LOCK_DETECT BIT(MSR_TEST_CTRL_SPLIT_LOCK_DETECT_BIT)
tools/arch/x86/include/asm/msr-index.h +12 -1
@@ -36,8 +36,19 @@#define EFER_FFXSR (1<<_EFER_FFXSR)#define EFER_AUTOIBRS (1<<_EFER_AUTOIBRS) -/* Intel MSRs. Some also available on other CPUs */ +/* FRED MSRs */ +#define MSR_IA32_FRED_RSP0 0x1cc/* Level 0 stack pointer */ +#define MSR_IA32_FRED_RSP1 0x1cd/* Level 1 stack pointer */ +#define MSR_IA32_FRED_RSP2 0x1ce/* Level 2 stack pointer */ +#define MSR_IA32_FRED_RSP3 0x1cf/* Level 3 stack pointer */ +#define MSR_IA32_FRED_STKLVLS 0x1d0/* Exception stack levels */ +#define MSR_IA32_FRED_SSP0 MSR_IA32_PL0_SSP/* Level 0 shadow stack pointer */ +#define MSR_IA32_FRED_SSP1 0x1d1/* Level 1 shadow stack pointer */ +#define MSR_IA32_FRED_SSP2 0x1d2/* Level 2 shadow stack pointer */ +#define MSR_IA32_FRED_SSP3 0x1d3/* Level 3 shadow stack pointer */ +#define MSR_IA32_FRED_CONFIG 0x1d4/* Entrypoint and interrupt stack level */ +/* Intel MSRs. Some also available on other CPUs */ #define MSR_TEST_CTRL 0x00000033#define MSR_TEST_CTRL_SPLIT_LOCK_DETECT_BIT 29#define MSR_TEST_CTRL_SPLIT_LOCK_DETECT BIT(MSR_TEST_CTRL_SPLIT_LOCK_DETECT_BIT)
PATCH v13 13/35 x86/ptrace: Cleanup the definition of the pt_regs structure
In reply to Xin Listruct pt_regs is hard to read because the member or section related comments are not aligned with the members.
The 'cs' and 'ss' members of pt_regs are type of 'unsigned long' while in reality they are only 16-bit wide. This works so far as the remaining space is unused, but FRED will use the remaining bits for other purposes.
To prepare for FRED:
- Cleanup the formatting
- Convert 'cs' and 'ss' to u16 and embed them into an union with a u64
- Fixup the related printk() format strings
---
Change since v12:
* Put comments ontop, not on the side (Borislav Petkov).
--- arch/x86/entry/vsyscall/vsyscall_64.c | 2 +- arch/x86/include/asm/ptrace.h | 48 +++++++++++++++++++-------- arch/x86/kernel/process_64.c | 2 +- 3 files changed, 37 insertions(+), 15 deletions(-)
arch/x86/entry/vsyscall/vsyscall_64.c +1 -1
@@ -76,7 +76,7 @@ static void warn_bad_vsyscall(const char *level, struct pt_regs *regs,if (!show_unhandled_signals)return ; -printk_ratelimited ("%s%s[%d] %s ip:%lx cs:%lx sp:%lx ax:%lx si:%lx di:%lx\n" , +printk_ratelimited ("%s%s[%d] %s ip:%lx cs:%x sp:%lx ax:%lx si:%lx di:%lx\n" , level, current->comm,task_pid_nr (current), message, regs->ip, regs->cs, regs->sp, regs->ax, regs->si, regs->di);
arch/x86/include/asm/ptrace.h +35 -13
70 lines not on this page · raw message
arch/x86/kernel/process_64.c +1 -1
@@ -117,7 +117,7 @@ void __show_regs(struct pt_regs *regs, enum show_regs_mode mode,printk ("%sFS: %016lx(%04x) GS:%016lx(%04x) knlGS:%016lx\n" , log_lvl, fs, fsindex, gs, gsindex, shadowgs); -printk ("%sCS: %04lx DS: %04x ES: %04x CR0: %016lx\n" , +printk ("%sCS: %04x DS: %04x ES: %04x CR0: %016lx\n" , log_lvl, regs->cs, ds, es, cr0);printk ("%sCR2: %016lx CR3: %016lx CR4: %016lx\n" , log_lvl, cr2, cr3, cr4);
Signature · 1 line
2.43.0
[tip: x86/fred] x86/ptrace: Cleanup the definition of the pt_regs structure
The following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: a75d2eeda289ae87896013df488081c62a50bff6 Gitweb: https://git.kernel.org/tip/a75d2eeda289ae87896013df488081c62a50bff6 Author: Xin Li <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:02 -08:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 25 Jan 2024 19:10:31 +01:00
x86/ptrace: Cleanup the definition of the pt_regs structure
struct pt_regs is hard to read because the member or section related comments are not aligned with the members.
The 'cs' and 'ss' members of pt_regs are type of 'unsigned long' while in reality they are only 16-bit wide. This works so far as the remaining space is unused, but FRED will use the remaining bits for other purposes.
To prepare for FRED:
- Cleanup the formatting
- Convert 'cs' and 'ss' to u16 and embed them into an union with a u64
- Fixup the related printk() format strings
--- arch/x86/entry/vsyscall/vsyscall_64.c | 2 +- arch/x86/include/asm/ptrace.h | 48 ++++++++++++++++++-------- arch/x86/kernel/process_64.c | 2 +- 3 files changed, 37 insertions(+), 15 deletions(-)
arch/x86/entry/vsyscall/vsyscall_64.c +1 -1
@@ -76,7 +76,7 @@ static void warn_bad_vsyscall(const char *level, struct pt_regs *regs,if (!show_unhandled_signals)return ; -printk_ratelimited ("%s%s[%d] %s ip:%lx cs:%lx sp:%lx ax:%lx si:%lx di:%lx\n" , +printk_ratelimited ("%s%s[%d] %s ip:%lx cs:%x sp:%lx ax:%lx si:%lx di:%lx\n" , level, current->comm,task_pid_nr (current), message, regs->ip, regs->cs, regs->sp, regs->ax, regs->si, regs->di);
arch/x86/include/asm/ptrace.h +35 -13
70 lines not on this page · raw message
arch/x86/kernel/process_64.c +1 -1
@@ -117,7 +117,7 @@ void __show_regs(struct pt_regs *regs, enum show_regs_mode mode,printk ("%sFS: %016lx(%04x) GS:%016lx(%04x) knlGS:%016lx\n" , log_lvl, fs, fsindex, gs, gsindex, shadowgs); -printk ("%sCS: %04lx DS: %04x ES: %04x CR0: %016lx\n" , +printk ("%sCS: %04x DS: %04x ES: %04x CR0: %016lx\n" , log_lvl, regs->cs, ds, es, cr0);printk ("%sCR2: %016lx CR3: %016lx CR4: %016lx\n" , log_lvl, cr2, cr3, cr4);
[tip: x86/fred] x86/ptrace: Cleanup the definition of the pt_regs structure
In reply to Xin LiThe following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: ed262541af195f452c43cd4f28310a09065039ec Gitweb: https://git.kernel.org/tip/ed262541af195f452c43cd4f28310a09065039ec Author: Xin Li <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:02 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Tue, 30 Jan 2024 18:20:34 +01:00
x86/ptrace: Cleanup the definition of the pt_regs structure
struct pt_regs is hard to read because the member or section related comments are not aligned with the members.
The 'cs' and 'ss' members of pt_regs are type of 'unsigned long' while in reality they are only 16-bit wide. This works so far as the remaining space is unused, but FRED will use the remaining bits for other purposes.
To prepare for FRED:
- Cleanup the formatting
- Convert 'cs' and 'ss' to u16 and embed them into an union with a u64
- Fixup the related printk() format strings
--- arch/x86/entry/vsyscall/vsyscall_64.c | 2 +- arch/x86/include/asm/ptrace.h | 48 ++++++++++++++++++-------- arch/x86/kernel/process_64.c | 2 +- 3 files changed, 37 insertions(+), 15 deletions(-)
arch/x86/entry/vsyscall/vsyscall_64.c +1 -1
@@ -76,7 +76,7 @@ static void warn_bad_vsyscall(const char *level, struct pt_regs *regs,if (!show_unhandled_signals)return ; -printk_ratelimited ("%s%s[%d] %s ip:%lx cs:%lx sp:%lx ax:%lx si:%lx di:%lx\n" , +printk_ratelimited ("%s%s[%d] %s ip:%lx cs:%x sp:%lx ax:%lx si:%lx di:%lx\n" , level, current->comm,task_pid_nr (current), message, regs->ip, regs->cs, regs->sp, regs->ax, regs->si, regs->di);
arch/x86/include/asm/ptrace.h +35 -13
70 lines not on this page · raw message
arch/x86/kernel/process_64.c +1 -1
@@ -117,7 +117,7 @@ void __show_regs(struct pt_regs *regs, enum show_regs_mode mode,printk ("%sFS: %016lx(%04x) GS:%016lx(%04x) knlGS:%016lx\n" , log_lvl, fs, fsindex, gs, gsindex, shadowgs); -printk ("%sCS: %04lx DS: %04x ES: %04x CR0: %016lx\n" , +printk ("%sCS: %04x DS: %04x ES: %04x CR0: %016lx\n" , log_lvl, regs->cs, ds, es, cr0);printk ("%sCR2: %016lx CR3: %016lx CR4: %016lx\n" , log_lvl, cr2, cr3, cr4);
[tip: x86/fred] x86/ptrace: Cleanup the definition of the pt_regs structure
In reply to Xin LiThe following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: ee63291aa8287cb7ded767d340155fe8681fc075 Gitweb: https://git.kernel.org/tip/ee63291aa8287cb7ded767d340155fe8681fc075 Author: Xin Li <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:02 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Wed, 31 Jan 2024 22:01:13 +01:00
x86/ptrace: Cleanup the definition of the pt_regs structure
struct pt_regs is hard to read because the member or section related comments are not aligned with the members.
The 'cs' and 'ss' members of pt_regs are type of 'unsigned long' while in reality they are only 16-bit wide. This works so far as the remaining space is unused, but FRED will use the remaining bits for other purposes.
To prepare for FRED:
- Cleanup the formatting
- Convert 'cs' and 'ss' to u16 and embed them into an union with a u64
- Fixup the related printk() format strings
--- arch/x86/entry/vsyscall/vsyscall_64.c | 2 +- arch/x86/include/asm/ptrace.h | 48 ++++++++++++++++++-------- arch/x86/kernel/process_64.c | 2 +- 3 files changed, 37 insertions(+), 15 deletions(-)
arch/x86/entry/vsyscall/vsyscall_64.c +1 -1
@@ -76,7 +76,7 @@ static void warn_bad_vsyscall(const char *level, struct pt_regs *regs,if (!show_unhandled_signals)return ; -printk_ratelimited ("%s%s[%d] %s ip:%lx cs:%lx sp:%lx ax:%lx si:%lx di:%lx\n" , +printk_ratelimited ("%s%s[%d] %s ip:%lx cs:%x sp:%lx ax:%lx si:%lx di:%lx\n" , level, current->comm,task_pid_nr (current), message, regs->ip, regs->cs, regs->sp, regs->ax, regs->si, regs->di);
arch/x86/include/asm/ptrace.h +35 -13
70 lines not on this page · raw message
arch/x86/kernel/process_64.c +1 -1
@@ -117,7 +117,7 @@ void __show_regs(struct pt_regs *regs, enum show_regs_mode mode,printk ("%sFS: %016lx(%04x) GS:%016lx(%04x) knlGS:%016lx\n" , log_lvl, fs, fsindex, gs, gsindex, shadowgs); -printk ("%sCS: %04lx DS: %04x ES: %04x CR0: %016lx\n" , +printk ("%sCS: %04x DS: %04x ES: %04x CR0: %016lx\n" , log_lvl, regs->cs, ds, es, cr0);printk ("%sCR2: %016lx CR3: %016lx CR4: %016lx\n" , log_lvl, cr2, cr3, cr4);
H. Peter Anvin
maintainerRe: [tip: x86/fred] x86/ptrace: Cleanup the definition of the pt_regs structure
Quoted 133 lines · On January 31, 2024 1:14:52 PM PST, tip-bot2 for Xin Li…
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: ee63291aa8287cb7ded767d340155fe8681fc075 Gitweb: https://git.kernel.org/tip/ee63291aa8287cb7ded767d340155fe8681fc075 Author: Xin Li <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:02 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Wed, 31 Jan 2024 22:01:13 +01:00x86/ptrace: Cleanup the definition of the
pt_regsstructurestruct
pt_regsis hard to read because the member or section related comments are not aligned with the members.The 'cs' and 'ss' members of
pt_regsare type of 'unsigned long' while in reality they are only 16-bit wide. This works so far as the remaining space is unused, but FRED will use the remaining bits for other purposes.To prepare for FRED:
- Cleanup the formatting
- Convert 'cs' and 'ss' to u16 and embed them into an union with a u64
- Fixup the relatedprintk()format stringsSuggested-by Thomas Gleixner <[email protected]>Originally-by H. Peter Anvin (Intel) <[email protected]>Signed-off-by Xin Li <[email protected]>Signed-off-by Thomas Gleixner <[email protected]>Signed-off-by Borislav Petkov (AMD) <[email protected]>Tested-by Shan Kang <[email protected]>---
arch/x86/entry/vsyscall/vsyscall_64.c | 2 +- arch/x86/include/asm/ptrace.h | 48 ++++++++++++++++++-------- arch/x86/kernel/process_64.c | 2 +- 3 files changed, 37 insertions(+), 15 deletions(-)arch/x86/entry/vsyscall/vsyscall_64.c +1
-1@@ -76,7 +76,7 @@ static void warn_bad_vsyscall(const char *level, struct pt_regs *regs,if (!show_unhandled_signals)return ; -printk_ratelimited ("%s%s[%d] %s ip:%lx cs:%lx sp:%lx ax:%lx si:%lx di:%lx\n" , +printk_ratelimited ("%s%s[%d] %s ip:%lx cs:%x sp:%lx ax:%lx si:%lx di:%lx\n" , level, current->comm,task_pid_nr (current), message, regs->ip, regs->cs, regs->sp, regs->ax, regs->si, regs->di);arch/x86/include/asm/ptrace.h +35
-13@@ -57,17 +57,19 @@ struct pt_regs { #else /* __i386__ */ struct pt_regs { -/* - * C ABI says these regs are callee-preserved. They aren't saved on kernel entry - * unless syscall needs a complete, fully filled "struct pt_regs". - */ + /* + * C ABI says these regs are callee-preserved. They aren't saved on + * kernel entry unless syscall needs a complete, fully filled + * "struct pt_regs". + */ unsigned long r15; unsigned long r14; unsigned long r13; unsigned long r12; unsigned long bp; unsigned long bx; -/* These regs are callee-clobbered. Always saved on kernel entry. */ + + /* These regs are callee-clobbered. Always saved on kernel entry. */ unsigned long r11; unsigned long r10; unsigned long r9;@@ -77,18 +79,38 @@ struct pt_regs {unsigned long dx;unsigned long si;unsigned long di; -/* -* On syscall entry, this is syscall#. On CPU exception, this is error code. -* On hw interrupt, it's IRQ number: -*/ + +/* +* orig_ax is used on entry for: +* - the syscall number (syscall, sysenter, int80) +* - error_code stored by the CPU on traps and exceptions +* - the interrupt number for device interrupts +*/ unsigned long orig_ax; -/* Return frame for iretq */ + +/* The IRETQ return frame starts here */ unsigned long ip; -unsigned long cs; + +union { +/* The full 64-bit data slot containing CS */ +u64 csx; +/* CS selector */ +u16 cs; + }; +unsigned long flags;unsigned long sp; -unsigned long ss; -/* top of stack page */ + +union { +/* The full 64-bit data slot containing SS */ +u64 ssx; +/* SS selector */ +u16 ss; + }; + +/* +* Top of stack on IDT systems. + */ };#endif /* !__i386__ */ arch/x86/kernel/process_64.c +0
-0
arch/x86/kernel/process_64.c void __show_regs(struct pt_regs *regs, enum show_regs_mode mode, · line 123
Quoted 8 lines
arch/x86/kernel/process_64.c +1
-1@@ -117,7 +117,7 @@ void __show_regs(struct pt_regs *regs, enum show_regs_mode mode,printk ("%sFS: %016lx(%04x) GS:%016lx(%04x) knlGS:%016lx\n" , log_lvl, fs, fsindex, gs, gsindex, shadowgs); -printk ("%sCS: %04lx DS: %04x ES: %04x CR0: %016lx\n" , +printk ("%sCS: %04x DS: %04x ES: %04x CR0: %016lx\n" , log_lvl, regs->cs, ds, es, cr0);printk ("%sCR2: %016lx CR3: %016lx CR4: %016lx\n" , log_lvl, cr2, cr3, cr4);
Incidentally, the comment about callee-saved registers is long since both obsolete and is now outright wrong.
The next version of gcc (14 I think) will have an attribute to turn off saving registers which we can use for top-level C functions.
Xin Li
maintainerRe: [tip: x86/fred] x86/ptrace: Cleanup the definition of the pt_regs structure
Quoted 34 lines · H. Peter Anvin
Quoted 33 lines · On January 31, 2024 1:14:52 PM PST, tip-bot2 for Xin Li…
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: ee63291aa8287cb7ded767d340155fe8681fc075 Gitweb: https://git.kernel.org/tip/ee63291aa8287cb7ded767d340155fe8681fc075 Author: Xin Li <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:02 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Wed, 31 Jan 2024 22:01:13 +01:00x86/ptrace: Cleanup the definition of the
pt_regsstructurestruct
pt_regsis hard to read because the member or section related comments are not aligned with the members.The 'cs' and 'ss' members of
pt_regsare type of 'unsigned long' while in reality they are only 16-bit wide. This works so far as the remaining space is unused, but FRED will use the remaining bits for other purposes.To prepare for FRED:
- Cleanup the formatting
- Convert 'cs' and 'ss' to u16 and embed them into an union with a u64
- Fixup the relatedprintk()format stringsSuggested-by Thomas Gleixner <[email protected]>Originally-by H. Peter Anvin (Intel) <[email protected]>Signed-off-by Xin Li <[email protected]>Signed-off-by Thomas Gleixner <[email protected]>Signed-off-by Borislav Petkov (AMD) <[email protected]>Tested-by Shan Kang <[email protected]>
[...]
Quoted 16 lines
arch/x86/kernel/process_64.c void __show_regs(struct pt_regs *regs, enum show_regs_mode mode, · line 123
Quoted 13 lines
arch/x86/kernel/process_64.c +1
-1@@ -117,7 +117,7 @@ void __show_regs(struct pt_regs *regs, enum show_regs_mode mode,printk ("%sFS: %016lx(%04x) GS:%016lx(%04x) knlGS:%016lx\n" , log_lvl, fs, fsindex, gs, gsindex, shadowgs); -printk ("%sCS: %04lx DS: %04x ES: %04x CR0: %016lx\n" , +printk ("%sCS: %04x DS: %04x ES: %04x CR0: %016lx\n" , log_lvl, regs->cs, ds, es, cr0);printk ("%sCR2: %016lx CR3: %016lx CR4: %016lx\n" , log_lvl, cr2, cr3, cr4);Incidentally, the comment about callee-saved registers is long since both obsolete and is now outright wrong.
Quoted 2 lines
The next version of gcc (14 I think) will have an attribute to turn off saving registers which we can use for top-level C functions.
Forgive my ignorance, do we have an official definition for "top-level C functions"?
Thanks!
Xin
H. Peter Anvin
maintainerRe: [tip: x86/fred] x86/ptrace: Cleanup the definition of the pt_regs structure
Quoted 54 lines · Xin Li
Quoted 34 lines · H. Peter Anvin
Quoted 33 lines · On January 31, 2024 1:14:52 PM PST, tip-bot2 for Xin Li…
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: ee63291aa8287cb7ded767d340155fe8681fc075 Gitweb: https://git.kernel.org/tip/ee63291aa8287cb7ded767d340155fe8681fc075 Author: Xin Li <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:02 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Wed, 31 Jan 2024 22:01:13 +01:00x86/ptrace: Cleanup the definition of the
pt_regsstructurestruct
pt_regsis hard to read because the member or section related comments are not aligned with the members.The 'cs' and 'ss' members of
pt_regsare type of 'unsigned long' while in reality they are only 16-bit wide. This works so far as the remaining space is unused, but FRED will use the remaining bits for other purposes.To prepare for FRED:
- Cleanup the formatting
- Convert 'cs' and 'ss' to u16 and embed them into an union with a u64
- Fixup the relatedprintk()format stringsSuggested-by Thomas Gleixner <[email protected]>Originally-by H. Peter Anvin (Intel) <[email protected]>Signed-off-by Xin Li <[email protected]>Signed-off-by Thomas Gleixner <[email protected]>Signed-off-by Borislav Petkov (AMD) <[email protected]>Tested-by Shan Kang <[email protected]>[...]
Quoted 16 lines
arch/x86/kernel/process_64.c void __show_regs(struct pt_regs *regs, enum show_regs_mode mode, · line 123
Quoted 13 lines
arch/x86/kernel/process_64.c +1
-1@@ -117,7 +117,7 @@ void __show_regs(struct pt_regs *regs, enum show_regs_mode mode,printk ("%sFS: %016lx(%04x) GS:%016lx(%04x) knlGS:%016lx\n" , log_lvl, fs, fsindex, gs, gsindex, shadowgs); -printk ("%sCS: %04lx DS: %04x ES: %04x CR0: %016lx\n" , +printk ("%sCS: %04x DS: %04x ES: %04x CR0: %016lx\n" , log_lvl, regs->cs, ds, es, cr0);printk ("%sCR2: %016lx CR3: %016lx CR4: %016lx\n" , log_lvl, cr2, cr3, cr4);Incidentally, the comment about callee-saved registers is long since both obsolete and is now outright wrong.
Quoted 8 lines
Quoted 2 lines
The next version of gcc (14 I think) will have an attribute to turn off saving registers which we can use for top-level C functions.
Forgive my ignorance, do we have an official definition for "top-level C functions"?
Thanks!
Xin
(Adding H.J., who did the gcc implementation of __attribute__((no_callee_saved_registers))).
The top level C functions are the ones whose stack frame are immediately below the exception/syscall frame, i.e. the C function called from the entry assembly code and functions tailcalled from those (unless they set up a stack frame for things like memory structures passed to the called function.)
Note that the implementation should properly handle the case when calling these functions from C (accidentally, or because it is a rare case that can be validly pessimized.)
Re: [tip: x86/fred] x86/ptrace: Cleanup the definition of the pt_regs structure
Quoted 56 lines · H. Peter Anvin
Quoted 54 lines · Xin Li
Quoted 34 lines · H. Peter Anvin
Quoted 33 lines · On January 31, 2024 1:14:52 PM PST, tip-bot2 for Xin Li…
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: ee63291aa8287cb7ded767d340155fe8681fc075 Gitweb: https://git.kernel.org/tip/ee63291aa8287cb7ded767d340155fe8681fc075 Author: Xin Li <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:02 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Wed, 31 Jan 2024 22:01:13 +01:00x86/ptrace: Cleanup the definition of the
pt_regsstructurestruct
pt_regsis hard to read because the member or section related comments are not aligned with the members.The 'cs' and 'ss' members of
pt_regsare type of 'unsigned long' while in reality they are only 16-bit wide. This works so far as the remaining space is unused, but FRED will use the remaining bits for other purposes.To prepare for FRED:
- Cleanup the formatting
- Convert 'cs' and 'ss' to u16 and embed them into an union with a u64
- Fixup the relatedprintk()format stringsSuggested-by Thomas Gleixner <[email protected]>Originally-by H. Peter Anvin (Intel) <[email protected]>Signed-off-by Xin Li <[email protected]>Signed-off-by Thomas Gleixner <[email protected]>Signed-off-by Borislav Petkov (AMD) <[email protected]>Tested-by Shan Kang <[email protected]>[...]
Quoted 16 lines
arch/x86/kernel/process_64.c void __show_regs(struct pt_regs *regs, enum show_regs_mode mode, · line 123
Quoted 13 lines
arch/x86/kernel/process_64.c +1
-1@@ -117,7 +117,7 @@ void __show_regs(struct pt_regs *regs, enum show_regs_mode mode,printk ("%sFS: %016lx(%04x) GS:%016lx(%04x) knlGS:%016lx\n" , log_lvl, fs, fsindex, gs, gsindex, shadowgs); -printk ("%sCS: %04lx DS: %04x ES: %04x CR0: %016lx\n" , +printk ("%sCS: %04x DS: %04x ES: %04x CR0: %016lx\n" , log_lvl, regs->cs, ds, es, cr0);printk ("%sCR2: %016lx CR3: %016lx CR4: %016lx\n" , log_lvl, cr2, cr3, cr4);Incidentally, the comment about callee-saved registers is long since both obsolete and is now outright wrong.
Quoted 1 line
Quoted 1 line
Quoted 1 line
The next version of gcc (14 I think) will have an attribute to turn off saving registers which we can use for top-level C functions.
__attribute__((no_callee_saved_registers))) has been added to GCC 14.
Quoted 7 lines
Quoted 6 lines
Forgive my ignorance, do we have an official definition for "top-level C functions"?
Thanks!
Xin
Quoted 5 lines
(Adding H.J., who did the gcc implementation of __attribute__((no_callee_saved_registers))).
The top level C functions are the ones whose stack frame are immediately below the exception/syscall frame, i.e. the C function called from the entry assembly code and functions tailcalled from those (unless they set up a stack frame for things like memory structures passed to the called function.)
Note that the implementation should properly handle the case when calling these functions from C (accidentally, or because it is a rare case that can be validly pessimized.)
GCC 14 should handle it properly. If not, please open a GCC bug.
Signature · 1 line
H.J.
PATCH v13 14/35 x86/ptrace: Add FRED additional information to the pt_regs structure
In reply to Xin LiFRED defines additional information in the upper 48 bits of cs/ss fields. Therefore add the information definitions into the pt_regs structure.
Specially introduce a new structure fred_ss to denote the FRED flags above SS selector, which avoids FRED_SSX_ macros and makes the code simpler and easier to read.
---
Change since v11:
* Add a new structure fred_cs to denote the FRED flags above CS selector as what is done for SS (H. Peter Anvin).
Changes since v9:
* Introduce a new structure fred_ss to denote the FRED flags above SS selector, which avoids FRED_SSX_ macros and makes the code simpler and easier to read (Thomas Gleixner).
* Use type u64 to define FRED bit fields instead of type unsigned int (Thomas Gleixner).
Changes since v8:
* Reflect stack frame definition changes from FRED spec 3.0 to 5.0.
* Use __packed instead of __attribute__((__packed__)) (Borislav Petkov).
* Put all comments above the members, like the rest of the file does (Borislav Petkov).
Changes since v3:
* Rename csl/ssl of the pt_regs structure to csx/ssx (x for extended) (Andrew Cooper).
--- arch/x86/include/asm/ptrace.h | 66 ++++++++++++++++++++++++++++++++--- 1 file changed, 61 insertions(+), 5 deletions(-)
arch/x86/include/asm/ptrace.h +61 -5
@@ -56,6 +56,50 @@ struct pt_regs {#else /* __i386__ */ +struct fred_cs { +/* CS selector */ +u64 cs :16 , +/* Stack level at event time */ + sl :2 , +/* IBT in WAIT_FOR_ENDBRANCH state */ + wfe : 1, + :45 ; +}; + +struct fred_ss { +/* SS selector */ +u64 ss :16 , +/* STI state */ + sti :1 , +/* Set if syscall, sysenter or INT n */ + swevent :1 , +/* Event is NMI type */ + nmi : 1, + :13 , +/* Event vector */ + vector : 8, + :8 , +/* Event type */ + type : 4, + :4 , +/* Event was incident to enclave execution */ + enclave :1 , +/* CPU was in long mode */ + lm :1 , +/* +* Nested exception during FRED delivery, not set +* for #DF. +*/ + nested : 1, + :1 , +/* +* The length of the instruction causing the event. +* Only set for INTO, INT1, INT3, INT n, SYSCALL +* and SYSENTER. 0 otherwise. +*/ + insnlen :4 ; +}; + struct pt_regs {/* * C ABI says these regs are callee-preserved. They aren't saved on
@@ -85,6 +129,12 @@ struct pt_regs {* - the syscall number (syscall, sysenter, int80) * - error_code stored by the CPU on traps and exceptions * - the interrupt number for device interrupts +* +* A FRED stack frame starts here: +* 1) It _always_ includes an error code; +* +* 2) The return frame for ERET[US] starts here, but +* the content of orig_ax is ignored. */ unsigned long orig_ax;
@@ -92,24 +142,30 @@ struct pt_regs {unsigned long ip;union { -/* The full 64-bit data slot containing CS */ -u64 csx;/* CS selector */ u16 cs; +/* The extended 64-bit data slot containing CS */ +u64 csx; +/* The FRED CS extension */ +struct fred_cs fred_cs; };unsigned long flags;unsigned long sp;union { -/* The full 64-bit data slot containing SS */ -u64 ssx;/* SS selector */ u16 ss; +/* The extended 64-bit data slot containing SS */ +u64 ssx; +/* The FRED SS extension */ +struct fred_ss fred_ss; };/* -* Top of stack on IDT systems. +* Top of stack on IDT systems, while FRED systems have extra fields +* defined above for storing exception related information, e.g. CR2 or +* DR6. */ };
Signature · 1 line
2.43.0
[tip: x86/fred] x86/ptrace: Add FRED additional information to the pt_regs structure
The following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: 078f58767cfea21dc9a153cc9e463e6ce481d87c Gitweb: https://git.kernel.org/tip/078f58767cfea21dc9a153cc9e463e6ce481d87c Author: Xin Li <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:03 -08:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 25 Jan 2024 19:10:31 +01:00
x86/ptrace: Add FRED additional information to the pt_regs structure
FRED defines additional information in the upper 48 bits of cs/ss fields. Therefore add the information definitions into the pt_regs structure.
Specifically introduce a new structure fred_ss to denote the FRED flags above SS selector, which avoids FRED_SSX_ macros and makes the code simpler and easier to read.
--- arch/x86/include/asm/ptrace.h | 66 +++++++++++++++++++++++++++++++--- 1 file changed, 61 insertions(+), 5 deletions(-)
arch/x86/include/asm/ptrace.h +61 -5
@@ -56,6 +56,50 @@ struct pt_regs {#else /* __i386__ */ +struct fred_cs { +/* CS selector */ +u64 cs :16 , +/* Stack level at event time */ + sl :2 , +/* IBT in WAIT_FOR_ENDBRANCH state */ + wfe : 1, + :45 ; +}; + +struct fred_ss { +/* SS selector */ +u64 ss :16 , +/* STI state */ + sti :1 , +/* Set if syscall, sysenter or INT n */ + swevent :1 , +/* Event is NMI type */ + nmi : 1, + :13 , +/* Event vector */ + vector : 8, + :8 , +/* Event type */ + type : 4, + :4 , +/* Event was incident to enclave execution */ + enclave :1 , +/* CPU was in long mode */ + lm :1 , +/* +* Nested exception during FRED delivery, not set +* for #DF. +*/ + nested : 1, + :1 , +/* +* The length of the instruction causing the event. +* Only set for INTO, INT1, INT3, INT n, SYSCALL +* and SYSENTER. 0 otherwise. +*/ + insnlen :4 ; +}; + struct pt_regs {/* * C ABI says these regs are callee-preserved. They aren't saved on
@@ -85,6 +129,12 @@ struct pt_regs {* - the syscall number (syscall, sysenter, int80) * - error_code stored by the CPU on traps and exceptions * - the interrupt number for device interrupts +* +* A FRED stack frame starts here: +* 1) It _always_ includes an error code; +* +* 2) The return frame for ERET[US] starts here, but +* the content of orig_ax is ignored. */ unsigned long orig_ax;
@@ -92,24 +142,30 @@ struct pt_regs {unsigned long ip;union { -/* The full 64-bit data slot containing CS */ -u64 csx;/* CS selector */ u16 cs; +/* The extended 64-bit data slot containing CS */ +u64 csx; +/* The FRED CS extension */ +struct fred_cs fred_cs; };unsigned long flags;unsigned long sp;union { -/* The full 64-bit data slot containing SS */ -u64 ssx;/* SS selector */ u16 ss; +/* The extended 64-bit data slot containing SS */ +u64 ssx; +/* The FRED SS extension */ +struct fred_ss fred_ss; };/* -* Top of stack on IDT systems. +* Top of stack on IDT systems, while FRED systems have extra fields +* defined above for storing exception related information, e.g. CR2 or +* DR6. */ };
[tip: x86/fred] x86/ptrace: Add FRED additional information to the pt_regs structure
In reply to Xin LiThe following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: c125443456e97f7bcc87cc7ba1346c2b92c4db94 Gitweb: https://git.kernel.org/tip/c125443456e97f7bcc87cc7ba1346c2b92c4db94 Author: Xin Li <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:03 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Tue, 30 Jan 2024 18:20:34 +01:00
x86/ptrace: Add FRED additional information to the pt_regs structure
FRED defines additional information in the upper 48 bits of cs/ss fields. Therefore add the information definitions into the pt_regs structure.
Specifically introduce a new structure fred_ss to denote the FRED flags above SS selector, which avoids FRED_SSX_ macros and makes the code simpler and easier to read.
--- arch/x86/include/asm/ptrace.h | 66 +++++++++++++++++++++++++++++++--- 1 file changed, 61 insertions(+), 5 deletions(-)
arch/x86/include/asm/ptrace.h +61 -5
@@ -56,6 +56,50 @@ struct pt_regs {#else /* __i386__ */ +struct fred_cs { +/* CS selector */ +u64 cs :16 , +/* Stack level at event time */ + sl :2 , +/* IBT in WAIT_FOR_ENDBRANCH state */ + wfe : 1, + :45 ; +}; + +struct fred_ss { +/* SS selector */ +u64 ss :16 , +/* STI state */ + sti :1 , +/* Set if syscall, sysenter or INT n */ + swevent :1 , +/* Event is NMI type */ + nmi : 1, + :13 , +/* Event vector */ + vector : 8, + :8 , +/* Event type */ + type : 4, + :4 , +/* Event was incident to enclave execution */ + enclave :1 , +/* CPU was in long mode */ + lm :1 , +/* +* Nested exception during FRED delivery, not set +* for #DF. +*/ + nested : 1, + :1 , +/* +* The length of the instruction causing the event. +* Only set for INTO, INT1, INT3, INT n, SYSCALL +* and SYSENTER. 0 otherwise. +*/ + insnlen :4 ; +}; + struct pt_regs {/* * C ABI says these regs are callee-preserved. They aren't saved on
@@ -85,6 +129,12 @@ struct pt_regs {* - the syscall number (syscall, sysenter, int80) * - error_code stored by the CPU on traps and exceptions * - the interrupt number for device interrupts +* +* A FRED stack frame starts here: +* 1) It _always_ includes an error code; +* +* 2) The return frame for ERET[US] starts here, but +* the content of orig_ax is ignored. */ unsigned long orig_ax;
@@ -92,24 +142,30 @@ struct pt_regs {unsigned long ip;union { -/* The full 64-bit data slot containing CS */ -u64 csx;/* CS selector */ u16 cs; +/* The extended 64-bit data slot containing CS */ +u64 csx; +/* The FRED CS extension */ +struct fred_cs fred_cs; };unsigned long flags;unsigned long sp;union { -/* The full 64-bit data slot containing SS */ -u64 ssx;/* SS selector */ u16 ss; +/* The extended 64-bit data slot containing SS */ +u64 ssx; +/* The FRED SS extension */ +struct fred_ss fred_ss; };/* -* Top of stack on IDT systems. +* Top of stack on IDT systems, while FRED systems have extra fields +* defined above for storing exception related information, e.g. CR2 or +* DR6. */ };
[tip: x86/fred] x86/ptrace: Add FRED additional information to the pt_regs structure
In reply to Xin LiThe following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: 3c77bf02d0c03beb3efdf7a5b427fb2e1a76c265 Gitweb: https://git.kernel.org/tip/3c77bf02d0c03beb3efdf7a5b427fb2e1a76c265 Author: Xin Li <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:03 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Wed, 31 Jan 2024 22:01:20 +01:00
x86/ptrace: Add FRED additional information to the pt_regs structure
FRED defines additional information in the upper 48 bits of cs/ss fields. Therefore add the information definitions into the pt_regs structure.
Specifically introduce a new structure fred_ss to denote the FRED flags above SS selector, which avoids FRED_SSX_ macros and makes the code simpler and easier to read.
--- arch/x86/include/asm/ptrace.h | 66 +++++++++++++++++++++++++++++++--- 1 file changed, 61 insertions(+), 5 deletions(-)
arch/x86/include/asm/ptrace.h +61 -5
@@ -56,6 +56,50 @@ struct pt_regs {#else /* __i386__ */ +struct fred_cs { +/* CS selector */ +u64 cs :16 , +/* Stack level at event time */ + sl :2 , +/* IBT in WAIT_FOR_ENDBRANCH state */ + wfe : 1, + :45 ; +}; + +struct fred_ss { +/* SS selector */ +u64 ss :16 , +/* STI state */ + sti :1 , +/* Set if syscall, sysenter or INT n */ + swevent :1 , +/* Event is NMI type */ + nmi : 1, + :13 , +/* Event vector */ + vector : 8, + :8 , +/* Event type */ + type : 4, + :4 , +/* Event was incident to enclave execution */ + enclave :1 , +/* CPU was in long mode */ + lm :1 , +/* +* Nested exception during FRED delivery, not set +* for #DF. +*/ + nested : 1, + :1 , +/* +* The length of the instruction causing the event. +* Only set for INTO, INT1, INT3, INT n, SYSCALL +* and SYSENTER. 0 otherwise. +*/ + insnlen :4 ; +}; + struct pt_regs {/* * C ABI says these regs are callee-preserved. They aren't saved on
@@ -85,6 +129,12 @@ struct pt_regs {* - the syscall number (syscall, sysenter, int80) * - error_code stored by the CPU on traps and exceptions * - the interrupt number for device interrupts +* +* A FRED stack frame starts here: +* 1) It _always_ includes an error code; +* +* 2) The return frame for ERET[US] starts here, but +* the content of orig_ax is ignored. */ unsigned long orig_ax;
@@ -92,24 +142,30 @@ struct pt_regs {unsigned long ip;union { -/* The full 64-bit data slot containing CS */ -u64 csx;/* CS selector */ u16 cs; +/* The extended 64-bit data slot containing CS */ +u64 csx; +/* The FRED CS extension */ +struct fred_cs fred_cs; };unsigned long flags;unsigned long sp;union { -/* The full 64-bit data slot containing SS */ -u64 ssx;/* SS selector */ u16 ss; +/* The extended 64-bit data slot containing SS */ +u64 ssx; +/* The FRED SS extension */ +struct fred_ss fred_ss; };/* -* Top of stack on IDT systems. +* Top of stack on IDT systems, while FRED systems have extra fields +* defined above for storing exception related information, e.g. CR2 or +* DR6. */ };
PATCH v13 15/35 x86/fred: Add a new header file for FRED definitions
In reply to Xin LiFrom: "H. Peter Anvin (Intel)" <[email protected]>
Add a header file for FRED prototypes and definitions.
---
Changes since v6:
* Replace pt_regs csx flags prefix FRED_CSL_ with FRED_CSX_.
--- arch/x86/include/asm/fred.h | 68 +++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 arch/x86/include/asm/fred.h
arch/x86/include/asm/fred.h new file +68 -0
@@ -0,0 +1,68 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* +* Macros for Flexible Return and Event Delivery (FRED) +*/ + +#ifndef ASM_X86_FRED_H +#define ASM_X86_FRED_H + +#include <linux/const.h> + +#include <asm/asm.h> + +/* +* FRED event return instruction opcodes for ERET{S,U}; supported in +* binutils >= 2.41. +*/ +#define ERETS _ASM_BYTES(0xf2,0x0f,0x01,0xca) +#define ERETU _ASM_BYTES(0xf3,0x0f,0x01,0xca) + +/* +* RSP is aligned to a 64-byte boundary before used to push a new stack frame +*/ +#define FRED_STACK_FRAME_RSP_MASK _AT(unsigned long, (~0x3f)) + +/* +* Used for the return address for call emulation during code patching, +* and measured in 64-byte cache lines. +*/ +#define FRED_CONFIG_REDZONE_AMOUNT 1 +#define FRED_CONFIG_REDZONE (_AT(unsigned long, FRED_CONFIG_REDZONE_AMOUNT) << 6) +#define FRED_CONFIG_INT_STKLVL (l) (_AT(unsigned long, l) << 9) +#define FRED_CONFIG_ENTRYPOINT (p) _AT(unsigned long, (p)) + +#ifndef __ASSEMBLY__ + +#ifdef CONFIG_X86_FRED +#include <linux/kernel.h> + +#include <asm/ptrace.h> + +struct fred_info { +/* Event data: CR2, DR6, ... */ +unsigned long edata; +unsigned long resv; +}; + +/* Full format of the FRED stack frame */ +struct fred_frame { +struct pt_regs regs; +struct fred_info info; +}; + +static __always_inline struct fred_info *fred_info(struct pt_regs *regs) +{ + return &container_of(regs, struct fred_frame, regs)->info; +} + +static __always_inline unsigned long fred_event_data (struct pt_regs *regs) +{ +return fred_info (regs)->edata; +} + +#else /* CONFIG_X86_FRED */ +static __always_inline unsigned long fred_event_data (struct pt_regs *regs) {return 0 ; } +#endif /* CONFIG_X86_FRED */ +#endif /* !__ASSEMBLY__ */ + +#endif /* ASM_X86_FRED_H */
Signature · 1 line
2.43.0
[tip: x86/fred] x86/fred: Add a new header file for FRED definitions
The following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: 6b0403ff15724348b3c1d409d9c39d62a7972ed4 Gitweb: https://git.kernel.org/tip/6b0403ff15724348b3c1d409d9c39d62a7972ed4 Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:04 -08:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 25 Jan 2024 19:10:31 +01:00
x86/fred: Add a new header file for FRED definitions
Add a header file for FRED prototypes and definitions.
--- arch/x86/include/asm/fred.h | 68 ++++++++++++++++++++++++++++++++++++- 1 file changed, 68 insertions(+) create mode 100644 arch/x86/include/asm/fred.h
arch/x86/include/asm/fred.h new file +68 -0
@@ -0,0 +1,68 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* +* Macros for Flexible Return and Event Delivery (FRED) +*/ + +#ifndef ASM_X86_FRED_H +#define ASM_X86_FRED_H + +#include <linux/const.h> + +#include <asm/asm.h> + +/* +* FRED event return instruction opcodes for ERET{S,U}; supported in +* binutils >= 2.41. +*/ +#define ERETS _ASM_BYTES(0xf2,0x0f,0x01,0xca) +#define ERETU _ASM_BYTES(0xf3,0x0f,0x01,0xca) + +/* +* RSP is aligned to a 64-byte boundary before used to push a new stack frame +*/ +#define FRED_STACK_FRAME_RSP_MASK _AT(unsigned long, (~0x3f)) + +/* +* Used for the return address for call emulation during code patching, +* and measured in 64-byte cache lines. +*/ +#define FRED_CONFIG_REDZONE_AMOUNT 1 +#define FRED_CONFIG_REDZONE (_AT(unsigned long, FRED_CONFIG_REDZONE_AMOUNT) << 6) +#define FRED_CONFIG_INT_STKLVL (l) (_AT(unsigned long, l) << 9) +#define FRED_CONFIG_ENTRYPOINT (p) _AT(unsigned long, (p)) + +#ifndef __ASSEMBLY__ + +#ifdef CONFIG_X86_FRED +#include <linux/kernel.h> + +#include <asm/ptrace.h> + +struct fred_info { +/* Event data: CR2, DR6, ... */ +unsigned long edata; +unsigned long resv; +}; + +/* Full format of the FRED stack frame */ +struct fred_frame { +struct pt_regs regs; +struct fred_info info; +}; + +static __always_inline struct fred_info *fred_info(struct pt_regs *regs) +{ + return &container_of(regs, struct fred_frame, regs)->info; +} + +static __always_inline unsigned long fred_event_data (struct pt_regs *regs) +{ +return fred_info (regs)->edata; +} + +#else /* CONFIG_X86_FRED */ +static __always_inline unsigned long fred_event_data (struct pt_regs *regs) {return 0 ; } +#endif /* CONFIG_X86_FRED */ +#endif /* !__ASSEMBLY__ */ + +#endif /* ASM_X86_FRED_H */
[tip: x86/fred] x86/fred: Add a new header file for FRED definitions
In reply to Xin LiThe following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: c413db75cb7db9740330f3375d1854994bd0c8cb Gitweb: https://git.kernel.org/tip/c413db75cb7db9740330f3375d1854994bd0c8cb Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:04 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Tue, 30 Jan 2024 18:20:34 +01:00
x86/fred: Add a new header file for FRED definitions
Add a header file for FRED prototypes and definitions.
--- arch/x86/include/asm/fred.h | 68 ++++++++++++++++++++++++++++++++++++- 1 file changed, 68 insertions(+) create mode 100644 arch/x86/include/asm/fred.h
arch/x86/include/asm/fred.h new file +68 -0
@@ -0,0 +1,68 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* +* Macros for Flexible Return and Event Delivery (FRED) +*/ + +#ifndef ASM_X86_FRED_H +#define ASM_X86_FRED_H + +#include <linux/const.h> + +#include <asm/asm.h> + +/* +* FRED event return instruction opcodes for ERET{S,U}; supported in +* binutils >= 2.41. +*/ +#define ERETS _ASM_BYTES(0xf2,0x0f,0x01,0xca) +#define ERETU _ASM_BYTES(0xf3,0x0f,0x01,0xca) + +/* +* RSP is aligned to a 64-byte boundary before used to push a new stack frame +*/ +#define FRED_STACK_FRAME_RSP_MASK _AT(unsigned long, (~0x3f)) + +/* +* Used for the return address for call emulation during code patching, +* and measured in 64-byte cache lines. +*/ +#define FRED_CONFIG_REDZONE_AMOUNT 1 +#define FRED_CONFIG_REDZONE (_AT(unsigned long, FRED_CONFIG_REDZONE_AMOUNT) << 6) +#define FRED_CONFIG_INT_STKLVL (l) (_AT(unsigned long, l) << 9) +#define FRED_CONFIG_ENTRYPOINT (p) _AT(unsigned long, (p)) + +#ifndef __ASSEMBLY__ + +#ifdef CONFIG_X86_FRED +#include <linux/kernel.h> + +#include <asm/ptrace.h> + +struct fred_info { +/* Event data: CR2, DR6, ... */ +unsigned long edata; +unsigned long resv; +}; + +/* Full format of the FRED stack frame */ +struct fred_frame { +struct pt_regs regs; +struct fred_info info; +}; + +static __always_inline struct fred_info *fred_info(struct pt_regs *regs) +{ + return &container_of(regs, struct fred_frame, regs)->info; +} + +static __always_inline unsigned long fred_event_data (struct pt_regs *regs) +{ +return fred_info (regs)->edata; +} + +#else /* CONFIG_X86_FRED */ +static __always_inline unsigned long fred_event_data (struct pt_regs *regs) {return 0 ; } +#endif /* CONFIG_X86_FRED */ +#endif /* !__ASSEMBLY__ */ + +#endif /* ASM_X86_FRED_H */
[tip: x86/fred] x86/fred: Add a new header file for FRED definitions
In reply to Xin LiThe following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: 32b09c230392ca4c03fcbade9e28b2053f11396b Gitweb: https://git.kernel.org/tip/32b09c230392ca4c03fcbade9e28b2053f11396b Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:04 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Wed, 31 Jan 2024 22:01:25 +01:00
x86/fred: Add a new header file for FRED definitions
Add a header file for FRED prototypes and definitions.
--- arch/x86/include/asm/fred.h | 68 ++++++++++++++++++++++++++++++++++++- 1 file changed, 68 insertions(+) create mode 100644 arch/x86/include/asm/fred.h
arch/x86/include/asm/fred.h new file +68 -0
@@ -0,0 +1,68 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* +* Macros for Flexible Return and Event Delivery (FRED) +*/ + +#ifndef ASM_X86_FRED_H +#define ASM_X86_FRED_H + +#include <linux/const.h> + +#include <asm/asm.h> + +/* +* FRED event return instruction opcodes for ERET{S,U}; supported in +* binutils >= 2.41. +*/ +#define ERETS _ASM_BYTES(0xf2,0x0f,0x01,0xca) +#define ERETU _ASM_BYTES(0xf3,0x0f,0x01,0xca) + +/* +* RSP is aligned to a 64-byte boundary before used to push a new stack frame +*/ +#define FRED_STACK_FRAME_RSP_MASK _AT(unsigned long, (~0x3f)) + +/* +* Used for the return address for call emulation during code patching, +* and measured in 64-byte cache lines. +*/ +#define FRED_CONFIG_REDZONE_AMOUNT 1 +#define FRED_CONFIG_REDZONE (_AT(unsigned long, FRED_CONFIG_REDZONE_AMOUNT) << 6) +#define FRED_CONFIG_INT_STKLVL (l) (_AT(unsigned long, l) << 9) +#define FRED_CONFIG_ENTRYPOINT (p) _AT(unsigned long, (p)) + +#ifndef __ASSEMBLY__ + +#ifdef CONFIG_X86_FRED +#include <linux/kernel.h> + +#include <asm/ptrace.h> + +struct fred_info { +/* Event data: CR2, DR6, ... */ +unsigned long edata; +unsigned long resv; +}; + +/* Full format of the FRED stack frame */ +struct fred_frame { +struct pt_regs regs; +struct fred_info info; +}; + +static __always_inline struct fred_info *fred_info(struct pt_regs *regs) +{ + return &container_of(regs, struct fred_frame, regs)->info; +} + +static __always_inline unsigned long fred_event_data (struct pt_regs *regs) +{ +return fred_info (regs)->edata; +} + +#else /* CONFIG_X86_FRED */ +static __always_inline unsigned long fred_event_data (struct pt_regs *regs) {return 0 ; } +#endif /* CONFIG_X86_FRED */ +#endif /* !__ASSEMBLY__ */ + +#endif /* ASM_X86_FRED_H */
PATCH v13 16/35 x86/fred: Reserve space for the FRED stack frame
In reply to Xin LiFrom: "H. Peter Anvin (Intel)" <[email protected]>
When using FRED, reserve space at the top of the stack frame, just like i386 does.
--- arch/x86/include/asm/thread_info.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
arch/x86/include/asm/thread_info.h +9 -3
@@ -31,7 +31,9 @@* In vm86 mode, the hardware frame is much longer still, so add 16 * bytes to make room for the real-mode segments. * -* x86_64 has a fixed-length stack frame. +* x86-64 has a fixed-length stack frame, but it depends on whether +* or not FRED is enabled. Future versions of FRED might make this +* dynamic, but for now it is always 2 words longer. */ #ifdef CONFIG_X86_32 # ifdef CONFIG_VM86
@@ -39,8 +41,12 @@# else # define TOP_OF_KERNEL_STACK_PADDING 8# endif -#else -# define TOP_OF_KERNEL_STACK_PADDING 0 +#else /* x86-64 */ +# ifdef CONFIG_X86_FRED +# define TOP_OF_KERNEL_STACK_PADDING (2 * 8) +# else +# define TOP_OF_KERNEL_STACK_PADDING 0 +# endif #endif /*
Signature · 1 line
2.43.0
[tip: x86/fred] x86/fred: Reserve space for the FRED stack frame
The following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: c83ce06e137034b155ce56f2830637e7dc9c56ce Gitweb: https://git.kernel.org/tip/c83ce06e137034b155ce56f2830637e7dc9c56ce Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:05 -08:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 25 Jan 2024 19:10:31 +01:00
x86/fred: Reserve space for the FRED stack frame
When using FRED, reserve space at the top of the stack frame, just like i386 does.
--- arch/x86/include/asm/thread_info.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
arch/x86/include/asm/thread_info.h +9 -3
@@ -31,7 +31,9 @@* In vm86 mode, the hardware frame is much longer still, so add 16 * bytes to make room for the real-mode segments. * -* x86_64 has a fixed-length stack frame. +* x86-64 has a fixed-length stack frame, but it depends on whether +* or not FRED is enabled. Future versions of FRED might make this +* dynamic, but for now it is always 2 words longer. */ #ifdef CONFIG_X86_32 # ifdef CONFIG_VM86
@@ -39,8 +41,12 @@# else # define TOP_OF_KERNEL_STACK_PADDING 8# endif -#else -# define TOP_OF_KERNEL_STACK_PADDING 0 +#else /* x86-64 */ +# ifdef CONFIG_X86_FRED +# define TOP_OF_KERNEL_STACK_PADDING (2 * 8) +# else +# define TOP_OF_KERNEL_STACK_PADDING 0 +# endif #endif /*
[tip: x86/fred] x86/fred: Reserve space for the FRED stack frame
In reply to Xin LiThe following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: fcd06abf6de2b81724a1e39c121d288f66b1d392 Gitweb: https://git.kernel.org/tip/fcd06abf6de2b81724a1e39c121d288f66b1d392 Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:05 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Tue, 30 Jan 2024 18:20:35 +01:00
x86/fred: Reserve space for the FRED stack frame
When using FRED, reserve space at the top of the stack frame, just like i386 does.
--- arch/x86/include/asm/thread_info.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
arch/x86/include/asm/thread_info.h +9 -3
@@ -31,7 +31,9 @@* In vm86 mode, the hardware frame is much longer still, so add 16 * bytes to make room for the real-mode segments. * -* x86_64 has a fixed-length stack frame. +* x86-64 has a fixed-length stack frame, but it depends on whether +* or not FRED is enabled. Future versions of FRED might make this +* dynamic, but for now it is always 2 words longer. */ #ifdef CONFIG_X86_32 # ifdef CONFIG_VM86
@@ -39,8 +41,12 @@# else # define TOP_OF_KERNEL_STACK_PADDING 8# endif -#else -# define TOP_OF_KERNEL_STACK_PADDING 0 +#else /* x86-64 */ +# ifdef CONFIG_X86_FRED +# define TOP_OF_KERNEL_STACK_PADDING (2 * 8) +# else +# define TOP_OF_KERNEL_STACK_PADDING 0 +# endif #endif /*
[tip: x86/fred] x86/fred: Reserve space for the FRED stack frame
In reply to Xin LiThe following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: 65c9cc9e2c14602d98f1ca61c51ac954e9529303 Gitweb: https://git.kernel.org/tip/65c9cc9e2c14602d98f1ca61c51ac954e9529303 Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:05 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Wed, 31 Jan 2024 22:01:31 +01:00
x86/fred: Reserve space for the FRED stack frame
When using FRED, reserve space at the top of the stack frame, just like i386 does.
--- arch/x86/include/asm/thread_info.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
arch/x86/include/asm/thread_info.h +9 -3
@@ -31,7 +31,9 @@* In vm86 mode, the hardware frame is much longer still, so add 16 * bytes to make room for the real-mode segments. * -* x86_64 has a fixed-length stack frame. +* x86-64 has a fixed-length stack frame, but it depends on whether +* or not FRED is enabled. Future versions of FRED might make this +* dynamic, but for now it is always 2 words longer. */ #ifdef CONFIG_X86_32 # ifdef CONFIG_VM86
@@ -39,8 +41,12 @@# else # define TOP_OF_KERNEL_STACK_PADDING 8# endif -#else -# define TOP_OF_KERNEL_STACK_PADDING 0 +#else /* x86-64 */ +# ifdef CONFIG_X86_FRED +# define TOP_OF_KERNEL_STACK_PADDING (2 * 8) +# else +# define TOP_OF_KERNEL_STACK_PADDING 0 +# endif #endif /*
PATCH v13 17/35 x86/fred: Update MSR_IA32_FRED_RSP0 during task switch
In reply to Xin LiFrom: "H. Peter Anvin (Intel)" <[email protected]>
MSR_IA32_FRED_RSP0 is used during ring 3 event delivery, and needs to be updated to point to the top of next task stack during task switch.
--- arch/x86/include/asm/switch_to.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
arch/x86/include/asm/switch_to.h +6 -2
@@ -70,9 +70,13 @@ static inline void update_task_stack(struct task_struct *task)#ifdef CONFIG_X86_32 this_cpu_write (cpu_tss_rw.x86_tss.sp1, task->thread.sp0);#else -/* Xen PV enters the kernel on the thread stack. */ -if (cpu_feature_enabled (X86_FEATURE_XENPV )) +if (cpu_feature_enabled (X86_FEATURE_FRED )) { +/* WRMSRNS is a baseline feature for FRED. */ +wrmsrns (MSR_IA32_FRED_RSP0 , (unsigned long )task_stack_page (task) +THREAD_SIZE ); + }else if (cpu_feature_enabled (X86_FEATURE_XENPV )) { +/* Xen PV enters the kernel on the thread stack. */ load_sp0 (task_top_of_stack (task)); + }#endif }
Signature · 1 line
2.43.0
[tip: x86/fred] x86/fred: Update MSR_IA32_FRED_RSP0 during task switch
The following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: 7a8aa729761a43528db58e73cf2cea938045991d Gitweb: https://git.kernel.org/tip/7a8aa729761a43528db58e73cf2cea938045991d Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:06 -08:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 25 Jan 2024 19:10:31 +01:00
x86/fred: Update MSR_IA32_FRED_RSP0 during task switch
MSR_IA32_FRED_RSP0 is used during ring 3 event delivery, and needs to be updated to point to the top of next task stack during task switch.
--- arch/x86/include/asm/switch_to.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
arch/x86/include/asm/switch_to.h +6 -2
@@ -70,9 +70,13 @@ static inline void update_task_stack(struct task_struct *task)#ifdef CONFIG_X86_32 this_cpu_write (cpu_tss_rw.x86_tss.sp1, task->thread.sp0);#else -/* Xen PV enters the kernel on the thread stack. */ -if (cpu_feature_enabled (X86_FEATURE_XENPV )) +if (cpu_feature_enabled (X86_FEATURE_FRED )) { +/* WRMSRNS is a baseline feature for FRED. */ +wrmsrns (MSR_IA32_FRED_RSP0 , (unsigned long )task_stack_page (task) +THREAD_SIZE ); + }else if (cpu_feature_enabled (X86_FEATURE_XENPV )) { +/* Xen PV enters the kernel on the thread stack. */ load_sp0 (task_top_of_stack (task)); + }#endif }
[tip: x86/fred] x86/fred: Update MSR_IA32_FRED_RSP0 during task switch
In reply to Xin LiThe following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: f393835cbab6184f3ee6ed90499a88e9930a8512 Gitweb: https://git.kernel.org/tip/f393835cbab6184f3ee6ed90499a88e9930a8512 Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:06 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Tue, 30 Jan 2024 18:20:35 +01:00
x86/fred: Update MSR_IA32_FRED_RSP0 during task switch
MSR_IA32_FRED_RSP0 is used during ring 3 event delivery, and needs to be updated to point to the top of next task stack during task switch.
--- arch/x86/include/asm/switch_to.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
arch/x86/include/asm/switch_to.h +6 -2
@@ -70,9 +70,13 @@ static inline void update_task_stack(struct task_struct *task)#ifdef CONFIG_X86_32 this_cpu_write (cpu_tss_rw.x86_tss.sp1, task->thread.sp0);#else -/* Xen PV enters the kernel on the thread stack. */ -if (cpu_feature_enabled (X86_FEATURE_XENPV )) +if (cpu_feature_enabled (X86_FEATURE_FRED )) { +/* WRMSRNS is a baseline feature for FRED. */ +wrmsrns (MSR_IA32_FRED_RSP0 , (unsigned long )task_stack_page (task) +THREAD_SIZE ); + }else if (cpu_feature_enabled (X86_FEATURE_XENPV )) { +/* Xen PV enters the kernel on the thread stack. */ load_sp0 (task_top_of_stack (task)); + }#endif }
[tip: x86/fred] x86/fred: Update MSR_IA32_FRED_RSP0 during task switch
In reply to Xin LiThe following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: 9356c4b8886c4f7d3436c3f7fe31715bdcf1c79e Gitweb: https://git.kernel.org/tip/9356c4b8886c4f7d3436c3f7fe31715bdcf1c79e Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:06 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Wed, 31 Jan 2024 22:01:36 +01:00
x86/fred: Update MSR_IA32_FRED_RSP0 during task switch
MSR_IA32_FRED_RSP0 is used during ring 3 event delivery, and needs to be updated to point to the top of next task stack during task switch.
--- arch/x86/include/asm/switch_to.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
arch/x86/include/asm/switch_to.h +6 -2
@@ -70,9 +70,13 @@ static inline void update_task_stack(struct task_struct *task)#ifdef CONFIG_X86_32 this_cpu_write (cpu_tss_rw.x86_tss.sp1, task->thread.sp0);#else -/* Xen PV enters the kernel on the thread stack. */ -if (cpu_feature_enabled (X86_FEATURE_XENPV )) +if (cpu_feature_enabled (X86_FEATURE_FRED )) { +/* WRMSRNS is a baseline feature for FRED. */ +wrmsrns (MSR_IA32_FRED_RSP0 , (unsigned long )task_stack_page (task) +THREAD_SIZE ); + }else if (cpu_feature_enabled (X86_FEATURE_XENPV )) { +/* Xen PV enters the kernel on the thread stack. */ load_sp0 (task_top_of_stack (task)); + }#endif }
PATCH v13 18/35 x86/fred: Disallow the swapgs instruction when FRED is enabled
In reply to Xin LiFrom: "H. Peter Anvin (Intel)" <[email protected]>
SWAPGS is no longer needed thus NOT allowed with FRED because FRED transitions ensure that an operating system can _always_ operate with its own GS base address:
- For events that occur in ring 3, FRED event delivery swaps the GS base address with the IA32_KERNEL_GS_BASE MSR.
- ERETU (the FRED transition that returns to ring 3) also swaps the GS base address with the IA32_KERNEL_GS_BASE MSR.
And the operating system can still setup the GS segment for a user thread without the need of loading a user thread GS with:
- Using LKGS, available with FRED, to modify other attributes of the GS segment without compromising its ability always to operate with its own GS base address.
- Accessing the GS segment base address for a user thread as before using RDMSR or WRMSR on the IA32_KERNEL_GS_BASE MSR.
Note, LKGS loads the GS base address into the IA32_KERNEL_GS_BASE MSR instead of the GS segment's descriptor cache. As such, the operating system never changes its runtime GS base address.
---
Change since v12:
* Use the ASCII char ' (char number 0x27), instead of its unicode char (Borislav Petkov).
Change since v8:
* Explain why writing directly to the IA32_KERNEL_GS_BASE MSR is doing the right thing (Thomas Gleixner).
--- arch/x86/kernel/process_64.c | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-)
arch/x86/kernel/process_64.c +25 -2
@@ -166,7 +166,29 @@ static noinstr unsigned long __rdgsbase_inactive(void)lockdep_assert_irqs_disabled (); -if (!cpu_feature_enabled (X86_FEATURE_XENPV )) { +/* +* SWAPGS is no longer needed thus NOT allowed with FRED because +* FRED transitions ensure that an operating system can _always_ +* operate with its own GS base address: +* - For events that occur in ring 3, FRED event delivery swaps +* the GS base address with the IA32_KERNEL_GS_BASE MSR. +* - ERETU (the FRED transition that returns to ring 3) also swaps +* the GS base address with the IA32_KERNEL_GS_BASE MSR. +* +* And the operating system can still setup the GS segment for a +* user thread without the need of loading a user thread GS with: +* - Using LKGS, available with FRED, to modify other attributes +* of the GS segment without compromising its ability always to +* operate with its own GS base address. +* - Accessing the GS segment base address for a user thread as +* before using RDMSR or WRMSR on the IA32_KERNEL_GS_BASE MSR. +* +* Note, LKGS loads the GS base address into the IA32_KERNEL_GS_BASE +* MSR instead of the GS segment’s descriptor cache. As such, the +* operating system never changes its runtime GS base address. +*/ +if (!cpu_feature_enabled (X86_FEATURE_FRED ) && + !cpu_feature_enabled (X86_FEATURE_XENPV )) {native_swapgs (); gsbase =rdgsbase ();native_swapgs ();
@@ -191,7 +213,8 @@ static noinstr void __wrgsbase_inactive(unsigned long gsbase) {lockdep_assert_irqs_disabled (); -if (!cpu_feature_enabled (X86_FEATURE_XENPV )) { +if (!cpu_feature_enabled (X86_FEATURE_FRED ) && + !cpu_feature_enabled (X86_FEATURE_XENPV )) {native_swapgs ();wrgsbase (gsbase);native_swapgs ();
Signature · 1 line
2.43.0
[tip: x86/fred] x86/fred: Disallow the swapgs instruction when FRED is enabled
The following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: 45ba25d49059ddab201a22d62c9364eab283856f Gitweb: https://git.kernel.org/tip/45ba25d49059ddab201a22d62c9364eab283856f Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:07 -08:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 25 Jan 2024 19:10:31 +01:00
x86/fred: Disallow the swapgs instruction when FRED is enabled
SWAPGS is no longer needed thus NOT allowed with FRED because FRED transitions ensure that an operating system can _always_ operate with its own GS base address:
- For events that occur in ring 3, FRED event delivery swaps the GS base address with the IA32_KERNEL_GS_BASE MSR.
- ERETU (the FRED transition that returns to ring 3) also swaps the GS base address with the IA32_KERNEL_GS_BASE MSR.
And the operating system can still setup the GS segment for a user thread without the need of loading a user thread GS with:
- Using LKGS, available with FRED, to modify other attributes of the GS segment without compromising its ability always to operate with its own GS base address.
- Accessing the GS segment base address for a user thread as before using RDMSR or WRMSR on the IA32_KERNEL_GS_BASE MSR.
Note, LKGS loads the GS base address into the IA32_KERNEL_GS_BASE MSR instead of the GS segment's descriptor cache. As such, the operating system never changes its runtime GS base address.
--- arch/x86/kernel/process_64.c | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-)
arch/x86/kernel/process_64.c +25 -2
@@ -166,7 +166,29 @@ static noinstr unsigned long __rdgsbase_inactive(void)lockdep_assert_irqs_disabled (); -if (!cpu_feature_enabled (X86_FEATURE_XENPV )) { +/* +* SWAPGS is no longer needed thus NOT allowed with FRED because +* FRED transitions ensure that an operating system can _always_ +* operate with its own GS base address: +* - For events that occur in ring 3, FRED event delivery swaps +* the GS base address with the IA32_KERNEL_GS_BASE MSR. +* - ERETU (the FRED transition that returns to ring 3) also swaps +* the GS base address with the IA32_KERNEL_GS_BASE MSR. +* +* And the operating system can still setup the GS segment for a +* user thread without the need of loading a user thread GS with: +* - Using LKGS, available with FRED, to modify other attributes +* of the GS segment without compromising its ability always to +* operate with its own GS base address. +* - Accessing the GS segment base address for a user thread as +* before using RDMSR or WRMSR on the IA32_KERNEL_GS_BASE MSR. +* +* Note, LKGS loads the GS base address into the IA32_KERNEL_GS_BASE +* MSR instead of the GS segment’s descriptor cache. As such, the +* operating system never changes its runtime GS base address. +*/ +if (!cpu_feature_enabled (X86_FEATURE_FRED ) && + !cpu_feature_enabled (X86_FEATURE_XENPV )) {native_swapgs (); gsbase =rdgsbase ();native_swapgs ();
@@ -191,7 +213,8 @@ static noinstr void __wrgsbase_inactive(unsigned long gsbase) {lockdep_assert_irqs_disabled (); -if (!cpu_feature_enabled (X86_FEATURE_XENPV )) { +if (!cpu_feature_enabled (X86_FEATURE_FRED ) && + !cpu_feature_enabled (X86_FEATURE_XENPV )) {native_swapgs ();wrgsbase (gsbase);native_swapgs ();
[tip: x86/fred] x86/fred: Disallow the swapgs instruction when FRED is enabled
In reply to Xin LiThe following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: 5710910a6c94bcb08d1081ca94119220066331ad Gitweb: https://git.kernel.org/tip/5710910a6c94bcb08d1081ca94119220066331ad Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:07 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Tue, 30 Jan 2024 18:20:35 +01:00
x86/fred: Disallow the swapgs instruction when FRED is enabled
SWAPGS is no longer needed thus NOT allowed with FRED because FRED transitions ensure that an operating system can _always_ operate with its own GS base address:
- For events that occur in ring 3, FRED event delivery swaps the GS base address with the IA32_KERNEL_GS_BASE MSR.
- ERETU (the FRED transition that returns to ring 3) also swaps the GS base address with the IA32_KERNEL_GS_BASE MSR.
And the operating system can still setup the GS segment for a user thread without the need of loading a user thread GS with:
- Using LKGS, available with FRED, to modify other attributes of the GS segment without compromising its ability always to operate with its own GS base address.
- Accessing the GS segment base address for a user thread as before using RDMSR or WRMSR on the IA32_KERNEL_GS_BASE MSR.
Note, LKGS loads the GS base address into the IA32_KERNEL_GS_BASE MSR instead of the GS segment's descriptor cache. As such, the operating system never changes its runtime GS base address.
--- arch/x86/kernel/process_64.c | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-)
arch/x86/kernel/process_64.c +25 -2
@@ -166,7 +166,29 @@ static noinstr unsigned long __rdgsbase_inactive(void)lockdep_assert_irqs_disabled (); -if (!cpu_feature_enabled (X86_FEATURE_XENPV )) { +/* +* SWAPGS is no longer needed thus NOT allowed with FRED because +* FRED transitions ensure that an operating system can _always_ +* operate with its own GS base address: +* - For events that occur in ring 3, FRED event delivery swaps +* the GS base address with the IA32_KERNEL_GS_BASE MSR. +* - ERETU (the FRED transition that returns to ring 3) also swaps +* the GS base address with the IA32_KERNEL_GS_BASE MSR. +* +* And the operating system can still setup the GS segment for a +* user thread without the need of loading a user thread GS with: +* - Using LKGS, available with FRED, to modify other attributes +* of the GS segment without compromising its ability always to +* operate with its own GS base address. +* - Accessing the GS segment base address for a user thread as +* before using RDMSR or WRMSR on the IA32_KERNEL_GS_BASE MSR. +* +* Note, LKGS loads the GS base address into the IA32_KERNEL_GS_BASE +* MSR instead of the GS segment’s descriptor cache. As such, the +* operating system never changes its runtime GS base address. +*/ +if (!cpu_feature_enabled (X86_FEATURE_FRED ) && + !cpu_feature_enabled (X86_FEATURE_XENPV )) {native_swapgs (); gsbase =rdgsbase ();native_swapgs ();
@@ -191,7 +213,8 @@ static noinstr void __wrgsbase_inactive(unsigned long gsbase) {lockdep_assert_irqs_disabled (); -if (!cpu_feature_enabled (X86_FEATURE_XENPV )) { +if (!cpu_feature_enabled (X86_FEATURE_FRED ) && + !cpu_feature_enabled (X86_FEATURE_XENPV )) {native_swapgs ();wrgsbase (gsbase);native_swapgs ();
[tip: x86/fred] x86/fred: Disallow the swapgs instruction when FRED is enabled
In reply to Xin LiThe following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: 09794f68936a017e5632774c3e4450bebbcca2cb Gitweb: https://git.kernel.org/tip/09794f68936a017e5632774c3e4450bebbcca2cb Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:07 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Wed, 31 Jan 2024 22:01:41 +01:00
x86/fred: Disallow the swapgs instruction when FRED is enabled
SWAPGS is no longer needed thus NOT allowed with FRED because FRED transitions ensure that an operating system can _always_ operate with its own GS base address:
- For events that occur in ring 3, FRED event delivery swaps the GS base address with the IA32_KERNEL_GS_BASE MSR.
- ERETU (the FRED transition that returns to ring 3) also swaps the GS base address with the IA32_KERNEL_GS_BASE MSR.
And the operating system can still setup the GS segment for a user thread without the need of loading a user thread GS with:
- Using LKGS, available with FRED, to modify other attributes of the GS segment without compromising its ability always to operate with its own GS base address.
- Accessing the GS segment base address for a user thread as before using RDMSR or WRMSR on the IA32_KERNEL_GS_BASE MSR.
Note, LKGS loads the GS base address into the IA32_KERNEL_GS_BASE MSR instead of the GS segment's descriptor cache. As such, the operating system never changes its runtime GS base address.
--- arch/x86/kernel/process_64.c | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-)
arch/x86/kernel/process_64.c +25 -2
@@ -166,7 +166,29 @@ static noinstr unsigned long __rdgsbase_inactive(void)lockdep_assert_irqs_disabled (); -if (!cpu_feature_enabled (X86_FEATURE_XENPV )) { +/* +* SWAPGS is no longer needed thus NOT allowed with FRED because +* FRED transitions ensure that an operating system can _always_ +* operate with its own GS base address: +* - For events that occur in ring 3, FRED event delivery swaps +* the GS base address with the IA32_KERNEL_GS_BASE MSR. +* - ERETU (the FRED transition that returns to ring 3) also swaps +* the GS base address with the IA32_KERNEL_GS_BASE MSR. +* +* And the operating system can still setup the GS segment for a +* user thread without the need of loading a user thread GS with: +* - Using LKGS, available with FRED, to modify other attributes +* of the GS segment without compromising its ability always to +* operate with its own GS base address. +* - Accessing the GS segment base address for a user thread as +* before using RDMSR or WRMSR on the IA32_KERNEL_GS_BASE MSR. +* +* Note, LKGS loads the GS base address into the IA32_KERNEL_GS_BASE +* MSR instead of the GS segment’s descriptor cache. As such, the +* operating system never changes its runtime GS base address. +*/ +if (!cpu_feature_enabled (X86_FEATURE_FRED ) && + !cpu_feature_enabled (X86_FEATURE_XENPV )) {native_swapgs (); gsbase =rdgsbase ();native_swapgs ();
@@ -191,7 +213,8 @@ static noinstr void __wrgsbase_inactive(unsigned long gsbase) {lockdep_assert_irqs_disabled (); -if (!cpu_feature_enabled (X86_FEATURE_XENPV )) { +if (!cpu_feature_enabled (X86_FEATURE_FRED ) && + !cpu_feature_enabled (X86_FEATURE_XENPV )) {native_swapgs ();wrgsbase (gsbase);native_swapgs ();
PATCH v13 19/35 x86/fred: No ESPFIX needed when FRED is enabled
In reply to Xin LiFrom: "H. Peter Anvin (Intel)" <[email protected]>
Because FRED always restores the full value of %rsp, ESPFIX is no longer needed when it's enabled.
--- arch/x86/kernel/espfix_64.c | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/x86/kernel/espfix_64.c +8 -0
@@ -106,6 +106,10 @@ void __init init_espfix_bsp(void)pgd_t *pgd;p4d_t *p4d; +/* FRED systems always restore the full value of %rsp */ +if (cpu_feature_enabled (X86_FEATURE_FRED )) +return ; +/* Install the espfix pud into the kernel page directory */ pgd = &init_top_pgt[pgd_index (ESPFIX_BASE_ADDR )]; p4d =p4d_alloc (&init_mm, pgd,ESPFIX_BASE_ADDR );
@@ -129,6 +133,10 @@ void init_espfix_ap(int cpu)void *stack_page;pteval_t ptemask; +/* FRED systems always restore the full value of %rsp */ +if (cpu_feature_enabled (X86_FEATURE_FRED )) +return ; +/* We only have to do this once... */ if (likely (per_cpu (espfix_stack, cpu)))return ;/* Already initialized */
Signature · 1 line
2.43.0
[tip: x86/fred] x86/fred: No ESPFIX needed when FRED is enabled
The following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: bc49cef5e02ab95b5235acbbc4cb5bb6a0bdec7f Gitweb: https://git.kernel.org/tip/bc49cef5e02ab95b5235acbbc4cb5bb6a0bdec7f Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:08 -08:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 25 Jan 2024 19:10:31 +01:00
x86/fred: No ESPFIX needed when FRED is enabled
Because FRED always restores the full value of %rsp, ESPFIX is no longer needed when it's enabled.
--- arch/x86/kernel/espfix_64.c | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/x86/kernel/espfix_64.c +8 -0
@@ -106,6 +106,10 @@ void __init init_espfix_bsp(void)pgd_t *pgd;p4d_t *p4d; +/* FRED systems always restore the full value of %rsp */ +if (cpu_feature_enabled (X86_FEATURE_FRED )) +return ; +/* Install the espfix pud into the kernel page directory */ pgd = &init_top_pgt[pgd_index (ESPFIX_BASE_ADDR )]; p4d =p4d_alloc (&init_mm, pgd,ESPFIX_BASE_ADDR );
@@ -129,6 +133,10 @@ void init_espfix_ap(int cpu)void *stack_page;pteval_t ptemask; +/* FRED systems always restore the full value of %rsp */ +if (cpu_feature_enabled (X86_FEATURE_FRED )) +return ; +/* We only have to do this once... */ if (likely (per_cpu (espfix_stack, cpu)))return ;/* Already initialized */
[tip: x86/fred] x86/fred: No ESPFIX needed when FRED is enabled
In reply to Xin LiThe following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: d0fb796dc3475cf71d788ec960d8ed5de4d7a429 Gitweb: https://git.kernel.org/tip/d0fb796dc3475cf71d788ec960d8ed5de4d7a429 Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:08 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Tue, 30 Jan 2024 18:20:35 +01:00
x86/fred: No ESPFIX needed when FRED is enabled
Because FRED always restores the full value of %rsp, ESPFIX is no longer needed when it's enabled.
--- arch/x86/kernel/espfix_64.c | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/x86/kernel/espfix_64.c +8 -0
@@ -106,6 +106,10 @@ void __init init_espfix_bsp(void)pgd_t *pgd;p4d_t *p4d; +/* FRED systems always restore the full value of %rsp */ +if (cpu_feature_enabled (X86_FEATURE_FRED )) +return ; +/* Install the espfix pud into the kernel page directory */ pgd = &init_top_pgt[pgd_index (ESPFIX_BASE_ADDR )]; p4d =p4d_alloc (&init_mm, pgd,ESPFIX_BASE_ADDR );
@@ -129,6 +133,10 @@ void init_espfix_ap(int cpu)void *stack_page;pteval_t ptemask; +/* FRED systems always restore the full value of %rsp */ +if (cpu_feature_enabled (X86_FEATURE_FRED )) +return ; +/* We only have to do this once... */ if (likely (per_cpu (espfix_stack, cpu)))return ;/* Already initialized */
[tip: x86/fred] x86/fred: No ESPFIX needed when FRED is enabled
In reply to Xin LiThe following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: df8838737b3612eea024fce5ffce0b23dafe5058 Gitweb: https://git.kernel.org/tip/df8838737b3612eea024fce5ffce0b23dafe5058 Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:08 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Wed, 31 Jan 2024 22:01:51 +01:00
x86/fred: No ESPFIX needed when FRED is enabled
Because FRED always restores the full value of %rsp, ESPFIX is no longer needed when it's enabled.
--- arch/x86/kernel/espfix_64.c | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/x86/kernel/espfix_64.c +8 -0
@@ -106,6 +106,10 @@ void __init init_espfix_bsp(void)pgd_t *pgd;p4d_t *p4d; +/* FRED systems always restore the full value of %rsp */ +if (cpu_feature_enabled (X86_FEATURE_FRED )) +return ; +/* Install the espfix pud into the kernel page directory */ pgd = &init_top_pgt[pgd_index (ESPFIX_BASE_ADDR )]; p4d =p4d_alloc (&init_mm, pgd,ESPFIX_BASE_ADDR );
@@ -129,6 +133,10 @@ void init_espfix_ap(int cpu)void *stack_page;pteval_t ptemask; +/* FRED systems always restore the full value of %rsp */ +if (cpu_feature_enabled (X86_FEATURE_FRED )) +return ; +/* We only have to do this once... */ if (likely (per_cpu (espfix_stack, cpu)))return ;/* Already initialized */
PATCH v13 20/35 x86/fred: Allow single-step trap and NMI when starting a new task
In reply to Xin LiFrom: "H. Peter Anvin (Intel)" <[email protected]>
Entering a new task is logically speaking a return from a system call (exec, fork, clone, etc.). As such, if ptrace enables single stepping a single step exception should be allowed to trigger immediately upon entering user space. This is not optional.
NMI should *never* be disabled in user space. As such, this is an optional, opportunistic way to catch errors.
Allow single-step trap and NMI when starting a new task, thus once the new task enters user space, single-step trap and NMI are both enabled immediately.
---
Changes since v8:
* Use high-order 48 bits above the lowest 16 bit SS only when FRED is enabled (Thomas Gleixner).
--- arch/x86/kernel/process_64.c | 38 ++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-)
arch/x86/kernel/process_64.c +32 -6
@@ -56,6 +56,7 @@#include <asm/resctrl.h> #include <asm/unistd.h> #include <asm/fsgsbase.h> +#include <asm/fred.h> #ifdef CONFIG_IA32_EMULATION /* Not included via unistd.h */ #include <asm/unistd_32_ia32.h>
@@ -528,7 +529,7 @@ void x86_gsbase_write_task(struct task_struct *task, unsigned long gsbase)static void start_thread_common (struct pt_regs *regs,unsigned long new_ip,unsigned long new_sp, -unsigned int _cs,unsigned int _ss,unsigned int _ds) +u16 _cs,u16 _ss,u16 _ds) {WARN_ON_ONCE (regs !=current_pt_regs ());
@@ -545,11 +546,36 @@ start_thread_common(struct pt_regs *regs, unsigned long new_ip,loadsegment (ds, _ds);load_gs_index (0 ); - regs->ip = new_ip; - regs->sp = new_sp; - regs->cs = _cs; - regs->ss = _ss; - regs->flags =X86_EFLAGS_IF ; + regs->ip = new_ip; + regs->sp = new_sp; + regs->csx = _cs; + regs->ssx = _ss; +/* +* Allow single-step trap and NMI when starting a new task, thus +* once the new task enters user space, single-step trap and NMI +* are both enabled immediately. +* +* Entering a new task is logically speaking a return from a +* system call (exec, fork, clone, etc.). As such, if ptrace +* enables single stepping a single step exception should be +* allowed to trigger immediately upon entering user space. +* This is not optional. +* +* NMI should *never* be disabled in user space. As such, this +* is an optional, opportunistic way to catch errors. +* +* Paranoia: High-order 48 bits above the lowest 16 bit SS are +* discarded by the legacy IRET instruction on all Intel, AMD, +* and Cyrix/Centaur/VIA CPUs, thus can be set unconditionally, +* even when FRED is not enabled. But we choose the safer side +* to use these bits only when FRED is enabled. +*/ +if (cpu_feature_enabled (X86_FEATURE_FRED )) { + regs->fred_ss.swevent = true; + regs->fred_ss.nmi = true; + } + + regs->flags =X86_EFLAGS_IF |X86_EFLAGS_FIXED ; }void
Signature · 1 line
2.43.0
[tip: x86/fred] x86/fred: Allow single-step trap and NMI when starting a new task
The following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: 2ecb2c4fc69011364110a36cd9056adf3fefbc56 Gitweb: https://git.kernel.org/tip/2ecb2c4fc69011364110a36cd9056adf3fefbc56 Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:09 -08:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 25 Jan 2024 19:10:31 +01:00
x86/fred: Allow single-step trap and NMI when starting a new task
Entering a new task is logically speaking a return from a system call (exec, fork, clone, etc.). As such, if ptrace enables single stepping a single step exception should be allowed to trigger immediately upon entering user space. This is not optional.
NMI should *never* be disabled in user space. As such, this is an optional, opportunistic way to catch errors.
Allow single-step trap and NMI when starting a new task, thus once the new task enters user space, single-step trap and NMI are both enabled immediately.
--- arch/x86/kernel/process_64.c | 38 +++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-)
arch/x86/kernel/process_64.c +32 -6
@@ -56,6 +56,7 @@#include <asm/resctrl.h> #include <asm/unistd.h> #include <asm/fsgsbase.h> +#include <asm/fred.h> #ifdef CONFIG_IA32_EMULATION /* Not included via unistd.h */ #include <asm/unistd_32_ia32.h>
@@ -528,7 +529,7 @@ void x86_gsbase_write_task(struct task_struct *task, unsigned long gsbase)static void start_thread_common (struct pt_regs *regs,unsigned long new_ip,unsigned long new_sp, -unsigned int _cs,unsigned int _ss,unsigned int _ds) +u16 _cs,u16 _ss,u16 _ds) {WARN_ON_ONCE (regs !=current_pt_regs ());
@@ -545,11 +546,36 @@ start_thread_common(struct pt_regs *regs, unsigned long new_ip,loadsegment (ds, _ds);load_gs_index (0 ); - regs->ip = new_ip; - regs->sp = new_sp; - regs->cs = _cs; - regs->ss = _ss; - regs->flags =X86_EFLAGS_IF ; + regs->ip = new_ip; + regs->sp = new_sp; + regs->csx = _cs; + regs->ssx = _ss; +/* +* Allow single-step trap and NMI when starting a new task, thus +* once the new task enters user space, single-step trap and NMI +* are both enabled immediately. +* +* Entering a new task is logically speaking a return from a +* system call (exec, fork, clone, etc.). As such, if ptrace +* enables single stepping a single step exception should be +* allowed to trigger immediately upon entering user space. +* This is not optional. +* +* NMI should *never* be disabled in user space. As such, this +* is an optional, opportunistic way to catch errors. +* +* Paranoia: High-order 48 bits above the lowest 16 bit SS are +* discarded by the legacy IRET instruction on all Intel, AMD, +* and Cyrix/Centaur/VIA CPUs, thus can be set unconditionally, +* even when FRED is not enabled. But we choose the safer side +* to use these bits only when FRED is enabled. +*/ +if (cpu_feature_enabled (X86_FEATURE_FRED )) { + regs->fred_ss.swevent = true; + regs->fred_ss.nmi = true; + } + + regs->flags =X86_EFLAGS_IF |X86_EFLAGS_FIXED ; }void
[tip: x86/fred] x86/fred: Allow single-step trap and NMI when starting a new task
In reply to Xin LiThe following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: f102fe126d2811eded63d700fbe27527d936af74 Gitweb: https://git.kernel.org/tip/f102fe126d2811eded63d700fbe27527d936af74 Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:09 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Tue, 30 Jan 2024 18:20:35 +01:00
x86/fred: Allow single-step trap and NMI when starting a new task
Entering a new task is logically speaking a return from a system call (exec, fork, clone, etc.). As such, if ptrace enables single stepping a single step exception should be allowed to trigger immediately upon entering user space. This is not optional.
NMI should *never* be disabled in user space. As such, this is an optional, opportunistic way to catch errors.
Allow single-step trap and NMI when starting a new task, thus once the new task enters user space, single-step trap and NMI are both enabled immediately.
--- arch/x86/kernel/process_64.c | 38 +++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-)
arch/x86/kernel/process_64.c +32 -6
@@ -56,6 +56,7 @@#include <asm/resctrl.h> #include <asm/unistd.h> #include <asm/fsgsbase.h> +#include <asm/fred.h> #ifdef CONFIG_IA32_EMULATION /* Not included via unistd.h */ #include <asm/unistd_32_ia32.h>
@@ -528,7 +529,7 @@ void x86_gsbase_write_task(struct task_struct *task, unsigned long gsbase)static void start_thread_common (struct pt_regs *regs,unsigned long new_ip,unsigned long new_sp, -unsigned int _cs,unsigned int _ss,unsigned int _ds) +u16 _cs,u16 _ss,u16 _ds) {WARN_ON_ONCE (regs !=current_pt_regs ());
@@ -545,11 +546,36 @@ start_thread_common(struct pt_regs *regs, unsigned long new_ip,loadsegment (ds, _ds);load_gs_index (0 ); - regs->ip = new_ip; - regs->sp = new_sp; - regs->cs = _cs; - regs->ss = _ss; - regs->flags =X86_EFLAGS_IF ; + regs->ip = new_ip; + regs->sp = new_sp; + regs->csx = _cs; + regs->ssx = _ss; +/* +* Allow single-step trap and NMI when starting a new task, thus +* once the new task enters user space, single-step trap and NMI +* are both enabled immediately. +* +* Entering a new task is logically speaking a return from a +* system call (exec, fork, clone, etc.). As such, if ptrace +* enables single stepping a single step exception should be +* allowed to trigger immediately upon entering user space. +* This is not optional. +* +* NMI should *never* be disabled in user space. As such, this +* is an optional, opportunistic way to catch errors. +* +* Paranoia: High-order 48 bits above the lowest 16 bit SS are +* discarded by the legacy IRET instruction on all Intel, AMD, +* and Cyrix/Centaur/VIA CPUs, thus can be set unconditionally, +* even when FRED is not enabled. But we choose the safer side +* to use these bits only when FRED is enabled. +*/ +if (cpu_feature_enabled (X86_FEATURE_FRED )) { + regs->fred_ss.swevent = true; + regs->fred_ss.nmi = true; + } + + regs->flags =X86_EFLAGS_IF |X86_EFLAGS_FIXED ; }void
[tip: x86/fred] x86/fred: Allow single-step trap and NMI when starting a new task
In reply to Xin LiThe following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: ad41a14cc2d66229479d73e4a7dc1fda26827666 Gitweb: https://git.kernel.org/tip/ad41a14cc2d66229479d73e4a7dc1fda26827666 Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:09 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Wed, 31 Jan 2024 22:02:00 +01:00
x86/fred: Allow single-step trap and NMI when starting a new task
Entering a new task is logically speaking a return from a system call (exec, fork, clone, etc.). As such, if ptrace enables single stepping a single step exception should be allowed to trigger immediately upon entering user space. This is not optional.
NMI should *never* be disabled in user space. As such, this is an optional, opportunistic way to catch errors.
Allow single-step trap and NMI when starting a new task, thus once the new task enters user space, single-step trap and NMI are both enabled immediately.
--- arch/x86/kernel/process_64.c | 38 +++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-)
arch/x86/kernel/process_64.c +32 -6
@@ -56,6 +56,7 @@#include <asm/resctrl.h> #include <asm/unistd.h> #include <asm/fsgsbase.h> +#include <asm/fred.h> #ifdef CONFIG_IA32_EMULATION /* Not included via unistd.h */ #include <asm/unistd_32_ia32.h>
@@ -528,7 +529,7 @@ void x86_gsbase_write_task(struct task_struct *task, unsigned long gsbase)static void start_thread_common (struct pt_regs *regs,unsigned long new_ip,unsigned long new_sp, -unsigned int _cs,unsigned int _ss,unsigned int _ds) +u16 _cs,u16 _ss,u16 _ds) {WARN_ON_ONCE (regs !=current_pt_regs ());
@@ -545,11 +546,36 @@ start_thread_common(struct pt_regs *regs, unsigned long new_ip,loadsegment (ds, _ds);load_gs_index (0 ); - regs->ip = new_ip; - regs->sp = new_sp; - regs->cs = _cs; - regs->ss = _ss; - regs->flags =X86_EFLAGS_IF ; + regs->ip = new_ip; + regs->sp = new_sp; + regs->csx = _cs; + regs->ssx = _ss; +/* +* Allow single-step trap and NMI when starting a new task, thus +* once the new task enters user space, single-step trap and NMI +* are both enabled immediately. +* +* Entering a new task is logically speaking a return from a +* system call (exec, fork, clone, etc.). As such, if ptrace +* enables single stepping a single step exception should be +* allowed to trigger immediately upon entering user space. +* This is not optional. +* +* NMI should *never* be disabled in user space. As such, this +* is an optional, opportunistic way to catch errors. +* +* Paranoia: High-order 48 bits above the lowest 16 bit SS are +* discarded by the legacy IRET instruction on all Intel, AMD, +* and Cyrix/Centaur/VIA CPUs, thus can be set unconditionally, +* even when FRED is not enabled. But we choose the safer side +* to use these bits only when FRED is enabled. +*/ +if (cpu_feature_enabled (X86_FEATURE_FRED )) { + regs->fred_ss.swevent = true; + regs->fred_ss.nmi = true; + } + + regs->flags =X86_EFLAGS_IF |X86_EFLAGS_FIXED ; }void
PATCH v13 21/35 x86/fred: Make exc_page_fault() work for FRED
In reply to Xin LiFrom: "H. Peter Anvin (Intel)" <[email protected]>
On a FRED system, the faulting address (CR2) is passed on the stack, to avoid the problem of transient state. Thus the page fault address is read from the FRED stack frame instead of CR2 when FRED is enabled.
---
Change since v12:
* No "we" in a commit message, use passive voice (Borislav Petkov).
--- arch/x86/mm/fault.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
arch/x86/mm/fault.c +4 -1
@@ -34,6 +34,7 @@#include <asm/kvm_para.h> /* kvm_handle_async_pf */ #include <asm/vdso.h> /* fixup_vdso_exception() */ #include <asm/irq_stack.h> +#include <asm/fred.h> #define CREATE_TRACE_POINTS #include <asm/trace/exceptions.h>
@@ -1516,8 +1517,10 @@ handle_page_fault(struct pt_regs *regs, unsigned long error_code,DEFINE_IDTENTRY_RAW_ERRORCODE (exc_page_fault) { -unsigned long address =read_cr2 ();irqentry_state_t state; +unsigned long address; + + address =cpu_feature_enabled (X86_FEATURE_FRED ) ?fred_event_data (regs) :read_cr2 ();prefetchw (¤t->mm->mmap_lock);
Signature · 1 line
2.43.0
[tip: x86/fred] x86/fred: Make exc_page_fault() work for FRED
The following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: 56d86ae082ba7030b4df0b365bf102c9a63826b2 Gitweb: https://git.kernel.org/tip/56d86ae082ba7030b4df0b365bf102c9a63826b2 Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:10 -08:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 25 Jan 2024 19:10:32 +01:00
x86/fred: Make exc_page_fault() work for FRED
On a FRED system, the faulting address (CR2) is passed on the stack, to avoid the problem of transient state. Thus the page fault address is read from the FRED stack frame instead of CR2 when FRED is enabled.
--- arch/x86/mm/fault.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
arch/x86/mm/fault.c +4 -1
@@ -34,6 +34,7 @@#include <asm/kvm_para.h> /* kvm_handle_async_pf */ #include <asm/vdso.h> /* fixup_vdso_exception() */ #include <asm/irq_stack.h> +#include <asm/fred.h> #define CREATE_TRACE_POINTS #include <asm/trace/exceptions.h>
@@ -1518,8 +1519,10 @@ handle_page_fault(struct pt_regs *regs, unsigned long error_code,DEFINE_IDTENTRY_RAW_ERRORCODE (exc_page_fault) { -unsigned long address =read_cr2 ();irqentry_state_t state; +unsigned long address; + + address =cpu_feature_enabled (X86_FEATURE_FRED ) ?fred_event_data (regs) :read_cr2 ();prefetchw (¤t->mm->mmap_lock);
[tip: x86/fred] x86/fred: Make exc_page_fault() work for FRED
In reply to Xin LiThe following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: 9f6870bafc183644d20cba702168e37b48e291a7 Gitweb: https://git.kernel.org/tip/9f6870bafc183644d20cba702168e37b48e291a7 Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:10 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Tue, 30 Jan 2024 18:20:35 +01:00
x86/fred: Make exc_page_fault() work for FRED
On a FRED system, the faulting address (CR2) is passed on the stack, to avoid the problem of transient state. Thus the page fault address is read from the FRED stack frame instead of CR2 when FRED is enabled.
--- arch/x86/mm/fault.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
arch/x86/mm/fault.c +4 -1
@@ -34,6 +34,7 @@#include <asm/kvm_para.h> /* kvm_handle_async_pf */ #include <asm/vdso.h> /* fixup_vdso_exception() */ #include <asm/irq_stack.h> +#include <asm/fred.h> #define CREATE_TRACE_POINTS #include <asm/trace/exceptions.h>
@@ -1518,8 +1519,10 @@ handle_page_fault(struct pt_regs *regs, unsigned long error_code,DEFINE_IDTENTRY_RAW_ERRORCODE (exc_page_fault) { -unsigned long address =read_cr2 ();irqentry_state_t state; +unsigned long address; + + address =cpu_feature_enabled (X86_FEATURE_FRED ) ?fred_event_data (regs) :read_cr2 ();prefetchw (¤t->mm->mmap_lock);
[tip: x86/fred] x86/fred: Make exc_page_fault() work for FRED
In reply to Xin LiThe following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: 58c80cc55e079933205597ecf846583c5e6e4946 Gitweb: https://git.kernel.org/tip/58c80cc55e079933205597ecf846583c5e6e4946 Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:10 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Wed, 31 Jan 2024 22:02:05 +01:00
x86/fred: Make exc_page_fault() work for FRED
On a FRED system, the faulting address (CR2) is passed on the stack, to avoid the problem of transient state. Thus the page fault address is read from the FRED stack frame instead of CR2 when FRED is enabled.
--- arch/x86/mm/fault.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
arch/x86/mm/fault.c +4 -1
@@ -34,6 +34,7 @@#include <asm/kvm_para.h> /* kvm_handle_async_pf */ #include <asm/vdso.h> /* fixup_vdso_exception() */ #include <asm/irq_stack.h> +#include <asm/fred.h> #define CREATE_TRACE_POINTS #include <asm/trace/exceptions.h>
@@ -1518,8 +1519,10 @@ handle_page_fault(struct pt_regs *regs, unsigned long error_code,DEFINE_IDTENTRY_RAW_ERRORCODE (exc_page_fault) { -unsigned long address =read_cr2 ();irqentry_state_t state; +unsigned long address; + + address =cpu_feature_enabled (X86_FEATURE_FRED ) ?fred_event_data (regs) :read_cr2 ();prefetchw (¤t->mm->mmap_lock);
PATCH v13 22/35 x86/idtentry: Incorporate definitions/declarations of the FRED entries
In reply to Xin LiFRED and IDT can share most of the definitions and declarations so that in the majority of cases the actual handler implementation is the same.
The differences are the exceptions where FRED stores exception related information on the stack and the sysvec implementations as FRED can handle irqentry/exit() in the dispatcher instead of having it in each handler.
Also add stub defines for vectors which are not used due to Kconfig decisions to spare the ifdeffery in the actual FRED dispatch code.
---
Change since v9:
* Except NMI/#DB/#MCE, FRED really should share the exception handlers with IDT (Thomas Gleixner).
Change since v8:
* Put IDTENTRY changes in a separate patch (Thomas Gleixner).
--- arch/x86/include/asm/idtentry.h | 71 +++++++++++++++++++++++++++++---- 1 file changed, 63 insertions(+), 8 deletions(-)
arch/x86/include/asm/idtentry.h +63 -8
@@ -13,15 +13,18 @@#include <asm/irq_stack.h> +typedef void (*idtentry_t )(struct pt_regs *regs); +/** * DECLARE_IDTENTRY - Declare functions for simple IDT entry points * No error code pushed by hardware * @vector: Vector number (ignored for C) * @func: Function name of the entry point * -* Declares three functions: +* Declares four functions: * - The ASM entry point: asm_##func * - The XEN PV trap entry point: xen_##func (maybe unused) +* - The C handler called from the FRED event dispatcher (maybe unused) * - The C handler called from the ASM entry point * * Note: This is the C variant of DECLARE_IDTENTRY(). As the name says it
@@ -31,6 +34,7 @@#define DECLARE_IDTENTRY (vector, func) \ asmlinkage void asm_##func(void); \ asmlinkage void xen_asm_##func(void); \ + void fred_##func(struct pt_regs *regs); \ __visible void func(struct pt_regs *regs)/**
@@ -137,6 +141,17 @@ static __always_inline void __##func(struct pt_regs *regs, \#define DEFINE_IDTENTRY_RAW (func) \ __visible noinstr void func(struct pt_regs *regs) +/** +* DEFINE_FREDENTRY_RAW - Emit code for raw FRED entry points +* @func: Function name of the entry point +* +* @func is called from the FRED event dispatcher with interrupts disabled. +* +* See @DEFINE_IDTENTRY_RAW for further details. +*/ +#define DEFINE_FREDENTRY_RAW (func) \ +noinstr void fred_##func(struct pt_regs *regs) +/** * DECLARE_IDTENTRY_RAW_ERRORCODE - Declare functions for raw IDT entry points * Error code pushed by hardware
@@ -233,17 +248,27 @@ static noinline void __##func(struct pt_regs *regs, u32 vector)#define DEFINE_IDTENTRY_SYSVEC (func) \ static void __##func(struct pt_regs *regs); \ \ +static __always_inline void instr_##func(struct pt_regs *regs) \ +{ \ + kvm_set_cpu_l1tf_flush_l1d(); \ + run_sysvec_on_irqstack_cond(__##func, regs); \ +} \ + \ __visible noinstr void func(struct pt_regs *regs) \ { \ irqentry_state_t state = irqentry_enter(regs); \ \ instrumentation_begin(); \ - kvm_set_cpu_l1tf_flush_l1d(); \ - run_sysvec_on_irqstack_cond(__##func, regs); \ + instr_##func (regs); \ instrumentation_end(); \ irqentry_exit(regs, state); \ } \ \ +void fred_##func(struct pt_regs *regs) \ +{ \ + instr_##func (regs); \ +} \ + \ static noinline void __##func(struct pt_regs *regs)/**
@@ -260,19 +285,29 @@ static noinline void __##func(struct pt_regs *regs)#define DEFINE_IDTENTRY_SYSVEC_SIMPLE (func) \ static __always_inline void __##func(struct pt_regs *regs); \ \ -__visible noinstr void func(struct pt_regs *regs) \ +static __always_inline void instr_##func(struct pt_regs *regs) \ { \ - irqentry_state_t state = irqentry_enter(regs); \ - \ - instrumentation_begin(); \ __irq_enter_raw(); \ kvm_set_cpu_l1tf_flush_l1d(); \ __##func (regs); \ __irq_exit_raw(); \ +} \ + \ +__visible noinstr void func(struct pt_regs *regs) \ +{ \ + irqentry_state_t state = irqentry_enter(regs); \ + \ + instrumentation_begin(); \ + instr_##func (regs); \ instrumentation_end(); \ irqentry_exit(regs, state); \ } \ \ +void fred_##func(struct pt_regs *regs) \ +{ \ + instr_##func (regs); \ +} \ + \ static __always_inline void __##func(struct pt_regs *regs)/**
@@ -410,15 +445,18 @@ __visible noinstr void func(struct pt_regs *regs, \/* C-Code mapping */ #define DECLARE_IDTENTRY_NMI DECLARE_IDTENTRY_RAW#define DEFINE_IDTENTRY_NMI DEFINE_IDTENTRY_RAW +#define DEFINE_FREDENTRY_NMI DEFINE_FREDENTRY_RAW#ifdef CONFIG_X86_64 #define DECLARE_IDTENTRY_MCE DECLARE_IDTENTRY_IST#define DEFINE_IDTENTRY_MCE DEFINE_IDTENTRY_IST#define DEFINE_IDTENTRY_MCE_USER DEFINE_IDTENTRY_NOIST +#define DEFINE_FREDENTRY_MCE DEFINE_FREDENTRY_RAW#define DECLARE_IDTENTRY_DEBUG DECLARE_IDTENTRY_IST#define DEFINE_IDTENTRY_DEBUG DEFINE_IDTENTRY_IST#define DEFINE_IDTENTRY_DEBUG_USER DEFINE_IDTENTRY_NOIST +#define DEFINE_FREDENTRY_DEBUG DEFINE_FREDENTRY_RAW#endif #else /* !__ASSEMBLY__ */
@@ -651,23 +689,36 @@ DECLARE_IDTENTRY(RESCHEDULE_VECTOR, sysvec_reschedule_ipi);DECLARE_IDTENTRY_SYSVEC (REBOOT_VECTOR , sysvec_reboot);DECLARE_IDTENTRY_SYSVEC (CALL_FUNCTION_SINGLE_VECTOR , sysvec_call_function_single);DECLARE_IDTENTRY_SYSVEC (CALL_FUNCTION_VECTOR , sysvec_call_function); +#else +# define fred_sysvec_reschedule_ipi NULL +# define fred_sysvec_reboot NULL +# define fred_sysvec_call_function_single NULL +# define fred_sysvec_call_function NULL#endif #ifdef CONFIG_X86_LOCAL_APIC # ifdef CONFIG_X86_MCE_THRESHOLD DECLARE_IDTENTRY_SYSVEC (THRESHOLD_APIC_VECTOR , sysvec_threshold); +# else +# define fred_sysvec_threshold NULL# endif # ifdef CONFIG_X86_MCE_AMD DECLARE_IDTENTRY_SYSVEC (DEFERRED_ERROR_VECTOR , sysvec_deferred_error); +# else +# define fred_sysvec_deferred_error NULL# endif # ifdef CONFIG_X86_THERMAL_VECTOR DECLARE_IDTENTRY_SYSVEC (THERMAL_APIC_VECTOR , sysvec_thermal); +# else +# define fred_sysvec_thermal NULL# endif # ifdef CONFIG_IRQ_WORK DECLARE_IDTENTRY_SYSVEC (IRQ_WORK_VECTOR , sysvec_irq_work); +# else +# define fred_sysvec_irq_work NULL# endif #endif
@@ -675,12 +726,16 @@ DECLARE_IDTENTRY_SYSVEC(IRQ_WORK_VECTOR, sysvec_irq_work);DECLARE_IDTENTRY_SYSVEC (POSTED_INTR_VECTOR , sysvec_kvm_posted_intr_ipi);DECLARE_IDTENTRY_SYSVEC (POSTED_INTR_WAKEUP_VECTOR , sysvec_kvm_posted_intr_wakeup_ipi);DECLARE_IDTENTRY_SYSVEC (POSTED_INTR_NESTED_VECTOR , sysvec_kvm_posted_intr_nested_ipi); +#else +# define fred_sysvec_kvm_posted_intr_ipi NULL +# define fred_sysvec_kvm_posted_intr_wakeup_ipi NULL +# define fred_sysvec_kvm_posted_intr_nested_ipi NULL#endif #if IS_ENABLED (CONFIG_HYPERV )DECLARE_IDTENTRY_SYSVEC (HYPERVISOR_CALLBACK_VECTOR , sysvec_hyperv_callback);DECLARE_IDTENTRY_SYSVEC (HYPERV_REENLIGHTENMENT_VECTOR , sysvec_hyperv_reenlightenment); -DECLARE_IDTENTRY_SYSVEC (HYPERV_STIMER0_VECTOR , sysvec_hyperv_stimer0); +DECLARE_IDTENTRY_SYSVEC (HYPERV_STIMER0_VECTOR , sysvec_hyperv_stimer0);#endif #if IS_ENABLED (CONFIG_ACRN_GUEST )
Signature · 1 line
2.43.0
[tip: x86/fred] x86/idtentry: Incorporate definitions/declarations of the FRED entries
The following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: e1896be71c38e5b531578fe59de8b48c0f667cc7 Gitweb: https://git.kernel.org/tip/e1896be71c38e5b531578fe59de8b48c0f667cc7 Author: Xin Li <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:11 -08:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 25 Jan 2024 19:10:32 +01:00
x86/idtentry: Incorporate definitions/declarations of the FRED entries
FRED and IDT can share most of the definitions and declarations so that in the majority of cases the actual handler implementation is the same.
The differences are the exceptions where FRED stores exception related information on the stack and the sysvec implementations as FRED can handle irqentry/exit() in the dispatcher instead of having it in each handler.
Also add stub defines for vectors which are not used due to Kconfig decisions to spare the ifdeffery in the actual FRED dispatch code.
--- arch/x86/include/asm/idtentry.h | 71 ++++++++++++++++++++++++++++---- 1 file changed, 63 insertions(+), 8 deletions(-)
arch/x86/include/asm/idtentry.h +63 -8
@@ -13,15 +13,18 @@#include <asm/irq_stack.h> +typedef void (*idtentry_t )(struct pt_regs *regs); +/** * DECLARE_IDTENTRY - Declare functions for simple IDT entry points * No error code pushed by hardware * @vector: Vector number (ignored for C) * @func: Function name of the entry point * -* Declares three functions: +* Declares four functions: * - The ASM entry point: asm_##func * - The XEN PV trap entry point: xen_##func (maybe unused) +* - The C handler called from the FRED event dispatcher (maybe unused) * - The C handler called from the ASM entry point * * Note: This is the C variant of DECLARE_IDTENTRY(). As the name says it
@@ -31,6 +34,7 @@#define DECLARE_IDTENTRY (vector, func) \ asmlinkage void asm_##func(void); \ asmlinkage void xen_asm_##func(void); \ + void fred_##func(struct pt_regs *regs); \ __visible void func(struct pt_regs *regs)/**
@@ -138,6 +142,17 @@ static __always_inline void __##func(struct pt_regs *regs, \ __visible noinstr void func(struct pt_regs *regs)/** +* DEFINE_FREDENTRY_RAW - Emit code for raw FRED entry points +* @func: Function name of the entry point +* +* @func is called from the FRED event dispatcher with interrupts disabled. +* +* See @DEFINE_IDTENTRY_RAW for further details. + */ +#define DEFINE_FREDENTRY_RAW (func) \ +noinstr void fred_##func(struct pt_regs *regs) + +/** * DECLARE_IDTENTRY_RAW_ERRORCODE - Declare functions for raw IDT entry points * Error code pushed by hardware * @vector: Vector number (ignored for C)
@@ -233,17 +248,27 @@ static noinline void __##func(struct pt_regs *regs, u32 vector)#define DEFINE_IDTENTRY_SYSVEC (func) \ static void __##func(struct pt_regs *regs); \ \ +static __always_inline void instr_##func(struct pt_regs *regs) \ +{ \ + kvm_set_cpu_l1tf_flush_l1d(); \ + run_sysvec_on_irqstack_cond(__##func, regs); \ +} \ + \ __visible noinstr void func(struct pt_regs *regs) \ { \ irqentry_state_t state = irqentry_enter(regs); \ \ instrumentation_begin(); \ - kvm_set_cpu_l1tf_flush_l1d(); \ - run_sysvec_on_irqstack_cond(__##func, regs); \ + instr_##func (regs); \ instrumentation_end(); \ irqentry_exit(regs, state); \ } \ \ +void fred_##func(struct pt_regs *regs) \ +{ \ + instr_##func (regs); \ +} \ + \ static noinline void __##func(struct pt_regs *regs)/**
@@ -260,19 +285,29 @@ static noinline void __##func(struct pt_regs *regs)#define DEFINE_IDTENTRY_SYSVEC_SIMPLE (func) \ static __always_inline void __##func(struct pt_regs *regs); \ \ -__visible noinstr void func(struct pt_regs *regs) \ +static __always_inline void instr_##func(struct pt_regs *regs) \ { \ - irqentry_state_t state = irqentry_enter(regs); \ - \ - instrumentation_begin(); \ __irq_enter_raw(); \ kvm_set_cpu_l1tf_flush_l1d(); \ __##func (regs); \ __irq_exit_raw(); \ +} \ + \ +__visible noinstr void func(struct pt_regs *regs) \ +{ \ + irqentry_state_t state = irqentry_enter(regs); \ + \ + instrumentation_begin(); \ + instr_##func (regs); \ instrumentation_end(); \ irqentry_exit(regs, state); \ } \ \ +void fred_##func(struct pt_regs *regs) \ +{ \ + instr_##func (regs); \ +} \ + \ static __always_inline void __##func(struct pt_regs *regs)/**
@@ -410,15 +445,18 @@ __visible noinstr void func(struct pt_regs *regs, \/* C-Code mapping */ #define DECLARE_IDTENTRY_NMI DECLARE_IDTENTRY_RAW#define DEFINE_IDTENTRY_NMI DEFINE_IDTENTRY_RAW +#define DEFINE_FREDENTRY_NMI DEFINE_FREDENTRY_RAW#ifdef CONFIG_X86_64 #define DECLARE_IDTENTRY_MCE DECLARE_IDTENTRY_IST#define DEFINE_IDTENTRY_MCE DEFINE_IDTENTRY_IST#define DEFINE_IDTENTRY_MCE_USER DEFINE_IDTENTRY_NOIST +#define DEFINE_FREDENTRY_MCE DEFINE_FREDENTRY_RAW#define DECLARE_IDTENTRY_DEBUG DECLARE_IDTENTRY_IST#define DEFINE_IDTENTRY_DEBUG DEFINE_IDTENTRY_IST#define DEFINE_IDTENTRY_DEBUG_USER DEFINE_IDTENTRY_NOIST +#define DEFINE_FREDENTRY_DEBUG DEFINE_FREDENTRY_RAW#endif #else /* !__ASSEMBLY__ */
@@ -655,23 +693,36 @@ DECLARE_IDTENTRY(RESCHEDULE_VECTOR, sysvec_reschedule_ipi);DECLARE_IDTENTRY_SYSVEC (REBOOT_VECTOR , sysvec_reboot);DECLARE_IDTENTRY_SYSVEC (CALL_FUNCTION_SINGLE_VECTOR , sysvec_call_function_single);DECLARE_IDTENTRY_SYSVEC (CALL_FUNCTION_VECTOR , sysvec_call_function); +#else +# define fred_sysvec_reschedule_ipi NULL +# define fred_sysvec_reboot NULL +# define fred_sysvec_call_function_single NULL +# define fred_sysvec_call_function NULL#endif #ifdef CONFIG_X86_LOCAL_APIC # ifdef CONFIG_X86_MCE_THRESHOLD DECLARE_IDTENTRY_SYSVEC (THRESHOLD_APIC_VECTOR , sysvec_threshold); +# else +# define fred_sysvec_threshold NULL# endif # ifdef CONFIG_X86_MCE_AMD DECLARE_IDTENTRY_SYSVEC (DEFERRED_ERROR_VECTOR , sysvec_deferred_error); +# else +# define fred_sysvec_deferred_error NULL# endif # ifdef CONFIG_X86_THERMAL_VECTOR DECLARE_IDTENTRY_SYSVEC (THERMAL_APIC_VECTOR , sysvec_thermal); +# else +# define fred_sysvec_thermal NULL# endif # ifdef CONFIG_IRQ_WORK DECLARE_IDTENTRY_SYSVEC (IRQ_WORK_VECTOR , sysvec_irq_work); +# else +# define fred_sysvec_irq_work NULL# endif #endif
@@ -679,12 +730,16 @@ DECLARE_IDTENTRY_SYSVEC(IRQ_WORK_VECTOR, sysvec_irq_work);DECLARE_IDTENTRY_SYSVEC (POSTED_INTR_VECTOR , sysvec_kvm_posted_intr_ipi);DECLARE_IDTENTRY_SYSVEC (POSTED_INTR_WAKEUP_VECTOR , sysvec_kvm_posted_intr_wakeup_ipi);DECLARE_IDTENTRY_SYSVEC (POSTED_INTR_NESTED_VECTOR , sysvec_kvm_posted_intr_nested_ipi); +#else +# define fred_sysvec_kvm_posted_intr_ipi NULL +# define fred_sysvec_kvm_posted_intr_wakeup_ipi NULL +# define fred_sysvec_kvm_posted_intr_nested_ipi NULL#endif #if IS_ENABLED (CONFIG_HYPERV )DECLARE_IDTENTRY_SYSVEC (HYPERVISOR_CALLBACK_VECTOR , sysvec_hyperv_callback);DECLARE_IDTENTRY_SYSVEC (HYPERV_REENLIGHTENMENT_VECTOR , sysvec_hyperv_reenlightenment); -DECLARE_IDTENTRY_SYSVEC (HYPERV_STIMER0_VECTOR , sysvec_hyperv_stimer0); +DECLARE_IDTENTRY_SYSVEC (HYPERV_STIMER0_VECTOR , sysvec_hyperv_stimer0);#endif #if IS_ENABLED (CONFIG_ACRN_GUEST )
[tip: x86/fred] x86/idtentry: Incorporate definitions/declarations of the FRED entries
In reply to Xin LiThe following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: 2ad2917c6f50c707fc9872f6885807e4133bd882 Gitweb: https://git.kernel.org/tip/2ad2917c6f50c707fc9872f6885807e4133bd882 Author: Xin Li <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:11 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Tue, 30 Jan 2024 18:20:35 +01:00
x86/idtentry: Incorporate definitions/declarations of the FRED entries
FRED and IDT can share most of the definitions and declarations so that in the majority of cases the actual handler implementation is the same.
The differences are the exceptions where FRED stores exception related information on the stack and the sysvec implementations as FRED can handle irqentry/exit() in the dispatcher instead of having it in each handler.
Also add stub defines for vectors which are not used due to Kconfig decisions to spare the ifdeffery in the actual FRED dispatch code.
--- arch/x86/include/asm/idtentry.h | 71 ++++++++++++++++++++++++++++---- 1 file changed, 63 insertions(+), 8 deletions(-)
arch/x86/include/asm/idtentry.h +63 -8
@@ -13,15 +13,18 @@#include <asm/irq_stack.h> +typedef void (*idtentry_t )(struct pt_regs *regs); +/** * DECLARE_IDTENTRY - Declare functions for simple IDT entry points * No error code pushed by hardware * @vector: Vector number (ignored for C) * @func: Function name of the entry point * -* Declares three functions: +* Declares four functions: * - The ASM entry point: asm_##func * - The XEN PV trap entry point: xen_##func (maybe unused) +* - The C handler called from the FRED event dispatcher (maybe unused) * - The C handler called from the ASM entry point * * Note: This is the C variant of DECLARE_IDTENTRY(). As the name says it
@@ -31,6 +34,7 @@#define DECLARE_IDTENTRY (vector, func) \ asmlinkage void asm_##func(void); \ asmlinkage void xen_asm_##func(void); \ + void fred_##func(struct pt_regs *regs); \ __visible void func(struct pt_regs *regs)/**
@@ -138,6 +142,17 @@ static __always_inline void __##func(struct pt_regs *regs, \ __visible noinstr void func(struct pt_regs *regs)/** +* DEFINE_FREDENTRY_RAW - Emit code for raw FRED entry points +* @func: Function name of the entry point +* +* @func is called from the FRED event dispatcher with interrupts disabled. +* +* See @DEFINE_IDTENTRY_RAW for further details. + */ +#define DEFINE_FREDENTRY_RAW (func) \ +noinstr void fred_##func(struct pt_regs *regs) + +/** * DECLARE_IDTENTRY_RAW_ERRORCODE - Declare functions for raw IDT entry points * Error code pushed by hardware * @vector: Vector number (ignored for C)
@@ -233,17 +248,27 @@ static noinline void __##func(struct pt_regs *regs, u32 vector)#define DEFINE_IDTENTRY_SYSVEC (func) \ static void __##func(struct pt_regs *regs); \ \ +static __always_inline void instr_##func(struct pt_regs *regs) \ +{ \ + kvm_set_cpu_l1tf_flush_l1d(); \ + run_sysvec_on_irqstack_cond(__##func, regs); \ +} \ + \ __visible noinstr void func(struct pt_regs *regs) \ { \ irqentry_state_t state = irqentry_enter(regs); \ \ instrumentation_begin(); \ - kvm_set_cpu_l1tf_flush_l1d(); \ - run_sysvec_on_irqstack_cond(__##func, regs); \ + instr_##func (regs); \ instrumentation_end(); \ irqentry_exit(regs, state); \ } \ \ +void fred_##func(struct pt_regs *regs) \ +{ \ + instr_##func (regs); \ +} \ + \ static noinline void __##func(struct pt_regs *regs)/**
@@ -260,19 +285,29 @@ static noinline void __##func(struct pt_regs *regs)#define DEFINE_IDTENTRY_SYSVEC_SIMPLE (func) \ static __always_inline void __##func(struct pt_regs *regs); \ \ -__visible noinstr void func(struct pt_regs *regs) \ +static __always_inline void instr_##func(struct pt_regs *regs) \ { \ - irqentry_state_t state = irqentry_enter(regs); \ - \ - instrumentation_begin(); \ __irq_enter_raw(); \ kvm_set_cpu_l1tf_flush_l1d(); \ __##func (regs); \ __irq_exit_raw(); \ +} \ + \ +__visible noinstr void func(struct pt_regs *regs) \ +{ \ + irqentry_state_t state = irqentry_enter(regs); \ + \ + instrumentation_begin(); \ + instr_##func (regs); \ instrumentation_end(); \ irqentry_exit(regs, state); \ } \ \ +void fred_##func(struct pt_regs *regs) \ +{ \ + instr_##func (regs); \ +} \ + \ static __always_inline void __##func(struct pt_regs *regs)/**
@@ -410,15 +445,18 @@ __visible noinstr void func(struct pt_regs *regs, \/* C-Code mapping */ #define DECLARE_IDTENTRY_NMI DECLARE_IDTENTRY_RAW#define DEFINE_IDTENTRY_NMI DEFINE_IDTENTRY_RAW +#define DEFINE_FREDENTRY_NMI DEFINE_FREDENTRY_RAW#ifdef CONFIG_X86_64 #define DECLARE_IDTENTRY_MCE DECLARE_IDTENTRY_IST#define DEFINE_IDTENTRY_MCE DEFINE_IDTENTRY_IST#define DEFINE_IDTENTRY_MCE_USER DEFINE_IDTENTRY_NOIST +#define DEFINE_FREDENTRY_MCE DEFINE_FREDENTRY_RAW#define DECLARE_IDTENTRY_DEBUG DECLARE_IDTENTRY_IST#define DEFINE_IDTENTRY_DEBUG DEFINE_IDTENTRY_IST#define DEFINE_IDTENTRY_DEBUG_USER DEFINE_IDTENTRY_NOIST +#define DEFINE_FREDENTRY_DEBUG DEFINE_FREDENTRY_RAW#endif #else /* !__ASSEMBLY__ */
@@ -655,23 +693,36 @@ DECLARE_IDTENTRY(RESCHEDULE_VECTOR, sysvec_reschedule_ipi);DECLARE_IDTENTRY_SYSVEC (REBOOT_VECTOR , sysvec_reboot);DECLARE_IDTENTRY_SYSVEC (CALL_FUNCTION_SINGLE_VECTOR , sysvec_call_function_single);DECLARE_IDTENTRY_SYSVEC (CALL_FUNCTION_VECTOR , sysvec_call_function); +#else +# define fred_sysvec_reschedule_ipi NULL +# define fred_sysvec_reboot NULL +# define fred_sysvec_call_function_single NULL +# define fred_sysvec_call_function NULL#endif #ifdef CONFIG_X86_LOCAL_APIC # ifdef CONFIG_X86_MCE_THRESHOLD DECLARE_IDTENTRY_SYSVEC (THRESHOLD_APIC_VECTOR , sysvec_threshold); +# else +# define fred_sysvec_threshold NULL# endif # ifdef CONFIG_X86_MCE_AMD DECLARE_IDTENTRY_SYSVEC (DEFERRED_ERROR_VECTOR , sysvec_deferred_error); +# else +# define fred_sysvec_deferred_error NULL# endif # ifdef CONFIG_X86_THERMAL_VECTOR DECLARE_IDTENTRY_SYSVEC (THERMAL_APIC_VECTOR , sysvec_thermal); +# else +# define fred_sysvec_thermal NULL# endif # ifdef CONFIG_IRQ_WORK DECLARE_IDTENTRY_SYSVEC (IRQ_WORK_VECTOR , sysvec_irq_work); +# else +# define fred_sysvec_irq_work NULL# endif #endif
@@ -679,12 +730,16 @@ DECLARE_IDTENTRY_SYSVEC(IRQ_WORK_VECTOR, sysvec_irq_work);DECLARE_IDTENTRY_SYSVEC (POSTED_INTR_VECTOR , sysvec_kvm_posted_intr_ipi);DECLARE_IDTENTRY_SYSVEC (POSTED_INTR_WAKEUP_VECTOR , sysvec_kvm_posted_intr_wakeup_ipi);DECLARE_IDTENTRY_SYSVEC (POSTED_INTR_NESTED_VECTOR , sysvec_kvm_posted_intr_nested_ipi); +#else +# define fred_sysvec_kvm_posted_intr_ipi NULL +# define fred_sysvec_kvm_posted_intr_wakeup_ipi NULL +# define fred_sysvec_kvm_posted_intr_nested_ipi NULL#endif #if IS_ENABLED (CONFIG_HYPERV )DECLARE_IDTENTRY_SYSVEC (HYPERVISOR_CALLBACK_VECTOR , sysvec_hyperv_callback);DECLARE_IDTENTRY_SYSVEC (HYPERV_REENLIGHTENMENT_VECTOR , sysvec_hyperv_reenlightenment); -DECLARE_IDTENTRY_SYSVEC (HYPERV_STIMER0_VECTOR , sysvec_hyperv_stimer0); +DECLARE_IDTENTRY_SYSVEC (HYPERV_STIMER0_VECTOR , sysvec_hyperv_stimer0);#endif #if IS_ENABLED (CONFIG_ACRN_GUEST )
[tip: x86/fred] x86/idtentry: Incorporate definitions/declarations of the FRED entries
In reply to Xin LiThe following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: 90f357208200a941e90e75757123326684d715d0 Gitweb: https://git.kernel.org/tip/90f357208200a941e90e75757123326684d715d0 Author: Xin Li <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:11 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Wed, 31 Jan 2024 22:02:10 +01:00
x86/idtentry: Incorporate definitions/declarations of the FRED entries
FRED and IDT can share most of the definitions and declarations so that in the majority of cases the actual handler implementation is the same.
The differences are the exceptions where FRED stores exception related information on the stack and the sysvec implementations as FRED can handle irqentry/exit() in the dispatcher instead of having it in each handler.
Also add stub defines for vectors which are not used due to Kconfig decisions to spare the ifdeffery in the actual FRED dispatch code.
--- arch/x86/include/asm/idtentry.h | 71 ++++++++++++++++++++++++++++---- 1 file changed, 63 insertions(+), 8 deletions(-)
arch/x86/include/asm/idtentry.h +63 -8
@@ -13,15 +13,18 @@#include <asm/irq_stack.h> +typedef void (*idtentry_t )(struct pt_regs *regs); +/** * DECLARE_IDTENTRY - Declare functions for simple IDT entry points * No error code pushed by hardware * @vector: Vector number (ignored for C) * @func: Function name of the entry point * -* Declares three functions: +* Declares four functions: * - The ASM entry point: asm_##func * - The XEN PV trap entry point: xen_##func (maybe unused) +* - The C handler called from the FRED event dispatcher (maybe unused) * - The C handler called from the ASM entry point * * Note: This is the C variant of DECLARE_IDTENTRY(). As the name says it
@@ -31,6 +34,7 @@#define DECLARE_IDTENTRY (vector, func) \ asmlinkage void asm_##func(void); \ asmlinkage void xen_asm_##func(void); \ + void fred_##func(struct pt_regs *regs); \ __visible void func(struct pt_regs *regs)/**
@@ -138,6 +142,17 @@ static __always_inline void __##func(struct pt_regs *regs, \ __visible noinstr void func(struct pt_regs *regs)/** +* DEFINE_FREDENTRY_RAW - Emit code for raw FRED entry points +* @func: Function name of the entry point +* +* @func is called from the FRED event dispatcher with interrupts disabled. +* +* See @DEFINE_IDTENTRY_RAW for further details. + */ +#define DEFINE_FREDENTRY_RAW (func) \ +noinstr void fred_##func(struct pt_regs *regs) + +/** * DECLARE_IDTENTRY_RAW_ERRORCODE - Declare functions for raw IDT entry points * Error code pushed by hardware * @vector: Vector number (ignored for C)
@@ -233,17 +248,27 @@ static noinline void __##func(struct pt_regs *regs, u32 vector)#define DEFINE_IDTENTRY_SYSVEC (func) \ static void __##func(struct pt_regs *regs); \ \ +static __always_inline void instr_##func(struct pt_regs *regs) \ +{ \ + kvm_set_cpu_l1tf_flush_l1d(); \ + run_sysvec_on_irqstack_cond(__##func, regs); \ +} \ + \ __visible noinstr void func(struct pt_regs *regs) \ { \ irqentry_state_t state = irqentry_enter(regs); \ \ instrumentation_begin(); \ - kvm_set_cpu_l1tf_flush_l1d(); \ - run_sysvec_on_irqstack_cond(__##func, regs); \ + instr_##func (regs); \ instrumentation_end(); \ irqentry_exit(regs, state); \ } \ \ +void fred_##func(struct pt_regs *regs) \ +{ \ + instr_##func (regs); \ +} \ + \ static noinline void __##func(struct pt_regs *regs)/**
@@ -260,19 +285,29 @@ static noinline void __##func(struct pt_regs *regs)#define DEFINE_IDTENTRY_SYSVEC_SIMPLE (func) \ static __always_inline void __##func(struct pt_regs *regs); \ \ -__visible noinstr void func(struct pt_regs *regs) \ +static __always_inline void instr_##func(struct pt_regs *regs) \ { \ - irqentry_state_t state = irqentry_enter(regs); \ - \ - instrumentation_begin(); \ __irq_enter_raw(); \ kvm_set_cpu_l1tf_flush_l1d(); \ __##func (regs); \ __irq_exit_raw(); \ +} \ + \ +__visible noinstr void func(struct pt_regs *regs) \ +{ \ + irqentry_state_t state = irqentry_enter(regs); \ + \ + instrumentation_begin(); \ + instr_##func (regs); \ instrumentation_end(); \ irqentry_exit(regs, state); \ } \ \ +void fred_##func(struct pt_regs *regs) \ +{ \ + instr_##func (regs); \ +} \ + \ static __always_inline void __##func(struct pt_regs *regs)/**
@@ -410,15 +445,18 @@ __visible noinstr void func(struct pt_regs *regs, \/* C-Code mapping */ #define DECLARE_IDTENTRY_NMI DECLARE_IDTENTRY_RAW#define DEFINE_IDTENTRY_NMI DEFINE_IDTENTRY_RAW +#define DEFINE_FREDENTRY_NMI DEFINE_FREDENTRY_RAW#ifdef CONFIG_X86_64 #define DECLARE_IDTENTRY_MCE DECLARE_IDTENTRY_IST#define DEFINE_IDTENTRY_MCE DEFINE_IDTENTRY_IST#define DEFINE_IDTENTRY_MCE_USER DEFINE_IDTENTRY_NOIST +#define DEFINE_FREDENTRY_MCE DEFINE_FREDENTRY_RAW#define DECLARE_IDTENTRY_DEBUG DECLARE_IDTENTRY_IST#define DEFINE_IDTENTRY_DEBUG DEFINE_IDTENTRY_IST#define DEFINE_IDTENTRY_DEBUG_USER DEFINE_IDTENTRY_NOIST +#define DEFINE_FREDENTRY_DEBUG DEFINE_FREDENTRY_RAW#endif #else /* !__ASSEMBLY__ */
@@ -655,23 +693,36 @@ DECLARE_IDTENTRY(RESCHEDULE_VECTOR, sysvec_reschedule_ipi);DECLARE_IDTENTRY_SYSVEC (REBOOT_VECTOR , sysvec_reboot);DECLARE_IDTENTRY_SYSVEC (CALL_FUNCTION_SINGLE_VECTOR , sysvec_call_function_single);DECLARE_IDTENTRY_SYSVEC (CALL_FUNCTION_VECTOR , sysvec_call_function); +#else +# define fred_sysvec_reschedule_ipi NULL +# define fred_sysvec_reboot NULL +# define fred_sysvec_call_function_single NULL +# define fred_sysvec_call_function NULL#endif #ifdef CONFIG_X86_LOCAL_APIC # ifdef CONFIG_X86_MCE_THRESHOLD DECLARE_IDTENTRY_SYSVEC (THRESHOLD_APIC_VECTOR , sysvec_threshold); +# else +# define fred_sysvec_threshold NULL# endif # ifdef CONFIG_X86_MCE_AMD DECLARE_IDTENTRY_SYSVEC (DEFERRED_ERROR_VECTOR , sysvec_deferred_error); +# else +# define fred_sysvec_deferred_error NULL# endif # ifdef CONFIG_X86_THERMAL_VECTOR DECLARE_IDTENTRY_SYSVEC (THERMAL_APIC_VECTOR , sysvec_thermal); +# else +# define fred_sysvec_thermal NULL# endif # ifdef CONFIG_IRQ_WORK DECLARE_IDTENTRY_SYSVEC (IRQ_WORK_VECTOR , sysvec_irq_work); +# else +# define fred_sysvec_irq_work NULL# endif #endif
@@ -679,12 +730,16 @@ DECLARE_IDTENTRY_SYSVEC(IRQ_WORK_VECTOR, sysvec_irq_work);DECLARE_IDTENTRY_SYSVEC (POSTED_INTR_VECTOR , sysvec_kvm_posted_intr_ipi);DECLARE_IDTENTRY_SYSVEC (POSTED_INTR_WAKEUP_VECTOR , sysvec_kvm_posted_intr_wakeup_ipi);DECLARE_IDTENTRY_SYSVEC (POSTED_INTR_NESTED_VECTOR , sysvec_kvm_posted_intr_nested_ipi); +#else +# define fred_sysvec_kvm_posted_intr_ipi NULL +# define fred_sysvec_kvm_posted_intr_wakeup_ipi NULL +# define fred_sysvec_kvm_posted_intr_nested_ipi NULL#endif #if IS_ENABLED (CONFIG_HYPERV )DECLARE_IDTENTRY_SYSVEC (HYPERVISOR_CALLBACK_VECTOR , sysvec_hyperv_callback);DECLARE_IDTENTRY_SYSVEC (HYPERV_REENLIGHTENMENT_VECTOR , sysvec_hyperv_reenlightenment); -DECLARE_IDTENTRY_SYSVEC (HYPERV_STIMER0_VECTOR , sysvec_hyperv_stimer0); +DECLARE_IDTENTRY_SYSVEC (HYPERV_STIMER0_VECTOR , sysvec_hyperv_stimer0);#endif #if IS_ENABLED (CONFIG_ACRN_GUEST )
PATCH v13 23/35 x86/fred: Add a debug fault entry stub for FRED
In reply to Xin LiFrom: "H. Peter Anvin (Intel)" <[email protected]>
When occurred on different ring level, i.e., from user or kernel context, #DB needs to be handled on different stack: User #DB on current task stack, while kernel #DB on a dedicated stack. This is exactly how FRED event delivery invokes an exception handler: ring 3 event on level 0 stack, i.e., current task stack; ring 0 event on the #DB dedicated stack specified in the IA32_FRED_STKLVLS MSR. So unlike IDT, the FRED debug exception entry stub doesn't do stack switch.
On a FRED system, the debug trap status information (DR6) is passed on the stack, to avoid the problem of transient state. Furthermore, FRED transitions avoid a lot of ugly corner cases the handling of which can, and should be, skipped.
The FRED debug trap status information saved on the stack differs from DR6 in both stickiness and polarity; it is exactly in the format which debug_read_clear_dr6() returns for the IDT entry points.
---
Changes since v9:
* Disable #DB to avoid endless recursion and stack overflow when a watchpoint/breakpoint is set in the code path which is executed by #DB handler (Thomas Gleixner).
Changes since v1:
* call irqentry_nmi_{enter,exit}() in both IDT and FRED debug fault kernel handler (Peter Zijlstra).
--- arch/x86/kernel/traps.c | 43 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 5 deletions(-)
arch/x86/kernel/traps.c +38 -5
@@ -50,6 +50,7 @@#include <asm/ftrace.h> #include <asm/traps.h> #include <asm/desc.h> +#include <asm/fred.h> #include <asm/fpu/api.h> #include <asm/cpu.h> #include <asm/cpu_entry_area.h>
@@ -934,8 +935,7 @@ static bool notify_debug(struct pt_regs *regs, unsigned long *dr6)return false; } -static __always_inline void exc_debug_kernel(struct pt_regs *regs, -unsigned long dr6) +static noinstr void exc_debug_kernel(struct pt_regs *regs, unsigned long dr6) {/* * Disable breakpoints during exception handling; recursive exceptions
@@ -947,6 +947,11 @@ static __always_inline void exc_debug_kernel(struct pt_regs *regs,* * Entry text is excluded for HW_BP_X and cpu_entry_area, which * includes the entry stack is excluded for everything. +* +* For FRED, nested #DB should just work fine. But when a watchpoint or +* breakpoint is set in the code path which is executed by #DB handler, +* it results in an endless recursion and stack overflow. Thus we stay +* with the IDT approach, i.e., save DR7 and disable #DB. */ unsigned long dr7 =local_db_save ();irqentry_state_t irq_state =irqentry_nmi_enter (regs);
@@ -976,7 +981,8 @@ static __always_inline void exc_debug_kernel(struct pt_regs *regs,* Catch SYSENTER with TF set and clear DR_STEP. If this hit a * watchpoint at the same time then that will still be handled. */ -if ((dr6 &DR_STEP ) &&is_sysenter_singlestep (regs)) +if (!cpu_feature_enabled (X86_FEATURE_FRED ) && + (dr6 &DR_STEP ) &&is_sysenter_singlestep (regs)) dr6 &= ~DR_STEP ;/*
@@ -1008,8 +1014,7 @@ static __always_inline void exc_debug_kernel(struct pt_regs *regs,local_db_restore (dr7); } -static __always_inline void exc_debug_user(struct pt_regs *regs, -unsigned long dr6) +static noinstr void exc_debug_user(struct pt_regs *regs, unsigned long dr6) {bool icebp;
@@ -1093,6 +1098,34 @@ DEFINE_IDTENTRY_DEBUG_USER(exc_debug) {exc_debug_user (regs,debug_read_clear_dr6 ()); } + +#ifdef CONFIG_X86_FRED +/* +* When occurred on different ring level, i.e., from user or kernel +* context, #DB needs to be handled on different stack: User #DB on +* current task stack, while kernel #DB on a dedicated stack. +* +* This is exactly how FRED event delivery invokes an exception +* handler: ring 3 event on level 0 stack, i.e., current task stack; +* ring 0 event on the #DB dedicated stack specified in the +* IA32_FRED_STKLVLS MSR. So unlike IDT, the FRED debug exception +* entry stub doesn't do stack switch. +*/ +DEFINE_FREDENTRY_DEBUG (exc_debug) +{ +/* +* FRED #DB stores DR6 on the stack in the format which +* debug_read_clear_dr6() returns for the IDT entry points. +*/ +unsigned long dr6 =fred_event_data (regs); + +if (user_mode (regs)) +exc_debug_user (regs, dr6); +else +exc_debug_kernel (regs, dr6); +} +#endif /* CONFIG_X86_FRED */ +#else /* 32 bit does not have separate entry points. */ DEFINE_IDTENTRY_RAW (exc_debug)
Signature · 1 line
2.43.0
[tip: x86/fred] x86/fred: Add a debug fault entry stub for FRED
The following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: cae371b3f6ab203fda6faeb3de5a04481ebb85d3 Gitweb: https://git.kernel.org/tip/cae371b3f6ab203fda6faeb3de5a04481ebb85d3 Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:12 -08:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 25 Jan 2024 19:10:32 +01:00
x86/fred: Add a debug fault entry stub for FRED
When occurred on different ring level, i.e., from user or kernel context, #DB needs to be handled on different stack: User #DB on current task stack, while kernel #DB on a dedicated stack. This is exactly how FRED event delivery invokes an exception handler: ring 3 event on level 0 stack, i.e., current task stack; ring 0 event on the #DB dedicated stack specified in the IA32_FRED_STKLVLS MSR. So unlike IDT, the FRED debug exception entry stub doesn't do stack switch.
On a FRED system, the debug trap status information (DR6) is passed on the stack, to avoid the problem of transient state. Furthermore, FRED transitions avoid a lot of ugly corner cases the handling of which can, and should be, skipped.
The FRED debug trap status information saved on the stack differs from DR6 in both stickiness and polarity; it is exactly in the format which debug_read_clear_dr6() returns for the IDT entry points.
--- arch/x86/kernel/traps.c | 43 +++++++++++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 5 deletions(-)
arch/x86/kernel/traps.c +38 -5
@@ -51,6 +51,7 @@#include <asm/ftrace.h> #include <asm/traps.h> #include <asm/desc.h> +#include <asm/fred.h> #include <asm/fpu/api.h> #include <asm/cpu.h> #include <asm/cpu_entry_area.h>
@@ -935,8 +936,7 @@ static bool notify_debug(struct pt_regs *regs, unsigned long *dr6)return false; } -static __always_inline void exc_debug_kernel(struct pt_regs *regs, -unsigned long dr6) +static noinstr void exc_debug_kernel(struct pt_regs *regs, unsigned long dr6) {/* * Disable breakpoints during exception handling; recursive exceptions
@@ -948,6 +948,11 @@ static __always_inline void exc_debug_kernel(struct pt_regs *regs,* * Entry text is excluded for HW_BP_X and cpu_entry_area, which * includes the entry stack is excluded for everything. +* +* For FRED, nested #DB should just work fine. But when a watchpoint or +* breakpoint is set in the code path which is executed by #DB handler, +* it results in an endless recursion and stack overflow. Thus we stay +* with the IDT approach, i.e., save DR7 and disable #DB. */ unsigned long dr7 =local_db_save ();irqentry_state_t irq_state =irqentry_nmi_enter (regs);
@@ -977,7 +982,8 @@ static __always_inline void exc_debug_kernel(struct pt_regs *regs,* Catch SYSENTER with TF set and clear DR_STEP. If this hit a * watchpoint at the same time then that will still be handled. */ -if ((dr6 &DR_STEP ) &&is_sysenter_singlestep (regs)) +if (!cpu_feature_enabled (X86_FEATURE_FRED ) && + (dr6 &DR_STEP ) &&is_sysenter_singlestep (regs)) dr6 &= ~DR_STEP ;/*
@@ -1009,8 +1015,7 @@ out:local_db_restore (dr7); } -static __always_inline void exc_debug_user(struct pt_regs *regs, -unsigned long dr6) +static noinstr void exc_debug_user(struct pt_regs *regs, unsigned long dr6) {bool icebp;
@@ -1094,6 +1099,34 @@ DEFINE_IDTENTRY_DEBUG_USER(exc_debug) {exc_debug_user (regs,debug_read_clear_dr6 ()); } + +#ifdef CONFIG_X86_FRED +/* +* When occurred on different ring level, i.e., from user or kernel +* context, #DB needs to be handled on different stack: User #DB on +* current task stack, while kernel #DB on a dedicated stack. +* +* This is exactly how FRED event delivery invokes an exception +* handler: ring 3 event on level 0 stack, i.e., current task stack; +* ring 0 event on the #DB dedicated stack specified in the +* IA32_FRED_STKLVLS MSR. So unlike IDT, the FRED debug exception +* entry stub doesn't do stack switch. +*/ +DEFINE_FREDENTRY_DEBUG (exc_debug) +{ +/* +* FRED #DB stores DR6 on the stack in the format which +* debug_read_clear_dr6() returns for the IDT entry points. +*/ +unsigned long dr6 =fred_event_data (regs); + +if (user_mode (regs)) +exc_debug_user (regs, dr6); +else +exc_debug_kernel (regs, dr6); +} +#endif /* CONFIG_X86_FRED */ +#else /* 32 bit does not have separate entry points. */ DEFINE_IDTENTRY_RAW (exc_debug)
[tip: x86/fred] x86/fred: Add a debug fault entry stub for FRED
In reply to Xin LiThe following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: 4af12f6a393ca2be76de6c5484f79acc1167e1c8 Gitweb: https://git.kernel.org/tip/4af12f6a393ca2be76de6c5484f79acc1167e1c8 Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:12 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Tue, 30 Jan 2024 18:20:35 +01:00
x86/fred: Add a debug fault entry stub for FRED
When occurred on different ring level, i.e., from user or kernel context, #DB needs to be handled on different stack: User #DB on current task stack, while kernel #DB on a dedicated stack. This is exactly how FRED event delivery invokes an exception handler: ring 3 event on level 0 stack, i.e., current task stack; ring 0 event on the #DB dedicated stack specified in the IA32_FRED_STKLVLS MSR. So unlike IDT, the FRED debug exception entry stub doesn't do stack switch.
On a FRED system, the debug trap status information (DR6) is passed on the stack, to avoid the problem of transient state. Furthermore, FRED transitions avoid a lot of ugly corner cases the handling of which can, and should be, skipped.
The FRED debug trap status information saved on the stack differs from DR6 in both stickiness and polarity; it is exactly in the format which debug_read_clear_dr6() returns for the IDT entry points.
--- arch/x86/kernel/traps.c | 43 +++++++++++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 5 deletions(-)
arch/x86/kernel/traps.c +38 -5
@@ -51,6 +51,7 @@#include <asm/ftrace.h> #include <asm/traps.h> #include <asm/desc.h> +#include <asm/fred.h> #include <asm/fpu/api.h> #include <asm/cpu.h> #include <asm/cpu_entry_area.h>
@@ -935,8 +936,7 @@ static bool notify_debug(struct pt_regs *regs, unsigned long *dr6)return false; } -static __always_inline void exc_debug_kernel(struct pt_regs *regs, -unsigned long dr6) +static noinstr void exc_debug_kernel(struct pt_regs *regs, unsigned long dr6) {/* * Disable breakpoints during exception handling; recursive exceptions
@@ -948,6 +948,11 @@ static __always_inline void exc_debug_kernel(struct pt_regs *regs,* * Entry text is excluded for HW_BP_X and cpu_entry_area, which * includes the entry stack is excluded for everything. +* +* For FRED, nested #DB should just work fine. But when a watchpoint or +* breakpoint is set in the code path which is executed by #DB handler, +* it results in an endless recursion and stack overflow. Thus we stay +* with the IDT approach, i.e., save DR7 and disable #DB. */ unsigned long dr7 =local_db_save ();irqentry_state_t irq_state =irqentry_nmi_enter (regs);
@@ -977,7 +982,8 @@ static __always_inline void exc_debug_kernel(struct pt_regs *regs,* Catch SYSENTER with TF set and clear DR_STEP. If this hit a * watchpoint at the same time then that will still be handled. */ -if ((dr6 &DR_STEP ) &&is_sysenter_singlestep (regs)) +if (!cpu_feature_enabled (X86_FEATURE_FRED ) && + (dr6 &DR_STEP ) &&is_sysenter_singlestep (regs)) dr6 &= ~DR_STEP ;/*
@@ -1009,8 +1015,7 @@ out:local_db_restore (dr7); } -static __always_inline void exc_debug_user(struct pt_regs *regs, -unsigned long dr6) +static noinstr void exc_debug_user(struct pt_regs *regs, unsigned long dr6) {bool icebp;
@@ -1094,6 +1099,34 @@ DEFINE_IDTENTRY_DEBUG_USER(exc_debug) {exc_debug_user (regs,debug_read_clear_dr6 ()); } + +#ifdef CONFIG_X86_FRED +/* +* When occurred on different ring level, i.e., from user or kernel +* context, #DB needs to be handled on different stack: User #DB on +* current task stack, while kernel #DB on a dedicated stack. +* +* This is exactly how FRED event delivery invokes an exception +* handler: ring 3 event on level 0 stack, i.e., current task stack; +* ring 0 event on the #DB dedicated stack specified in the +* IA32_FRED_STKLVLS MSR. So unlike IDT, the FRED debug exception +* entry stub doesn't do stack switch. +*/ +DEFINE_FREDENTRY_DEBUG (exc_debug) +{ +/* +* FRED #DB stores DR6 on the stack in the format which +* debug_read_clear_dr6() returns for the IDT entry points. +*/ +unsigned long dr6 =fred_event_data (regs); + +if (user_mode (regs)) +exc_debug_user (regs, dr6); +else +exc_debug_kernel (regs, dr6); +} +#endif /* CONFIG_X86_FRED */ +#else /* 32 bit does not have separate entry points. */ DEFINE_IDTENTRY_RAW (exc_debug)
[tip: x86/fred] x86/fred: Add a debug fault entry stub for FRED
In reply to Xin LiThe following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: 99fcc968e7c4b117c91f7d03c302d860b74b947b Gitweb: https://git.kernel.org/tip/99fcc968e7c4b117c91f7d03c302d860b74b947b Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:12 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Wed, 31 Jan 2024 22:02:15 +01:00
x86/fred: Add a debug fault entry stub for FRED
When occurred on different ring level, i.e., from user or kernel context, stack, while kernel #DB on a dedicated stack. This is exactly how FRED event delivery invokes an exception handler: ring 3 event on level 0 stack, i.e., current task stack; ring 0 event on the #DB dedicated stack specified in the IA32_FRED_STKLVLS MSR. So unlike IDT, the FRED debug exception entry stub doesn't do stack switch.
On a FRED system, the debug trap status information (DR6) is passed on the stack, to avoid the problem of transient state. Furthermore, FRED transitions avoid a lot of ugly corner cases the handling of which can, and should be, skipped.
The FRED debug trap status information saved on the stack differs from DR6 in both stickiness and polarity; it is exactly in the format which debug_read_clear_dr6() returns for the IDT entry points.
--- arch/x86/kernel/traps.c | 43 +++++++++++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 5 deletions(-)
arch/x86/kernel/traps.c +38 -5
@@ -51,6 +51,7 @@#include <asm/ftrace.h> #include <asm/traps.h> #include <asm/desc.h> +#include <asm/fred.h> #include <asm/fpu/api.h> #include <asm/cpu.h> #include <asm/cpu_entry_area.h>
@@ -935,8 +936,7 @@ static bool notify_debug(struct pt_regs *regs, unsigned long *dr6)return false; } -static __always_inline void exc_debug_kernel(struct pt_regs *regs, -unsigned long dr6) +static noinstr void exc_debug_kernel(struct pt_regs *regs, unsigned long dr6) {/* * Disable breakpoints during exception handling; recursive exceptions
@@ -948,6 +948,11 @@ static __always_inline void exc_debug_kernel(struct pt_regs *regs,* * Entry text is excluded for HW_BP_X and cpu_entry_area, which * includes the entry stack is excluded for everything. +* +* For FRED, nested #DB should just work fine. But when a watchpoint or +* breakpoint is set in the code path which is executed by #DB handler, +* it results in an endless recursion and stack overflow. Thus we stay +* with the IDT approach, i.e., save DR7 and disable #DB. */ unsigned long dr7 =local_db_save ();irqentry_state_t irq_state =irqentry_nmi_enter (regs);
@@ -977,7 +982,8 @@ static __always_inline void exc_debug_kernel(struct pt_regs *regs,* Catch SYSENTER with TF set and clear DR_STEP. If this hit a * watchpoint at the same time then that will still be handled. */ -if ((dr6 &DR_STEP ) &&is_sysenter_singlestep (regs)) +if (!cpu_feature_enabled (X86_FEATURE_FRED ) && + (dr6 &DR_STEP ) &&is_sysenter_singlestep (regs)) dr6 &= ~DR_STEP ;/*
@@ -1009,8 +1015,7 @@ out:local_db_restore (dr7); } -static __always_inline void exc_debug_user(struct pt_regs *regs, -unsigned long dr6) +static noinstr void exc_debug_user(struct pt_regs *regs, unsigned long dr6) {bool icebp;
@@ -1094,6 +1099,34 @@ DEFINE_IDTENTRY_DEBUG_USER(exc_debug) {exc_debug_user (regs,debug_read_clear_dr6 ()); } + +#ifdef CONFIG_X86_FRED +/* +* When occurred on different ring level, i.e., from user or kernel +* context, #DB needs to be handled on different stack: User #DB on +* current task stack, while kernel #DB on a dedicated stack. +* +* This is exactly how FRED event delivery invokes an exception +* handler: ring 3 event on level 0 stack, i.e., current task stack; +* ring 0 event on the #DB dedicated stack specified in the +* IA32_FRED_STKLVLS MSR. So unlike IDT, the FRED debug exception +* entry stub doesn't do stack switch. +*/ +DEFINE_FREDENTRY_DEBUG (exc_debug) +{ +/* +* FRED #DB stores DR6 on the stack in the format which +* debug_read_clear_dr6() returns for the IDT entry points. +*/ +unsigned long dr6 =fred_event_data (regs); + +if (user_mode (regs)) +exc_debug_user (regs, dr6); +else +exc_debug_kernel (regs, dr6); +} +#endif /* CONFIG_X86_FRED */ +#else /* 32 bit does not have separate entry points. */ DEFINE_IDTENTRY_RAW (exc_debug)
PATCH v13 24/35 x86/fred: Add a NMI entry stub for FRED
In reply to Xin LiFrom: "H. Peter Anvin (Intel)" <[email protected]>
On a FRED system, NMIs nest both with themselves and faults, transient information is saved into the stack frame, and NMI unblocking only happens when the stack frame indicates that so should happen.
Thus, the NMI entry stub for FRED is really quite small...
--- arch/x86/kernel/nmi.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)
arch/x86/kernel/nmi.c +28 -0
@@ -35,6 +35,7 @@#include <asm/nospec-branch.h> #include <asm/microcode.h> #include <asm/sev.h> +#include <asm/fred.h> #define CREATE_TRACE_POINTS #include <trace/events/nmi.h>
@@ -651,6 +652,33 @@ void nmi_backtrace_stall_check(const struct cpumask *btp)#endif +#ifdef CONFIG_X86_FRED +/* +* With FRED, CR2/DR6 is pushed to #PF/#DB stack frame during FRED +* event delivery, i.e., there is no problem of transient states. +* And NMI unblocking only happens when the stack frame indicates +* that so should happen. +* +* Thus, the NMI entry stub for FRED is really straightforward and +* as simple as most exception handlers. As such, #DB is allowed +* during NMI handling. +*/ +DEFINE_FREDENTRY_NMI (exc_nmi) +{ +irqentry_state_t irq_state; + +if (IS_ENABLED (CONFIG_SMP ) &&arch_cpu_is_offline (smp_processor_id ())) +return ; + + irq_state =irqentry_nmi_enter (regs); + +inc_irq_stat (__nmi_count); +default_do_nmi (regs); + +irqentry_nmi_exit (regs, irq_state); +} +#endif +void stop_nmi (void ) { ignore_nmis++;
Signature · 1 line
2.43.0
H. Peter Anvin
maintainerRe: [PATCH v13 24/35] x86/fred: Add a NMI entry stub for FRED
So we have recently discovered an overlooked interaction with VT-x. Immediately before VMENTER and after VMEXIT, CR2 is live with the *guest* CR2. Regardless of if the guest uses FRED or not, this is guest state and SHOULD NOT be corrupted. Furthermore, host state MUST NOT leak into the guest.
NMIs are blocked on VMEXIT if the cause was an NMI, but not for other reasons, so a NMI coming in during this window that then #PFs could corrupt the guest CR2.
Intel is exploring ways to close this hole, but for schedule reasons, it will not be available at the same time as the first implementation of FRED. Therefore, as a workaround, it turns out that the FRED NMI stub *will*, unfortunately, have to save and restore CR2 after all when (at least) Intel KVM is in use.
Note that this is airtight: it does add a performance penalty to the NMI path (two read CR2 in the common case of no #PF), but there is no gap during which a bad CR2 value could be introduced in the guest, no matter in which sequence the events happen.
In theory the performance penalty could be further reduced by conditionalizing this on the NMI happening in the critical region in the KVM code, but it seems to be pretty far from necessary to me.
This obviously was an unfortunate oversight on our part, but the workaround is simple and doesn't affect any non-NMI paths.
-hpa
arch/x86/kernel/nmi.c void nmi_backtrace_stall_check(const struct cpumask *btp) · line 672
Quoted 4 lines · Xin Li
arch/x86/kernel/nmi.c +4
-0+ +if (IS_ENABLED (CONFIG_SMP ) &&arch_cpu_is_offline (smp_processor_id ())) +return ; +
This is cut & paste from elsewhere in the NMI code, but I believe the IS_ENABLED() is unnecessary (not to mention ugly): smp_processor_id() should always return zero on UP, and arch_cpu_is_offline() reduces to !(cpu == 0), so this is a statically true condition on UP.
-hpa
RE: [PATCH v13 24/35] x86/fred: Add a NMI entry stub for FRED
Quoted 9 lines
So we have recently discovered an overlooked interaction with VT-x. Immediately before VMENTER and after VMEXIT, CR2 is live with the *guest* CR2. Regardless of if the guest uses FRED or not, this is guest state and SHOULD NOT be corrupted. Furthermore, host state MUST NOT leak into the guest.
NMIs are blocked on VMEXIT if the cause was an NMI, but not for other reasons, so a NMI coming in during this window that then #PFs could corrupt the guest CR2.
I add a comment to vmx_vcpu_enter_exit() in
https://lore.kernel.org/kvm/[email protected]/T/#m29616c02befc04305085b1cbac64df916364626a
for this.
Quoted 7 lines
Intel is exploring ways to close this hole, but for schedule reasons, it will not be available at the same time as the first implementation of FRED. Therefore, as a workaround, it turns out that the FRED NMI stub *will*, unfortunately, have to save and restore CR2 after all when (at least) Intel KVM is in use.
Quoted 8 lines
Note that this is airtight: it does add a performance penalty to the NMI path (two read CR2 in the common case of no #PF), but there is no gap during which a bad CR2 value could be introduced in the guest, no matter in which sequence the events happen.
In theory the performance penalty could be further reduced by conditionalizing this on the NMI happening in the critical region in the KVM code, but it seems to be pretty far from necessary to me.
We should keep the following code in the FRED NMI handler, right?
{
...
this_cpu_write(nmi_cr2, read_cr2()); ... if (unlikely(this_cpu_read(nmi_cr2) != read_cr2())) write_cr2(this_cpu_read(nmi_cr2));
...
}
Quoted 6 lines
This obviously was an unfortunate oversight on our part, but the workaround is simple and doesn't affect any non-NMI paths.
Review
Quoted 2 lines
(quoted diff) +2
-0+ + if (IS_ENABLED(CONFIG_SMP) &&arch_cpu_is_offline(smp_processor_id()))
Quoted 7 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+ return; +This is cut & paste from elsewhere in the NMI code, but I believe the
IS_ENABLED()is unnecessary (not to mention ugly):smp_processor_id()should always return zero on UP, andarch_cpu_is_offline()reduces to !(cpu == 0), so this is a statically true condition on UP.
Ah, good point!
PATCH v13 24/35 x86/fred: Add a NMI entry stub for FRED
From: "H. Peter Anvin (Intel)" <[email protected]>
On a FRED system, NMIs nest both with themselves and faults, transient information is saved into the stack frame, and NMI unblocking only happens when the stack frame indicates that so should happen.
Thus, the NMI entry stub for FRED is really quite small...
---
Changes since v13:
* Save and restore %cr2 upon entering and leaving the FRED NMI handler (H. Peter Anvin).
* Remove an unnecessary check "IS_ENABLED(CONFIG_SMP)" (H. Peter Anvin).
* Sync a microcode change to the IDT NMI handler from 8f849ff63bcbc to the FRED NMI handler.
--- arch/x86/kernel/nmi.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+)
arch/x86/kernel/nmi.c +36 -0
@@ -35,6 +35,7 @@#include <asm/nospec-branch.h> #include <asm/microcode.h> #include <asm/sev.h> +#include <asm/fred.h> #define CREATE_TRACE_POINTS #include <trace/events/nmi.h>
@@ -651,6 +652,41 @@ void nmi_backtrace_stall_check(const struct cpumask *btp)#endif +#ifdef CONFIG_X86_FRED +/* +* With FRED, CR2/DR6 is pushed to #PF/#DB stack frame during FRED +* event delivery, i.e., there is no problem of transient states. +* And NMI unblocking only happens when the stack frame indicates +* that so should happen. +* +* Thus, the NMI entry stub for FRED is really straightforward and +* as simple as most exception handlers. As such, #DB is allowed +* during NMI handling. +*/ +DEFINE_FREDENTRY_NMI (exc_nmi) +{ +irqentry_state_t irq_state; + +if (arch_cpu_is_offline (smp_processor_id ())) { +if (microcode_nmi_handler_enabled ()) +microcode_offline_nmi_handler (); +return ; + } + +this_cpu_write (nmi_cr2,read_cr2 ()); + + irq_state =irqentry_nmi_enter (regs); + +inc_irq_stat (__nmi_count); +default_do_nmi (regs); + +irqentry_nmi_exit (regs, irq_state); + +if (unlikely (this_cpu_read (nmi_cr2) !=read_cr2 ())) +write_cr2 (this_cpu_read (nmi_cr2)); +} +#endif +void stop_nmi (void ) { ignore_nmis++;
Signature · 1 line
2.43.0
[tip: x86/fred] x86/fred: Add a NMI entry stub for FRED
The following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: 994f75798425ca0865b54dcc7bbe13bba5e4cfe4 Gitweb: https://git.kernel.org/tip/994f75798425ca0865b54dcc7bbe13bba5e4cfe4 Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Fri, 15 Dec 2023 22:31:39 -08:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 25 Jan 2024 19:10:32 +01:00
x86/fred: Add a NMI entry stub for FRED
On a FRED system, NMIs nest both with themselves and faults, transient information is saved into the stack frame, and NMI unblocking only happens when the stack frame indicates that so should happen.
Thus, the NMI entry stub for FRED is really quite small...
--- arch/x86/kernel/nmi.c | 42 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+)
arch/x86/kernel/nmi.c +42 -0
@@ -35,6 +35,7 @@#include <asm/nospec-branch.h> #include <asm/microcode.h> #include <asm/sev.h> +#include <asm/fred.h> #define CREATE_TRACE_POINTS #include <trace/events/nmi.h>
@@ -651,6 +652,47 @@ void nmi_backtrace_stall_check(const struct cpumask *btp)#endif +#ifdef CONFIG_X86_FRED +/* +* With FRED, CR2/DR6 is pushed to #PF/#DB stack frame during FRED +* event delivery, i.e., there is no problem of transient states. +* And NMI unblocking only happens when the stack frame indicates +* that so should happen. +* +* Thus, the NMI entry stub for FRED is really straightforward and +* as simple as most exception handlers. As such, #DB is allowed +* during NMI handling. +*/ +DEFINE_FREDENTRY_NMI (exc_nmi) +{ +irqentry_state_t irq_state; + +if (arch_cpu_is_offline (smp_processor_id ())) { +if (microcode_nmi_handler_enabled ()) +microcode_offline_nmi_handler (); +return ; + } + +/* +* Save CR2 for eventual restore to cover the case where the NMI +* hits the VMENTER/VMEXIT region where guest CR2 is life. This +* prevents guest state corruption in case that the NMI handler +* takes a page fault. +*/ +this_cpu_write (nmi_cr2,read_cr2 ()); + + irq_state =irqentry_nmi_enter (regs); + +inc_irq_stat (__nmi_count); +default_do_nmi (regs); + +irqentry_nmi_exit (regs, irq_state); + +if (unlikely (this_cpu_read (nmi_cr2) !=read_cr2 ())) +write_cr2 (this_cpu_read (nmi_cr2)); +} +#endif +void stop_nmi (void ) { ignore_nmis++;
[tip: x86/fred] x86/fred: Add a NMI entry stub for FRED
In reply to Xin LiThe following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: 3e91abaa567300fd48a0fac4c9aaedd30fa2f3f9 Gitweb: https://git.kernel.org/tip/3e91abaa567300fd48a0fac4c9aaedd30fa2f3f9 Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Fri, 15 Dec 2023 22:31:39 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Tue, 30 Jan 2024 18:20:35 +01:00
x86/fred: Add a NMI entry stub for FRED
On a FRED system, NMIs nest both with themselves and faults, transient information is saved into the stack frame, and NMI unblocking only happens when the stack frame indicates that so should happen.
Thus, the NMI entry stub for FRED is really quite small...
--- arch/x86/kernel/nmi.c | 42 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+)
arch/x86/kernel/nmi.c +42 -0
@@ -35,6 +35,7 @@#include <asm/nospec-branch.h> #include <asm/microcode.h> #include <asm/sev.h> +#include <asm/fred.h> #define CREATE_TRACE_POINTS #include <trace/events/nmi.h>
@@ -651,6 +652,47 @@ void nmi_backtrace_stall_check(const struct cpumask *btp)#endif +#ifdef CONFIG_X86_FRED +/* +* With FRED, CR2/DR6 is pushed to #PF/#DB stack frame during FRED +* event delivery, i.e., there is no problem of transient states. +* And NMI unblocking only happens when the stack frame indicates +* that so should happen. +* +* Thus, the NMI entry stub for FRED is really straightforward and +* as simple as most exception handlers. As such, #DB is allowed +* during NMI handling. +*/ +DEFINE_FREDENTRY_NMI (exc_nmi) +{ +irqentry_state_t irq_state; + +if (arch_cpu_is_offline (smp_processor_id ())) { +if (microcode_nmi_handler_enabled ()) +microcode_offline_nmi_handler (); +return ; + } + +/* +* Save CR2 for eventual restore to cover the case where the NMI +* hits the VMENTER/VMEXIT region where guest CR2 is life. This +* prevents guest state corruption in case that the NMI handler +* takes a page fault. +*/ +this_cpu_write (nmi_cr2,read_cr2 ()); + + irq_state =irqentry_nmi_enter (regs); + +inc_irq_stat (__nmi_count); +default_do_nmi (regs); + +irqentry_nmi_exit (regs, irq_state); + +if (unlikely (this_cpu_read (nmi_cr2) !=read_cr2 ())) +write_cr2 (this_cpu_read (nmi_cr2)); +} +#endif +void stop_nmi (void ) { ignore_nmis++;
[tip: x86/fred] x86/fred: Add a NMI entry stub for FRED
In reply to Xin LiThe following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: f8b8ee45f82b681606d288bcec89c9071b4079fc Gitweb: https://git.kernel.org/tip/f8b8ee45f82b681606d288bcec89c9071b4079fc Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Fri, 15 Dec 2023 22:31:39 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Wed, 31 Jan 2024 22:02:20 +01:00
x86/fred: Add a NMI entry stub for FRED
On a FRED system, NMIs nest both with themselves and faults, transient information is saved into the stack frame, and NMI unblocking only happens when the stack frame indicates that so should happen.
Thus, the NMI entry stub for FRED is really quite small...
--- arch/x86/kernel/nmi.c | 42 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+)
arch/x86/kernel/nmi.c +42 -0
@@ -35,6 +35,7 @@#include <asm/nospec-branch.h> #include <asm/microcode.h> #include <asm/sev.h> +#include <asm/fred.h> #define CREATE_TRACE_POINTS #include <trace/events/nmi.h>
@@ -651,6 +652,47 @@ void nmi_backtrace_stall_check(const struct cpumask *btp)#endif +#ifdef CONFIG_X86_FRED +/* +* With FRED, CR2/DR6 is pushed to #PF/#DB stack frame during FRED +* event delivery, i.e., there is no problem of transient states. +* And NMI unblocking only happens when the stack frame indicates +* that so should happen. +* +* Thus, the NMI entry stub for FRED is really straightforward and +* as simple as most exception handlers. As such, #DB is allowed +* during NMI handling. +*/ +DEFINE_FREDENTRY_NMI (exc_nmi) +{ +irqentry_state_t irq_state; + +if (arch_cpu_is_offline (smp_processor_id ())) { +if (microcode_nmi_handler_enabled ()) +microcode_offline_nmi_handler (); +return ; + } + +/* +* Save CR2 for eventual restore to cover the case where the NMI +* hits the VMENTER/VMEXIT region where guest CR2 is life. This +* prevents guest state corruption in case that the NMI handler +* takes a page fault. +*/ +this_cpu_write (nmi_cr2,read_cr2 ()); + + irq_state =irqentry_nmi_enter (regs); + +inc_irq_stat (__nmi_count); +default_do_nmi (regs); + +irqentry_nmi_exit (regs, irq_state); + +if (unlikely (this_cpu_read (nmi_cr2) !=read_cr2 ())) +write_cr2 (this_cpu_read (nmi_cr2)); +} +#endif +void stop_nmi (void ) { ignore_nmis++;
PATCH v13 25/35 x86/fred: Add a machine check entry stub for FRED
In reply to Xin LiLike #DB, when occurred on different ring level, i.e., from user or kernel context, #MCE needs to be handled on different stack: User #MCE on current task stack, while kernel #MCE on a dedicated stack.
This is exactly how FRED event delivery invokes an exception handler: ring 3 event on level 0 stack, i.e., current task stack; ring 0 event on the #MCE dedicated stack specified in the IA32_FRED_STKLVLS MSR. So unlike IDT, the FRED machine check entry stub doesn't do stack switch.
---
Changes since v5:
* Disallow #DB inside #MCE for robustness sake (Peter Zijlstra).
--- arch/x86/kernel/cpu/mce/core.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)
arch/x86/kernel/cpu/mce/core.c +26 -0
@@ -53,6 +53,7 @@#include <asm/mce.h> #include <asm/msr.h> #include <asm/reboot.h> +#include <asm/fred.h> #include "internal.h"
@@ -2150,6 +2151,31 @@ DEFINE_IDTENTRY_MCE_USER(exc_machine_check)exc_machine_check_user (regs); local_db_restore(dr7); } + +#ifdef CONFIG_X86_FRED +/* +* When occurred on different ring level, i.e., from user or kernel +* context, #MCE needs to be handled on different stack: User #MCE +* on current task stack, while kernel #MCE on a dedicated stack. +* +* This is exactly how FRED event delivery invokes an exception +* handler: ring 3 event on level 0 stack, i.e., current task stack; +* ring 0 event on the #MCE dedicated stack specified in the +* IA32_FRED_STKLVLS MSR. So unlike IDT, the FRED machine check entry +* stub doesn't do stack switch. +*/ +DEFINE_FREDENTRY_MCE (exc_machine_check) +{ +unsigned long dr7; + + dr7 =local_db_save (); +if (user_mode (regs)) +exc_machine_check_user (regs); +else +exc_machine_check_kernel (regs); +local_db_restore (dr7); +} +#endif #else /* 32bit unified entry point */ DEFINE_IDTENTRY_RAW (exc_machine_check)
Signature · 1 line
2.43.0
[tip: x86/fred] x86/fred: Add a machine check entry stub for FRED
The following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: 4aa4dce58fb07380c5a63c1993d0478f7ee195d1 Gitweb: https://git.kernel.org/tip/4aa4dce58fb07380c5a63c1993d0478f7ee195d1 Author: Xin Li <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:14 -08:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 25 Jan 2024 19:10:32 +01:00
x86/fred: Add a machine check entry stub for FRED
Like #DB, when occurred on different ring level, i.e., from user or kernel context, #MCE needs to be handled on different stack: User #MCE on current task stack, while kernel #MCE on a dedicated stack.
This is exactly how FRED event delivery invokes an exception handler: ring 3 event on level 0 stack, i.e., current task stack; ring 0 event on the #MCE dedicated stack specified in the IA32_FRED_STKLVLS MSR. So unlike IDT, the FRED machine check entry stub doesn't do stack switch.
--- arch/x86/kernel/cpu/mce/core.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)
arch/x86/kernel/cpu/mce/core.c +26 -0
@@ -46,6 +46,7 @@#include <linux/hardirq.h> #include <linux/kexec.h> +#include <asm/fred.h> #include <asm/intel-family.h> #include <asm/processor.h> #include <asm/traps.h>
@@ -2166,6 +2167,31 @@ DEFINE_IDTENTRY_MCE_USER(exc_machine_check)exc_machine_check_user (regs); local_db_restore(dr7); } + +#ifdef CONFIG_X86_FRED +/* +* When occurred on different ring level, i.e., from user or kernel +* context, #MCE needs to be handled on different stack: User #MCE +* on current task stack, while kernel #MCE on a dedicated stack. +* +* This is exactly how FRED event delivery invokes an exception +* handler: ring 3 event on level 0 stack, i.e., current task stack; +* ring 0 event on the #MCE dedicated stack specified in the +* IA32_FRED_STKLVLS MSR. So unlike IDT, the FRED machine check entry +* stub doesn't do stack switch. +*/ +DEFINE_FREDENTRY_MCE (exc_machine_check) +{ +unsigned long dr7; + + dr7 =local_db_save (); +if (user_mode (regs)) +exc_machine_check_user (regs); +else +exc_machine_check_kernel (regs); +local_db_restore (dr7); +} +#endif #else /* 32bit unified entry point */ DEFINE_IDTENTRY_RAW (exc_machine_check)
[tip: x86/fred] x86/fred: Add a machine check entry stub for FRED
In reply to Xin LiThe following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: 5dd56c94ca2f8834e7689cac0045d312ef3ac9c6 Gitweb: https://git.kernel.org/tip/5dd56c94ca2f8834e7689cac0045d312ef3ac9c6 Author: Xin Li <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:14 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Tue, 30 Jan 2024 18:20:35 +01:00
x86/fred: Add a machine check entry stub for FRED
Like #DB, when occurred on different ring level, i.e., from user or kernel context, #MCE needs to be handled on different stack: User #MCE on current task stack, while kernel #MCE on a dedicated stack.
This is exactly how FRED event delivery invokes an exception handler: ring 3 event on level 0 stack, i.e., current task stack; ring 0 event on the #MCE dedicated stack specified in the IA32_FRED_STKLVLS MSR. So unlike IDT, the FRED machine check entry stub doesn't do stack switch.
--- arch/x86/kernel/cpu/mce/core.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)
arch/x86/kernel/cpu/mce/core.c +26 -0
@@ -46,6 +46,7 @@#include <linux/hardirq.h> #include <linux/kexec.h> +#include <asm/fred.h> #include <asm/intel-family.h> #include <asm/processor.h> #include <asm/traps.h>
@@ -2166,6 +2167,31 @@ DEFINE_IDTENTRY_MCE_USER(exc_machine_check)exc_machine_check_user (regs); local_db_restore(dr7); } + +#ifdef CONFIG_X86_FRED +/* +* When occurred on different ring level, i.e., from user or kernel +* context, #MCE needs to be handled on different stack: User #MCE +* on current task stack, while kernel #MCE on a dedicated stack. +* +* This is exactly how FRED event delivery invokes an exception +* handler: ring 3 event on level 0 stack, i.e., current task stack; +* ring 0 event on the #MCE dedicated stack specified in the +* IA32_FRED_STKLVLS MSR. So unlike IDT, the FRED machine check entry +* stub doesn't do stack switch. +*/ +DEFINE_FREDENTRY_MCE (exc_machine_check) +{ +unsigned long dr7; + + dr7 =local_db_save (); +if (user_mode (regs)) +exc_machine_check_user (regs); +else +exc_machine_check_kernel (regs); +local_db_restore (dr7); +} +#endif #else /* 32bit unified entry point */ DEFINE_IDTENTRY_RAW (exc_machine_check)
[tip: x86/fred] x86/fred: Add a machine check entry stub for FRED
In reply to Xin LiThe following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: ffa4901f0e004e1a0a4e18a2452a1fcc27277cc0 Gitweb: https://git.kernel.org/tip/ffa4901f0e004e1a0a4e18a2452a1fcc27277cc0 Author: Xin Li <[email protected]> AuthorDate: Tue, 05 Dec 2023 02:50:14 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Wed, 31 Jan 2024 22:02:25 +01:00
x86/fred: Add a machine check entry stub for FRED
Like #DB, when occurred on different ring level, i.e., from user or kernel context, #MCE needs to be handled on different stack: User #MCE on current task stack, while kernel #MCE on a dedicated stack.
This is exactly how FRED event delivery invokes an exception handler: ring 3 event on level 0 stack, i.e., current task stack; ring 0 event on the the FRED machine check entry stub doesn't do stack switch.
--- arch/x86/kernel/cpu/mce/core.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)
arch/x86/kernel/cpu/mce/core.c +26 -0
@@ -46,6 +46,7 @@#include <linux/hardirq.h> #include <linux/kexec.h> +#include <asm/fred.h> #include <asm/intel-family.h> #include <asm/processor.h> #include <asm/traps.h>
@@ -2166,6 +2167,31 @@ DEFINE_IDTENTRY_MCE_USER(exc_machine_check)exc_machine_check_user (regs); local_db_restore(dr7); } + +#ifdef CONFIG_X86_FRED +/* +* When occurred on different ring level, i.e., from user or kernel +* context, #MCE needs to be handled on different stack: User #MCE +* on current task stack, while kernel #MCE on a dedicated stack. +* +* This is exactly how FRED event delivery invokes an exception +* handler: ring 3 event on level 0 stack, i.e., current task stack; +* ring 0 event on the #MCE dedicated stack specified in the +* IA32_FRED_STKLVLS MSR. So unlike IDT, the FRED machine check entry +* stub doesn't do stack switch. +*/ +DEFINE_FREDENTRY_MCE (exc_machine_check) +{ +unsigned long dr7; + + dr7 =local_db_save (); +if (user_mode (regs)) +exc_machine_check_user (regs); +else +exc_machine_check_kernel (regs); +local_db_restore (dr7); +} +#endif #else /* 32bit unified entry point */ DEFINE_IDTENTRY_RAW (exc_machine_check)
PATCH v13 26/35 x86/fred: FRED entry/exit and dispatch code
In reply to Xin LiFrom: "H. Peter Anvin (Intel)" <[email protected]>
The code to actually handle kernel and event entry/exit using FRED. It is split up into two files thus:
- entry_64_fred.S contains the actual entrypoints and exit code, and saves and restores registers.
- entry_fred.c contains the two-level event dispatch code for FRED. The first-level dispatch is on the event type, and the second-level is on the event vector.
---
Changes since v10:
* Replace "IS_ENABLED(CONFIG_IA32_EMULATION)" with the new ia32_enabled() API (Nikolay Borisov).
Changes since v9:
* Don't use jump tables, indirect jumps are expensive (Thomas Gleixner).
* Except NMI/#DB/#MCE, FRED really can share the exception handlers with IDT (Thomas Gleixner).
* Avoid the sysvec_* idt_entry muck, do it at a central place, reuse code instead of blindly copying it, which breaks the performance optimized sysvec entries like reschedule_ipi (Thomas Gleixner).
* Add asm_ prefix to FRED asm entry points (Thomas Gleixner).
Changes since v8:
* Don't do syscall early out in fred_entry_from_user() before there are proper performance numbers and justifications (Thomas Gleixner).
* Add the control exception handler to the FRED exception handler table (Thomas Gleixner).
* Add ENDBR to the FRED_ENTER asm macro.
* Reflect the FRED spec 5.0 change that ERETS and ERETU add 8 to %rsp before popping the return context from the stack.
Changes since v1:
* Initialize a FRED exception handler to fred_bad_event() instead of NULL if no FRED handler defined for an exception vector (Peter Zijlstra).
* Push calling irqentry_{enter,exit}() and instrumentation_{begin,end}() down into individual FRED exception handlers, instead of in the dispatch framework (Peter Zijlstra).
--- arch/x86/entry/Makefile | 5 +- arch/x86/entry/entry_64_fred.S | 52 ++++++ arch/x86/entry/entry_fred.c | 230 ++++++++++++++++++++++++++ arch/x86/include/asm/asm-prototypes.h | 1 + arch/x86/include/asm/fred.h | 6 + 5 files changed, 293 insertions(+), 1 deletion(-) create mode 100644 arch/x86/entry/entry_64_fred.S create mode 100644 arch/x86/entry/entry_fred.c
arch/x86/entry/Makefile +4 -1
@@ -18,6 +18,9 @@ obj-y += vdso/ obj-y += vsyscall/ obj-$(CONFIG_PREEMPTION) += thunk_$(BITS).o +CFLAGS_entry_fred.o += -fno-stack-protector +CFLAGS_REMOVE_entry_fred.o += -pg $(CC_FLAGS_FTRACE) +obj-$(CONFIG_X86_FRED) += entry_64_fred.o entry_fred.o + obj-$(CONFIG_IA32_EMULATION) += entry_64_compat.o syscall_32.o obj-$(CONFIG_X86_X32_ABI) += syscall_x32.o -
arch/x86/entry/entry_64_fred.S new file +52 -0
52 lines not on this page · raw message
arch/x86/entry/entry_fred.c new file +230 -0
230 lines not on this page · raw message
arch/x86/include/asm/asm-prototypes.h +1 -0
@@ -12,6 +12,7 @@#include <asm/special_insns.h> #include <asm/preempt.h> #include <asm/asm.h> +#include <asm/fred.h> #include <asm/gsseg.h> #ifndef CONFIG_X86_CMPXCHG64
arch/x86/include/asm/fred.h +6 -0
@@ -60,6 +60,12 @@ static __always_inline unsigned long fred_event_data(struct pt_regs *regs)return fred_info (regs)->edata; } +void asm_fred_entrypoint_user (void ); +void asm_fred_entrypoint_kernel (void ); + +__visible void fred_entry_from_user(struct pt_regs *regs); +__visible void fred_entry_from_kernel(struct pt_regs *regs); +#else /* CONFIG_X86_FRED */ static __always_inline unsigned long fred_event_data (struct pt_regs *regs) {return 0 ; }#endif /* CONFIG_X86_FRED */
Signature · 1 line
2.43.0
Re: [PATCH v13 26/35] x86/fred: FRED entry/exit and dispatch code
arch/x86/entry/entry_fred.c line 57
Quoted 11 lines · Xin Li
arch/x86/entry/entry_fred.c new file +4
-0@@ -0,0 +1,230 @@ +static noinstr void fred_intx(struct pt_regs *regs) +{ +switch (regs->fred_ss.vector) { +/* INT0 */
INTO (for overflow), not INT-zero. However...
arch/x86/entry/entry_fred.c line 65
Quoted 8 lines
arch/x86/entry/entry_fred.c new file +8
-0+case X86_TRAP_OF : +exc_overflow (regs); +return ; + +/* INT3 */ +case X86_TRAP_BP : +exc_int3 (regs); +return ;
... neither OF nor BP will ever enter fred_intx() because they're type SWEXC not SWINT.
SWINT is strictly the INT $imm8 instruction.
arch/x86/entry/entry_fred.c line 140
Quoted 13 lines
...
arch/x86/entry/entry_fred.c new file +12
-0+static noinstr void fred_extint(struct pt_regs *regs) +{ +unsigned int vector = regs->fred_ss.vector; + +if (WARN_ON_ONCE (vector <FIRST_EXTERNAL_VECTOR )) +return ; + +if (likely (vector >=FIRST_SYSTEM_VECTOR )) { +irqentry_state_t state =irqentry_enter (regs); + +instrumentation_begin (); + sysvec_table[vector -FIRST_SYSTEM_VECTOR ](regs);
array_index_mask_nospec()
This is easy for an attacker to abuse, to install non-function-pointer targets into the indirect predictor.
Quoted 10 lines
arch/x86/entry/entry_fred.c new file +10
-0+instrumentation_end (); +irqentry_exit (regs, state); + }else { +common_interrupt (regs, vector); + } +} + +static noinstr void fred_exception(struct pt_regs *regs, unsigned long error_code) +{ +/* Optimize for #PF. That's the only exception which matters performance wise */
arch/x86/entry/entry_fred.c line 160
Quoted 10 lines
arch/x86/entry/entry_fred.c new file +10
-0+if (likely (regs->fred_ss.vector ==X86_TRAP_PF )) { +exc_page_fault (regs, error_code); +return ; + } + +switch (regs->fred_ss.vector) { +case X86_TRAP_DE :return exc_divide_error (regs); +case X86_TRAP_DB :return fred_exc_debug (regs); +case X86_TRAP_BP :return exc_int3 (regs); +case X86_TRAP_OF :return exc_overflow (regs);
Depending on what you want to do with BP/OF vs fred_intx(), this may need adjusting.
If you are cross-checking type and vector, then these should be rejected for not being of type HWEXC.
Quoted 9 lines
arch/x86/entry/entry_fred.c new file +9
-0+case X86_TRAP_BR :return exc_bounds (regs); +case X86_TRAP_UD :return exc_invalid_op (regs); +case X86_TRAP_NM :return exc_device_not_available (regs); +case X86_TRAP_DF :return exc_double_fault (regs, error_code); +case X86_TRAP_TS :return exc_invalid_tss (regs, error_code); +case X86_TRAP_NP :return exc_segment_not_present (regs, error_code); +case X86_TRAP_SS :return exc_stack_segment (regs, error_code); +case X86_TRAP_GP :return exc_general_protection (regs, error_code); +case X86_TRAP_MF :return exc_coprocessor_error (regs);
arch/x86/entry/entry_fred.c line 179
Quoted 10 lines
arch/x86/entry/entry_fred.c new file +10
-0+case X86_TRAP_AC :return exc_alignment_check (regs, error_code); +case X86_TRAP_XF :return exc_simd_coprocessor_error (regs); + +#ifdef CONFIG_X86_MCE +case X86_TRAP_MC :return fred_exc_machine_check (regs); +#endif +#ifdef CONFIG_INTEL_TDX_GUEST +case X86_TRAP_VE :return exc_virtualization_exception (regs); +#endif +#ifdef CONFIG_X86_KERNEL_IBT
CONFIG_X86_CET
Userspace can use CET even if the kernel isn't compiled with IBT, so this exception needs handling.
Quoted 14 lines
arch/x86/entry/entry_fred.c new file +14
-0+case X86_TRAP_CP :return exc_control_protection (regs, error_code); +#endif +default :return fred_bad_type (regs, error_code); + } +} + +__visible noinstr void fred_entry_from_user(struct pt_regs *regs) +{ +unsigned long error_code = regs->orig_ax; + +/* Invalidate orig_ax so that syscall_get_nr() works correctly */ + regs->orig_ax =-1 ; + +switch (regs->fred_ss.type) {
arch/x86/entry/entry_fred.c line 203
Quoted 10 lines
arch/x86/entry/entry_fred.c new file +10
-0+case EVENT_TYPE_EXTINT : +return fred_extint (regs); +case EVENT_TYPE_NMI : +return fred_exc_nmi (regs); +case EVENT_TYPE_SWINT : +return fred_intx (regs); +case EVENT_TYPE_HWEXC : +case EVENT_TYPE_SWEXC : +case EVENT_TYPE_PRIV_SWEXC : +return fred_exception (regs, error_code);
PRIV_SWEXC should have it's own function and not fall into fred_exception().
It is strictly only the ICEBP (INT1) instruction at the moment, so should fall into bad_type() for any vector other than X86_TRAP_DB.
arch/x86/entry/entry_fred.c line 209
Quoted 6 lines
arch/x86/entry/entry_fred.c new file +6
-0+case EVENT_TYPE_OTHER : +return fred_other (regs); +default : +return fred_bad_type (regs, error_code); + } +}
~Andrew
RE: [PATCH v13 26/35] x86/fred: FRED entry/exit and dispatch code
Quoted 119 lines
arch/x86/entry/entry_fred.c line 57
Quoted 3 lines
arch/x86/entry/entry_fred.c new file +3
-0+static noinstr void fred_intx(struct pt_regs *regs) { +switch (regs->fred_ss.vector) { +/* INT0 */ INTO (for overflow), not INT-zero. However...
arch/x86/entry/entry_fred.c line 65
Quoted 8 lines
arch/x86/entry/entry_fred.c new file +8
-0+case X86_TRAP_OF : +exc_overflow (regs); +return ; + +/* INT3 */ +case X86_TRAP_BP : +exc_int3 (regs); +return ;... neither OF nor BP will ever enter
fred_intx()because they're type SWEXC not SWINT.SWINT is strictly the INT $imm8 instruction.
arch/x86/entry/entry_fred.c line 140
Quoted 12 lines
...
arch/x86/entry/entry_fred.c new file +11
-0+static noinstr void fred_extint(struct pt_regs *regs) { +unsigned int vector = regs->fred_ss.vector; + +if (WARN_ON_ONCE (vector <FIRST_EXTERNAL_VECTOR )) +return ; + +if (likely (vector >=FIRST_SYSTEM_VECTOR )) { +irqentry_state_t state =irqentry_enter (regs); + +instrumentation_begin (); + sysvec_table[vector -FIRST_SYSTEM_VECTOR ](regs);
array_index_mask_nospec()This is easy for an attacker to abuse, to install non-function-pointer targets into the indirect predictor.
arch/x86/entry/entry_fred.c
Quoted 10 lines
arch/x86/entry/entry_fred.c new file +10
-0+instrumentation_end (); +irqentry_exit (regs, state); + }else { +common_interrupt (regs, vector); + } +} + +static noinstr void fred_exception(struct pt_regs *regs, unsigned +long error_code) { +/* Optimize for #PF. That's the only exception which matters performance wise */
arch/x86/entry/entry_fred.c line 160
Quoted 10 lines
arch/x86/entry/entry_fred.c new file +10
-0+if (likely (regs->fred_ss.vector ==X86_TRAP_PF )) { +exc_page_fault (regs, error_code); +return ; + } + +switch (regs->fred_ss.vector) { +case X86_TRAP_DE :return exc_divide_error (regs); +case X86_TRAP_DB :return fred_exc_debug (regs); +case X86_TRAP_BP :return exc_int3 (regs); +case X86_TRAP_OF :return exc_overflow (regs);Depending on what you want to do with BP/OF vs
fred_intx(), this may need adjusting.If you are cross-checking type and vector, then these should be rejected for not being of type HWEXC.
Quoted 8 lines
arch/x86/entry/entry_fred.c new file +8
-0+case X86_TRAP_BR :return exc_bounds (regs); +case X86_TRAP_UD :return exc_invalid_op (regs); +case X86_TRAP_NM :return exc_device_not_available (regs); +case X86_TRAP_DF :return exc_double_fault (regs, error_code); +case X86_TRAP_TS :return exc_invalid_tss (regs, error_code); +case X86_TRAP_NP :return exc_segment_not_present (regs, error_code); +case X86_TRAP_SS :return exc_stack_segment (regs, error_code); +case X86_TRAP_GP :return exc_general_protection (regs, error_code);arch/x86/entry/entry_fred.c line 179
Quoted 10 lines
arch/x86/entry/entry_fred.c new file +10
-0+case X86_TRAP_MF :return exc_coprocessor_error (regs); +case X86_TRAP_AC :return exc_alignment_check (regs, error_code); +case X86_TRAP_XF :return exc_simd_coprocessor_error (regs); + +#ifdef CONFIG_X86_MCE +case X86_TRAP_MC :return fred_exc_machine_check (regs);#endif #ifdef +CONFIG_INTEL_TDX_GUEST +case X86_TRAP_VE :return exc_virtualization_exception (regs); +#endif +#ifdef CONFIG_X86_KERNEL_IBT
CONFIG_X86_CETUserspace can use CET even if the kernel isn't compiled with IBT, so this exception needs handling.
Quoted 13 lines
arch/x86/entry/entry_fred.c new file +13
-0+case X86_TRAP_CP :return exc_control_protection (regs, error_code); +#endif +default :return fred_bad_type (regs, error_code); + } +} + +__visible noinstr void fred_entry_from_user(struct pt_regs *regs) { +unsigned long error_code = regs->orig_ax; + +/* Invalidate orig_ax so that syscall_get_nr() works correctly */ + regs->orig_ax =-1 ; + +switch (regs->fred_ss.type) {arch/x86/entry/entry_fred.c line 203
Quoted 10 lines
arch/x86/entry/entry_fred.c new file +10
-0+case EVENT_TYPE_EXTINT : +return fred_extint (regs); +case EVENT_TYPE_NMI : +return fred_exc_nmi (regs); +case EVENT_TYPE_SWINT : +return fred_intx (regs); +case EVENT_TYPE_HWEXC : +case EVENT_TYPE_SWEXC : +case EVENT_TYPE_PRIV_SWEXC : +return fred_exception (regs, error_code);
PRIV_SWEXCshould have it's own function and not fall intofred_exception().It is strictly only the ICEBP (INT1) instruction at the moment, so should fall into
bad_type()for any vector other thanX86_TRAP_DB.
Quoted 8 lines
arch/x86/entry/entry_fred.c line 209
Quoted 6 lines
arch/x86/entry/entry_fred.c new file +6
-0+case EVENT_TYPE_OTHER : +return fred_other (regs); +default : +return fred_bad_type (regs, error_code); + } +}~Andrew
Thanks a lot for your quick review, will address soon.
Xin
RE: [PATCH v13 26/35] x86/fred: FRED entry/exit and dispatch code
In reply to Andrew CooperQuoted 11 lines
arch/x86/entry/entry_fred.c line 57
Quoted 9 lines
arch/x86/entry/entry_fred.c new file +3
-0@@ -0,0 +1,230 @@ +static noinstr void fred_intx(struct pt_regs *regs) { +switch (regs->fred_ss.vector) { +/* INT0 */ INTO (for overflow), not INT-zero. However...
My bad again...
Quoted 11 lines
arch/x86/entry/entry_fred.c line 65
Quoted 8 lines
arch/x86/entry/entry_fred.c new file +8
-0+case X86_TRAP_OF : +exc_overflow (regs); +return ; + +/* INT3 */ +case X86_TRAP_BP : +exc_int3 (regs); +return ;... neither OF nor BP will ever enter
fred_intx()because they're type SWEXC not SWINT.
Per FRED spec 5.0, section 7.3 Software Interrupts and Related Instructions:
INT n (opcode CD followed by an immediate byte): There are 256 such software interrupt instructions, one for each value n of the immediate byte (0–255).
And appendix B Event Stack Levels:
If the event is an execution of INT n (opcode CD n for 8-bit value n), the event stack level is 0. The event type is 4 (software interrupt) and the vector is n.
So int $0x4 and int $0x3 (use asm(".byte 0xCD, 0x03")) get here.
But into (0xCE) and int3 (0xCC) do use event type SWEXC.
BTW, into is NOT allowed in 64-bit mode but "int $0x4" is allowed.
Quoted 18 lines
SWINT is strictly the INT $imm8 instruction.
arch/x86/entry/entry_fred.c line 140
Quoted 12 lines
...
arch/x86/entry/entry_fred.c new file +11
-0+static noinstr void fred_extint(struct pt_regs *regs) { +unsigned int vector = regs->fred_ss.vector; + +if (WARN_ON_ONCE (vector <FIRST_EXTERNAL_VECTOR )) +return ; + +if (likely (vector >=FIRST_SYSTEM_VECTOR )) { +irqentry_state_t state =irqentry_enter (regs); + +instrumentation_begin (); + sysvec_table[vector -FIRST_SYSTEM_VECTOR ](regs);
array_index_mask_nospec()
Quoted 2 lines
This is easy for an attacker to abuse, to install non-function-pointer targets into the indirect predictor.
HPA did use array_index_nospec() at the beginning, but I forgot it later.
Quoted 26 lines
arch/x86/entry/entry_fred.c
Quoted 11 lines
arch/x86/entry/entry_fred.c new file +10
-0+instrumentation_end (); +irqentry_exit (regs, state); + }else { +common_interrupt (regs, vector); + } +} + +static noinstr void fred_exception(struct pt_regs *regs, unsigned +long error_code) { +/* Optimize for #PF. That's the only exception which matters performance wise */
arch/x86/entry/entry_fred.c line 160
Quoted 10 lines
arch/x86/entry/entry_fred.c new file +10
-0+if (likely (regs->fred_ss.vector ==X86_TRAP_PF )) { +exc_page_fault (regs, error_code); +return ; + } + +switch (regs->fred_ss.vector) { +case X86_TRAP_DE :return exc_divide_error (regs); +case X86_TRAP_DB :return fred_exc_debug (regs); +case X86_TRAP_BP :return exc_int3 (regs); +case X86_TRAP_OF :return exc_overflow (regs);Depending on what you want to do with BP/OF vs
fred_intx(), this may need adjusting.
Quoted 2 lines
If you are cross-checking type and vector, then these should be rejected for not being of type HWEXC.
You're right, the event type needs to be SWEXC for into and int3.
However, would it be overkilling? Assuming hardware and VMM are sane.
Quoted 22 lines
Quoted 9 lines
arch/x86/entry/entry_fred.c new file +8
-0+case X86_TRAP_BR :return exc_bounds (regs); +case X86_TRAP_UD :return exc_invalid_op (regs); +case X86_TRAP_NM :return exc_device_not_available (regs); +case X86_TRAP_DF :return exc_double_fault (regs, error_code); +case X86_TRAP_TS :return exc_invalid_tss (regs, error_code); +case X86_TRAP_NP :return exc_segment_not_present (regs, error_code); +case X86_TRAP_SS :return exc_stack_segment (regs, error_code); +case X86_TRAP_GP :return exc_general_protection (regs, error_code);arch/x86/entry/entry_fred.c line 179
Quoted 10 lines
arch/x86/entry/entry_fred.c new file +10
-0+case X86_TRAP_MF :return exc_coprocessor_error (regs); +case X86_TRAP_AC :return exc_alignment_check (regs, error_code); +case X86_TRAP_XF :return exc_simd_coprocessor_error (regs); + +#ifdef CONFIG_X86_MCE +case X86_TRAP_MC :return fred_exc_machine_check (regs);#endif #ifdef +CONFIG_INTEL_TDX_GUEST +case X86_TRAP_VE :return exc_virtualization_exception (regs); +#endif +#ifdef CONFIG_X86_KERNEL_IBT
CONFIG_X86_CET
Quoted 2 lines
Userspace can use CET even if the kernel isn't compiled with IBT, so this exception needs handling.
Absolutely correct!
Quoted 27 lines
Quoted 14 lines
arch/x86/entry/entry_fred.c new file +13
-0+case X86_TRAP_CP :return exc_control_protection (regs, error_code); +#endif +default :return fred_bad_type (regs, error_code); + } +} + +__visible noinstr void fred_entry_from_user(struct pt_regs *regs) { +unsigned long error_code = regs->orig_ax; + +/* Invalidate orig_ax so that syscall_get_nr() works correctly */ + regs->orig_ax =-1 ; + +switch (regs->fred_ss.type) {arch/x86/entry/entry_fred.c line 203
Quoted 10 lines
arch/x86/entry/entry_fred.c new file +10
-0+case EVENT_TYPE_EXTINT : +return fred_extint (regs); +case EVENT_TYPE_NMI : +return fred_exc_nmi (regs); +case EVENT_TYPE_SWINT : +return fred_intx (regs); +case EVENT_TYPE_HWEXC : +case EVENT_TYPE_SWEXC : +case EVENT_TYPE_PRIV_SWEXC : +return fred_exception (regs, error_code);
PRIV_SWEXCshould have it's own function and not fall intofred_exception().
Quoted 2 lines
It is strictly only the ICEBP (INT1) instruction at the moment, so should fall into
bad_type()for any vector other thanX86_TRAP_DB.
Good point!
It's like NMI, one event type with only one valid event vector now.
Quoted 9 lines
arch/x86/entry/entry_fred.c line 209
Quoted 7 lines
arch/x86/entry/entry_fred.c new file +6
-0+case EVENT_TYPE_OTHER : +return fred_other (regs); +default : +return fred_bad_type (regs, error_code); + } +}~Andrew
Thanks!
Xin
Re: [PATCH v13 26/35] x86/fred: FRED entry/exit and dispatch code
Quoted 20 lines · On 06/12/2023 7:45 am, Li, Xin3 wrote:
Quoted 10 lines
arch/x86/entry/entry_fred.c line 65
Quoted 8 lines
arch/x86/entry/entry_fred.c new file +8
-0+case X86_TRAP_OF : +exc_overflow (regs); +return ; + +/* INT3 */ +case X86_TRAP_BP : +exc_int3 (regs); +return ;... neither OF nor BP will ever enter
fred_intx()because they're type SWEXC not SWINT.Per FRED spec 5.0, section 7.3 Software Interrupts and Related Instructions:
INT n (opcode CD followed by an immediate byte): There are 256 such software interrupt instructions, one for each value n of the immediate byte (0–255).And appendix B Event Stack Levels:
If the event is an execution of INT n (opcode CD n for 8-bit value n), the event stack level is 0. The event type is 4 (software interrupt) and the vector is n.
Quoted 5 lines
So int $0x4 and int $0x3 (use
asm(".byte 0xCD, 0x03")) get here.But into (
0xCE) and int3 (0xCC) do use event type SWEXC.BTW, into is NOT allowed in 64-bit mode but "int $0x4" is allowed.
There is certainly fun to be had with CD 03 and CD 04 byte patterns, but if you meant to mean those here, then the comments are wrong.
Vectors 3 and 4 are installed with DPL3 because that is necessary to make CC and CE function in userspace. It also suggests that the SWINT vs SWEXC distinction was retrofitted to architecture after the 286, because exceptions don't check DPL and ICEBP delivers #DB from userspace even when Vector 1 has a DPL of 0.
While CC is for most cases indistinguishable from CD 03, CE behaves entirely differently to CD 04. CD 04 doesn't #UD in 64bit mode, and will trigger exc_overflow() irrespective of the state of EFLAGS.OF.
The SDM goes out of it's way to say not to use the CD 03 byte pattern (and it does take effort to emit this byte pattern - e.g. GAS will silently translate "int $3" to "int3"), and there's no plausible way software is using CD 04 in place of CE.
So why do we care about containing to make mistakes of the IDT era work in a FRED world?
Is there anything (other than perhaps the selftests) which would even notice?
Quoted 24 lines
Quoted 24 lines
arch/x86/entry/entry_fred.c
Quoted 10 lines
arch/x86/entry/entry_fred.c new file +10
-0+instrumentation_end (); +irqentry_exit (regs, state); + }else { +common_interrupt (regs, vector); + } +} + +static noinstr void fred_exception(struct pt_regs *regs, unsigned +long error_code) { +/* Optimize for #PF. That's the only exception which matters performance wise */
arch/x86/entry/entry_fred.c line 160
Quoted 10 lines
arch/x86/entry/entry_fred.c new file +10
-0+if (likely (regs->fred_ss.vector ==X86_TRAP_PF )) { +exc_page_fault (regs, error_code); +return ; + } + +switch (regs->fred_ss.vector) { +case X86_TRAP_DE :return exc_divide_error (regs); +case X86_TRAP_DB :return fred_exc_debug (regs); +case X86_TRAP_BP :return exc_int3 (regs); +case X86_TRAP_OF :return exc_overflow (regs);Depending on what you want to do with BP/OF vs
fred_intx(), this may need adjusting.
Quoted 5 lines
Quoted 2 lines
If you are cross-checking type and vector, then these should be rejected for not being of type HWEXC.
You're right, the event type needs to be SWEXC for into and int3.
However, would it be overkilling? Assuming hardware and VMM are sane.
You either care about cross checking, or not. Right now, this patch is a mix of the two approaches.
In my opinion, cross-checking is the better approach, because it means that violations of the assumptions get noticed more quickly, and hopefully by whomever is working on the new feature which alters the assumptions.
~Andrew
RE: [PATCH v13 26/35] x86/fred: FRED entry/exit and dispatch code
Quoted 39 lines
Quoted 20 lines
Quoted 10 lines
arch/x86/entry/entry_fred.c line 65
Quoted 8 lines
arch/x86/entry/entry_fred.c new file +8
-0+case X86_TRAP_OF : +exc_overflow (regs); +return ; + +/* INT3 */ +case X86_TRAP_BP : +exc_int3 (regs); +return ;... neither OF nor BP will ever enter
fred_intx()because they're type SWEXC not SWINT.Per FRED spec 5.0, section 7.3 Software Interrupts and Related Instructions:
INT n (opcode CD followed by an immediate byte): There are 256 such software interrupt instructions, one for each value n of the immediate byte (0–255).And appendix B Event Stack Levels:
If the event is an execution of INT n (opcode CD n for 8-bit value n), the event stack level is 0. The event type is 4 (software interrupt) and the vector is n.Quoted 5 lines
So int $0x4 and int $0x3 (use
asm(".byte 0xCD, 0x03")) get here.But into (
0xCE) and int3 (0xCC) do use event type SWEXC.BTW, into is NOT allowed in 64-bit mode but "int $0x4" is allowed.
There is certainly fun to be had with CD 03 and CD 04 byte patterns, but if you meant to mean those here, then the comments are wrong.
Vectors 3 and 4 are installed with DPL3 because that is necessary to make CC and CE function in userspace. It also suggests that the SWINT vs SWEXC distinction was retrofitted to architecture after the 286, because exceptions don't check DPL and ICEBP delivers #DB from userspace even when Vector 1 has a DPL of 0.
While CC is for most cases indistinguishable from CD 03, CE behaves entirely differently to CD 04. CD 04 doesn't #UD in 64bit mode, and will trigger
exc_overflow()irrespective of the state of EFLAGS.OF.
Quoted 6 lines
The SDM goes out of it's way to say not to use the CD 03 byte pattern (and it does take effort to emit this byte pattern - e.g. GAS will silently translate "int $3" to "int3"), and there's no plausible way software is using CD 04 in place of CE.
So why do we care about containing to make mistakes of the IDT era work in a FRED world?
First, I agree with you because it makes things simple and neat.
However, the latest SDM and FRED spec 5.0 both doesn't disallow it, so it becomes an OS implementation choice.
Quoted 2 lines
Is there anything (other than perhaps the selftests) which would even notice?
I'm just conservative :)
If a user app can do it with IDT, we should still allow it when FRED is enabled. But if all key stakeholders don't care whatever gets broken due to the change and agree to change it.
Quoted 29 lines
Quoted 29 lines
Quoted 25 lines
arch/x86/entry/entry_fred.c
Quoted 11 lines
arch/x86/entry/entry_fred.c new file +11
-0+instrumentation_end (); +irqentry_exit (regs, state); + }else { +common_interrupt (regs, vector); + } +} + +static noinstr void fred_exception(struct pt_regs *regs, unsigned +long error_code) { +/* Optimize for #PF. That's the only exception which matters +performance wise */
arch/x86/entry/entry_fred.c line 160
Quoted 10 lines
arch/x86/entry/entry_fred.c new file +10
-0+if (likely (regs->fred_ss.vector ==X86_TRAP_PF )) { +exc_page_fault (regs, error_code); +return ; + } + +switch (regs->fred_ss.vector) { +case X86_TRAP_DE :return exc_divide_error (regs); +case X86_TRAP_DB :return fred_exc_debug (regs); +case X86_TRAP_BP :return exc_int3 (regs); +case X86_TRAP_OF :return exc_overflow (regs);Depending on what you want to do with BP/OF vs
fred_intx(), this may need adjusting.Quoted 2 lines
If you are cross-checking type and vector, then these should be rejected for not being of type HWEXC.
You're right, the event type needs to be SWEXC for into and int3.
Quoted 8 lines
Quoted 1 line
However, would it be overkilling? Assuming hardware and VMM are sane.
You either care about cross checking, or not. Right now, this patch is a mix of the two approaches.
In my opinion, cross-checking is the better approach, because it means that violations of the assumptions get noticed more quickly, and hopefully by whomever is working on the new feature which alters the assumptions.
Yeah, I can make the change.
Thanks!
Xin
H. Peter Anvin
maintainerRE: [PATCH v13 26/35] x86/fred: FRED entry/exit and dispatch code
Quoted 94 lines · On December 6, 2023 11:19:26 AM PST, "Li, Xin3" <[email protected]> wrote:
Quoted 39 lines
Quoted 20 lines
Quoted 10 lines
arch/x86/entry/entry_fred.c line 65
Quoted 8 lines
arch/x86/entry/entry_fred.c new file +8
-0+case X86_TRAP_OF : +exc_overflow (regs); +return ; + +/* INT3 */ +case X86_TRAP_BP : +exc_int3 (regs); +return ;... neither OF nor BP will ever enter
fred_intx()because they're type SWEXC not SWINT.Per FRED spec 5.0, section 7.3 Software Interrupts and Related Instructions:
INT n (opcode CD followed by an immediate byte): There are 256 such software interrupt instructions, one for each value n of the immediate byte (0–255).And appendix B Event Stack Levels:
If the event is an execution of INT n (opcode CD n for 8-bit value n), the event stack level is 0. The event type is 4 (software interrupt) and the vector is n.Quoted 5 lines
So int $0x4 and int $0x3 (use
asm(".byte 0xCD, 0x03")) get here.But into (
0xCE) and int3 (0xCC) do use event type SWEXC.BTW, into is NOT allowed in 64-bit mode but "int $0x4" is allowed.
There is certainly fun to be had with CD 03 and CD 04 byte patterns, but if you meant to mean those here, then the comments are wrong.
Vectors 3 and 4 are installed with DPL3 because that is necessary to make CC and CE function in userspace. It also suggests that the SWINT vs SWEXC distinction was retrofitted to architecture after the 286, because exceptions don't check DPL and ICEBP delivers #DB from userspace even when Vector 1 has a DPL of 0.
While CC is for most cases indistinguishable from CD 03, CE behaves entirely differently to CD 04. CD 04 doesn't #UD in 64bit mode, and will trigger
exc_overflow()irrespective of the state of EFLAGS.OF.Quoted 6 lines
The SDM goes out of it's way to say not to use the CD 03 byte pattern (and it does take effort to emit this byte pattern - e.g. GAS will silently translate "int $3" to "int3"), and there's no plausible way software is using CD 04 in place of CE.
So why do we care about containing to make mistakes of the IDT era work in a FRED world?
First, I agree with you because it makes things simple and neat.
However, the latest SDM and FRED spec 5.0 both doesn't disallow it, so it becomes an OS implementation choice.
Quoted 2 lines
Is there anything (other than perhaps the selftests) which would even notice?
I'm just conservative :)
If a user app can do it with IDT, we should still allow it when FRED is enabled. But if all key stakeholders don't care whatever gets broken due to the change and agree to change it.
Quoted 34 lines
Quoted 25 lines
Quoted 25 lines
arch/x86/entry/entry_fred.c
Quoted 11 lines
arch/x86/entry/entry_fred.c new file +11
-0+instrumentation_end (); +irqentry_exit (regs, state); + }else { +common_interrupt (regs, vector); + } +} + +static noinstr void fred_exception(struct pt_regs *regs, unsigned +long error_code) { +/* Optimize for #PF. That's the only exception which matters +performance wise */
arch/x86/entry/entry_fred.c line 160
Quoted 10 lines
arch/x86/entry/entry_fred.c new file +10
-0+if (likely (regs->fred_ss.vector ==X86_TRAP_PF )) { +exc_page_fault (regs, error_code); +return ; + } + +switch (regs->fred_ss.vector) { +case X86_TRAP_DE :return exc_divide_error (regs); +case X86_TRAP_DB :return fred_exc_debug (regs); +case X86_TRAP_BP :return exc_int3 (regs); +case X86_TRAP_OF :return exc_overflow (regs);Depending on what you want to do with BP/OF vs
fred_intx(), this may need adjusting.Quoted 5 lines
Quoted 2 lines
If you are cross-checking type and vector, then these should be rejected for not being of type HWEXC.
You're right, the event type needs to be SWEXC for into and int3.
However, would it be overkilling? Assuming hardware and VMM are sane.
You either care about cross checking, or not. Right now, this patch is a mix of the two approaches.
Quoted 9 lines
Quoted 3 lines
In my opinion, cross-checking is the better approach, because it means that violations of the assumptions get noticed more quickly, and hopefully by whomever is working on the new feature which alters the assumptions.
Yeah, I can make the change.
Thanks!
Xin
The intent is to not break userspace even if userspace does something fundamentally stupid.
Re: [PATCH v13 26/35] x86/fred: FRED entry/exit and dispatch code
In reply to Li, Xin3Quoted 53 lines · On Wed, Dec 6, 2023 at 2:19 PM Li, Xin3 <[email protected]> wrote:
Quoted 40 lines
Quoted 21 lines
Quoted 11 lines
arch/x86/entry/entry_fred.c line 65
Quoted 9 lines
+ case
X86_TRAP_OF:arch/x86/entry/entry_fred.c new file +7
-0+exc_overflow (regs); +return ; + +/* INT3 */ +case X86_TRAP_BP : +exc_int3 (regs); +return ;... neither OF nor BP will ever enter
fred_intx()because they're type SWEXC not SWINT.Per FRED spec 5.0, section 7.3 Software Interrupts and Related Instructions:
INT n (opcode CD followed by an immediate byte): There are 256 such software interrupt instructions, one for each value n of the immediate byte (0–255).And appendix B Event Stack Levels:
If the event is an execution of INT n (opcode CD n for 8-bit value n), the event stack level is 0. The event type is 4 (software interrupt) and the vector is n.Quoted 5 lines
So int $0x4 and int $0x3 (use
asm(".byte 0xCD, 0x03")) get here.But into (
0xCE) and int3 (0xCC) do use event type SWEXC.BTW, into is NOT allowed in 64-bit mode but "int $0x4" is allowed.
There is certainly fun to be had with CD 03 and CD 04 byte patterns, but if you meant to mean those here, then the comments are wrong.
Vectors 3 and 4 are installed with DPL3 because that is necessary to make CC and CE function in userspace. It also suggests that the SWINT vs SWEXC distinction was retrofitted to architecture after the 286, because exceptions don't check DPL and ICEBP delivers #DB from userspace even when Vector 1 has a DPL of 0.
While CC is for most cases indistinguishable from CD 03, CE behaves entirely differently to CD 04. CD 04 doesn't #UD in 64bit mode, and will trigger
exc_overflow()irrespective of the state of EFLAGS.OF.Quoted 6 lines
The SDM goes out of it's way to say not to use the CD 03 byte pattern (and it does take effort to emit this byte pattern - e.g. GAS will silently translate "int $3" to "int3"), and there's no plausible way software is using CD 04 in place of CE.
So why do we care about containing to make mistakes of the IDT era work in a FRED world?
First, I agree with you because it makes things simple and neat.
However, the latest SDM and FRED spec 5.0 both doesn't disallow it, so it becomes an OS implementation choice.
Quoted 1 line
Quoted 7 lines
Quoted 1 line
Is there anything (other than perhaps the selftests) which would even notice?
I'm just conservative :)
If a user app can do it with IDT, we should still allow it when FRED is enabled. But if all key stakeholders don't care whatever gets broken due to the change and agree to change it.
One case to consider is Windows software running under Wine. Anti-tampering code has been known to do some non-standard things, like using ICEBP or using SYSCALL directly instead of through system DLLs. Keeping the status quo should be preferred, especially if Microsoft does the same.
Brian Gerst
RE: [PATCH v13 26/35] x86/fred: FRED entry/exit and dispatch code
In reply to Li, Xin3Quoted 5 lines
Quoted 3 lines
In my opinion, cross-checking is the better approach, because it means that violations of the assumptions get noticed more quickly, and hopefully by whomever is working on the new feature which alters the assumptions.
Yeah, I can make the change.
Hi Andrew,
Following is the updated patch, can you please have another review?
Thanks!
Xin
arch/x86/entry/entry_fred.c new file +252 -0
@@ -0,0 +1,252 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* +* The FRED specific kernel/user entry functions which are invoked from +* assembly code and dispatch to the associated handlers. +*/ +#include <linux/kernel.h> +#include <linux/kdebug.h> +#include <linux/nospec.h> + +#include <asm/desc.h> +#include <asm/fred.h> +#include <asm/idtentry.h> +#include <asm/syscall.h> +#include <asm/trapnr.h> +#include <asm/traps.h> + +/* FRED EVENT_TYPE_OTHER vector numbers */ +#define FRED_SYSCALL 1 +#define FRED_SYSENTER 2 + +static noinstr void fred_bad_type(struct pt_regs *regs, unsigned long error_code) +{ +irqentry_state_t irq_state =irqentry_nmi_enter (regs); + +instrumentation_begin (); + +/* Panic on events from a high stack level */ +if (regs->fred_cs.sl >0 ) { +pr_emerg ("PANIC: invalid or fatal FRED event; event type %u " +"vector %u error 0x%lx aux 0x%lx at %04x:%016lx\n" , + regs->fred_ss.type, regs->fred_ss.vector, regs->orig_ax, +fred_event_data (regs), regs->cs, regs->ip); +die ("invalid or fatal FRED event" , regs, regs->orig_ax); +panic ("invalid or fatal FRED event" ); + }else { +unsigned long flags =oops_begin (); +int sig =SIGKILL ; + +pr_alert ("BUG: invalid or fatal FRED event; event type %u " +"vector %u error 0x%lx aux 0x%lx at %04x:%016lx\n" , + regs->fred_ss.type, regs->fred_ss.vector, regs->orig_ax, +fred_event_data (regs), regs->cs, regs->ip); + +if (__die ("Invalid or fatal FRED event" , regs, regs->orig_ax)) + sig =0 ; + +oops_end (flags, regs, sig); + } + +instrumentation_end (); +irqentry_nmi_exit (regs, irq_state); +} + +static noinstr void fred_intx(struct pt_regs *regs) +{ +switch (regs->fred_ss.vector) { +/* Opcode 0xcd, 0x3, NOT INT3 (opcode 0xcc) */ +case X86_TRAP_BP : +exc_int3 (regs); +return ; + +/* Opcode 0xcd, 0x4, NOT INTO (opcode 0xce) */ +case X86_TRAP_OF : +exc_overflow (regs); +return ; + +/* INT80 */ +case IA32_SYSCALL_VECTOR : +if (ia32_enabled ()) { +/* Save the syscall number */ + regs->orig_ax = regs->ax; + regs->ax = -ENOSYS ; +do_int80_syscall_32 (regs); +return ; + } + fallthrough; + +default : +exc_general_protection (regs,0 ); +return ; + } +} + +static __always_inline void fred_other(struct pt_regs *regs) +{ +/* The compiler can fold these conditions into a single test */ +if (likely (regs->fred_ss.vector ==FRED_SYSCALL && regs->fred_ss.lm)) { + regs->orig_ax = regs->ax; + regs->ax = -ENOSYS ; +do_syscall_64 (regs, regs->orig_ax); +return ; + }else if (ia32_enabled () && +likely (regs->fred_ss.vector ==FRED_SYSENTER && + !regs->fred_ss.lm)) { + regs->orig_ax = regs->ax; + regs->ax = -ENOSYS ; +do_fast_syscall_32 (regs); +return ; + }else { +exc_invalid_op (regs); +return ; + } +} + +#define SYSVEC (_vector, _function) [_vector - FIRST_SYSTEM_VECTOR] = fred_sysvec_##_function + +static idtentry_t sysvec_table[NR_SYSTEM_VECTORS ]__ro_after_init = { +SYSVEC (ERROR_APIC_VECTOR , error_interrupt), +SYSVEC (SPURIOUS_APIC_VECTOR , spurious_apic_interrupt), +SYSVEC (LOCAL_TIMER_VECTOR , apic_timer_interrupt), +SYSVEC (X86_PLATFORM_IPI_VECTOR , x86_platform_ipi), + +SYSVEC (RESCHEDULE_VECTOR , reschedule_ipi), +SYSVEC (CALL_FUNCTION_SINGLE_VECTOR , call_function_single), +SYSVEC (CALL_FUNCTION_VECTOR , call_function), +SYSVEC (REBOOT_VECTOR , reboot), + +SYSVEC (THRESHOLD_APIC_VECTOR , threshold), +SYSVEC (DEFERRED_ERROR_VECTOR , deferred_error), +SYSVEC (THERMAL_APIC_VECTOR , thermal), + +SYSVEC (IRQ_WORK_VECTOR , irq_work), + +SYSVEC (POSTED_INTR_VECTOR , kvm_posted_intr_ipi), +SYSVEC (POSTED_INTR_WAKEUP_VECTOR , kvm_posted_intr_wakeup_ipi), +SYSVEC (POSTED_INTR_NESTED_VECTOR , kvm_posted_intr_nested_ipi), +}; + +static noinstr void fred_extint(struct pt_regs *regs) +{ +unsigned int vector = regs->fred_ss.vector; +unsigned int index =array_index_nospec (vector -FIRST_SYSTEM_VECTOR , +NR_SYSTEM_VECTORS ); + +if (WARN_ON_ONCE (vector <FIRST_EXTERNAL_VECTOR )) +return ; + +if (likely (vector >=FIRST_SYSTEM_VECTOR )) { +irqentry_state_t state =irqentry_enter (regs); + +instrumentation_begin (); + sysvec_table[index](regs); +instrumentation_end (); +irqentry_exit (regs, state); + }else { +common_interrupt (regs, vector); + } +} + +static noinstr void fred_hwexc(struct pt_regs *regs, unsigned long error_code) +{ +/* Optimize for #PF. That's the only exception which matters performance wise */ +if (likely (regs->fred_ss.vector ==X86_TRAP_PF )) +return exc_page_fault (regs, error_code); + +switch (regs->fred_ss.vector) { +case X86_TRAP_DE :return exc_divide_error (regs); +case X86_TRAP_DB :return fred_exc_debug (regs); +case X86_TRAP_BR :return exc_bounds (regs); +case X86_TRAP_UD :return exc_invalid_op (regs); +case X86_TRAP_NM :return exc_device_not_available (regs); +case X86_TRAP_DF :return exc_double_fault (regs, error_code); +case X86_TRAP_TS :return exc_invalid_tss (regs, error_code); +case X86_TRAP_NP :return exc_segment_not_present (regs, error_code); +case X86_TRAP_SS :return exc_stack_segment (regs, error_code); +case X86_TRAP_GP :return exc_general_protection (regs, error_code); +case X86_TRAP_MF :return exc_coprocessor_error (regs); +case X86_TRAP_AC :return exc_alignment_check (regs, error_code); +case X86_TRAP_XF :return exc_simd_coprocessor_error (regs); + +#ifdef CONFIG_X86_MCE +case X86_TRAP_MC :return fred_exc_machine_check (regs); +#endif +#ifdef CONFIG_INTEL_TDX_GUEST +case X86_TRAP_VE :return exc_virtualization_exception (regs); +#endif +#ifdef CONFIG_X86_CET +case X86_TRAP_CP :return exc_control_protection (regs, error_code); +#endif +default :return fred_bad_type (regs, error_code); + } + +} + +static noinstr void fred_swexc(struct pt_regs *regs, unsigned long error_code) +{ +switch (regs->fred_ss.vector) { +case X86_TRAP_BP :return exc_int3 (regs); +case X86_TRAP_OF :return exc_overflow (regs); +default :return fred_bad_type (regs, error_code); + } +} + +__visible noinstr void fred_entry_from_user(struct pt_regs *regs) +{ +unsigned long error_code = regs->orig_ax; + +/* Invalidate orig_ax so that syscall_get_nr() works correctly */ + regs->orig_ax =-1 ; + +switch (regs->fred_ss.type) { +case EVENT_TYPE_EXTINT : +return fred_extint (regs); +case EVENT_TYPE_NMI : +if (likely (regs->fred_ss.vector ==X86_TRAP_NMI )) +return fred_exc_nmi (regs); +break ; +case EVENT_TYPE_SWINT : +return fred_intx (regs); +case EVENT_TYPE_HWEXC : +return fred_hwexc (regs, error_code); +case EVENT_TYPE_SWEXC : +return fred_swexc (regs, error_code); +case EVENT_TYPE_PRIV_SWEXC : +if (likely (regs->fred_ss.vector ==X86_TRAP_DB )) +return fred_exc_debug (regs); +break ; +case EVENT_TYPE_OTHER : +return fred_other (regs); +default :break ; + } + +return fred_bad_type (regs, error_code); +} + +__visible noinstr void fred_entry_from_kernel(struct pt_regs *regs) +{ +unsigned long error_code = regs->orig_ax; + +/* Invalidate orig_ax so that syscall_get_nr() works correctly */ + regs->orig_ax =-1 ; + +switch (regs->fred_ss.type) { +case EVENT_TYPE_EXTINT : +return fred_extint (regs); +case EVENT_TYPE_NMI : +if (likely (regs->fred_ss.vector ==X86_TRAP_NMI )) +return fred_exc_nmi (regs); +break ; +case EVENT_TYPE_HWEXC : +return fred_hwexc (regs, error_code); +case EVENT_TYPE_SWEXC : +return fred_swexc (regs, error_code); +case EVENT_TYPE_PRIV_SWEXC : +if (likely (regs->fred_ss.vector ==X86_TRAP_DB )) +return fred_exc_debug (regs); +break ; +default :break ; + } + +return fred_bad_type (regs, error_code); +}
PATCH v13 26/35 x86/fred: FRED entry/exit and dispatch code
From: "H. Peter Anvin (Intel)" <[email protected]>
The code to actually handle kernel and event entry/exit using FRED. It is split up into two files thus:
- entry_64_fred.S contains the actual entrypoints and exit code, and saves and restores registers.
- entry_fred.c contains the two-level event dispatch code for FRED. The first-level dispatch is on the event type, and the second-level is on the event vector.
---
Changes since v13:
* Fix a typo, INTO instead of INT0 (Andrew Cooper).
* Build #CP handler with CONFIG_X86_CET instead of CONFIG_X86_KERNEL_IBT (Andrew Cooper).
* Use array_index_nospec() to safe-guard sysvec_table index calculation (Andrew Cooper).
* Cross-check both event type and vector (Andrew Cooper).
Changes since v10:
* Replace "IS_ENABLED(CONFIG_IA32_EMULATION)" with the new ia32_enabled() API (Nikolay Borisov).
Changes since v9:
* Don't use jump tables, indirect jumps are expensive (Thomas Gleixner).
* Except NMI/#DB/#MCE, FRED really can share the exception handlers with IDT (Thomas Gleixner).
* Avoid the sysvec_* idt_entry muck, do it at a central place, reuse code instead of blindly copying it, which breaks the performance optimized sysvec entries like reschedule_ipi (Thomas Gleixner).
* Add asm_ prefix to FRED asm entry points (Thomas Gleixner).
Changes since v8:
* Don't do syscall early out in fred_entry_from_user() before there are proper performance numbers and justifications (Thomas Gleixner).
* Add the control exception handler to the FRED exception handler table (Thomas Gleixner).
* Add ENDBR to the FRED_ENTER asm macro.
* Reflect the FRED spec 5.0 change that ERETS and ERETU add 8 to %rsp before popping the return context from the stack.
Changes since v1:
* Initialize a FRED exception handler to fred_bad_event() instead of NULL if no FRED handler defined for an exception vector (Peter Zijlstra).
* Push calling irqentry_{enter,exit}() and instrumentation_{begin,end}() down into individual FRED exception handlers, instead of in the dispatch framework (Peter Zijlstra).
--- arch/x86/entry/Makefile | 5 +- arch/x86/entry/entry_64_fred.S | 52 ++++++ arch/x86/entry/entry_fred.c | 244 ++++++++++++++++++++++++++ arch/x86/include/asm/asm-prototypes.h | 1 + arch/x86/include/asm/fred.h | 6 + 5 files changed, 307 insertions(+), 1 deletion(-) create mode 100644 arch/x86/entry/entry_64_fred.S create mode 100644 arch/x86/entry/entry_fred.c
arch/x86/entry/Makefile +4 -1
@@ -18,6 +18,9 @@ obj-y += vdso/ obj-y += vsyscall/ obj-$(CONFIG_PREEMPTION) += thunk_$(BITS).o +CFLAGS_entry_fred.o += -fno-stack-protector +CFLAGS_REMOVE_entry_fred.o += -pg $(CC_FLAGS_FTRACE) +obj-$(CONFIG_X86_FRED) += entry_64_fred.o entry_fred.o + obj-$(CONFIG_IA32_EMULATION) += entry_64_compat.o syscall_32.o obj-$(CONFIG_X86_X32_ABI) += syscall_x32.o -
arch/x86/entry/entry_64_fred.S new file +52 -0
52 lines not on this page · raw message
arch/x86/entry/entry_fred.c new file +244 -0
244 lines not on this page · raw message
arch/x86/include/asm/asm-prototypes.h +1 -0
@@ -12,6 +12,7 @@#include <asm/special_insns.h> #include <asm/preempt.h> #include <asm/asm.h> +#include <asm/fred.h> #include <asm/gsseg.h> #ifndef CONFIG_X86_CMPXCHG64
arch/x86/include/asm/fred.h +6 -0
@@ -60,6 +60,12 @@ static __always_inline unsigned long fred_event_data(struct pt_regs *regs)return fred_info (regs)->edata; } +void asm_fred_entrypoint_user (void ); +void asm_fred_entrypoint_kernel (void ); + +__visible void fred_entry_from_user(struct pt_regs *regs); +__visible void fred_entry_from_kernel(struct pt_regs *regs); +#else /* CONFIG_X86_FRED */ static __always_inline unsigned long fred_event_data (struct pt_regs *regs) {return 0 ; }#endif /* CONFIG_X86_FRED */
Signature · 1 line
2.43.0
[tip: x86/fred] x86/fred: FRED entry/exit and dispatch code
The following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: 5e0636a414857287e57bdca888a163e4a7d1a326 Gitweb: https://git.kernel.org/tip/5e0636a414857287e57bdca888a163e4a7d1a326 Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Sat, 09 Dec 2023 13:42:14 -08:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Thu, 25 Jan 2024 19:10:32 +01:00
x86/fred: FRED entry/exit and dispatch code
The code to actually handle kernel and event entry/exit using FRED. It is split up into two files thus:
- entry_64_fred.S contains the actual entrypoints and exit code, and saves and restores registers.
- entry_fred.c contains the two-level event dispatch code for FRED. The first-level dispatch is on the event type, and the second-level is on the event vector.
--- arch/x86/entry/Makefile | 5 +- arch/x86/entry/entry_64_fred.S | 52 +++++- arch/x86/entry/entry_fred.c | 243 +++++++++++++++++++++++++- arch/x86/include/asm/asm-prototypes.h | 1 +- arch/x86/include/asm/fred.h | 6 +- 5 files changed, 306 insertions(+), 1 deletion(-) create mode 100644 arch/x86/entry/entry_64_fred.S create mode 100644 arch/x86/entry/entry_fred.c
arch/x86/entry/Makefile +4 -1
@@ -18,6 +18,9 @@ obj-y += vdso/ obj-y += vsyscall/ obj-$(CONFIG_PREEMPTION) += thunk_$(BITS).o +CFLAGS_entry_fred.o += -fno-stack-protector +CFLAGS_REMOVE_entry_fred.o += -pg $(CC_FLAGS_FTRACE) +obj-$(CONFIG_X86_FRED) += entry_64_fred.o entry_fred.o + obj-$(CONFIG_IA32_EMULATION) += entry_64_compat.o syscall_32.o obj-$(CONFIG_X86_X32_ABI) += syscall_x32.o -
arch/x86/entry/entry_64_fred.S new file +52 -0
52 lines not on this page · raw message
arch/x86/entry/entry_fred.c new file +243 -0
243 lines not on this page · raw message
arch/x86/include/asm/asm-prototypes.h +1 -0
@@ -12,6 +12,7 @@#include <asm/special_insns.h> #include <asm/preempt.h> #include <asm/asm.h> +#include <asm/fred.h> #include <asm/gsseg.h> #ifndef CONFIG_X86_CMPXCHG64
arch/x86/include/asm/fred.h +6 -0
@@ -60,6 +60,12 @@ static __always_inline unsigned long fred_event_data(struct pt_regs *regs)return fred_info (regs)->edata; } +void asm_fred_entrypoint_user (void ); +void asm_fred_entrypoint_kernel (void ); + +__visible void fred_entry_from_user(struct pt_regs *regs); +__visible void fred_entry_from_kernel(struct pt_regs *regs); +#else /* CONFIG_X86_FRED */ static __always_inline unsigned long fred_event_data (struct pt_regs *regs) {return 0 ; }#endif /* CONFIG_X86_FRED */
Borislav Petkov
maintainerRe: [tip: x86/fred] x86/fred: FRED entry/exit and dispatch code
arch/x86/entry/entry_64_fred.S line 39
Quoted 8 lines · On Thu, Jan 25, 2024 at 06:21:21PM -0000, tip-bot2 for H. Peter Anvin (Intel)…
arch/x86/entry/entry_64_fred.S new file +8
-0+SYM_CODE_START_NOALIGN(asm_fred_entrypoint_user) + FRED_ENTER + call fred_entry_from_user + FRED_EXIT + ERETU +SYM_CODE_END(asm_fred_entrypoint_user) + +.fill asm_fred_entrypoint_kernel - ., 1, 0xcc
me compiler no likey:
/tmp/entry_64_fred-de6f10.s:896:7: error: expected assembly-time absolute expression .fill asm_fred_entrypoint_kernel - ., 1, 0xcc
^
make[4]: *** [scripts/Makefile.build:361: arch/x86/entry/entry_64_fred.o] Error 1 make[4]: *** Waiting for unfinished jobs....
make[3]: *** [scripts/Makefile.build:481: arch/x86/entry] Error 2 make[3]: *** Waiting for unfinished jobs....
config is x86_64 allmodconfig, compiler is
$ clang --version Ubuntu clang version 14.0.0-1ubuntu1.1
Signature · 4 lines
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquetteBorislav Petkov
maintainerRe: [PATCH v13A 26/35] x86/fred: FRED entry/exit and dispatch code
In reply to Xin LiQuoted 5 lines · Xin Li
arch/x86/entry/entry_fred.c new file +5
-0+static noinstr void fred_intx(struct pt_regs *regs) +{ +switch (regs->fred_ss.vector) { +/* Opcode 0xcd, 0x3, NOT INT3 (opcode 0xcc) */ +case X86_TRAP_BP :
arch/x86/entry/entry_fred.c line 68
Quoted 10 lines
arch/x86/entry/entry_fred.c new file +10
-0+return exc_int3 (regs); + +/* Opcode 0xcd, 0x4, NOT INTO (opcode 0xce) */ +case X86_TRAP_OF : +return exc_overflow (regs); + +/* INT80 */ +case IA32_SYSCALL_VECTOR : +if (ia32_enabled ()) +return int80_emulation (regs);
Second compiler no likey:
arch/x86/entry/entry_fred.c:68:11: error: implicit declaration of function 'int80_emulation' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
return int80_emulation(regs);
^
arch/x86/entry/entry_fred.c:68:4: error: void function 'fred_intx' should not return a value [-Wreturn-type]
return int80_emulation(regs);
^ ~~~~~~~~~~~~~~~~~~~~~2 errors generated.
config is attached.
compiler is Ubuntu clang version 14.0.0-1ubuntu1.1.
Signature · 4 lines
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette#
# Automatically generated file; DO NOT EDIT.
# Linux/x86_64 6.8.0-rc1 Kernel Configuration
#CONFIG_CC_VERSION_TEXT="gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0" CONFIG_CC_IS_GCC=yCONFIG_GCC_VERSION=110400CONFIG_CLANG_VERSION=0CONFIG_AS_IS_GNU=yCONFIG_AS_VERSION=23800CONFIG_LD_IS_BFD=yCONFIG_LD_VERSION=23800CONFIG_LLD_VERSION=0CONFIG_CC_CAN_LINK=yCONFIG_CC_CAN_LINK_STATIC=y CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y CONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y CONFIG_TOOLS_SUPPORT_RELR=yCONFIG_CC_HAS_ASM_INLINE=y CONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y CONFIG_PAHOLE_VERSION=0CONFIG_CONSTRUCTORS=yCONFIG_IRQ_WORK=yCONFIG_BUILDTIME_TABLE_SORT=y CONFIG_THREAD_INFO_IN_TASK=y
#
# General setup
#CONFIG_INIT_ENV_ARG_LIMIT=32CONFIG_COMPILE_TEST=y
# CONFIG_WERROR is not set
# CONFIG_UAPI_HEADER_TEST is not setCONFIG_LOCALVERSION=""CONFIG_BUILD_SALT=""CONFIG_HAVE_KERNEL_GZIP=yCONFIG_HAVE_KERNEL_BZIP2=yCONFIG_HAVE_KERNEL_LZMA=yCONFIG_HAVE_KERNEL_XZ=yCONFIG_HAVE_KERNEL_LZO=yCONFIG_HAVE_KERNEL_LZ4=yCONFIG_HAVE_KERNEL_ZSTD=yCONFIG_KERNEL_GZIP=y
# CONFIG_KERNEL_BZIP2 is not set
# CONFIG_KERNEL_LZMA is not set
# CONFIG_KERNEL_XZ is not set
# CONFIG_KERNEL_LZO is not set
# CONFIG_KERNEL_LZ4 is not set
# CONFIG_KERNEL_ZSTD is not setCONFIG_DEFAULT_INIT=""CONFIG_DEFAULT_HOSTNAME="(none)"
# CONFIG_SYSVIPC is not set
# CONFIG_POSIX_MQUEUE is not set
# CONFIG_WATCH_QUEUE is not setCONFIG_CROSS_MEMORY_ATTACH=yCONFIG_USELIB=yCONFIG_AUDIT=yCONFIG_HAVE_ARCH_AUDITSYSCALL=yCONFIG_AUDITSYSCALL=y
#
# IRQ subsystem
#CONFIG_GENERIC_IRQ_PROBE=yCONFIG_GENERIC_IRQ_SHOW=yCONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=yCONFIG_GENERIC_PENDING_IRQ=yCONFIG_GENERIC_IRQ_MIGRATION=yCONFIG_GENERIC_IRQ_INJECTION=yCONFIG_HARDIRQS_SW_RESEND=yCONFIG_GENERIC_IRQ_CHIP=yCONFIG_IRQ_DOMAIN=yCONFIG_IRQ_SIM=yCONFIG_IRQ_DOMAIN_HIERARCHY=yCONFIG_IRQ_MSI_IOMMU=yCONFIG_GENERIC_IRQ_MATRIX_ALLOCATOR=yCONFIG_GENERIC_IRQ_RESERVATION_MODE=yCONFIG_IRQ_FORCED_THREADING=yCONFIG_SPARSE_IRQ=yCONFIG_GENERIC_IRQ_DEBUGFS=y
# end of IRQ subsystem
CONFIG_CLOCKSOURCE_WATCHDOG=yCONFIG_ARCH_CLOCKSOURCE_INIT=yCONFIG_CLOCKSOURCE_VALIDATE_LAST_CYCLE=yCONFIG_GENERIC_TIME_VSYSCALL=yCONFIG_GENERIC_CLOCKEVENTS=yCONFIG_GENERIC_CLOCKEVENTS_BROADCAST=yCONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=yCONFIG_GENERIC_CMOS_UPDATE=yCONFIG_HAVE_POSIX_CPU_TIMERS_TASK_WORK=yCONFIG_POSIX_CPU_TIMERS_TASK_WORK=yCONFIG_CONTEXT_TRACKING=yCONFIG_CONTEXT_TRACKING_IDLE=y
#
# Timers subsystem
#CONFIG_TICK_ONESHOT=yCONFIG_NO_HZ_COMMON=y
# CONFIG_HZ_PERIODIC is not setCONFIG_NO_HZ_IDLE=y
# CONFIG_NO_HZ_FULL is not setCONFIG_NO_HZ=yCONFIG_HIGH_RES_TIMERS=yCONFIG_CLOCKSOURCE_WATCHDOG_MAX_SKEW_US=125
# end of Timers subsystem
CONFIG_BPF=yCONFIG_HAVE_EBPF_JIT=yCONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y
#
# BPF subsystem
#
# CONFIG_BPF_SYSCALL is not set
# end of BPF subsystem
CONFIG_PREEMPT_BUILD=yCONFIG_PREEMPT_NONE=y
# CONFIG_PREEMPT_VOLUNTARY is not set
# CONFIG_PREEMPT is not setCONFIG_PREEMPT_COUNT=yCONFIG_PREEMPTION=yCONFIG_PREEMPT_DYNAMIC=y
# CONFIG_SCHED_CORE is not set
#
# CPU/Task time and stats accounting
#CONFIG_TICK_CPU_ACCOUNTING=y
# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set
# CONFIG_IRQ_TIME_ACCOUNTING is not set
# CONFIG_BSD_PROCESS_ACCT is not set
# CONFIG_TASKSTATS is not setCONFIG_PSI=y
# CONFIG_PSI_DEFAULT_DISABLED is not set
# end of CPU/Task time and stats accounting
# CONFIG_CPU_ISOLATION is not set
#
# RCU Subsystem
#CONFIG_TREE_RCU=yCONFIG_PREEMPT_RCU=yCONFIG_RCU_EXPERT=yCONFIG_TREE_SRCU=yCONFIG_TASKS_RCU_GENERIC=yCONFIG_FORCE_TASKS_RCU=yCONFIG_TASKS_RCU=y
# CONFIG_FORCE_TASKS_RUDE_RCU is not setCONFIG_TASKS_RUDE_RCU=yCONFIG_FORCE_TASKS_TRACE_RCU=yCONFIG_TASKS_TRACE_RCU=yCONFIG_RCU_STALL_COMMON=yCONFIG_RCU_NEED_SEGCBLIST=yCONFIG_RCU_FANOUT=64CONFIG_RCU_FANOUT_LEAF=16
# CONFIG_RCU_BOOST is not setCONFIG_RCU_NOCB_CPU=yCONFIG_RCU_NOCB_CPU_DEFAULT_ALL=yCONFIG_TASKS_TRACE_RCU_READ_MB=y
# CONFIG_RCU_LAZY is not set
# CONFIG_RCU_DOUBLE_CHECK_CB_TIME is not set
# end of RCU Subsystem
CONFIG_IKCONFIG=y
# CONFIG_IKCONFIG_PROC is not setCONFIG_IKHEADERS=yCONFIG_LOG_BUF_SHIFT=17CONFIG_LOG_CPU_MAX_BUF_SHIFT=0CONFIG_PRINTK_INDEX=yCONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y
#
# Scheduler features
#
# end of Scheduler features
CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH=y CONFIG_CC_HAS_INT128=y CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5" CONFIG_GCC11_NO_ARRAY_BOUNDS=y CONFIG_CC_NO_ARRAY_BOUNDS=y CONFIG_GCC11_NO_STRINGOP_OVERFLOW=y CONFIG_CC_NO_STRINGOP_OVERFLOW=y CONFIG_ARCH_SUPPORTS_INT128=y CONFIG_NUMA_BALANCING=y CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=y CONFIG_CGROUPS=yCONFIG_PAGE_COUNTER=y CONFIG_CGROUP_FAVOR_DYNMODS=yCONFIG_MEMCG=yCONFIG_MEMCG_KMEM=y
# CONFIG_BLK_CGROUP is not set CONFIG_CGROUP_SCHED=yCONFIG_FAIR_GROUP_SCHED=yCONFIG_CFS_BANDWIDTH=yCONFIG_RT_GROUP_SCHED=yCONFIG_SCHED_MM_CID=y
# CONFIG_CGROUP_PIDS is not set
# CONFIG_CGROUP_RDMA is not set CONFIG_CGROUP_FREEZER=y
# CONFIG_CGROUP_HUGETLB is not set
# CONFIG_CPUSETS is not set CONFIG_CGROUP_DEVICE=yCONFIG_CGROUP_CPUACCT=y
# CONFIG_CGROUP_PERF is not set CONFIG_CGROUP_MISC=y
# CONFIG_CGROUP_DEBUG is not set CONFIG_SOCK_CGROUP_DATA=yCONFIG_NAMESPACES=y
# CONFIG_UTS_NS is not setCONFIG_TIME_NS=yCONFIG_USER_NS=yCONFIG_PID_NS=yCONFIG_NET_NS=yCONFIG_CHECKPOINT_RESTORE=y CONFIG_SCHED_AUTOGROUP=y
# CONFIG_RELAY is not set CONFIG_BLK_DEV_INITRD=y CONFIG_INITRAMFS_SOURCE=""CONFIG_RD_GZIP=y
# CONFIG_RD_BZIP2 is not set
# CONFIG_RD_LZMA is not setCONFIG_RD_XZ=y
# CONFIG_RD_LZO is not set
# CONFIG_RD_LZ4 is not setCONFIG_RD_ZSTD=yCONFIG_BOOT_CONFIG=yCONFIG_BOOT_CONFIG_FORCE=y
# CONFIG_BOOT_CONFIG_EMBED is not set CONFIG_INITRAMFS_PRESERVE_MTIME=y CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set CONFIG_LD_ORPHAN_WARN=y CONFIG_LD_ORPHAN_WARN_LEVEL="warn" CONFIG_SYSCTL=yCONFIG_SYSCTL_EXCEPTION_TRACE=y CONFIG_HAVE_PCSPKR_PLATFORM=y
# CONFIG_EXPERT is not setCONFIG_MULTIUSER=yCONFIG_SGETMASK_SYSCALL=yCONFIG_SYSFS_SYSCALL=yCONFIG_FHANDLE=yCONFIG_POSIX_TIMERS=yCONFIG_PRINTK=yCONFIG_BUG=yCONFIG_ELF_CORE=yCONFIG_PCSPKR_PLATFORM=yCONFIG_BASE_FULL=yCONFIG_FUTEX=yCONFIG_FUTEX_PI=yCONFIG_EPOLL=yCONFIG_SIGNALFD=yCONFIG_TIMERFD=yCONFIG_EVENTFD=yCONFIG_SHMEM=yCONFIG_AIO=yCONFIG_IO_URING=yCONFIG_ADVISE_SYSCALLS=yCONFIG_MEMBARRIER=yCONFIG_KCMP=yCONFIG_RSEQ=yCONFIG_CACHESTAT_SYSCALL=yCONFIG_KALLSYMS=yCONFIG_KALLSYMS_SELFTEST=yCONFIG_KALLSYMS_ALL=y CONFIG_KALLSYMS_ABSOLUTE_PERCPU=y CONFIG_KALLSYMS_BASE_RELATIVE=y CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y CONFIG_HAVE_PERF_EVENTS=y CONFIG_GUEST_PERF_EVENTS=y CONFIG_PERF_USE_VMALLOC=y
#
# Kernel Performance Events And Counters
#CONFIG_PERF_EVENTS=yCONFIG_DEBUG_PERF_USE_VMALLOC=y
# end of Kernel Performance Events And Counters
CONFIG_SYSTEM_DATA_VERIFICATION=yCONFIG_PROFILING=yCONFIG_TRACEPOINTS=y
#
# Kexec and crash features
#
# CONFIG_KEXEC is not set
# CONFIG_KEXEC_FILE is not set
# CONFIG_CRASH_DUMP is not set
# end of Kexec and crash features # end of General setup
CONFIG_64BIT=yCONFIG_X86_64=yCONFIG_X86=yCONFIG_INSTRUCTION_DECODER=yCONFIG_OUTPUT_FORMAT="elf64-x86-64"CONFIG_LOCKDEP_SUPPORT=yCONFIG_STACKTRACE_SUPPORT=yCONFIG_MMU=yCONFIG_ARCH_MMAP_RND_BITS_MIN=28CONFIG_ARCH_MMAP_RND_BITS_MAX=32CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=8CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=16CONFIG_GENERIC_ISA_DMA=yCONFIG_GENERIC_BUG=yCONFIG_GENERIC_BUG_RELATIVE_POINTERS=yCONFIG_ARCH_MAY_HAVE_PC_FDC=yCONFIG_GENERIC_CALIBRATE_DELAY=yCONFIG_ARCH_HAS_CPU_RELAX=yCONFIG_ARCH_HIBERNATION_POSSIBLE=yCONFIG_ARCH_SUSPEND_POSSIBLE=yCONFIG_AUDIT_ARCH=yCONFIG_X86_64_SMP=yCONFIG_ARCH_SUPPORTS_UPROBES=yCONFIG_FIX_EARLYCON_MEM=yCONFIG_PGTABLE_LEVELS=4CONFIG_CC_HAS_SANE_STACKPROTECTOR=y
#
# Processor type and features
#CONFIG_SMP=yCONFIG_X86_MPPARSE=y
# CONFIG_GOLDFISH is not setCONFIG_X86_CPU_RESCTRL=yCONFIG_X86_FRED=y
# CONFIG_X86_EXTENDED_PLATFORM is not setCONFIG_IOSF_MBI=yCONFIG_IOSF_MBI_DEBUG=yCONFIG_SCHED_OMIT_FRAME_POINTER=y
# CONFIG_HYPERVISOR_GUEST is not set
# CONFIG_MK8 is not set
# CONFIG_MPSC is not set
# CONFIG_MCORE2 is not set
# CONFIG_MATOM is not setCONFIG_GENERIC_CPU=yCONFIG_X86_INTERNODE_CACHE_SHIFT=6CONFIG_X86_L1_CACHE_SHIFT=6CONFIG_X86_TSC=yCONFIG_X86_HAVE_PAE=yCONFIG_X86_CMPXCHG64=yCONFIG_X86_CMOV=yCONFIG_X86_MINIMUM_CPU_FAMILY=64CONFIG_X86_DEBUGCTLMSR=yCONFIG_IA32_FEAT_CTL=yCONFIG_X86_VMX_FEATURE_NAMES=yCONFIG_CPU_SUP_INTEL=yCONFIG_CPU_SUP_AMD=yCONFIG_CPU_SUP_HYGON=yCONFIG_CPU_SUP_CENTAUR=yCONFIG_CPU_SUP_ZHAOXIN=yCONFIG_HPET_TIMER=yCONFIG_DMI=y
# CONFIG_GART_IOMMU is not setCONFIG_BOOT_VESA_SUPPORT=yCONFIG_MAXSMP=yCONFIG_NR_CPUS_RANGE_BEGIN=8192CONFIG_NR_CPUS_RANGE_END=8192CONFIG_NR_CPUS_DEFAULT=8192CONFIG_NR_CPUS=8192
# CONFIG_SCHED_CLUSTER is not setCONFIG_SCHED_SMT=y
# CONFIG_SCHED_MC is not setCONFIG_X86_LOCAL_APIC=yCONFIG_X86_IO_APIC=yCONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y
# CONFIG_X86_MCE is not set
#
# Performance monitoring
#CONFIG_PERF_EVENTS_INTEL_UNCORE=yCONFIG_PERF_EVENTS_INTEL_RAPL=y
# CONFIG_PERF_EVENTS_INTEL_CSTATE is not set
# CONFIG_PERF_EVENTS_AMD_POWER is not setCONFIG_PERF_EVENTS_AMD_UNCORE=y
# CONFIG_PERF_EVENTS_AMD_BRS is not set
# end of Performance monitoring
CONFIG_X86_16BIT=yCONFIG_X86_ESPFIX64=y CONFIG_X86_VSYSCALL_EMULATION=y CONFIG_X86_IOPL_IOPERM=yCONFIG_MICROCODE=y CONFIG_MICROCODE_LATE_LOADING=y
# CONFIG_MICROCODE_LATE_FORCE_MINREV is not set # CONFIG_X86_MSR is not set
# CONFIG_X86_CPUID is not set
# CONFIG_X86_5LEVEL is not set CONFIG_X86_DIRECT_GBPAGES=y
# CONFIG_X86_CPA_STATISTICS is not set CONFIG_NUMA=y
# CONFIG_AMD_NUMA is not set CONFIG_NUMA_EMU=yCONFIG_NODES_SHIFT=10 CONFIG_ARCH_SPARSEMEM_ENABLE=y CONFIG_ARCH_SPARSEMEM_DEFAULT=y CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000 CONFIG_X86_CHECK_BIOS_CORRUPTION=y CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y CONFIG_MTRR=yCONFIG_MTRR_SANITIZER=y CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT=0 CONFIG_MTRR_SANITIZER_SPARE_REG_NR_DEFAULT=1 CONFIG_X86_PAT=y CONFIG_ARCH_USES_PG_UNCACHED=y CONFIG_X86_UMIP=yCONFIG_CC_HAS_IBT=yCONFIG_X86_CET=yCONFIG_X86_KERNEL_IBT=y
# CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS is not set CONFIG_X86_INTEL_TSX_MODE_OFF=y
# CONFIG_X86_INTEL_TSX_MODE_ON is not set
# CONFIG_X86_INTEL_TSX_MODE_AUTO is not set CONFIG_X86_USER_SHADOW_STACK=y
# CONFIG_HZ_100 is not setCONFIG_HZ_250=y
# CONFIG_HZ_300 is not set
# CONFIG_HZ_1000 is not setCONFIG_HZ=250CONFIG_SCHED_HRTICK=y CONFIG_ARCH_SUPPORTS_KEXEC=y CONFIG_ARCH_SUPPORTS_KEXEC_FILE=y CONFIG_ARCH_SUPPORTS_KEXEC_PURGATORY=y CONFIG_ARCH_SUPPORTS_KEXEC_SIG=y CONFIG_ARCH_SUPPORTS_KEXEC_SIG_FORCE=y CONFIG_ARCH_SUPPORTS_KEXEC_BZIMAGE_VERIFY_SIG=y CONFIG_ARCH_SUPPORTS_KEXEC_JUMP=y CONFIG_ARCH_SUPPORTS_CRASH_DUMP=y CONFIG_ARCH_SUPPORTS_CRASH_HOTPLUG=y CONFIG_PHYSICAL_START=0x1000000
# CONFIG_RELOCATABLE is not set CONFIG_PHYSICAL_ALIGN=0x200000 CONFIG_ADDRESS_MASKING=y CONFIG_HOTPLUG_CPU=y CONFIG_LEGACY_VSYSCALL_XONLY=y
# CONFIG_LEGACY_VSYSCALL_NONE is not set CONFIG_CMDLINE_BOOL=yCONFIG_CMDLINE="" CONFIG_MODIFY_LDT_SYSCALL=y CONFIG_STRICT_SIGALTSTACK_SIZE=y CONFIG_HAVE_LIVEPATCH=y
# end of Processor type and features
CONFIG_CC_HAS_SLS=yCONFIG_CC_HAS_RETURN_THUNK=yCONFIG_CC_HAS_ENTRY_PADDING=yCONFIG_FUNCTION_PADDING_CFI=11CONFIG_FUNCTION_PADDING_BYTES=16CONFIG_SPECULATION_MITIGATIONS=yCONFIG_MITIGATION_PAGE_TABLE_ISOLATION=yCONFIG_MITIGATION_RETPOLINE=y
# CONFIG_MITIGATION_RETHUNK is not setCONFIG_MITIGATION_IBPB_ENTRY=yCONFIG_MITIGATION_IBRS_ENTRY=yCONFIG_MITIGATION_SLS=yCONFIG_MITIGATION_GDS_FORCE=yCONFIG_ARCH_HAS_ADD_PAGES=y
#
# Power management and ACPI options
#
# CONFIG_SUSPEND is not set
# CONFIG_HIBERNATION is not set
# CONFIG_PM is not setCONFIG_ARCH_SUPPORTS_ACPI=y
# CONFIG_ACPI is not set
#
# CPU Frequency scaling
#
# CONFIG_CPU_FREQ is not set
# end of CPU Frequency scaling
#
# CPU Idle
#
# CONFIG_CPU_IDLE is not set
# end of CPU Idle # end of Power management and ACPI options
#
# Bus options (PCI etc.)
#CONFIG_PCI_DIRECT=yCONFIG_ISA_DMA_API=yCONFIG_AMD_NB=y
# end of Bus options (PCI etc.)
#
# Binary Emulations
#
# CONFIG_IA32_EMULATION is not set
# CONFIG_X86_X32_ABI is not set
# end of Binary Emulations
CONFIG_HAVE_KVM=yCONFIG_KVM_COMMON=yCONFIG_HAVE_KVM_PFNCACHE=yCONFIG_HAVE_KVM_IRQCHIP=yCONFIG_HAVE_KVM_IRQ_ROUTING=yCONFIG_HAVE_KVM_DIRTY_RING=yCONFIG_HAVE_KVM_DIRTY_RING_TSO=yCONFIG_HAVE_KVM_DIRTY_RING_ACQ_REL=yCONFIG_KVM_MMIO=yCONFIG_KVM_ASYNC_PF=yCONFIG_HAVE_KVM_MSI=yCONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT=yCONFIG_KVM_VFIO=yCONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=yCONFIG_HAVE_KVM_IRQ_BYPASS=yCONFIG_HAVE_KVM_NO_POLL=yCONFIG_KVM_XFER_TO_GUEST_WORK=yCONFIG_KVM_GENERIC_HARDWARE_ENABLING=yCONFIG_KVM_GENERIC_MMU_NOTIFIER=yCONFIG_VIRTUALIZATION=yCONFIG_KVM=yCONFIG_KVM_INTEL=yCONFIG_KVM_AMD=y
# CONFIG_KVM_SMM is not setCONFIG_KVM_HYPERV=yCONFIG_KVM_XEN=yCONFIG_KVM_MAX_NR_VCPUS=4096CONFIG_AS_AVX512=yCONFIG_AS_SHA1_NI=yCONFIG_AS_SHA256_NI=yCONFIG_AS_TPAUSE=yCONFIG_AS_GFNI=yCONFIG_AS_WRUSS=y
#
# General architecture-dependent options
#CONFIG_HOTPLUG_SMT=yCONFIG_HOTPLUG_CORE_SYNC=yCONFIG_HOTPLUG_CORE_SYNC_DEAD=yCONFIG_HOTPLUG_CORE_SYNC_FULL=yCONFIG_HOTPLUG_SPLIT_STARTUP=yCONFIG_HOTPLUG_PARALLEL=yCONFIG_GENERIC_ENTRY=yCONFIG_JUMP_LABEL=yCONFIG_STATIC_KEYS_SELFTEST=y
# CONFIG_STATIC_CALL_SELFTEST is not setCONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=yCONFIG_ARCH_USE_BUILTIN_BSWAP=yCONFIG_USER_RETURN_NOTIFIER=yCONFIG_HAVE_IOREMAP_PROT=yCONFIG_HAVE_KPROBES=yCONFIG_HAVE_KRETPROBES=yCONFIG_HAVE_OPTPROBES=yCONFIG_HAVE_KPROBES_ON_FTRACE=yCONFIG_ARCH_CORRECT_STACKTRACE_ON_KRETPROBE=yCONFIG_HAVE_FUNCTION_ERROR_INJECTION=yCONFIG_HAVE_NMI=yCONFIG_TRACE_IRQFLAGS_SUPPORT=yCONFIG_TRACE_IRQFLAGS_NMI_SUPPORT=yCONFIG_HAVE_ARCH_TRACEHOOK=yCONFIG_HAVE_DMA_CONTIGUOUS=yCONFIG_GENERIC_SMP_IDLE_THREAD=yCONFIG_ARCH_HAS_FORTIFY_SOURCE=yCONFIG_ARCH_HAS_SET_MEMORY=yCONFIG_ARCH_HAS_SET_DIRECT_MAP=yCONFIG_ARCH_HAS_CPU_FINALIZE_INIT=yCONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=yCONFIG_ARCH_WANTS_DYNAMIC_TASK_STRUCT=yCONFIG_ARCH_WANTS_NO_INSTR=yCONFIG_HAVE_ASM_MODVERSIONS=yCONFIG_HAVE_REGS_AND_STACK_ACCESS_API=yCONFIG_HAVE_RSEQ=yCONFIG_HAVE_RUST=yCONFIG_HAVE_FUNCTION_ARG_ACCESS_API=yCONFIG_HAVE_HW_BREAKPOINT=yCONFIG_HAVE_MIXED_BREAKPOINTS_REGS=yCONFIG_HAVE_USER_RETURN_NOTIFIER=yCONFIG_HAVE_PERF_EVENTS_NMI=yCONFIG_HAVE_HARDLOCKUP_DETECTOR_PERF=yCONFIG_HAVE_PERF_REGS=yCONFIG_HAVE_PERF_USER_STACK_DUMP=yCONFIG_HAVE_ARCH_JUMP_LABEL=yCONFIG_HAVE_ARCH_JUMP_LABEL_RELATIVE=yCONFIG_MMU_GATHER_MERGE_VMAS=yCONFIG_MMU_LAZY_TLB_REFCOUNT=yCONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=yCONFIG_ARCH_HAS_NMI_SAFE_THIS_CPU_OPS=yCONFIG_HAVE_ALIGNED_STRUCT_PAGE=yCONFIG_HAVE_CMPXCHG_LOCAL=yCONFIG_HAVE_CMPXCHG_DOUBLE=yCONFIG_HAVE_ARCH_SECCOMP=yCONFIG_HAVE_ARCH_SECCOMP_FILTER=yCONFIG_SECCOMP=yCONFIG_SECCOMP_FILTER=yCONFIG_SECCOMP_CACHE_DEBUG=yCONFIG_HAVE_ARCH_STACKLEAK=yCONFIG_HAVE_STACKPROTECTOR=y
# CONFIG_STACKPROTECTOR is not setCONFIG_ARCH_SUPPORTS_LTO_CLANG=yCONFIG_ARCH_SUPPORTS_LTO_CLANG_THIN=yCONFIG_LTO_NONE=yCONFIG_ARCH_SUPPORTS_CFI_CLANG=yCONFIG_HAVE_ARCH_WITHIN_STACK_FRAMES=yCONFIG_HAVE_CONTEXT_TRACKING_USER=yCONFIG_HAVE_CONTEXT_TRACKING_USER_OFFSTACK=yCONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=yCONFIG_HAVE_IRQ_TIME_ACCOUNTING=yCONFIG_HAVE_MOVE_PUD=yCONFIG_HAVE_MOVE_PMD=yCONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=yCONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD=yCONFIG_HAVE_ARCH_HUGE_VMAP=yCONFIG_HAVE_ARCH_HUGE_VMALLOC=yCONFIG_ARCH_WANT_HUGE_PMD_SHARE=yCONFIG_HAVE_ARCH_SOFT_DIRTY=yCONFIG_HAVE_MOD_ARCH_SPECIFIC=yCONFIG_MODULES_USE_ELF_RELA=yCONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK=yCONFIG_HAVE_SOFTIRQ_ON_OWN_STACK=yCONFIG_SOFTIRQ_ON_OWN_STACK=yCONFIG_ARCH_HAS_ELF_RANDOMIZE=yCONFIG_HAVE_ARCH_MMAP_RND_BITS=yCONFIG_HAVE_EXIT_THREAD=yCONFIG_ARCH_MMAP_RND_BITS=28CONFIG_PAGE_SIZE_LESS_THAN_64KB=yCONFIG_PAGE_SIZE_LESS_THAN_256KB=yCONFIG_HAVE_OBJTOOL=yCONFIG_HAVE_JUMP_LABEL_HACK=yCONFIG_HAVE_NOINSTR_HACK=yCONFIG_HAVE_NOINSTR_VALIDATION=yCONFIG_HAVE_UACCESS_VALIDATION=yCONFIG_HAVE_STACK_VALIDATION=yCONFIG_HAVE_RELIABLE_STACKTRACE=yCONFIG_ISA_BUS_API=y
# CONFIG_COMPAT_32BIT_TIME is not setCONFIG_HAVE_ARCH_VMAP_STACK=yCONFIG_VMAP_STACK=yCONFIG_HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET=yCONFIG_RANDOMIZE_KSTACK_OFFSET=yCONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT=yCONFIG_ARCH_HAS_STRICT_KERNEL_RWX=yCONFIG_STRICT_KERNEL_RWX=yCONFIG_ARCH_HAS_STRICT_MODULE_RWX=yCONFIG_HAVE_ARCH_PREL32_RELOCATIONS=yCONFIG_LOCK_EVENT_COUNTS=yCONFIG_ARCH_HAS_MEM_ENCRYPT=yCONFIG_HAVE_STATIC_CALL=yCONFIG_HAVE_STATIC_CALL_INLINE=yCONFIG_HAVE_PREEMPT_DYNAMIC=yCONFIG_HAVE_PREEMPT_DYNAMIC_CALL=yCONFIG_ARCH_WANT_LD_ORPHAN_WARN=yCONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=yCONFIG_ARCH_SUPPORTS_PAGE_TABLE_CHECK=yCONFIG_ARCH_HAS_ELFCORE_COMPAT=yCONFIG_ARCH_HAS_PARANOID_L1D_FLUSH=yCONFIG_DYNAMIC_SIGFRAME=yCONFIG_ARCH_HAS_HW_PTE_YOUNG=yCONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG=y
#
# GCOV-based kernel profiling
#CONFIG_GCOV_KERNEL=yCONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y
# end of GCOV-based kernel profiling
CONFIG_HAVE_GCC_PLUGINS=yCONFIG_FUNCTION_ALIGNMENT_4B=yCONFIG_FUNCTION_ALIGNMENT_16B=yCONFIG_FUNCTION_ALIGNMENT=16
# end of General architecture-dependent options
CONFIG_RT_MUTEXES=yCONFIG_BASE_SMALL=0
# CONFIG_MODULES is not setCONFIG_BLOCK=y
# CONFIG_BLOCK_LEGACY_AUTOLOAD is not setCONFIG_BLK_CGROUP_PUNT_BIO=yCONFIG_BLK_DEV_BSG_COMMON=yCONFIG_BLK_DEV_BSGLIB=yCONFIG_BLK_DEV_INTEGRITY=yCONFIG_BLK_DEV_INTEGRITY_T10=y
# CONFIG_BLK_DEV_WRITE_MOUNTED is not setCONFIG_BLK_DEV_ZONED=y
# CONFIG_BLK_WBT is not setCONFIG_BLK_DEBUG_FS=yCONFIG_BLK_DEBUG_FS_ZONED=y
# CONFIG_BLK_SED_OPAL is not setCONFIG_BLK_INLINE_ENCRYPTION=yCONFIG_BLK_INLINE_ENCRYPTION_FALLBACK=y
#
# Partition Types
#
# CONFIG_PARTITION_ADVANCED is not setCONFIG_MSDOS_PARTITION=yCONFIG_EFI_PARTITION=y
# end of Partition Types
CONFIG_BLK_MQ_PCI=yCONFIG_BLK_MQ_VIRTIO=yCONFIG_BLOCK_HOLDER_DEPRECATED=yCONFIG_BLK_MQ_STACKING=y
#
# IO Schedulers
#CONFIG_MQ_IOSCHED_DEADLINE=yCONFIG_MQ_IOSCHED_KYBER=y
# CONFIG_IOSCHED_BFQ is not set
# end of IO Schedulers
CONFIG_PREEMPT_NOTIFIERS=yCONFIG_PADATA=yCONFIG_ASN1=yCONFIG_UNINLINE_SPIN_UNLOCK=yCONFIG_ARCH_SUPPORTS_ATOMIC_RMW=yCONFIG_MUTEX_SPIN_ON_OWNER=yCONFIG_RWSEM_SPIN_ON_OWNER=yCONFIG_LOCK_SPIN_ON_OWNER=yCONFIG_ARCH_USE_QUEUED_SPINLOCKS=yCONFIG_QUEUED_SPINLOCKS=yCONFIG_ARCH_USE_QUEUED_RWLOCKS=yCONFIG_QUEUED_RWLOCKS=yCONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE=yCONFIG_ARCH_HAS_SYNC_CORE_BEFORE_USERMODE=yCONFIG_ARCH_HAS_SYSCALL_WRAPPER=yCONFIG_FREEZER=y
#
# Executable file formats
#
# CONFIG_BINFMT_ELF is not set
# CONFIG_BINFMT_SCRIPT is not setCONFIG_BINFMT_MISC=yCONFIG_COREDUMP=y
# end of Executable file formats
#
# Memory Management options
#CONFIG_ZPOOL=yCONFIG_SWAP=yCONFIG_ZSWAP=y
# CONFIG_ZSWAP_DEFAULT_ON is not set CONFIG_ZSWAP_EXCLUSIVE_LOADS_DEFAULT_ON=y
# CONFIG_ZSWAP_SHRINKER_DEFAULT_ON is not set # CONFIG_ZSWAP_COMPRESSOR_DEFAULT_DEFLATE is not set CONFIG_ZSWAP_COMPRESSOR_DEFAULT_LZO=y
# CONFIG_ZSWAP_COMPRESSOR_DEFAULT_842 is not set # CONFIG_ZSWAP_COMPRESSOR_DEFAULT_LZ4 is not set # CONFIG_ZSWAP_COMPRESSOR_DEFAULT_LZ4HC is not set # CONFIG_ZSWAP_COMPRESSOR_DEFAULT_ZSTD is not set CONFIG_ZSWAP_COMPRESSOR_DEFAULT="lzo"
# CONFIG_ZSWAP_ZPOOL_DEFAULT_ZBUD is not set # CONFIG_ZSWAP_ZPOOL_DEFAULT_Z3FOLD is not set CONFIG_ZSWAP_ZPOOL_DEFAULT_ZSMALLOC=y CONFIG_ZSWAP_ZPOOL_DEFAULT="zsmalloc"
# CONFIG_ZBUD is not setCONFIG_Z3FOLD=yCONFIG_ZSMALLOC=yCONFIG_ZSMALLOC_STAT=y CONFIG_ZSMALLOC_CHAIN_SIZE=8
#
# Slab allocator options
#CONFIG_SLUB=yCONFIG_SLAB_MERGE_DEFAULT=y
# CONFIG_SLAB_FREELIST_RANDOM is not setCONFIG_SLAB_FREELIST_HARDENED=y
# CONFIG_SLUB_STATS is not setCONFIG_SLUB_CPU_PARTIAL=y
# CONFIG_RANDOM_KMALLOC_CACHES is not set
# end of Slab allocator options
CONFIG_SHUFFLE_PAGE_ALLOCATOR=yCONFIG_COMPAT_BRK=yCONFIG_SPARSEMEM=yCONFIG_SPARSEMEM_EXTREME=yCONFIG_SPARSEMEM_VMEMMAP_ENABLE=yCONFIG_SPARSEMEM_VMEMMAP=yCONFIG_ARCH_WANT_OPTIMIZE_DAX_VMEMMAP=yCONFIG_ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP=yCONFIG_HAVE_FAST_GUP=yCONFIG_MEMORY_ISOLATION=yCONFIG_EXCLUSIVE_SYSTEM_RAM=yCONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
# CONFIG_MEMORY_HOTPLUG is not setCONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=yCONFIG_SPLIT_PTLOCK_CPUS=4CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=yCONFIG_MEMORY_BALLOON=y
# CONFIG_COMPACTION is not setCONFIG_PAGE_REPORTING=yCONFIG_MIGRATION=yCONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION=yCONFIG_CONTIG_ALLOC=yCONFIG_PCP_BATCH_SCALE_MAX=5CONFIG_PHYS_ADDR_T_64BIT=yCONFIG_MMU_NOTIFIER=yCONFIG_KSM=yCONFIG_DEFAULT_MMAP_MIN_ADDR=4096CONFIG_ARCH_WANT_GENERAL_HUGETLB=yCONFIG_ARCH_WANTS_THP_SWAP=y
# CONFIG_TRANSPARENT_HUGEPAGE is not setCONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=yCONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=yCONFIG_USE_PERCPU_NUMA_NODE_ID=yCONFIG_HAVE_SETUP_PER_CPU_AREA=yCONFIG_CMA=y
# CONFIG_CMA_DEBUG is not set
# CONFIG_CMA_DEBUGFS is not set
# CONFIG_CMA_SYSFS is not setCONFIG_CMA_AREAS=19CONFIG_MEM_SOFT_DIRTY=yCONFIG_GENERIC_EARLY_IOREMAP=yCONFIG_DEFERRED_STRUCT_PAGE_INIT=y
# CONFIG_IDLE_PAGE_TRACKING is not setCONFIG_ARCH_HAS_CACHE_LINE_SIZE=yCONFIG_ARCH_HAS_CURRENT_STACK_POINTER=yCONFIG_ARCH_HAS_PTE_DEVMAP=yCONFIG_ZONE_DMA=yCONFIG_ZONE_DMA32=yCONFIG_GET_FREE_REGION=yCONFIG_ARCH_USES_HIGH_VMA_FLAGS=yCONFIG_VM_EVENT_COUNTERS=y
# CONFIG_PERCPU_STATS is not setCONFIG_GUP_TEST=yCONFIG_DMAPOOL_TEST=yCONFIG_ARCH_HAS_PTE_SPECIAL=yCONFIG_MEMFD_CREATE=yCONFIG_SECRETMEM=yCONFIG_ANON_VMA_NAME=y
# CONFIG_USERFAULTFD is not setCONFIG_LRU_GEN=y
# CONFIG_LRU_GEN_ENABLED is not setCONFIG_LRU_GEN_STATS=yCONFIG_LRU_GEN_WALKS_MMU=yCONFIG_ARCH_SUPPORTS_PER_VMA_LOCK=yCONFIG_PER_VMA_LOCK=yCONFIG_LOCK_MM_AND_FIND_VMA=y
#
# Data Access Monitoring
#
# CONFIG_DAMON is not set
# end of Data Access Monitoring # end of Memory Management options
CONFIG_NET=yCONFIG_NET_INGRESS=yCONFIG_NET_EGRESS=yCONFIG_NET_XGRESS=yCONFIG_SKB_EXTENSIONS=y
#
# Networking options
#
# CONFIG_PACKET is not setCONFIG_UNIX=yCONFIG_UNIX_SCM=yCONFIG_AF_UNIX_OOB=yCONFIG_UNIX_DIAG=yCONFIG_TLS=y
# CONFIG_TLS_DEVICE is not set
# CONFIG_TLS_TOE is not setCONFIG_XFRM=yCONFIG_XFRM_ALGO=yCONFIG_XFRM_USER=y
# CONFIG_XFRM_SUB_POLICY is not setCONFIG_XFRM_MIGRATE=yCONFIG_XFRM_STATISTICS=yCONFIG_NET_KEY=yCONFIG_NET_KEY_MIGRATE=yCONFIG_SMC=yCONFIG_SMC_DIAG=yCONFIG_NET_HANDSHAKE=yCONFIG_INET=yCONFIG_IP_MULTICAST=y
# CONFIG_IP_ADVANCED_ROUTER is not setCONFIG_IP_ROUTE_CLASSID=y
# CONFIG_IP_PNP is not set
# CONFIG_NET_IPIP is not setCONFIG_NET_IPGRE_DEMUX=yCONFIG_NET_IP_TUNNEL=y
# CONFIG_NET_IPGRE is not set
# CONFIG_IP_MROUTE is not setCONFIG_SYN_COOKIES=yCONFIG_NET_IPVTI=yCONFIG_NET_UDP_TUNNEL=y
# CONFIG_NET_FOU is not set
# CONFIG_INET_AH is not set
# CONFIG_INET_ESP is not set
# CONFIG_INET_IPCOMP is not setCONFIG_INET_TABLE_PERTURB_ORDER=16CONFIG_INET_TUNNEL=yCONFIG_INET_DIAG=yCONFIG_INET_TCP_DIAG=yCONFIG_INET_UDP_DIAG=y
# CONFIG_INET_RAW_DIAG is not set
# CONFIG_INET_DIAG_DESTROY is not setCONFIG_TCP_CONG_ADVANCED=yCONFIG_TCP_CONG_BIC=yCONFIG_TCP_CONG_CUBIC=yCONFIG_TCP_CONG_WESTWOOD=yCONFIG_TCP_CONG_HTCP=yCONFIG_TCP_CONG_HSTCP=yCONFIG_TCP_CONG_HYBLA=yCONFIG_TCP_CONG_VEGAS=yCONFIG_TCP_CONG_NV=yCONFIG_TCP_CONG_SCALABLE=yCONFIG_TCP_CONG_LP=yCONFIG_TCP_CONG_VENO=yCONFIG_TCP_CONG_YEAH=yCONFIG_TCP_CONG_ILLINOIS=y
# CONFIG_TCP_CONG_DCTCP is not setCONFIG_TCP_CONG_CDG=yCONFIG_TCP_CONG_BBR=y
# CONFIG_DEFAULT_BIC is not setCONFIG_DEFAULT_CUBIC=y
# CONFIG_DEFAULT_HTCP is not set
# CONFIG_DEFAULT_HYBLA is not set
# CONFIG_DEFAULT_VEGAS is not set
# CONFIG_DEFAULT_VENO is not set
# CONFIG_DEFAULT_WESTWOOD is not set
# CONFIG_DEFAULT_CDG is not set
# CONFIG_DEFAULT_BBR is not set
# CONFIG_DEFAULT_RENO is not setCONFIG_DEFAULT_TCP_CONG="cubic"CONFIG_TCP_SIGPOOL=yCONFIG_TCP_AO=yCONFIG_TCP_MD5SIG=y
# CONFIG_IPV6 is not set
# CONFIG_NETLABEL is not set
# CONFIG_MPTCP is not setCONFIG_NETWORK_SECMARK=yCONFIG_NET_PTP_CLASSIFY=yCONFIG_NETWORK_PHY_TIMESTAMPING=yCONFIG_NETFILTER=yCONFIG_NETFILTER_ADVANCED=yCONFIG_BRIDGE_NETFILTER=y
#
# Core Netfilter Configuration
#CONFIG_NETFILTER_INGRESS=yCONFIG_NETFILTER_EGRESS=yCONFIG_NETFILTER_SKIP_EGRESS=yCONFIG_NETFILTER_NETLINK=yCONFIG_NETFILTER_FAMILY_BRIDGE=yCONFIG_NETFILTER_FAMILY_ARP=yCONFIG_NETFILTER_NETLINK_HOOK=yCONFIG_NETFILTER_NETLINK_ACCT=yCONFIG_NETFILTER_NETLINK_QUEUE=y
# CONFIG_NETFILTER_NETLINK_LOG is not setCONFIG_NETFILTER_NETLINK_OSF=yCONFIG_NF_CONNTRACK=yCONFIG_NF_LOG_SYSLOG=yCONFIG_NETFILTER_CONNCOUNT=yCONFIG_NF_CONNTRACK_MARK=yCONFIG_NF_CONNTRACK_SECMARK=y
# CONFIG_NF_CONNTRACK_ZONES is not setCONFIG_NF_CONNTRACK_PROCFS=y
# CONFIG_NF_CONNTRACK_EVENTS is not setCONFIG_NF_CONNTRACK_TIMEOUT=y
# CONFIG_NF_CONNTRACK_TIMESTAMP is not setCONFIG_NF_CONNTRACK_LABELS=yCONFIG_NF_CONNTRACK_OVS=yCONFIG_NF_CT_PROTO_DCCP=y
# CONFIG_NF_CT_PROTO_SCTP is not set
# CONFIG_NF_CT_PROTO_UDPLITE is not setCONFIG_NF_CONNTRACK_AMANDA=yCONFIG_NF_CONNTRACK_FTP=y
# CONFIG_NF_CONNTRACK_H323 is not setCONFIG_NF_CONNTRACK_IRC=yCONFIG_NF_CONNTRACK_BROADCAST=y
# CONFIG_NF_CONNTRACK_NETBIOS_NS is not setCONFIG_NF_CONNTRACK_SNMP=y
# CONFIG_NF_CONNTRACK_PPTP is not setCONFIG_NF_CONNTRACK_SANE=y
# CONFIG_NF_CONNTRACK_SIP is not setCONFIG_NF_CONNTRACK_TFTP=y
# CONFIG_NF_CT_NETLINK is not set
# CONFIG_NF_CT_NETLINK_TIMEOUT is not set
# CONFIG_NF_NAT is not setCONFIG_NF_TABLES=yCONFIG_NF_TABLES_NETDEV=yCONFIG_NFT_NUMGEN=yCONFIG_NFT_CT=y
# CONFIG_NFT_FLOW_OFFLOAD is not setCONFIG_NFT_CONNLIMIT=y
# CONFIG_NFT_LOG is not set
# CONFIG_NFT_LIMIT is not set
# CONFIG_NFT_NAT is not setCONFIG_NFT_TUNNEL=y
# CONFIG_NFT_QUEUE is not setCONFIG_NFT_QUOTA=yCONFIG_NFT_REJECT=yCONFIG_NFT_COMPAT=y
# CONFIG_NFT_HASH is not setCONFIG_NFT_FIB=y
# CONFIG_NFT_XFRM is not setCONFIG_NFT_SOCKET=y
# CONFIG_NFT_OSF is not setCONFIG_NFT_TPROXY=y
# CONFIG_NFT_SYNPROXY is not setCONFIG_NF_DUP_NETDEV=y
# CONFIG_NFT_DUP_NETDEV is not setCONFIG_NFT_FWD_NETDEV=yCONFIG_NF_FLOW_TABLE_INET=yCONFIG_NF_FLOW_TABLE=yCONFIG_NF_FLOW_TABLE_PROCFS=yCONFIG_NETFILTER_XTABLES=y
#
# Xtables combined modules
#CONFIG_NETFILTER_XT_MARK=yCONFIG_NETFILTER_XT_CONNMARK=y
#
# Xtables targets
#
# CONFIG_NETFILTER_XT_TARGET_AUDIT is not set
# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not setCONFIG_NETFILTER_XT_TARGET_CONNMARK=yCONFIG_NETFILTER_XT_TARGET_CONNSECMARK=yCONFIG_NETFILTER_XT_TARGET_HMARK=yCONFIG_NETFILTER_XT_TARGET_IDLETIMER=y
# CONFIG_NETFILTER_XT_TARGET_LED is not setCONFIG_NETFILTER_XT_TARGET_LOG=yCONFIG_NETFILTER_XT_TARGET_MARK=y
# CONFIG_NETFILTER_XT_TARGET_NFLOG is not setCONFIG_NETFILTER_XT_TARGET_NFQUEUE=yCONFIG_NETFILTER_XT_TARGET_RATEEST=y
# CONFIG_NETFILTER_XT_TARGET_TEE is not set
# CONFIG_NETFILTER_XT_TARGET_SECMARK is not setCONFIG_NETFILTER_XT_TARGET_TCPMSS=y
#
# Xtables matches
#CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=yCONFIG_NETFILTER_XT_MATCH_BPF=yCONFIG_NETFILTER_XT_MATCH_CGROUP=yCONFIG_NETFILTER_XT_MATCH_CLUSTER=yCONFIG_NETFILTER_XT_MATCH_COMMENT=yCONFIG_NETFILTER_XT_MATCH_CONNBYTES=yCONFIG_NETFILTER_XT_MATCH_CONNLABEL=yCONFIG_NETFILTER_XT_MATCH_CONNLIMIT=yCONFIG_NETFILTER_XT_MATCH_CONNMARK=yCONFIG_NETFILTER_XT_MATCH_CONNTRACK=yCONFIG_NETFILTER_XT_MATCH_CPU=yCONFIG_NETFILTER_XT_MATCH_DCCP=yCONFIG_NETFILTER_XT_MATCH_DEVGROUP=yCONFIG_NETFILTER_XT_MATCH_DSCP=y
# CONFIG_NETFILTER_XT_MATCH_ECN is not setCONFIG_NETFILTER_XT_MATCH_ESP=yCONFIG_NETFILTER_XT_MATCH_HASHLIMIT=y
# CONFIG_NETFILTER_XT_MATCH_HELPER is not set
# CONFIG_NETFILTER_XT_MATCH_HL is not setCONFIG_NETFILTER_XT_MATCH_IPCOMP=y
# CONFIG_NETFILTER_XT_MATCH_IPRANGE is not setCONFIG_NETFILTER_XT_MATCH_IPVS=yCONFIG_NETFILTER_XT_MATCH_L2TP=yCONFIG_NETFILTER_XT_MATCH_LENGTH=yCONFIG_NETFILTER_XT_MATCH_LIMIT=y
# CONFIG_NETFILTER_XT_MATCH_MAC is not set
# CONFIG_NETFILTER_XT_MATCH_MARK is not set
# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not setCONFIG_NETFILTER_XT_MATCH_NFACCT=y
# CONFIG_NETFILTER_XT_MATCH_OSF is not setCONFIG_NETFILTER_XT_MATCH_OWNER=yCONFIG_NETFILTER_XT_MATCH_POLICY=yCONFIG_NETFILTER_XT_MATCH_PHYSDEV=yCONFIG_NETFILTER_XT_MATCH_PKTTYPE=yCONFIG_NETFILTER_XT_MATCH_QUOTA=yCONFIG_NETFILTER_XT_MATCH_RATEEST=yCONFIG_NETFILTER_XT_MATCH_REALM=yCONFIG_NETFILTER_XT_MATCH_RECENT=yCONFIG_NETFILTER_XT_MATCH_SCTP=y
# CONFIG_NETFILTER_XT_MATCH_SOCKET is not set
# CONFIG_NETFILTER_XT_MATCH_STATE is not setCONFIG_NETFILTER_XT_MATCH_STATISTIC=yCONFIG_NETFILTER_XT_MATCH_STRING=y
# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
# CONFIG_NETFILTER_XT_MATCH_TIME is not setCONFIG_NETFILTER_XT_MATCH_U32=y
# end of Core Netfilter Configuration
# CONFIG_IP_SET is not setCONFIG_IP_VS=y
# CONFIG_IP_VS_DEBUG is not setCONFIG_IP_VS_TAB_BITS=12
#
# IPVS transport protocol load balancing support
#CONFIG_IP_VS_PROTO_TCP=y
# CONFIG_IP_VS_PROTO_UDP is not setCONFIG_IP_VS_PROTO_AH_ESP=yCONFIG_IP_VS_PROTO_ESP=yCONFIG_IP_VS_PROTO_AH=yCONFIG_IP_VS_PROTO_SCTP=y
#
# IPVS scheduler
#
# CONFIG_IP_VS_RR is not setCONFIG_IP_VS_WRR=y
# CONFIG_IP_VS_LC is not set
# CONFIG_IP_VS_WLC is not setCONFIG_IP_VS_FO=y
# CONFIG_IP_VS_OVF is not setCONFIG_IP_VS_LBLC=yCONFIG_IP_VS_LBLCR=yCONFIG_IP_VS_DH=y
# CONFIG_IP_VS_SH is not setCONFIG_IP_VS_MH=y
# CONFIG_IP_VS_SED is not setCONFIG_IP_VS_NQ=yCONFIG_IP_VS_TWOS=y
#
# IPVS SH scheduler
#CONFIG_IP_VS_SH_TAB_BITS=8
#
# IPVS MH scheduler
#CONFIG_IP_VS_MH_TAB_INDEX=12
#
# IPVS application helper
#
# CONFIG_IP_VS_NFCT is not set
#
# IP: Netfilter Configuration
#CONFIG_NF_DEFRAG_IPV4=yCONFIG_NF_SOCKET_IPV4=yCONFIG_NF_TPROXY_IPV4=yCONFIG_NF_TABLES_IPV4=yCONFIG_NFT_REJECT_IPV4=yCONFIG_NFT_DUP_IPV4=yCONFIG_NFT_FIB_IPV4=y
# CONFIG_NF_TABLES_ARP is not setCONFIG_NF_DUP_IPV4=yCONFIG_NF_LOG_ARP=y
# CONFIG_NF_LOG_IPV4 is not setCONFIG_NF_REJECT_IPV4=y
# CONFIG_IP_NF_IPTABLES is not setCONFIG_IP_NF_ARPTABLES=y
# CONFIG_IP_NF_ARPFILTER is not set
# CONFIG_IP_NF_ARP_MANGLE is not set
# end of IP: Netfilter Configuration
CONFIG_NF_TABLES_BRIDGE=yCONFIG_NFT_BRIDGE_META=yCONFIG_NF_CONNTRACK_BRIDGE=yCONFIG_BRIDGE_NF_EBTABLES=yCONFIG_BRIDGE_EBT_BROUTE=y
# CONFIG_BRIDGE_EBT_T_FILTER is not setCONFIG_BRIDGE_EBT_T_NAT=y
# CONFIG_BRIDGE_EBT_802_3 is not set
# CONFIG_BRIDGE_EBT_AMONG is not setCONFIG_BRIDGE_EBT_ARP=y
# CONFIG_BRIDGE_EBT_IP is not set
# CONFIG_BRIDGE_EBT_LIMIT is not setCONFIG_BRIDGE_EBT_MARK=yCONFIG_BRIDGE_EBT_PKTTYPE=yCONFIG_BRIDGE_EBT_STP=yCONFIG_BRIDGE_EBT_VLAN=yCONFIG_BRIDGE_EBT_ARPREPLY=yCONFIG_BRIDGE_EBT_DNAT=y
# CONFIG_BRIDGE_EBT_MARK_T is not set
# CONFIG_BRIDGE_EBT_REDIRECT is not setCONFIG_BRIDGE_EBT_SNAT=yCONFIG_BRIDGE_EBT_LOG=yCONFIG_BRIDGE_EBT_NFLOG=yCONFIG_IP_DCCP=yCONFIG_INET_DCCP_DIAG=y
#
# DCCP CCIDs Configuration
#CONFIG_IP_DCCP_CCID2_DEBUG=yCONFIG_IP_DCCP_CCID3=yCONFIG_IP_DCCP_CCID3_DEBUG=yCONFIG_IP_DCCP_TFRC_LIB=yCONFIG_IP_DCCP_TFRC_DEBUG=y
# end of DCCP CCIDs Configuration
#
# DCCP Kernel Hacking
#CONFIG_IP_DCCP_DEBUG=y
# end of DCCP Kernel Hacking
CONFIG_IP_SCTP=yCONFIG_SCTP_DBG_OBJCNT=yCONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5=y
# CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA1 is not set
# CONFIG_SCTP_DEFAULT_COOKIE_HMAC_NONE is not setCONFIG_SCTP_COOKIE_HMAC_MD5=yCONFIG_SCTP_COOKIE_HMAC_SHA1=yCONFIG_INET_SCTP_DIAG=yCONFIG_RDS=y
# CONFIG_RDS_RDMA is not set
# CONFIG_RDS_TCP is not set
# CONFIG_RDS_DEBUG is not setCONFIG_TIPC=y
# CONFIG_TIPC_MEDIA_IB is not setCONFIG_TIPC_MEDIA_UDP=y
# CONFIG_TIPC_CRYPTO is not setCONFIG_TIPC_DIAG=y
# CONFIG_ATM is not set
# CONFIG_L2TP is not setCONFIG_STP=yCONFIG_BRIDGE=yCONFIG_BRIDGE_IGMP_SNOOPING=yCONFIG_BRIDGE_MRP=y
# CONFIG_BRIDGE_CFM is not setCONFIG_NET_DSA=yCONFIG_NET_DSA_TAG_NONE=yCONFIG_NET_DSA_TAG_AR9331=yCONFIG_NET_DSA_TAG_BRCM_COMMON=yCONFIG_NET_DSA_TAG_BRCM=yCONFIG_NET_DSA_TAG_BRCM_LEGACY=yCONFIG_NET_DSA_TAG_BRCM_PREPEND=yCONFIG_NET_DSA_TAG_HELLCREEK=yCONFIG_NET_DSA_TAG_GSWIP=yCONFIG_NET_DSA_TAG_DSA_COMMON=yCONFIG_NET_DSA_TAG_DSA=yCONFIG_NET_DSA_TAG_EDSA=yCONFIG_NET_DSA_TAG_MTK=y
# CONFIG_NET_DSA_TAG_KSZ is not setCONFIG_NET_DSA_TAG_OCELOT=yCONFIG_NET_DSA_TAG_OCELOT_8021Q=yCONFIG_NET_DSA_TAG_QCA=yCONFIG_NET_DSA_TAG_RTL4_A=yCONFIG_NET_DSA_TAG_RTL8_4=y
# CONFIG_NET_DSA_TAG_RZN1_A5PSW is not setCONFIG_NET_DSA_TAG_LAN9303=y
# CONFIG_NET_DSA_TAG_SJA1105 is not set
# CONFIG_NET_DSA_TAG_TRAILER is not setCONFIG_NET_DSA_TAG_XRS700X=y
# CONFIG_VLAN_8021Q is not setCONFIG_LLC=y
# CONFIG_LLC2 is not setCONFIG_ATALK=yCONFIG_X25=y
# CONFIG_LAPB is not setCONFIG_PHONET=y
# CONFIG_IEEE802154 is not setCONFIG_NET_SCHED=y
#
# Queueing/Scheduling
#
# CONFIG_NET_SCH_HTB is not set
# CONFIG_NET_SCH_HFSC is not setCONFIG_NET_SCH_PRIO=yCONFIG_NET_SCH_MULTIQ=yCONFIG_NET_SCH_RED=y
# CONFIG_NET_SCH_SFB is not set
# CONFIG_NET_SCH_SFQ is not setCONFIG_NET_SCH_TEQL=yCONFIG_NET_SCH_TBF=y
# CONFIG_NET_SCH_CBS is not set
# CONFIG_NET_SCH_ETF is not set
# CONFIG_NET_SCH_TAPRIO is not set
# CONFIG_NET_SCH_GRED is not setCONFIG_NET_SCH_NETEM=y
# CONFIG_NET_SCH_DRR is not set
# CONFIG_NET_SCH_MQPRIO is not set
# CONFIG_NET_SCH_SKBPRIO is not set
# CONFIG_NET_SCH_CHOKE is not setCONFIG_NET_SCH_QFQ=yCONFIG_NET_SCH_CODEL=yCONFIG_NET_SCH_FQ_CODEL=yCONFIG_NET_SCH_CAKE=yCONFIG_NET_SCH_FQ=y
# CONFIG_NET_SCH_HHF is not set
# CONFIG_NET_SCH_PIE is not set
# CONFIG_NET_SCH_INGRESS is not setCONFIG_NET_SCH_PLUG=yCONFIG_NET_SCH_ETS=y
# CONFIG_NET_SCH_DEFAULT is not set
#
# Classification
#CONFIG_NET_CLS=y
# CONFIG_NET_CLS_BASIC is not setCONFIG_NET_CLS_ROUTE4=y
# CONFIG_NET_CLS_FW is not setCONFIG_NET_CLS_U32=yCONFIG_CLS_U32_PERF=yCONFIG_CLS_U32_MARK=y
# CONFIG_NET_CLS_FLOW is not setCONFIG_NET_CLS_CGROUP=yCONFIG_NET_CLS_BPF=yCONFIG_NET_CLS_FLOWER=yCONFIG_NET_CLS_MATCHALL=y
# CONFIG_NET_EMATCH is not setCONFIG_NET_CLS_ACT=yCONFIG_NET_ACT_POLICE=y
# CONFIG_NET_ACT_GACT is not setCONFIG_NET_ACT_MIRRED=yCONFIG_NET_ACT_SAMPLE=y
# CONFIG_NET_ACT_IPT is not set
# CONFIG_NET_ACT_NAT is not set
# CONFIG_NET_ACT_PEDIT is not setCONFIG_NET_ACT_SIMP=y
# CONFIG_NET_ACT_SKBEDIT is not setCONFIG_NET_ACT_CSUM=yCONFIG_NET_ACT_MPLS=y
# CONFIG_NET_ACT_VLAN is not set
# CONFIG_NET_ACT_BPF is not setCONFIG_NET_ACT_CONNMARK=yCONFIG_NET_ACT_CTINFO=yCONFIG_NET_ACT_SKBMOD=yCONFIG_NET_ACT_IFE=yCONFIG_NET_ACT_TUNNEL_KEY=yCONFIG_NET_ACT_CT=yCONFIG_NET_ACT_GATE=y
# CONFIG_NET_IFE_SKBMARK is not set
# CONFIG_NET_IFE_SKBPRIO is not setCONFIG_NET_IFE_SKBTCINDEX=yCONFIG_NET_TC_SKB_EXT=yCONFIG_NET_SCH_FIFO=yCONFIG_DCB=yCONFIG_DNS_RESOLVER=yCONFIG_BATMAN_ADV=yCONFIG_BATMAN_ADV_BATMAN_V=y
# CONFIG_BATMAN_ADV_BLA is not setCONFIG_BATMAN_ADV_DAT=y
# CONFIG_BATMAN_ADV_NC is not setCONFIG_BATMAN_ADV_MCAST=y
# CONFIG_BATMAN_ADV_DEBUG is not setCONFIG_BATMAN_ADV_TRACING=yCONFIG_OPENVSWITCH=yCONFIG_VSOCKETS=y
# CONFIG_VSOCKETS_DIAG is not set
# CONFIG_VSOCKETS_LOOPBACK is not set
# CONFIG_VMWARE_VMCI_VSOCKETS is not set
# CONFIG_VIRTIO_VSOCKETS is not set
# CONFIG_NETLINK_DIAG is not setCONFIG_MPLS=yCONFIG_NET_MPLS_GSO=yCONFIG_MPLS_ROUTING=y
# CONFIG_MPLS_IPTUNNEL is not setCONFIG_NET_NSH=yCONFIG_HSR=yCONFIG_NET_SWITCHDEV=y
# CONFIG_NET_L3_MASTER_DEV is not setCONFIG_QRTR=yCONFIG_QRTR_SMD=yCONFIG_QRTR_TUN=yCONFIG_NET_NCSI=y
# CONFIG_NCSI_OEM_CMD_GET_MAC is not set
# CONFIG_NCSI_OEM_CMD_KEEP_PHY is not setCONFIG_PCPU_DEV_REFCNT=yCONFIG_MAX_SKB_FRAGS=17CONFIG_RPS=yCONFIG_RFS_ACCEL=yCONFIG_SOCK_RX_QUEUE_MAPPING=yCONFIG_XPS=y
# CONFIG_CGROUP_NET_PRIO is not setCONFIG_CGROUP_NET_CLASSID=yCONFIG_NET_RX_BUSY_POLL=yCONFIG_BQL=yCONFIG_NET_FLOW_LIMIT=y
#
# Network testing
#CONFIG_NET_PKTGEN=yCONFIG_NET_DROP_MONITOR=y
# end of Network testing # end of Networking options
# CONFIG_HAMRADIO is not set
# CONFIG_CAN is not setCONFIG_BT=y
# CONFIG_BT_BREDR is not set
# CONFIG_BT_LE is not set
# CONFIG_BT_LEDS is not setCONFIG_BT_MSFTEXT=yCONFIG_BT_AOSPEXT=y
# CONFIG_BT_DEBUGFS is not setCONFIG_BT_SELFTEST=y
#
# Bluetooth device drivers
#CONFIG_BT_MTK=y
# CONFIG_BT_HCIUART is not set
# CONFIG_BT_HCIBCM4377 is not setCONFIG_BT_HCIDTL1=y
# CONFIG_BT_HCIBT3C is not set
# CONFIG_BT_HCIBLUECARD is not set
# CONFIG_BT_HCIVHCI is not set
# CONFIG_BT_MRVL is not setCONFIG_BT_MTKUART=y
# CONFIG_BT_QCOMSMD is not set
# CONFIG_BT_VIRTIO is not set
# CONFIG_BT_NXPUART is not set
# end of Bluetooth device drivers
CONFIG_AF_RXRPC=y
# CONFIG_AF_RXRPC_INJECT_LOSS is not set
# CONFIG_AF_RXRPC_INJECT_RX_DELAY is not setCONFIG_AF_RXRPC_DEBUG=y
# CONFIG_RXKAD is not setCONFIG_RXPERF=y
# CONFIG_AF_KCM is not setCONFIG_STREAM_PARSER=yCONFIG_MCTP=yCONFIG_MCTP_FLOWS=yCONFIG_WIRELESS=y
# CONFIG_CFG80211 is not set
#
# CFG80211 needs to be enabled for MAC80211
#CONFIG_MAC80211_STA_HASH_MAX_SIZE=0
# CONFIG_RFKILL is not setCONFIG_NET_9P=yCONFIG_NET_9P_FD=yCONFIG_NET_9P_VIRTIO=yCONFIG_NET_9P_RDMA=yCONFIG_NET_9P_DEBUG=y
# CONFIG_CAIF is not setCONFIG_CEPH_LIB=y
# CONFIG_CEPH_LIB_PRETTYDEBUG is not setCONFIG_CEPH_LIB_USE_DNS_RESOLVER=yCONFIG_NFC=y
# CONFIG_NFC_DIGITAL is not set
# CONFIG_NFC_NCI is not setCONFIG_NFC_HCI=yCONFIG_NFC_SHDLC=y
#
# Near Field Communication (NFC) devices
#CONFIG_NFC_MEI_PHY=y
# CONFIG_NFC_PN544_I2C is not set
# CONFIG_NFC_PN544_MEI is not setCONFIG_NFC_PN533=y
# CONFIG_NFC_PN533_I2C is not setCONFIG_NFC_PN532_UART=yCONFIG_NFC_MICROREAD=yCONFIG_NFC_MICROREAD_I2C=yCONFIG_NFC_MICROREAD_MEI=yCONFIG_NFC_ST21NFCA=yCONFIG_NFC_ST21NFCA_I2C=y
# end of Near Field Communication (NFC) devices
CONFIG_PSAMPLE=yCONFIG_NET_IFE=yCONFIG_LWTUNNEL=y
# CONFIG_LWTUNNEL_BPF is not setCONFIG_DST_CACHE=yCONFIG_GRO_CELLS=yCONFIG_NET_SELFTESTS=yCONFIG_NET_SOCK_MSG=yCONFIG_NET_DEVLINK=yCONFIG_PAGE_POOL=y
# CONFIG_PAGE_POOL_STATS is not setCONFIG_FAILOVER=y
# CONFIG_ETHTOOL_NETLINK is not set
#
# Device Drivers
#CONFIG_HAVE_EISA=yCONFIG_EISA=yCONFIG_EISA_VLB_PRIMING=yCONFIG_EISA_PCI_EISA=y
# CONFIG_EISA_VIRTUAL_ROOT is not setCONFIG_EISA_NAMES=yCONFIG_HAVE_PCI=yCONFIG_PCI=yCONFIG_PCI_DOMAINS=y
# CONFIG_PCIEPORTBUS is not setCONFIG_PCIEASPM=yCONFIG_PCIEASPM_DEFAULT=y
# CONFIG_PCIEASPM_POWERSAVE is not set
# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set
# CONFIG_PCIEASPM_PERFORMANCE is not setCONFIG_PCIE_PTM=y
# CONFIG_PCI_MSI is not setCONFIG_PCI_QUIRKS=y
# CONFIG_PCI_DEBUG is not setCONFIG_PCI_REALLOC_ENABLE_AUTO=yCONFIG_PCI_STUB=y
# CONFIG_PCI_PF_STUB is not setCONFIG_PCI_ATS=yCONFIG_PCI_DOE=yCONFIG_PCI_ECAM=yCONFIG_PCI_LOCKLESS_CONFIG=yCONFIG_PCI_IOV=y
# CONFIG_PCI_PRI is not set
# CONFIG_PCI_PASID is not setCONFIG_PCI_LABEL=yCONFIG_VGA_ARB=yCONFIG_VGA_ARB_MAX_GPUS=16
# CONFIG_HOTPLUG_PCI is not set
#
# PCI controller drivers
#CONFIG_PCIE_ALTERA=y
# CONFIG_PCI_VERSATILE is not setCONFIG_PCI_HOST_COMMON=y
# CONFIG_PCIE_MT7621 is not setCONFIG_PCIE_XILINX_CPM=y
#
# Cadence-based PCIe controllers
#
# end of Cadence-based PCIe controllers
#
# DesignWare-based PCIe controllers
#
# end of DesignWare-based PCIe controllers
#
# Mobiveil-based PCIe controllers
#
# end of Mobiveil-based PCIe controllers # end of PCI controller drivers
#
# PCI Endpoint
#
# CONFIG_PCI_ENDPOINT is not set
# end of PCI Endpoint
#
# PCI switch controller drivers
#CONFIG_PCI_SW_SWITCHTEC=y
# end of PCI switch controller drivers
CONFIG_CXL_BUS=yCONFIG_CXL_PCI=y
# CONFIG_CXL_MEM_RAW_COMMANDS is not setCONFIG_CXL_MEM=yCONFIG_CXL_PORT=yCONFIG_CXL_REGION=yCONFIG_CXL_REGION_INVALIDATION_TEST=yCONFIG_CXL_PMU=yCONFIG_PCCARD=yCONFIG_PCMCIA=y
# CONFIG_PCMCIA_LOAD_CIS is not setCONFIG_CARDBUS=y
#
# PC-card bridges
#CONFIG_YENTA=yCONFIG_YENTA_O2=yCONFIG_YENTA_RICOH=yCONFIG_YENTA_TI=yCONFIG_YENTA_ENE_TUNE=yCONFIG_YENTA_TOSHIBA=yCONFIG_PD6729=yCONFIG_I82092=yCONFIG_PCCARD_NONSTATIC=y
# CONFIG_RAPIDIO is not set
#
# Generic Driver Options
#CONFIG_AUXILIARY_BUS=yCONFIG_UEVENT_HELPER=yCONFIG_UEVENT_HELPER_PATH=""CONFIG_DEVTMPFS=yCONFIG_DEVTMPFS_MOUNT=y
# CONFIG_DEVTMPFS_SAFE is not set
# CONFIG_STANDALONE is not set
# CONFIG_PREVENT_FIRMWARE_BUILD is not set
#
# Firmware loader
#CONFIG_FW_LOADER=y
# CONFIG_FW_LOADER_DEBUG is not setCONFIG_FW_LOADER_PAGED_BUF=yCONFIG_FW_LOADER_SYSFS=yCONFIG_EXTRA_FIRMWARE=""
# CONFIG_FW_LOADER_USER_HELPER is not set
# CONFIG_FW_LOADER_COMPRESS is not setCONFIG_FW_UPLOAD=y
# end of Firmware loader
CONFIG_ALLOW_DEV_COREDUMP=y
# CONFIG_DEBUG_DRIVER is not set
# CONFIG_DEBUG_DEVRES is not setCONFIG_DEBUG_TEST_DRIVER_REMOVE=yCONFIG_GENERIC_CPU_DEVICES=yCONFIG_GENERIC_CPU_AUTOPROBE=yCONFIG_GENERIC_CPU_VULNERABILITIES=yCONFIG_SOC_BUS=yCONFIG_REGMAP=yCONFIG_REGMAP_I2C=yCONFIG_REGMAP_SLIMBUS=yCONFIG_REGMAP_SPMI=yCONFIG_REGMAP_W1=yCONFIG_REGMAP_MMIO=yCONFIG_REGMAP_IRQ=yCONFIG_REGMAP_I3C=yCONFIG_DMA_SHARED_BUFFER=yCONFIG_DMA_FENCE_TRACE=y
# CONFIG_FW_DEVLINK_SYNC_STATE_TIMEOUT is not set
# end of Generic Driver Options
#
# Bus devices
#
# CONFIG_ARM_INTEGRATOR_LM is not setCONFIG_BT1_APB=yCONFIG_BT1_AXI=y
# CONFIG_HISILICON_LPC is not set
# CONFIG_INTEL_IXP4XX_EB is not setCONFIG_QCOM_EBI2=y
# CONFIG_MHI_BUS is not setCONFIG_MHI_BUS_EP=y
# end of Bus devices
#
# Cache Drivers
#
# end of Cache Drivers
CONFIG_CONNECTOR=y
# CONFIG_PROC_EVENTS is not set
#
# Firmware Drivers
#
#
# ARM System Control and Management Interface Protocol #CONFIG_ARM_SCMI_PROTOCOL=y CONFIG_ARM_SCMI_NEED_DEBUGFS=y CONFIG_ARM_SCMI_RAW_MODE_SUPPORT=y CONFIG_ARM_SCMI_RAW_MODE_SUPPORT_COEX=y
# CONFIG_ARM_SCMI_TRANSPORT_MAILBOX is not set # CONFIG_ARM_SCMI_TRANSPORT_VIRTIO is not set CONFIG_ARM_SCMI_POWER_CONTROL=y
# end of ARM System Control and Management Interface Protocol
CONFIG_ARM_SCPI_PROTOCOL=yCONFIG_EDD=yCONFIG_EDD_OFF=yCONFIG_FIRMWARE_MEMMAP=yCONFIG_DMIID=yCONFIG_DMI_SYSFS=yCONFIG_DMI_SCAN_MACHINE_NON_EFI_FALLBACK=yCONFIG_FW_CFG_SYSFS=yCONFIG_FW_CFG_SYSFS_CMDLINE=yCONFIG_SYSFB=yCONFIG_SYSFB_SIMPLEFB=y
# CONFIG_BCM47XX_NVRAM is not setCONFIG_TEE_BNXT_FW=y
# CONFIG_GOOGLE_FIRMWARE is not setCONFIG_POLARFIRE_SOC_AUTO_UPDATE=y
#
# Qualcomm firmware drivers
#CONFIG_QCOM_SCM=yCONFIG_QCOM_SCM_DOWNLOAD_MODE_DEFAULT=y
# CONFIG_QCOM_QSEECOM is not set
# end of Qualcomm firmware drivers
#
# Tegra firmware driver
#
# end of Tegra firmware driver # end of Firmware Drivers
CONFIG_GNSS=yCONFIG_GNSS_SERIAL=y
# CONFIG_GNSS_MTK_SERIAL is not set
# CONFIG_GNSS_SIRF_SERIAL is not setCONFIG_GNSS_UBX_SERIAL=yCONFIG_MTD=y
#
# Partition parsers
#CONFIG_MTD_BCM63XX_PARTS=yCONFIG_MTD_BRCM_U_BOOT=yCONFIG_MTD_CMDLINE_PARTS=yCONFIG_MTD_PARSER_IMAGETAG=yCONFIG_MTD_PARSER_TPLINK_SAFELOADER=y
# CONFIG_MTD_PARSER_TRX is not setCONFIG_MTD_SHARPSL_PARTS=y
# CONFIG_MTD_REDBOOT_PARTS is not set
# end of Partition parsers
#
# User Modules And Translation Layers
#CONFIG_MTD_BLKDEVS=yCONFIG_MTD_BLOCK=y
#
# Note that in some cases UBI block is preferred. See MTD_UBI_BLOCK. #CONFIG_FTL=y
# CONFIG_NFTL is not setCONFIG_INFTL=yCONFIG_RFD_FTL=y
# CONFIG_SSFDC is not setCONFIG_SM_FTL=yCONFIG_MTD_OOPS=yCONFIG_MTD_SWAP=yCONFIG_MTD_PARTITIONED_MASTER=y
#
# RAM/ROM/Flash chip drivers
#CONFIG_MTD_CFI=yCONFIG_MTD_JEDECPROBE=yCONFIG_MTD_GEN_PROBE=y
# CONFIG_MTD_CFI_ADV_OPTIONS is not setCONFIG_MTD_MAP_BANK_WIDTH_1=yCONFIG_MTD_MAP_BANK_WIDTH_2=yCONFIG_MTD_MAP_BANK_WIDTH_4=yCONFIG_MTD_CFI_I1=yCONFIG_MTD_CFI_I2=yCONFIG_MTD_CFI_INTELEXT=yCONFIG_MTD_CFI_AMDSTD=yCONFIG_MTD_CFI_STAA=yCONFIG_MTD_CFI_UTIL=yCONFIG_MTD_RAM=yCONFIG_MTD_ROM=y
# CONFIG_MTD_ABSENT is not set
# end of RAM/ROM/Flash chip drivers
#
# Mapping drivers for chip access
#CONFIG_MTD_COMPLEX_MAPPINGS=yCONFIG_MTD_PHYSMAP=yCONFIG_MTD_PHYSMAP_COMPAT=yCONFIG_MTD_PHYSMAP_START=0x8000000CONFIG_MTD_PHYSMAP_LEN=0CONFIG_MTD_PHYSMAP_BANKWIDTH=2
# CONFIG_MTD_PHYSMAP_GPIO_ADDR is not setCONFIG_MTD_SC520CDP=yCONFIG_MTD_NETSC520=yCONFIG_MTD_TS5500=yCONFIG_MTD_SBC_GXX=y
# CONFIG_MTD_AMD76XROM is not set
# CONFIG_MTD_ICHXROM is not setCONFIG_MTD_ESB2ROM=yCONFIG_MTD_CK804XROM=yCONFIG_MTD_SCB2_FLASH=y
# CONFIG_MTD_NETtel is not set
# CONFIG_MTD_L440GX is not setCONFIG_MTD_PCI=yCONFIG_MTD_PCMCIA=yCONFIG_MTD_PCMCIA_ANONYMOUS=yCONFIG_MTD_INTEL_VR_NOR=yCONFIG_MTD_PLATRAM=y
# end of Mapping drivers for chip access
#
# Self-contained MTD device drivers
#CONFIG_MTD_PMC551=y
# CONFIG_MTD_PMC551_BUGFIX is not set
# CONFIG_MTD_PMC551_DEBUG is not setCONFIG_MTD_SPEAR_SMI=y
# CONFIG_MTD_SLRAM is not setCONFIG_MTD_PHRAM=yCONFIG_MTD_MTDRAM=yCONFIG_MTDRAM_TOTAL_SIZE=4096CONFIG_MTDRAM_ERASE_SIZE=128CONFIG_MTD_BLOCK2MTD=y
#
# Disk-On-Chip Device Drivers
#CONFIG_MTD_DOCG3=yCONFIG_BCH_CONST_M=14CONFIG_BCH_CONST_T=4
# end of Self-contained MTD device drivers
#
# NAND
#CONFIG_MTD_NAND_CORE=y
# CONFIG_MTD_ONENAND is not setCONFIG_MTD_RAW_NAND=y
#
# Raw/parallel NAND flash controllers
#CONFIG_MTD_NAND_DENALI=yCONFIG_MTD_NAND_DENALI_PCI=yCONFIG_MTD_NAND_AMS_DELTA=y
# CONFIG_MTD_NAND_SHARPSL is not set
# CONFIG_MTD_NAND_CAFE is not set
# CONFIG_MTD_NAND_ATMEL is not setCONFIG_MTD_NAND_MARVELL=yCONFIG_MTD_NAND_SLC_LPC32XX=yCONFIG_MTD_NAND_MLC_LPC32XX=yCONFIG_MTD_NAND_BRCMNAND=yCONFIG_MTD_NAND_BRCMNAND_BCM63XX=y
# CONFIG_MTD_NAND_BRCMNAND_BCMA is not set
# CONFIG_MTD_NAND_BRCMNAND_BCMBCA is not setCONFIG_MTD_NAND_BRCMNAND_BRCMSTB=y
# CONFIG_MTD_NAND_BRCMNAND_IPROC is not setCONFIG_MTD_NAND_BCM47XXNFLASH=yCONFIG_MTD_NAND_FSL_IFC=yCONFIG_MTD_NAND_VF610_NFC=yCONFIG_MTD_NAND_SH_FLCTL=y
# CONFIG_MTD_NAND_DAVINCI is not set
# CONFIG_MTD_NAND_TXX9NDFMC is not set
# CONFIG_MTD_NAND_SUNXI is not setCONFIG_MTD_NAND_HISI504=yCONFIG_MTD_NAND_QCOM=yCONFIG_MTD_NAND_MXIC=yCONFIG_MTD_NAND_TEGRA=yCONFIG_MTD_NAND_STM32_FMC2=yCONFIG_MTD_NAND_GPIO=y
# CONFIG_MTD_NAND_PLATFORM is not setCONFIG_MTD_NAND_ARASAN=yCONFIG_MTD_NAND_RENESAS=y
#
# Misc
#CONFIG_MTD_SM_COMMON=y
# CONFIG_MTD_NAND_NANDSIM is not setCONFIG_MTD_NAND_RICOH=yCONFIG_MTD_NAND_DISKONCHIP=yCONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED=yCONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0CONFIG_MTD_NAND_DISKONCHIP_PROBE_HIGH=yCONFIG_MTD_NAND_DISKONCHIP_BBTWRITE=y
#
# ECC engine support
#CONFIG_MTD_NAND_ECC=yCONFIG_MTD_NAND_ECC_SW_HAMMING=yCONFIG_MTD_NAND_ECC_SW_HAMMING_SMC=yCONFIG_MTD_NAND_ECC_SW_BCH=yCONFIG_MTD_NAND_ECC_MXIC=y
# CONFIG_MTD_NAND_ECC_MEDIATEK is not set
# end of ECC engine support # end of NAND
#
# LPDDR & LPDDR2 PCM memory drivers
#
# CONFIG_MTD_LPDDR is not set
# end of LPDDR & LPDDR2 PCM memory drivers
CONFIG_MTD_UBI=yCONFIG_MTD_UBI_WL_THRESHOLD=4096CONFIG_MTD_UBI_BEB_LIMIT=20CONFIG_MTD_UBI_FASTMAP=yCONFIG_MTD_UBI_GLUEBI=y
# CONFIG_MTD_UBI_BLOCK is not set
# CONFIG_MTD_UBI_FAULT_INJECTION is not setCONFIG_MTD_HYPERBUS=yCONFIG_HBMC_AM654=y
# CONFIG_OF is not setCONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=yCONFIG_PARPORT=yCONFIG_PARPORT_PC=yCONFIG_PARPORT_SERIAL=y
# CONFIG_PARPORT_PC_FIFO is not setCONFIG_PARPORT_PC_SUPERIO=yCONFIG_PARPORT_PC_PCMCIA=yCONFIG_PARPORT_1284=y
# CONFIG_BLK_DEV is not set
#
# NVME Support
#CONFIG_NVME_AUTH=yCONFIG_NVME_CORE=yCONFIG_BLK_DEV_NVME=yCONFIG_NVME_MULTIPATH=yCONFIG_NVME_VERBOSE_ERRORS=y
# CONFIG_NVME_HWMON is not setCONFIG_NVME_FABRICS=y
# CONFIG_NVME_RDMA is not setCONFIG_NVME_FC=yCONFIG_NVME_TCP=y
# CONFIG_NVME_TCP_TLS is not setCONFIG_NVME_HOST_AUTH=yCONFIG_NVME_TARGET=yCONFIG_NVME_TARGET_PASSTHRU=y
# CONFIG_NVME_TARGET_LOOP is not setCONFIG_NVME_TARGET_RDMA=yCONFIG_NVME_TARGET_FC=yCONFIG_NVME_TARGET_FCLOOP=y
# CONFIG_NVME_TARGET_TCP is not set
# CONFIG_NVME_TARGET_AUTH is not set
# end of NVME Support
#
# Misc devices
#CONFIG_SENSORS_LIS3LV02D=yCONFIG_AD525X_DPOT=y
# CONFIG_AD525X_DPOT_I2C is not setCONFIG_DUMMY_IRQ=yCONFIG_IBM_ASM=yCONFIG_PHANTOM=yCONFIG_TIFM_CORE=yCONFIG_TIFM_7XX1=y
# CONFIG_ICS932S401 is not setCONFIG_ATMEL_SSC=yCONFIG_ENCLOSURE_SERVICES=yCONFIG_SMPRO_ERRMON=y
# CONFIG_SMPRO_MISC is not set
# CONFIG_HP_ILO is not set
# CONFIG_QCOM_COINCELL is not set
# CONFIG_QCOM_FASTRPC is not setCONFIG_APDS9802ALS=yCONFIG_ISL29003=yCONFIG_ISL29020=yCONFIG_SENSORS_TSL2550=yCONFIG_SENSORS_BH1770=y
# CONFIG_SENSORS_APDS990X is not setCONFIG_HMC6352=yCONFIG_DS1682=y
# CONFIG_PCH_PHUB is not set
# CONFIG_SRAM is not setCONFIG_DW_XDATA_PCIE=yCONFIG_PCI_ENDPOINT_TEST=yCONFIG_XILINX_SDFEC=yCONFIG_MISC_RTSX=yCONFIG_TPS6594_ESM=yCONFIG_TPS6594_PFSM=yCONFIG_NSM=yCONFIG_C2PORT=yCONFIG_C2PORT_DURAMAR_2150=y
#
# EEPROM support
#
# CONFIG_EEPROM_AT24 is not setCONFIG_EEPROM_MAX6875=yCONFIG_EEPROM_93CX6=yCONFIG_EEPROM_IDT_89HPESX=yCONFIG_EEPROM_EE1004=y
# end of EEPROM support
# CONFIG_CB710_CORE is not set
#
# Texas Instruments shared transport line discipline #CONFIG_TI_ST=y
# end of Texas Instruments shared transport line discipline
CONFIG_SENSORS_LIS3_I2C=yCONFIG_ALTERA_STAPL=yCONFIG_INTEL_MEI=yCONFIG_INTEL_MEI_ME=yCONFIG_INTEL_MEI_TXE=yCONFIG_VMWARE_VMCI=y
# CONFIG_GENWQE is not setCONFIG_ECHO=yCONFIG_MISC_ALCOR_PCI=yCONFIG_MISC_RTSX_PCI=yCONFIG_UACCE=y
# CONFIG_PVPANIC is not set
# end of Misc devices
#
# SCSI device support
#CONFIG_SCSI_MOD=yCONFIG_RAID_ATTRS=yCONFIG_SCSI_COMMON=yCONFIG_SCSI=yCONFIG_SCSI_DMA=yCONFIG_SCSI_PROC_FS=y
#
# SCSI support type (disk, tape, CD-ROM)
#CONFIG_BLK_DEV_SD=yCONFIG_CHR_DEV_ST=yCONFIG_CHR_DEV_SG=yCONFIG_BLK_DEV_BSG=y
# CONFIG_CHR_DEV_SCH is not set
# CONFIG_SCSI_ENCLOSURE is not set
# CONFIG_SCSI_CONSTANTS is not set
# CONFIG_SCSI_LOGGING is not setCONFIG_SCSI_SCAN_ASYNC=y
#
# SCSI Transports
#CONFIG_SCSI_SPI_ATTRS=y
# CONFIG_SCSI_FC_ATTRS is not setCONFIG_SCSI_ISCSI_ATTRS=yCONFIG_SCSI_SAS_ATTRS=yCONFIG_SCSI_SAS_LIBSAS=yCONFIG_SCSI_SAS_ATA=y
# CONFIG_SCSI_SAS_HOST_SMP is not setCONFIG_SCSI_SRP_ATTRS=y
# end of SCSI Transports
CONFIG_SCSI_LOWLEVEL=yCONFIG_ISCSI_TCP=yCONFIG_ISCSI_BOOT_SYSFS=y CONFIG_SCSI_CXGB3_ISCSI=y CONFIG_SCSI_CXGB4_ISCSI=y
# CONFIG_SCSI_BNX2_ISCSI is not set
# CONFIG_BE2ISCSI is not set
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
# CONFIG_SCSI_HPSA is not set
# CONFIG_SCSI_3W_9XXX is not set
# CONFIG_SCSI_3W_SAS is not set
# CONFIG_SCSI_ACARD is not set
# CONFIG_SCSI_AHA1740 is not set CONFIG_SCSI_AACRAID=y
# CONFIG_SCSI_AIC7XXX is not set
# CONFIG_SCSI_AIC79XX is not set CONFIG_SCSI_AIC94XX=yCONFIG_AIC94XX_DEBUG=yCONFIG_SCSI_HISI_SAS=y
# CONFIG_SCSI_HISI_SAS_DEBUGFS_DEFAULT_ENABLE is not set CONFIG_SCSI_MVSAS=y
# CONFIG_SCSI_MVSAS_DEBUG is not set
# CONFIG_SCSI_MVSAS_TASKLET is not set
# CONFIG_SCSI_MVUMI is not set CONFIG_SCSI_ADVANSYS=yCONFIG_SCSI_ARCMSR=yCONFIG_SCSI_ESAS2R=y
# CONFIG_MEGARAID_NEWGEN is not set CONFIG_MEGARAID_LEGACY=y
# CONFIG_MEGARAID_SAS is not set CONFIG_SCSI_MPT3SAS=y CONFIG_SCSI_MPT2SAS_MAX_SGE=128 CONFIG_SCSI_MPT3SAS_MAX_SGE=128 CONFIG_SCSI_MPT2SAS=yCONFIG_SCSI_MPI3MR=y
# CONFIG_SCSI_SMARTPQI is not set
# CONFIG_SCSI_HPTIOP is not set CONFIG_SCSI_BUSLOGIC=yCONFIG_SCSI_FLASHPOINT=yCONFIG_SCSI_MYRB=y
# CONFIG_SCSI_MYRS is not set CONFIG_VMWARE_PVSCSI=yCONFIG_SCSI_SNIC=yCONFIG_SCSI_SNIC_DEBUG_FS=y CONFIG_SCSI_DMX3191D=y
# CONFIG_SCSI_FDOMAIN_PCI is not set
# CONFIG_SCSI_ISCI is not setCONFIG_SCSI_IPS=yCONFIG_SCSI_INITIO=yCONFIG_SCSI_INIA100=y
# CONFIG_SCSI_PPA is not setCONFIG_SCSI_IMM=y
# CONFIG_SCSI_IZIP_SLOW_CTR is not set CONFIG_SCSI_STEX=y
# CONFIG_SCSI_SYM53C8XX_2 is not set CONFIG_SCSI_IPR=yCONFIG_SCSI_IPR_TRACE=yCONFIG_SCSI_IPR_DUMP=y
# CONFIG_SCSI_QLOGIC_1280 is not set CONFIG_SCSI_QLA_ISCSI=y
# CONFIG_SCSI_SIM710 is not set CONFIG_SCSI_DC395x=y
# CONFIG_SCSI_AM53C974 is not set CONFIG_SCSI_WD719X=yCONFIG_SCSI_DEBUG=yCONFIG_SCSI_PMCRAID=yCONFIG_SCSI_PM8001=yCONFIG_SCSI_VIRTIO=y
# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set CONFIG_SCSI_DH=yCONFIG_SCSI_DH_RDAC=yCONFIG_SCSI_DH_HP_SW=yCONFIG_SCSI_DH_EMC=y
# CONFIG_SCSI_DH_ALUA is not set
# end of SCSI device support
CONFIG_ATA=yCONFIG_SATA_HOST=yCONFIG_PATA_TIMINGS=y
# CONFIG_ATA_VERBOSE_ERROR is not setCONFIG_ATA_FORCE=y
# CONFIG_SATA_PMP is not set
#
# Controllers with non-SFF native interface
#CONFIG_SATA_AHCI=yCONFIG_SATA_MOBILE_LPM_POLICY=0CONFIG_SATA_AHCI_PLATFORM=yCONFIG_AHCI_BRCM=y
# CONFIG_AHCI_DA850 is not set
# CONFIG_AHCI_DM816 is not setCONFIG_AHCI_DWC=y
# CONFIG_AHCI_ST is not set
# CONFIG_AHCI_IMX is not set
# CONFIG_AHCI_MTK is not setCONFIG_AHCI_MVEBU=yCONFIG_AHCI_SUNXI=yCONFIG_AHCI_TEGRA=yCONFIG_AHCI_XGENE=yCONFIG_SATA_FSL=y
# CONFIG_SATA_GEMINI is not set
# CONFIG_SATA_AHCI_SEATTLE is not setCONFIG_SATA_INIC162X=y
# CONFIG_SATA_ACARD_AHCI is not setCONFIG_SATA_SIL24=yCONFIG_ATA_SFF=y
#
# SFF controllers with custom DMA interface
#CONFIG_PDC_ADMA=yCONFIG_SATA_QSTOR=yCONFIG_SATA_SX4=y
# CONFIG_ATA_BMDMA is not set
#
# PIO-only SFF controllers
#
# CONFIG_PATA_CMD640_PCI is not setCONFIG_PATA_IXP4XX_CF=y
# CONFIG_PATA_MPIIX is not setCONFIG_PATA_NS87410=y
# CONFIG_PATA_OPTI is not setCONFIG_PATA_PCMCIA=y
# CONFIG_PATA_RZ1000 is not setCONFIG_PATA_PARPORT=y
#
# Parallel IDE protocol modules
#
# CONFIG_PATA_PARPORT_ATEN is not set
# CONFIG_PATA_PARPORT_BPCK is not set
# CONFIG_PATA_PARPORT_BPCK6 is not setCONFIG_PATA_PARPORT_COMM=yCONFIG_PATA_PARPORT_DSTR=yCONFIG_PATA_PARPORT_FIT2=y
# CONFIG_PATA_PARPORT_FIT3 is not setCONFIG_PATA_PARPORT_EPAT=y
# CONFIG_PATA_PARPORT_EPATC8 is not setCONFIG_PATA_PARPORT_EPIA=yCONFIG_PATA_PARPORT_FRIQ=y
# CONFIG_PATA_PARPORT_FRPW is not setCONFIG_PATA_PARPORT_KBIC=y
# CONFIG_PATA_PARPORT_KTTI is not set
# CONFIG_PATA_PARPORT_ON20 is not setCONFIG_PATA_PARPORT_ON26=y
#
# Generic fallback / legacy drivers
#CONFIG_PATA_LEGACY=yCONFIG_MD=y
# CONFIG_BLK_DEV_MD is not set CONFIG_MD_BITMAP_FILE=y
# CONFIG_BCACHE is not set CONFIG_BLK_DEV_DM_BUILTIN=y CONFIG_BLK_DEV_DM=y
# CONFIG_DM_DEBUG is not set CONFIG_DM_BUFIO=y
# CONFIG_DM_DEBUG_BLOCK_MANAGER_LOCKING is not set CONFIG_DM_BIO_PRISON=y CONFIG_DM_PERSISTENT_DATA=y CONFIG_DM_UNSTRIPED=yCONFIG_DM_CRYPT=y
# CONFIG_DM_SNAPSHOT is not set CONFIG_DM_THIN_PROVISIONING=y CONFIG_DM_CACHE=y
# CONFIG_DM_CACHE_SMQ is not set
# CONFIG_DM_WRITECACHE is not set
# CONFIG_DM_EBS is not setCONFIG_DM_ERA=yCONFIG_DM_CLONE=yCONFIG_DM_MIRROR=y CONFIG_DM_LOG_USERSPACE=y
# CONFIG_DM_RAID is not set
# CONFIG_DM_ZERO is not set CONFIG_DM_MULTIPATH=y CONFIG_DM_MULTIPATH_QL=y
# CONFIG_DM_MULTIPATH_ST is not set CONFIG_DM_MULTIPATH_HST=y CONFIG_DM_MULTIPATH_IOA=y CONFIG_DM_DELAY=y
# CONFIG_DM_DUST is not set CONFIG_DM_INIT=yCONFIG_DM_UEVENT=y
# CONFIG_DM_FLAKEY is not set CONFIG_DM_VERITY=y
# CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG is not set CONFIG_DM_VERITY_FEC=y
# CONFIG_DM_SWITCH is not set CONFIG_DM_LOG_WRITES=y CONFIG_DM_INTEGRITY=yCONFIG_DM_ZONED=yCONFIG_DM_AUDIT=yCONFIG_TARGET_CORE=yCONFIG_TCM_IBLOCK=y
# CONFIG_TCM_FILEIO is not set
# CONFIG_TCM_PSCSI is not set CONFIG_TCM_USER2=y CONFIG_LOOPBACK_TARGET=y
# CONFIG_ISCSI_TARGET is not set CONFIG_SBP_TARGET=yCONFIG_REMOTE_TARGET=y
# CONFIG_FUSION is not set
#
# IEEE 1394 (FireWire) support
#CONFIG_FIREWIRE=y
# CONFIG_FIREWIRE_OHCI is not setCONFIG_FIREWIRE_SBP2=yCONFIG_FIREWIRE_NET=yCONFIG_FIREWIRE_NOSY=y
# end of IEEE 1394 (FireWire) support
CONFIG_MACINTOSH_DRIVERS=yCONFIG_MAC_EMUMOUSEBTN=yCONFIG_NETDEVICES=yCONFIG_MII=y
# CONFIG_NET_CORE is not setCONFIG_ARCNET=yCONFIG_ARCNET_1201=yCONFIG_ARCNET_1051=y
# CONFIG_ARCNET_RAW is not setCONFIG_ARCNET_CAP=y
# CONFIG_ARCNET_COM90xx is not set
CONFIG_ARCNET_COM90xxIO=yCONFIG_ARCNET_RIM_I=yCONFIG_ARCNET_COM20020=y
# CONFIG_ARCNET_COM20020_PCI is not set
# CONFIG_ARCNET_COM20020_CS is not set
#
# Distributed Switch Architecture drivers
#CONFIG_B53=yCONFIG_B53_MDIO_DRIVER=y
# CONFIG_B53_MMAP_DRIVER is not set
# CONFIG_B53_SRAB_DRIVER is not setCONFIG_B53_SERDES=yCONFIG_NET_DSA_BCM_SF2=y
# CONFIG_NET_DSA_LOOP is not setCONFIG_NET_DSA_LANTIQ_GSWIP=y
# CONFIG_NET_DSA_MT7530 is not set
# CONFIG_NET_DSA_MV88E6060 is not set
# CONFIG_NET_DSA_MICROCHIP_KSZ_COMMON is not setCONFIG_NET_DSA_MV88E6XXX=yCONFIG_NET_DSA_MSCC_FELIX_DSA_LIB=y
# CONFIG_NET_DSA_MSCC_FELIX is not setCONFIG_NET_DSA_MSCC_SEVILLE=yCONFIG_NET_DSA_AR9331=yCONFIG_NET_DSA_QCA8K=y
# CONFIG_NET_DSA_QCA8K_LEDS_SUPPORT is not setCONFIG_NET_DSA_XRS700X=yCONFIG_NET_DSA_XRS700X_I2C=yCONFIG_NET_DSA_XRS700X_MDIO=yCONFIG_NET_DSA_REALTEK=y
# CONFIG_NET_DSA_REALTEK_MDIO is not set
# CONFIG_NET_DSA_REALTEK_SMI is not setCONFIG_NET_DSA_REALTEK_RTL8365MB=yCONFIG_NET_DSA_REALTEK_RTL8366RB=yCONFIG_NET_DSA_SMSC_LAN9303=yCONFIG_NET_DSA_SMSC_LAN9303_I2C=yCONFIG_NET_DSA_SMSC_LAN9303_MDIO=yCONFIG_NET_DSA_VITESSE_VSC73XX=yCONFIG_NET_DSA_VITESSE_VSC73XX_PLATFORM=y
# end of Distributed Switch Architecture drivers
CONFIG_ETHERNET=yCONFIG_MDIO=yCONFIG_NET_VENDOR_3COM=yCONFIG_EL3=y
# CONFIG_PCMCIA_3C574 is not set
# CONFIG_PCMCIA_3C589 is not set
# CONFIG_VORTEX is not set
# CONFIG_TYPHOON is not set
# CONFIG_NET_VENDOR_ACTIONS is not set
# CONFIG_NET_VENDOR_ADAPTEC is not set
# CONFIG_NET_VENDOR_AGERE is not set
# CONFIG_NET_VENDOR_ALACRITECH is not setCONFIG_NET_VENDOR_ALTEON=yCONFIG_ACENIC=yCONFIG_ACENIC_OMIT_TIGON_I=yCONFIG_ALTERA_TSE=y
# CONFIG_NET_VENDOR_AMAZON is not setCONFIG_NET_VENDOR_AMD=yCONFIG_AMD8111_ETH=yCONFIG_PCNET32=yCONFIG_PCMCIA_NMCLAN=yCONFIG_AMD_XGBE=y
# CONFIG_AMD_XGBE_DCB is not setCONFIG_AMD_XGBE_HAVE_ECC=yCONFIG_PDS_CORE=yCONFIG_NET_XGENE=yCONFIG_NET_XGENE_V2=y
# CONFIG_NET_VENDOR_AQUANTIA is not setCONFIG_NET_VENDOR_ARC=yCONFIG_NET_VENDOR_ASIX=yCONFIG_NET_VENDOR_ATHEROS=yCONFIG_ATL2=y
# CONFIG_ATL1 is not setCONFIG_ATL1E=yCONFIG_ATL1C=yCONFIG_ALX=yCONFIG_CX_ECAT=yCONFIG_NET_VENDOR_BROADCOM=yCONFIG_B44=yCONFIG_B44_PCI_AUTOSELECT=yCONFIG_B44_PCICORE_AUTOSELECT=yCONFIG_B44_PCI=yCONFIG_BCM4908_ENET=yCONFIG_BCMGENET=y
# CONFIG_BNX2 is not set
# CONFIG_CNIC is not set
# CONFIG_TIGON3 is not setCONFIG_BNX2X=yCONFIG_BNX2X_SRIOV=yCONFIG_BGMAC=yCONFIG_BGMAC_BCMA=yCONFIG_BGMAC_PLATFORM=y
# CONFIG_SYSTEMPORT is not set
# CONFIG_BNXT is not set
# CONFIG_NET_VENDOR_CADENCE is not set
# CONFIG_NET_CALXEDA_XGMAC is not set
# CONFIG_NET_VENDOR_CAVIUM is not setCONFIG_NET_VENDOR_CHELSIO=yCONFIG_CHELSIO_T1=yCONFIG_CHELSIO_T1_1G=yCONFIG_CHELSIO_T3=yCONFIG_CHELSIO_T4=yCONFIG_CHELSIO_T4_DCB=yCONFIG_CHELSIO_T4VF=yCONFIG_CHELSIO_LIB=yCONFIG_CHELSIO_INLINE_CRYPTO=yCONFIG_NET_VENDOR_CIRRUS=y
CONFIG_CS89x0=y
CONFIG_CS89x0_PLATFORM=y
# CONFIG_EP93XX_ETH is not setCONFIG_NET_VENDOR_CISCO=yCONFIG_ENIC=y
# CONFIG_NET_VENDOR_CORTINA is not setCONFIG_NET_VENDOR_DAVICOM=yCONFIG_DM9000=y
# CONFIG_DM9000_FORCE_SIMPLE_PHY_POLL is not setCONFIG_DNET=yCONFIG_NET_VENDOR_DEC=yCONFIG_NET_TULIP=y
# CONFIG_DE2104X is not set
# CONFIG_TULIP is not set
# CONFIG_WINBOND_840 is not setCONFIG_DM9102=yCONFIG_ULI526X=yCONFIG_PCMCIA_XIRCOM=yCONFIG_NET_VENDOR_DLINK=yCONFIG_DL2K=yCONFIG_SUNDANCE=y
# CONFIG_SUNDANCE_MMIO is not setCONFIG_NET_VENDOR_EMULEX=yCONFIG_BE2NET=yCONFIG_BE2NET_HWMON=yCONFIG_BE2NET_BE2=y
# CONFIG_BE2NET_BE3 is not setCONFIG_BE2NET_LANCER=y
# CONFIG_BE2NET_SKYHAWK is not set
# CONFIG_NET_VENDOR_ENGLEDER is not setCONFIG_NET_VENDOR_EZCHIP=yCONFIG_NET_VENDOR_FARADAY=yCONFIG_NET_VENDOR_FREESCALE=y
# CONFIG_FEC is not setCONFIG_FSL_FMAN=yCONFIG_FSL_PQ_MDIO=y
# CONFIG_GIANFAR is not setCONFIG_FSL_DPAA2_SWITCH=yCONFIG_FSL_ENETC_IERB=yCONFIG_FSL_ENETC_MDIO=yCONFIG_NET_VENDOR_FUJITSU=y
# CONFIG_PCMCIA_FMVJ18X is not setCONFIG_NET_VENDOR_FUNGIBLE=yCONFIG_NET_VENDOR_GOOGLE=y
# CONFIG_NET_VENDOR_HUAWEI is not set
# CONFIG_NET_VENDOR_INTEL is not setCONFIG_JME=yCONFIG_KORINA=yCONFIG_NET_VENDOR_LITEX=y
# CONFIG_NET_VENDOR_MARVELL is not set
# CONFIG_NET_VENDOR_MEDIATEK is not setCONFIG_NET_VENDOR_MELLANOX=yCONFIG_MLX4_EN=yCONFIG_MLX4_EN_DCB=yCONFIG_MLX4_CORE=yCONFIG_MLX4_DEBUG=yCONFIG_MLX4_CORE_GEN2=yCONFIG_MLX5_CORE=y
# CONFIG_MLX5_FPGA is not setCONFIG_MLX5_CORE_EN=yCONFIG_MLX5_EN_ARFS=y
# CONFIG_MLX5_EN_RXNFC is not set
# CONFIG_MLX5_MPFS is not set
# CONFIG_MLX5_ESWITCH is not setCONFIG_MLX5_CORE_EN_DCB=yCONFIG_MLX5_CORE_IPOIB=y
# CONFIG_MLX5_SF is not setCONFIG_MLX5_DPLL=y
# CONFIG_MLXSW_CORE is not setCONFIG_MLXFW=yCONFIG_MLXBF_GIGE=y
# CONFIG_NET_VENDOR_MICREL is not setCONFIG_NET_VENDOR_MICROCHIP=yCONFIG_LAN743X=y
# CONFIG_VCAP is not setCONFIG_NET_VENDOR_MICROSEMI=yCONFIG_MSCC_OCELOT_SWITCH_LIB=yCONFIG_NET_VENDOR_MICROSOFT=yCONFIG_NET_VENDOR_MYRI=yCONFIG_MYRI10GE=y
# CONFIG_MYRI10GE_DCA is not setCONFIG_FEALNX=y
# CONFIG_NET_VENDOR_NI is not setCONFIG_NET_VENDOR_NATSEMI=yCONFIG_NATSEMI=yCONFIG_NS83820=y
# CONFIG_NET_VENDOR_NETERION is not set
# CONFIG_NET_VENDOR_NETRONOME is not setCONFIG_NET_VENDOR_8390=yCONFIG_PCMCIA_AXNET=yCONFIG_AX88796=yCONFIG_AX88796_93CX6=y
# CONFIG_NE2K_PCI is not set
# CONFIG_PCMCIA_PCNET is not setCONFIG_NET_VENDOR_NVIDIA=y
# CONFIG_FORCEDETH is not set
# CONFIG_LPC_ENET is not set
# CONFIG_NET_VENDOR_OKI is not set
# CONFIG_ETHOC is not set
# CONFIG_NET_VENDOR_PACKET_ENGINES is not set
# CONFIG_NET_VENDOR_PENSANDO is not set
# CONFIG_NET_VENDOR_QLOGIC is not set
# CONFIG_NET_VENDOR_BROCADE is not setCONFIG_NET_VENDOR_QUALCOMM=yCONFIG_QCOM_EMAC=yCONFIG_RMNET=yCONFIG_NET_VENDOR_RDC=yCONFIG_R6040=yCONFIG_NET_VENDOR_REALTEK=yCONFIG_ATP=y
# CONFIG_8139CP is not setCONFIG_8139TOO=y
# CONFIG_8139TOO_PIO is not setCONFIG_8139TOO_TUNE_TWISTER=yCONFIG_8139TOO_8129=yCONFIG_8139_OLD_RX_RESET=yCONFIG_R8169=yCONFIG_R8169_LEDS=y
# CONFIG_NET_VENDOR_RENESAS is not setCONFIG_NET_VENDOR_ROCKER=y
# CONFIG_ROCKER is not set
# CONFIG_NET_VENDOR_SAMSUNG is not setCONFIG_NET_VENDOR_SEEQ=y
# CONFIG_NET_VENDOR_SILAN is not setCONFIG_NET_VENDOR_SIS=yCONFIG_SIS900=y
# CONFIG_SIS190 is not setCONFIG_NET_VENDOR_SOLARFLARE=yCONFIG_SFC=yCONFIG_SFC_MTD=y
# CONFIG_SFC_MCDI_MON is not set
# CONFIG_SFC_SRIOV is not setCONFIG_SFC_MCDI_LOGGING=yCONFIG_SFC_FALCON=y
# CONFIG_SFC_FALCON_MTD is not set
# CONFIG_NET_VENDOR_SMSC is not set
# CONFIG_NET_VENDOR_SOCIONEXT is not set
# CONFIG_NET_VENDOR_STMICRO is not set
# CONFIG_NET_VENDOR_SUN is not set
# CONFIG_NET_VENDOR_SUNPLUS is not set
# CONFIG_NET_VENDOR_SYNOPSYS is not setCONFIG_NET_VENDOR_TEHUTI=yCONFIG_TEHUTI=y
# CONFIG_NET_VENDOR_TI is not set
# CONFIG_NET_VENDOR_VERTEXCOM is not setCONFIG_NET_VENDOR_VIA=y
# CONFIG_VIA_RHINE is not setCONFIG_VIA_VELOCITY=y
# CONFIG_NET_VENDOR_WANGXUN is not setCONFIG_NET_VENDOR_WIZNET=yCONFIG_WIZNET_W5100=yCONFIG_WIZNET_W5300=y
# CONFIG_WIZNET_BUS_DIRECT is not set
# CONFIG_WIZNET_BUS_INDIRECT is not setCONFIG_WIZNET_BUS_ANY=yCONFIG_NET_VENDOR_XILINX=yCONFIG_XILINX_EMACLITE=yCONFIG_XILINX_AXI_EMAC=yCONFIG_XILINX_LL_TEMAC=yCONFIG_NET_VENDOR_XIRCOM=y
# CONFIG_PCMCIA_XIRC2PS is not setCONFIG_FDDI=y
# CONFIG_DEFXX is not setCONFIG_SKFP=y
# CONFIG_HIPPI is not setCONFIG_PHYLINK=yCONFIG_PHYLIB=yCONFIG_SWPHY=y
# CONFIG_LED_TRIGGER_PHY is not setCONFIG_FIXED_PHY=yCONFIG_SFP=y
#
# MII PHY device drivers
#CONFIG_AMD_PHY=yCONFIG_MESON_GXL_PHY=yCONFIG_ADIN_PHY=y
# CONFIG_ADIN1100_PHY is not setCONFIG_AQUANTIA_PHY=yCONFIG_AX88796B_PHY=yCONFIG_BROADCOM_PHY=yCONFIG_BCM54140_PHY=y
# CONFIG_BCM63XX_PHY is not setCONFIG_BCM7XXX_PHY=y
# CONFIG_BCM84881_PHY is not set
# CONFIG_BCM87XX_PHY is not setCONFIG_BCM_NET_PHYLIB=yCONFIG_BCM_NET_PHYPTP=yCONFIG_CICADA_PHY=yCONFIG_CORTINA_PHY=yCONFIG_DAVICOM_PHY=yCONFIG_ICPLUS_PHY=yCONFIG_LXT_PHY=yCONFIG_INTEL_XWAY_PHY=yCONFIG_LSI_ET1011C_PHY=yCONFIG_MARVELL_PHY=y
# CONFIG_MARVELL_10G_PHY is not setCONFIG_MARVELL_88Q2XXX_PHY=y
# CONFIG_MARVELL_88X2222_PHY is not setCONFIG_MAXLINEAR_GPHY=y
# CONFIG_MEDIATEK_GE_PHY is not setCONFIG_MEDIATEK_GE_SOC_PHY=y
# CONFIG_MICREL_PHY is not setCONFIG_MICROCHIP_T1S_PHY=yCONFIG_MICROCHIP_PHY=yCONFIG_MICROCHIP_T1_PHY=yCONFIG_MICROSEMI_PHY=yCONFIG_MOTORCOMM_PHY=yCONFIG_NATIONAL_PHY=y
# CONFIG_NXP_CBTX_PHY is not setCONFIG_NXP_C45_TJA11XX_PHY=yCONFIG_NXP_TJA11XX_PHY=yCONFIG_NCN26000_PHY=yCONFIG_QSEMI_PHY=yCONFIG_REALTEK_PHY=yCONFIG_RENESAS_PHY=y
# CONFIG_ROCKCHIP_PHY is not setCONFIG_SMSC_PHY=y
# CONFIG_STE10XP is not setCONFIG_TERANETICS_PHY=y
# CONFIG_DP83822_PHY is not set
# CONFIG_DP83TC811_PHY is not set
# CONFIG_DP83848_PHY is not setCONFIG_DP83867_PHY=y
# CONFIG_DP83869_PHY is not set
# CONFIG_DP83TD510_PHY is not setCONFIG_DP83TG720_PHY=yCONFIG_VITESSE_PHY=y
# CONFIG_XILINX_GMII2RGMII is not set
# CONFIG_PSE_CONTROLLER is not set
#
# MCTP Device Drivers
#CONFIG_MCTP_SERIAL=yCONFIG_MCTP_TRANSPORT_I2C=yCONFIG_MCTP_TRANSPORT_I3C=y
# end of MCTP Device Drivers
CONFIG_MDIO_DEVICE=yCONFIG_MDIO_BUS=yCONFIG_FWNODE_MDIO=yCONFIG_MDIO_DEVRES=y
# CONFIG_MDIO_SUN4I is not setCONFIG_MDIO_XGENE=yCONFIG_MDIO_BITBANG=yCONFIG_MDIO_BCM_UNIMAC=y
# CONFIG_MDIO_GPIO is not setCONFIG_MDIO_I2C=yCONFIG_MDIO_MSCC_MIIM=yCONFIG_MDIO_MOXART=y
# CONFIG_MDIO_OCTEON is not setCONFIG_MDIO_REGMAP=y
# CONFIG_MDIO_THUNDER is not set
#
# MDIO Multiplexers
#
#
# PCS device drivers
#CONFIG_PCS_LYNX=y
# end of PCS device drivers
# CONFIG_PLIP is not setCONFIG_PPP=y
# CONFIG_PPP_BSDCOMP is not setCONFIG_PPP_DEFLATE=y
# CONFIG_PPP_FILTER is not setCONFIG_PPP_MPPE=yCONFIG_PPP_MULTILINK=yCONFIG_PPPOE=y
# CONFIG_PPPOE_HASH_BITS_1 is not set
# CONFIG_PPPOE_HASH_BITS_2 is not setCONFIG_PPPOE_HASH_BITS_4=y
# CONFIG_PPPOE_HASH_BITS_8 is not setCONFIG_PPPOE_HASH_BITS=4
# CONFIG_PPTP is not setCONFIG_PPP_ASYNC=y
# CONFIG_PPP_SYNC_TTY is not setCONFIG_SLIP=yCONFIG_SLHC=y
# CONFIG_SLIP_COMPRESSED is not set
# CONFIG_SLIP_SMART is not setCONFIG_SLIP_MODE_SLIP6=y
#
# Host-side USB support is needed for USB Network Adapter support #CONFIG_WLAN=y
# CONFIG_WLAN_VENDOR_ADMTEK is not set CONFIG_WLAN_VENDOR_ATH=yCONFIG_ATH_DEBUG=y
# CONFIG_ATH_TRACEPOINTS is not setCONFIG_ATH5K_PCI=y
# CONFIG_WLAN_VENDOR_ATMEL is not set
# CONFIG_WLAN_VENDOR_BROADCOM is not set
# CONFIG_WLAN_VENDOR_INTEL is not set CONFIG_WLAN_VENDOR_INTERSIL=y
# CONFIG_WLAN_VENDOR_MARVELL is not set
# CONFIG_WLAN_VENDOR_MEDIATEK is not set CONFIG_WLAN_VENDOR_MICROCHIP=y CONFIG_WLAN_VENDOR_PURELIFI=y CONFIG_WLAN_VENDOR_RALINK=y CONFIG_WLAN_VENDOR_REALTEK=yCONFIG_WLAN_VENDOR_RSI=yCONFIG_WLAN_VENDOR_SILABS=y
# CONFIG_WLAN_VENDOR_ST is not set
# CONFIG_WLAN_VENDOR_TI is not set
# CONFIG_WLAN_VENDOR_ZYDAS is not set
# CONFIG_WLAN_VENDOR_QUANTENNA is not setCONFIG_WAN=y
# CONFIG_HDLC is not set
# CONFIG_FRAMER is not set
#
# Wireless WAN
#
# CONFIG_WWAN is not set
# end of Wireless WAN
CONFIG_VMXNET3=yCONFIG_USB4_NET=yCONFIG_NETDEVSIM=yCONFIG_NET_FAILOVER=yCONFIG_ISDN=yCONFIG_ISDN_CAPI=yCONFIG_MISDN=y
# CONFIG_MISDN_DSP is not setCONFIG_MISDN_L1OIP=y
#
# mISDN hardware drivers
#CONFIG_MISDN_HFCPCI=yCONFIG_MISDN_HFCMULTI=yCONFIG_MISDN_AVMFRITZ=yCONFIG_MISDN_SPEEDFAX=yCONFIG_MISDN_INFINEON=yCONFIG_MISDN_W6692=yCONFIG_MISDN_NETJET=yCONFIG_MISDN_HDLC=yCONFIG_MISDN_IPAC=yCONFIG_MISDN_ISAR=y
#
# Input device support
#CONFIG_INPUT=y
# CONFIG_INPUT_LEDS is not setCONFIG_INPUT_FF_MEMLESS=yCONFIG_INPUT_SPARSEKMAP=yCONFIG_INPUT_MATRIXKMAP=y
#
# Userland interfaces
#
# CONFIG_INPUT_MOUSEDEV is not set
# CONFIG_INPUT_JOYDEV is not setCONFIG_INPUT_EVDEV=yCONFIG_INPUT_EVBUG=y
#
# Input Device Drivers
#
# CONFIG_INPUT_KEYBOARD is not set
# CONFIG_INPUT_MOUSE is not set
# CONFIG_INPUT_JOYSTICK is not setCONFIG_INPUT_TABLET=yCONFIG_TABLET_SERIAL_WACOM4=yCONFIG_INPUT_TOUCHSCREEN=yCONFIG_TOUCHSCREEN_AD7879=y
# CONFIG_TOUCHSCREEN_AD7879_I2C is not set
# CONFIG_TOUCHSCREEN_ADC is not set
# CONFIG_TOUCHSCREEN_ATMEL_MXT is not setCONFIG_TOUCHSCREEN_AUO_PIXCIR=y
# CONFIG_TOUCHSCREEN_BU21013 is not set
# CONFIG_TOUCHSCREEN_BU21029 is not set
# CONFIG_TOUCHSCREEN_CY8CTMA140 is not setCONFIG_TOUCHSCREEN_CY8CTMG110=yCONFIG_TOUCHSCREEN_CYTTSP_CORE=yCONFIG_TOUCHSCREEN_CYTTSP_I2C=y
# CONFIG_TOUCHSCREEN_CYTTSP4_CORE is not set
# CONFIG_TOUCHSCREEN_CYTTSP5 is not set
# CONFIG_TOUCHSCREEN_DYNAPRO is not setCONFIG_TOUCHSCREEN_HAMPSHIRE=yCONFIG_TOUCHSCREEN_EETI=y
# CONFIG_TOUCHSCREEN_EGALAX_SERIAL is not set
# CONFIG_TOUCHSCREEN_EXC3000 is not setCONFIG_TOUCHSCREEN_FUJITSU=yCONFIG_TOUCHSCREEN_GOODIX=yCONFIG_TOUCHSCREEN_HIDEEP=yCONFIG_TOUCHSCREEN_HYCON_HY46XX=yCONFIG_TOUCHSCREEN_HYNITRON_CSTXXX=yCONFIG_TOUCHSCREEN_ILI210X=y
# CONFIG_TOUCHSCREEN_ILITEK is not setCONFIG_TOUCHSCREEN_IPROC=y
# CONFIG_TOUCHSCREEN_S6SY761 is not setCONFIG_TOUCHSCREEN_GUNZE=yCONFIG_TOUCHSCREEN_EKTF2127=yCONFIG_TOUCHSCREEN_ELAN=yCONFIG_TOUCHSCREEN_ELO=yCONFIG_TOUCHSCREEN_WACOM_W8001=yCONFIG_TOUCHSCREEN_WACOM_I2C=y
# CONFIG_TOUCHSCREEN_MAX11801 is not setCONFIG_TOUCHSCREEN_MCS5000=yCONFIG_TOUCHSCREEN_MMS114=y
# CONFIG_TOUCHSCREEN_MELFAS_MIP4 is not set
# CONFIG_TOUCHSCREEN_MSG2638 is not setCONFIG_TOUCHSCREEN_MTOUCH=y
# CONFIG_TOUCHSCREEN_NOVATEK_NVT_TS is not setCONFIG_TOUCHSCREEN_IMAGIS=y
# CONFIG_TOUCHSCREEN_IMX6UL_TSC is not setCONFIG_TOUCHSCREEN_INEXIO=yCONFIG_TOUCHSCREEN_PENMOUNT=yCONFIG_TOUCHSCREEN_EDT_FT5X06=y
# CONFIG_TOUCHSCREEN_RASPBERRYPI_FW is not setCONFIG_TOUCHSCREEN_MIGOR=y
# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not setCONFIG_TOUCHSCREEN_TOUCHWIN=yCONFIG_TOUCHSCREEN_PIXCIR=yCONFIG_TOUCHSCREEN_WDT87XX_I2C=yCONFIG_TOUCHSCREEN_WM831X=y
# CONFIG_TOUCHSCREEN_MXS_LRADC is not setCONFIG_TOUCHSCREEN_TOUCHIT213=yCONFIG_TOUCHSCREEN_TSC_SERIO=y
# CONFIG_TOUCHSCREEN_TSC2004 is not set
# CONFIG_TOUCHSCREEN_TSC2007 is not setCONFIG_TOUCHSCREEN_RM_TS=y
# CONFIG_TOUCHSCREEN_SILEAD is not setCONFIG_TOUCHSCREEN_SIS_I2C=yCONFIG_TOUCHSCREEN_ST1232=yCONFIG_TOUCHSCREEN_STMFTS=y
# CONFIG_TOUCHSCREEN_SUN4I is not set
# CONFIG_TOUCHSCREEN_SX8654 is not setCONFIG_TOUCHSCREEN_TPS6507X=yCONFIG_TOUCHSCREEN_ZET6223=yCONFIG_TOUCHSCREEN_ZFORCE=yCONFIG_TOUCHSCREEN_COLIBRI_VF50=yCONFIG_TOUCHSCREEN_ROHM_BU21023=yCONFIG_TOUCHSCREEN_IQS5XX=yCONFIG_TOUCHSCREEN_IQS7211=yCONFIG_TOUCHSCREEN_ZINITIX=yCONFIG_TOUCHSCREEN_HIMAX_HX83112B=yCONFIG_INPUT_MISC=y
# CONFIG_INPUT_AD714X is not setCONFIG_INPUT_ATC260X_ONKEY=yCONFIG_INPUT_BMA150=yCONFIG_INPUT_E3X0_BUTTON=y
# CONFIG_INPUT_PCSPKR is not setCONFIG_INPUT_PM8XXX_VIBRATOR=yCONFIG_INPUT_PMIC8XXX_PWRKEY=yCONFIG_INPUT_MAX77693_HAPTIC=y
# CONFIG_INPUT_MAX8925_ONKEY is not set
# CONFIG_INPUT_MMA8450 is not setCONFIG_INPUT_APANEL=y
# CONFIG_INPUT_GPIO_BEEPER is not setCONFIG_INPUT_GPIO_DECODER=y
# CONFIG_INPUT_GPIO_VIBRA is not set
# CONFIG_INPUT_KXTJ9 is not setCONFIG_INPUT_RETU_PWRBUTTON=yCONFIG_INPUT_AXP20X_PEK=yCONFIG_INPUT_TWL4030_PWRBUTTON=yCONFIG_INPUT_TWL4030_VIBRA=yCONFIG_INPUT_TWL6040_VIBRA=y
# CONFIG_INPUT_UINPUT is not set
# CONFIG_INPUT_PALMAS_PWRBUTTON is not setCONFIG_INPUT_PCF50633_PMU=yCONFIG_INPUT_PCF8574=yCONFIG_INPUT_PWM_BEEPER=yCONFIG_INPUT_PWM_VIBRA=yCONFIG_INPUT_GPIO_ROTARY_ENCODER=yCONFIG_INPUT_DA7280_HAPTICS=yCONFIG_INPUT_DA9055_ONKEY=yCONFIG_INPUT_DA9063_ONKEY=yCONFIG_INPUT_WM831X_ON=yCONFIG_INPUT_ADXL34X=yCONFIG_INPUT_ADXL34X_I2C=yCONFIG_INPUT_IBM_PANEL=yCONFIG_INPUT_IQS269A=yCONFIG_INPUT_IQS626A=yCONFIG_INPUT_IQS7222=yCONFIG_INPUT_CMA3000=yCONFIG_INPUT_CMA3000_I2C=yCONFIG_INPUT_IDEAPAD_SLIDEBAR=yCONFIG_INPUT_DRV260X_HAPTICS=y
# CONFIG_INPUT_DRV2665_HAPTICS is not setCONFIG_INPUT_DRV2667_HAPTICS=yCONFIG_INPUT_HISI_POWERKEY=y
# CONFIG_INPUT_SC27XX_VIBRA is not setCONFIG_INPUT_RT5120_PWRKEY=yCONFIG_RMI4_CORE=yCONFIG_RMI4_I2C=yCONFIG_RMI4_SMB=yCONFIG_RMI4_F03=yCONFIG_RMI4_F03_SERIO=yCONFIG_RMI4_2D_SENSOR=y
# CONFIG_RMI4_F11 is not setCONFIG_RMI4_F12=y
# CONFIG_RMI4_F30 is not setCONFIG_RMI4_F34=y
# CONFIG_RMI4_F3A is not set
# CONFIG_RMI4_F54 is not set
# CONFIG_RMI4_F55 is not set
#
# Hardware I/O ports
#CONFIG_SERIO=yCONFIG_ARCH_MIGHT_HAVE_PC_SERIO=yCONFIG_SERIO_I8042=yCONFIG_SERIO_SERPORT=yCONFIG_SERIO_CT82C710=yCONFIG_SERIO_PARKBD=yCONFIG_SERIO_PCIPS2=yCONFIG_SERIO_LIBPS2=yCONFIG_SERIO_RAW=yCONFIG_SERIO_ALTERA_PS2=yCONFIG_SERIO_PS2MULT=yCONFIG_SERIO_ARC_PS2=yCONFIG_SERIO_OLPC_APSP=yCONFIG_SERIO_SUN4I_PS2=y
# CONFIG_SERIO_GPIO_PS2 is not set
# CONFIG_USERIO is not setCONFIG_GAMEPORT=yCONFIG_GAMEPORT_EMU10K1=yCONFIG_GAMEPORT_FM801=y
# end of Hardware I/O ports # end of Input device support
#
# Character devices
#CONFIG_TTY=yCONFIG_VT=yCONFIG_CONSOLE_TRANSLATIONS=yCONFIG_VT_CONSOLE=yCONFIG_HW_CONSOLE=yCONFIG_VT_HW_CONSOLE_BINDING=yCONFIG_UNIX98_PTYS=yCONFIG_LEGACY_PTYS=yCONFIG_LEGACY_PTY_COUNT=256
# CONFIG_LEGACY_TIOCSTI is not set
# CONFIG_LDISC_AUTOLOAD is not set
#
# Serial drivers
#CONFIG_SERIAL_EARLYCON=yCONFIG_SERIAL_8250=yCONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y
# CONFIG_SERIAL_8250_16550A_VARIANTS is not set
# CONFIG_SERIAL_8250_FINTEK is not setCONFIG_SERIAL_8250_CONSOLE=yCONFIG_SERIAL_8250_DMA=yCONFIG_SERIAL_8250_PCILIB=yCONFIG_SERIAL_8250_PCI=y
# CONFIG_SERIAL_8250_EXAR is not setCONFIG_SERIAL_8250_CS=yCONFIG_SERIAL_8250_MEN_MCB=yCONFIG_SERIAL_8250_NR_UARTS=4CONFIG_SERIAL_8250_RUNTIME_UARTS=4CONFIG_SERIAL_8250_EXTENDED=yCONFIG_SERIAL_8250_MANY_PORTS=yCONFIG_SERIAL_8250_PCI1XXXX=y
# CONFIG_SERIAL_8250_SHARE_IRQ is not set
# CONFIG_SERIAL_8250_DETECT_IRQ is not set
# CONFIG_SERIAL_8250_RSA is not setCONFIG_SERIAL_8250_DWLIB=yCONFIG_SERIAL_8250_FSL=y
# CONFIG_SERIAL_8250_DW is not set
# CONFIG_SERIAL_8250_IOC3 is not set
# CONFIG_SERIAL_8250_RT288X is not setCONFIG_SERIAL_8250_OMAP=yCONFIG_SERIAL_8250_OMAP_TTYO_FIXUP=yCONFIG_SERIAL_8250_MT6577=yCONFIG_SERIAL_8250_UNIPHIER=yCONFIG_SERIAL_8250_LPSS=yCONFIG_SERIAL_8250_MID=yCONFIG_SERIAL_8250_PERICOM=yCONFIG_SERIAL_8250_PXA=yCONFIG_SERIAL_8250_TEGRA=y
# CONFIG_SERIAL_8250_BCM7271 is not set
#
# Non-8250 serial port support
#
# CONFIG_SERIAL_AMBA_PL010 is not setCONFIG_SERIAL_MESON=y
# CONFIG_SERIAL_MESON_CONSOLE is not setCONFIG_SERIAL_CLPS711X=yCONFIG_SERIAL_CLPS711X_CONSOLE=yCONFIG_SERIAL_SAMSUNG=yCONFIG_SERIAL_SAMSUNG_UARTS=4
# CONFIG_SERIAL_SAMSUNG_CONSOLE is not set
# CONFIG_SERIAL_TEGRA is not set
# CONFIG_SERIAL_TEGRA_TCU is not set
# CONFIG_SERIAL_IMX is not set
# CONFIG_SERIAL_UARTLITE is not setCONFIG_SERIAL_SH_SCI=yCONFIG_SERIAL_SH_SCI_NR_UARTS=2CONFIG_SERIAL_SH_SCI_CONSOLE=yCONFIG_SERIAL_CORE=yCONFIG_SERIAL_CORE_CONSOLE=y
# CONFIG_SERIAL_ICOM is not setCONFIG_SERIAL_JSM=y
# CONFIG_SERIAL_MSM is not setCONFIG_SERIAL_QCOM_GENI=y
# CONFIG_SERIAL_QCOM_GENI_CONSOLE is not set
# CONFIG_SERIAL_VT8500 is not set
# CONFIG_SERIAL_OMAP is not setCONFIG_SERIAL_LANTIQ=y
# CONFIG_SERIAL_LANTIQ_CONSOLE is not setCONFIG_SERIAL_SCCNXP=yCONFIG_SERIAL_SCCNXP_CONSOLE=y
# CONFIG_SERIAL_SC16IS7XX is not setCONFIG_SERIAL_TIMBERDALE=y
# CONFIG_SERIAL_BCM63XX is not set
# CONFIG_SERIAL_ALTERA_JTAGUART is not setCONFIG_SERIAL_ALTERA_UART=yCONFIG_SERIAL_ALTERA_UART_MAXPORTS=4CONFIG_SERIAL_ALTERA_UART_BAUDRATE=115200
# CONFIG_SERIAL_ALTERA_UART_CONSOLE is not set
# CONFIG_SERIAL_PCH_UART is not setCONFIG_SERIAL_MXS_AUART=yCONFIG_SERIAL_MXS_AUART_CONSOLE=yCONFIG_SERIAL_MPS2_UART_CONSOLE=yCONFIG_SERIAL_MPS2_UART=yCONFIG_SERIAL_ARC=y
# CONFIG_SERIAL_ARC_CONSOLE is not setCONFIG_SERIAL_ARC_NR_PORTS=1CONFIG_SERIAL_RP2=yCONFIG_SERIAL_RP2_NR_UARTS=32CONFIG_SERIAL_FSL_LPUART=y
# CONFIG_SERIAL_FSL_LPUART_CONSOLE is not set
# CONFIG_SERIAL_FSL_LINFLEXUART is not setCONFIG_SERIAL_ST_ASC=y
# CONFIG_SERIAL_ST_ASC_CONSOLE is not set
# CONFIG_SERIAL_MEN_Z135 is not setCONFIG_SERIAL_STM32=y
# CONFIG_SERIAL_STM32_CONSOLE is not setCONFIG_SERIAL_OWL=y
# CONFIG_SERIAL_OWL_CONSOLE is not set
# CONFIG_SERIAL_RDA is not setCONFIG_SERIAL_SUNPLUS=yCONFIG_SERIAL_SUNPLUS_CONSOLE=yCONFIG_SERIAL_NUVOTON_MA35D1=y
# CONFIG_SERIAL_NUVOTON_MA35D1_CONSOLE is not set
# end of Serial drivers
CONFIG_SERIAL_MCTRL_GPIO=y
# CONFIG_SERIAL_NONSTANDARD is not setCONFIG_IPWIRELESS=y
# CONFIG_N_GSM is not setCONFIG_NOZOMI=yCONFIG_NULL_TTY=yCONFIG_HVC_DRIVER=y
# CONFIG_RPMSG_TTY is not setCONFIG_SERIAL_DEV_BUS=y
# CONFIG_SERIAL_DEV_CTRL_TTYPORT is not setCONFIG_PRINTER=yCONFIG_LP_CONSOLE=yCONFIG_PPDEV=yCONFIG_VIRTIO_CONSOLE=y
# CONFIG_IPMI_HANDLER is not setCONFIG_IPMI_KCS_BMC=yCONFIG_ASPEED_KCS_IPMI_BMC=yCONFIG_NPCM7XX_KCS_IPMI_BMC=yCONFIG_IPMI_KCS_BMC_CDEV_IPMI=yCONFIG_IPMI_KCS_BMC_SERIO=yCONFIG_ASPEED_BT_IPMI_BMC=yCONFIG_SSIF_IPMI_BMC=yCONFIG_IPMB_DEVICE_INTERFACE=yCONFIG_HW_RANDOM=yCONFIG_HW_RANDOM_TIMERIOMEM=yCONFIG_HW_RANDOM_INTEL=yCONFIG_HW_RANDOM_AMD=yCONFIG_HW_RANDOM_ATMEL=yCONFIG_HW_RANDOM_BA431=yCONFIG_HW_RANDOM_BCM2835=yCONFIG_HW_RANDOM_IPROC_RNG200=y
# CONFIG_HW_RANDOM_GEODE is not setCONFIG_HW_RANDOM_VIA=yCONFIG_HW_RANDOM_IXP4XX=yCONFIG_HW_RANDOM_OMAP=yCONFIG_HW_RANDOM_OMAP3_ROM=yCONFIG_HW_RANDOM_VIRTIO=y
# CONFIG_HW_RANDOM_MXC_RNGA is not setCONFIG_HW_RANDOM_IMX_RNGC=yCONFIG_HW_RANDOM_INGENIC_RNG=yCONFIG_HW_RANDOM_INGENIC_TRNG=yCONFIG_HW_RANDOM_NOMADIK=yCONFIG_HW_RANDOM_HISI=yCONFIG_HW_RANDOM_HISTB=y
# CONFIG_HW_RANDOM_ST is not set
# CONFIG_HW_RANDOM_XGENE is not setCONFIG_HW_RANDOM_STM32=y
# CONFIG_HW_RANDOM_PIC32 is not setCONFIG_HW_RANDOM_POLARFIRE_SOC=yCONFIG_HW_RANDOM_EXYNOS=yCONFIG_HW_RANDOM_NPCM=yCONFIG_HW_RANDOM_XIPHERA=y
# CONFIG_HW_RANDOM_CN10K is not set
# CONFIG_HW_RANDOM_JH7110 is not setCONFIG_APPLICOM=yCONFIG_MWAVE=yCONFIG_DEVMEM=yCONFIG_NVRAM=y
# CONFIG_DEVPORT is not set
# CONFIG_HANGCHECK_TIMER is not setCONFIG_TCG_TPM=y
# CONFIG_HW_RANDOM_TPM is not setCONFIG_TCG_TIS_CORE=yCONFIG_TCG_TIS=yCONFIG_TCG_TIS_I2C=yCONFIG_TCG_TIS_SYNQUACER=yCONFIG_TCG_TIS_I2C_CR50=yCONFIG_TCG_TIS_I2C_ATMEL=yCONFIG_TCG_TIS_I2C_INFINEON=y
# CONFIG_TCG_TIS_I2C_NUVOTON is not set
# CONFIG_TCG_NSC is not set
# CONFIG_TCG_ATMEL is not set
# CONFIG_TCG_VTPM_PROXY is not setCONFIG_TCG_TIS_ST33ZP24=yCONFIG_TCG_TIS_ST33ZP24_I2C=y
# CONFIG_TELCLOCK is not setCONFIG_XILLYBUS_CLASS=yCONFIG_XILLYBUS=y
# end of Character devices
#
# I2C support
#CONFIG_I2C=yCONFIG_I2C_BOARDINFO=y
# CONFIG_I2C_COMPAT is not setCONFIG_I2C_CHARDEV=yCONFIG_I2C_MUX=y
#
# Multiplexer I2C Chip support
#CONFIG_I2C_MUX_GPIO=yCONFIG_I2C_MUX_LTC4306=yCONFIG_I2C_MUX_PCA9541=y
CONFIG_I2C_MUX_PCA954x=y
# CONFIG_I2C_MUX_REG is not set
# CONFIG_I2C_MUX_MLXCPLD is not set
# end of Multiplexer I2C Chip support
CONFIG_I2C_ATR=y
# CONFIG_I2C_HELPER_AUTO is not setCONFIG_I2C_SMBUS=y
#
# I2C Algorithms
#CONFIG_I2C_ALGOBIT=yCONFIG_I2C_ALGOPCF=y
# CONFIG_I2C_ALGOPCA is not set
# end of I2C Algorithms
#
# I2C Hardware Bus support
#
#
# PC SMBus host controller drivers
#CONFIG_I2C_CCGX_UCSI=yCONFIG_I2C_ALI1535=yCONFIG_I2C_ALI1563=yCONFIG_I2C_ALI15X3=yCONFIG_I2C_AMD756=yCONFIG_I2C_AMD756_S4882=yCONFIG_I2C_AMD8111=yCONFIG_I2C_HIX5HD2=y
# CONFIG_I2C_I801 is not setCONFIG_I2C_ISCH=y
# CONFIG_I2C_ISMT is not setCONFIG_I2C_PIIX4=y
# CONFIG_I2C_NFORCE2 is not set
# CONFIG_I2C_NVIDIA_GPU is not set
# CONFIG_I2C_SIS5595 is not set
# CONFIG_I2C_SIS630 is not setCONFIG_I2C_SIS96X=yCONFIG_I2C_VIA=yCONFIG_I2C_VIAPRO=y
#
# I2C system bus drivers (mostly embedded / system-on-chip) #
# CONFIG_I2C_ASPEED is not setCONFIG_I2C_AT91=y
# CONFIG_I2C_AT91_SLAVE_EXPERIMENTAL is not set CONFIG_I2C_AXXIA=yCONFIG_I2C_BCM_IPROC=y
# CONFIG_I2C_BCM_KONA is not set CONFIG_I2C_BRCMSTB=yCONFIG_I2C_CADENCE=yCONFIG_I2C_CBUS_GPIO=yCONFIG_I2C_DAVINCI=yCONFIG_I2C_DESIGNWARE_CORE=y
# CONFIG_I2C_DESIGNWARE_SLAVE is not set CONFIG_I2C_DESIGNWARE_PLATFORM=y CONFIG_I2C_DESIGNWARE_PCI=yCONFIG_I2C_DIGICOLOR=yCONFIG_I2C_EG20T=y
# CONFIG_I2C_GPIO is not setCONFIG_I2C_GXP=yCONFIG_I2C_HIGHLANDER=y
# CONFIG_I2C_HISI is not setCONFIG_I2C_IMG=yCONFIG_I2C_IMX=yCONFIG_I2C_IMX_LPI2C=y
# CONFIG_I2C_IOP3XX is not setCONFIG_I2C_JZ4780=yCONFIG_I2C_KEMPLD=y
# CONFIG_I2C_LS2X is not set
# CONFIG_I2C_MT65XX is not setCONFIG_I2C_MT7621=yCONFIG_I2C_MV64XXX=y
# CONFIG_I2C_MXS is not setCONFIG_I2C_NPCM=yCONFIG_I2C_OCORES=yCONFIG_I2C_OMAP=yCONFIG_I2C_OWL=yCONFIG_I2C_APPLE=y
# CONFIG_I2C_PCA_PLATFORM is not set CONFIG_I2C_PNX=y
# CONFIG_I2C_PXA is not set
# CONFIG_I2C_QCOM_CCI is not set CONFIG_I2C_QCOM_GENI=yCONFIG_I2C_QUP=y
# CONFIG_I2C_RIIC is not setCONFIG_I2C_RZV2M=y
# CONFIG_I2C_S3C2410 is not set CONFIG_I2C_SH_MOBILE=yCONFIG_I2C_SIMTEC=yCONFIG_I2C_ST=yCONFIG_I2C_STM32F4=yCONFIG_I2C_STM32F7=yCONFIG_I2C_SUN6I_P2WI=yCONFIG_I2C_SYNQUACER=yCONFIG_I2C_TEGRA_BPMP=yCONFIG_I2C_UNIPHIER=y
# CONFIG_I2C_UNIPHIER_F is not set CONFIG_I2C_VERSATILE=yCONFIG_I2C_WMT=yCONFIG_I2C_THUNDERX=yCONFIG_I2C_XILINX=yCONFIG_I2C_XLP9XX=yCONFIG_I2C_RCAR=y
#
# External I2C/SMBus adapter drivers
#CONFIG_I2C_PARPORT=yCONFIG_I2C_PCI1XXXX=yCONFIG_I2C_TAOS_EVM=y
#
# Other I2C/SMBus bus drivers
#
# CONFIG_I2C_MLXCPLD is not setCONFIG_I2C_CROS_EC_TUNNEL=yCONFIG_I2C_VIRTIO=y
# end of I2C Hardware Bus support
CONFIG_I2C_SLAVE=yCONFIG_I2C_SLAVE_EEPROM=y
# CONFIG_I2C_SLAVE_TESTUNIT is not setCONFIG_I2C_DEBUG_CORE=yCONFIG_I2C_DEBUG_ALGO=y
# CONFIG_I2C_DEBUG_BUS is not set
# end of I2C support
CONFIG_I3C=y
# CONFIG_CDNS_I3C_MASTER is not setCONFIG_DW_I3C_MASTER=yCONFIG_AST2600_I3C_MASTER=yCONFIG_SVC_I3C_MASTER=yCONFIG_MIPI_I3C_HCI=y
# CONFIG_SPI is not setCONFIG_SPMI=y
# CONFIG_SPMI_HISI3670 is not setCONFIG_SPMI_MSM_PMIC_ARB=yCONFIG_SPMI_MTK_PMIF=yCONFIG_HSI=yCONFIG_HSI_BOARDINFO=y
#
# HSI controllers
#
#
# HSI clients
#CONFIG_HSI_CHAR=yCONFIG_PPS=y
# CONFIG_PPS_DEBUG is not set
#
# PPS clients support
#
# CONFIG_PPS_CLIENT_KTIMER is not set
# CONFIG_PPS_CLIENT_LDISC is not set
# CONFIG_PPS_CLIENT_PARPORT is not set
# CONFIG_PPS_CLIENT_GPIO is not set
#
# PPS generators support
#
#
# PTP clock support
#
# CONFIG_PTP_1588_CLOCK is not setCONFIG_PTP_1588_CLOCK_OPTIONAL=y
# end of PTP clock support
CONFIG_PINCTRL=yCONFIG_PINMUX=yCONFIG_PINCONF=yCONFIG_GENERIC_PINCONF=yCONFIG_DEBUG_PINCTRL=y
# CONFIG_PINCTRL_AMD is not set
# CONFIG_PINCTRL_CY8C95X0 is not set
# CONFIG_PINCTRL_DA9062 is not setCONFIG_PINCTRL_MCP23S08_I2C=yCONFIG_PINCTRL_MCP23S08=y
# CONFIG_PINCTRL_SX150X is not setCONFIG_PINCTRL_MLXBF3=yCONFIG_PINCTRL_CS42L43=y
#
# Intel pinctrl drivers
#CONFIG_PINCTRL_BAYTRAIL=y
# CONFIG_PINCTRL_CHERRYVIEW is not set
# CONFIG_PINCTRL_LYNXPOINT is not setCONFIG_PINCTRL_INTEL=yCONFIG_PINCTRL_ALDERLAKE=yCONFIG_PINCTRL_BROXTON=y
# CONFIG_PINCTRL_CANNONLAKE is not setCONFIG_PINCTRL_CEDARFORK=yCONFIG_PINCTRL_DENVERTON=y
# CONFIG_PINCTRL_ELKHARTLAKE is not set
# CONFIG_PINCTRL_EMMITSBURG is not setCONFIG_PINCTRL_GEMINILAKE=yCONFIG_PINCTRL_ICELAKE=yCONFIG_PINCTRL_JASPERLAKE=y
# CONFIG_PINCTRL_LAKEFIELD is not setCONFIG_PINCTRL_LEWISBURG=yCONFIG_PINCTRL_METEORLAKE=yCONFIG_PINCTRL_SUNRISEPOINT=yCONFIG_PINCTRL_TIGERLAKE=yCONFIG_PINCTRL_TANGIER=yCONFIG_PINCTRL_MERRIFIELD=yCONFIG_PINCTRL_MOOREFIELD=y
# end of Intel pinctrl drivers
#
# MediaTek pinctrl drivers
#CONFIG_EINT_MTK=y
# end of MediaTek pinctrl drivers
CONFIG_PINCTRL_PXA=yCONFIG_PINCTRL_PXA25X=yCONFIG_PINCTRL_PXA27X=y
# CONFIG_PINCTRL_LPASS_LPI is not set
#
# Renesas pinctrl drivers
#CONFIG_PINCTRL_RENESAS=yCONFIG_PINCTRL_SH_PFC=yCONFIG_PINCTRL_SH_PFC_GPIO=yCONFIG_PINCTRL_SH_FUNC_GPIO=y
# CONFIG_PINCTRL_PFC_EMEV2 is not set
# CONFIG_PINCTRL_PFC_R8A77995 is not setCONFIG_PINCTRL_PFC_R8A7794=yCONFIG_PINCTRL_PFC_R8A77990=yCONFIG_PINCTRL_PFC_R8A7779=y
# CONFIG_PINCTRL_PFC_R8A7790 is not set
# CONFIG_PINCTRL_PFC_R8A77951 is not set
# CONFIG_PINCTRL_PFC_R8A7778 is not set
# CONFIG_PINCTRL_PFC_R8A7793 is not setCONFIG_PINCTRL_PFC_R8A7791=yCONFIG_PINCTRL_PFC_R8A77965=y
# CONFIG_PINCTRL_PFC_R8A77960 is not setCONFIG_PINCTRL_PFC_R8A77961=y
# CONFIG_PINCTRL_PFC_R8A779F0 is not set
# CONFIG_PINCTRL_PFC_R8A7792 is not set
# CONFIG_PINCTRL_PFC_R8A77980 is not set
# CONFIG_PINCTRL_PFC_R8A77970 is not setCONFIG_PINCTRL_PFC_R8A779A0=yCONFIG_PINCTRL_PFC_R8A779G0=yCONFIG_PINCTRL_PFC_R8A7740=y
# CONFIG_PINCTRL_PFC_R8A73A4 is not set
# CONFIG_PINCTRL_PFC_R8A77470 is not set
# CONFIG_PINCTRL_PFC_R8A7745 is not setCONFIG_PINCTRL_PFC_R8A7742=y
# CONFIG_PINCTRL_PFC_R8A7743 is not setCONFIG_PINCTRL_PFC_R8A7744=y
# CONFIG_PINCTRL_PFC_R8A774C0 is not set
# CONFIG_PINCTRL_PFC_R8A774E1 is not setCONFIG_PINCTRL_PFC_R8A774A1=y
# CONFIG_PINCTRL_PFC_R8A774B1 is not setCONFIG_PINCTRL_PFC_SH7203=yCONFIG_PINCTRL_PFC_SH7264=y
# CONFIG_PINCTRL_PFC_SH7269 is not setCONFIG_PINCTRL_PFC_SH7720=y
# CONFIG_PINCTRL_PFC_SH7722 is not setCONFIG_PINCTRL_PFC_SH7734=yCONFIG_PINCTRL_PFC_SH7757=yCONFIG_PINCTRL_PFC_SH7785=yCONFIG_PINCTRL_PFC_SH7786=y
# CONFIG_PINCTRL_PFC_SH73A0 is not set
# CONFIG_PINCTRL_PFC_SH7723 is not setCONFIG_PINCTRL_PFC_SH7724=yCONFIG_PINCTRL_PFC_SHX3=y
# end of Renesas pinctrl drivers
CONFIG_GPIOLIB=yCONFIG_GPIOLIB_FASTPATH_LIMIT=512CONFIG_GPIOLIB_IRQCHIP=y
# CONFIG_DEBUG_GPIO is not setCONFIG_GPIO_CDEV=yCONFIG_GPIO_CDEV_V1=yCONFIG_GPIO_GENERIC=yCONFIG_GPIO_REGMAP=y
#
# Memory mapped GPIO drivers
#CONFIG_GPIO_ATH79=y
# CONFIG_GPIO_BCM_KONA is not setCONFIG_GPIO_CLPS711X=yCONFIG_GPIO_DWAPB=y
# CONFIG_GPIO_GE_FPGA is not set
# CONFIG_GPIO_GENERIC_PLATFORM is not set
# CONFIG_GPIO_HISI is not set
# CONFIG_GPIO_ICH is not setCONFIG_GPIO_MB86S7X=y
# CONFIG_GPIO_MENZ127 is not setCONFIG_GPIO_MPC8XXX=yCONFIG_GPIO_MXC=y
# CONFIG_GPIO_MXS is not set
# CONFIG_GPIO_NPCM_SGPIO is not setCONFIG_GPIO_PXA=y
# CONFIG_GPIO_RCAR is not setCONFIG_GPIO_ROCKCHIP=yCONFIG_GPIO_XGENE_SB=y
# CONFIG_GPIO_XLP is not set
# CONFIG_GPIO_AMD_FCH is not setCONFIG_GPIO_IDT3243X=y
# end of Memory mapped GPIO drivers
#
# Port-mapped I/O GPIO drivers
#
# CONFIG_GPIO_VX855 is not setCONFIG_GPIO_F7188X=yCONFIG_GPIO_IT87=y
# CONFIG_GPIO_SCH311X is not set
# CONFIG_GPIO_TS5500 is not setCONFIG_GPIO_WINBOND=yCONFIG_GPIO_WS16C48=y
# end of Port-mapped I/O GPIO drivers
#
# I2C GPIO expanders
#CONFIG_GPIO_FXL6408=yCONFIG_GPIO_DS4520=y
# CONFIG_GPIO_MAX7300 is not setCONFIG_GPIO_MAX732X=y
# CONFIG_GPIO_MAX732X_IRQ is not set
# CONFIG_GPIO_PCA953X is not setCONFIG_GPIO_PCA9570=yCONFIG_GPIO_PCF857X=yCONFIG_GPIO_TPIC2810=yCONFIG_GPIO_TS4900=y
# end of I2C GPIO expanders
#
# MFD GPIO expanders
#CONFIG_GPIO_ADP5520=yCONFIG_GPIO_ARIZONA=y
# CONFIG_GPIO_BD9571MWV is not setCONFIG_GPIO_DA9055=y
# CONFIG_GPIO_ELKHARTLAKE is not setCONFIG_GPIO_JANZ_TTL=y
# CONFIG_GPIO_KEMPLD is not set
# CONFIG_GPIO_LP3943 is not setCONFIG_GPIO_PALMAS=y
# CONFIG_GPIO_RC5T583 is not set
# CONFIG_GPIO_SL28CPLD is not set
# CONFIG_GPIO_TIMBERDALE is not set
# CONFIG_GPIO_TPS6586X is not set
# CONFIG_GPIO_TPS65912 is not set
# CONFIG_GPIO_TQMX86 is not setCONFIG_GPIO_TWL4030=yCONFIG_GPIO_TWL6040=y
# CONFIG_GPIO_WM831X is not setCONFIG_GPIO_WM8994=y
# end of MFD GPIO expanders
#
# PCI GPIO expanders
#CONFIG_GPIO_AMD8111=yCONFIG_GPIO_BT8XX=y
# CONFIG_GPIO_MLXBF is not setCONFIG_GPIO_MLXBF2=yCONFIG_GPIO_MLXBF3=yCONFIG_GPIO_ML_IOH=y
# CONFIG_GPIO_PCH is not set
# CONFIG_GPIO_PCI_IDIO_16 is not setCONFIG_GPIO_PCIE_IDIO_24=yCONFIG_GPIO_RDC321X=y
# end of PCI GPIO expanders
#
# Virtual GPIO drivers
#CONFIG_GPIO_AGGREGATOR=y
# CONFIG_GPIO_LATCH is not setCONFIG_GPIO_MOCKUP=yCONFIG_GPIO_VIRTIO=y
# CONFIG_GPIO_SIM is not set
# end of Virtual GPIO drivers
CONFIG_W1=yCONFIG_W1_CON=y
#
# 1-wire Bus Masters
#CONFIG_W1_MASTER_AMD_AXI=y
# CONFIG_W1_MASTER_MATROX is not set
# CONFIG_W1_MASTER_DS2482 is not set
# CONFIG_W1_MASTER_MXC is not setCONFIG_W1_MASTER_GPIO=yCONFIG_HDQ_MASTER_OMAP=yCONFIG_W1_MASTER_SGI=y
# end of 1-wire Bus Masters
#
# 1-wire Slaves
#
# CONFIG_W1_SLAVE_THERM is not set
# CONFIG_W1_SLAVE_SMEM is not setCONFIG_W1_SLAVE_DS2405=yCONFIG_W1_SLAVE_DS2408=yCONFIG_W1_SLAVE_DS2408_READBACK=yCONFIG_W1_SLAVE_DS2413=yCONFIG_W1_SLAVE_DS2406=y
# CONFIG_W1_SLAVE_DS2423 is not set
# CONFIG_W1_SLAVE_DS2805 is not setCONFIG_W1_SLAVE_DS2430=yCONFIG_W1_SLAVE_DS2431=y
# CONFIG_W1_SLAVE_DS2433 is not set
# CONFIG_W1_SLAVE_DS2438 is not setCONFIG_W1_SLAVE_DS250X=yCONFIG_W1_SLAVE_DS2780=yCONFIG_W1_SLAVE_DS2781=yCONFIG_W1_SLAVE_DS28E04=yCONFIG_W1_SLAVE_DS28E17=y
# end of 1-wire Slaves
CONFIG_POWER_RESET=yCONFIG_POWER_RESET_ATC260X=y
# CONFIG_POWER_RESET_BRCMKONA is not set
# CONFIG_POWER_RESET_BRCMSTB is not setCONFIG_POWER_RESET_OCELOT_RESET=yCONFIG_POWER_RESET_PIIX4_POWEROFF=yCONFIG_POWER_RESET_MT6323=y
# CONFIG_POWER_RESET_RESTART is not setCONFIG_POWER_RESET_KEYSTONE=yCONFIG_POWER_RESET_RMOBILE=yCONFIG_POWER_RESET_SC27XX=yCONFIG_POWER_SUPPLY=y
# CONFIG_POWER_SUPPLY_DEBUG is not set
# CONFIG_POWER_SUPPLY_HWMON is not setCONFIG_GENERIC_ADC_BATTERY=yCONFIG_IP5XXX_POWER=yCONFIG_MAX8925_POWER=yCONFIG_WM831X_BACKUP=y
# CONFIG_WM831X_POWER is not setCONFIG_TEST_POWER=yCONFIG_CHARGER_ADP5061=y
# CONFIG_BATTERY_ACT8945A is not set
# CONFIG_BATTERY_CW2015 is not set
# CONFIG_BATTERY_DS2760 is not setCONFIG_BATTERY_DS2780=y
# CONFIG_BATTERY_DS2781 is not setCONFIG_BATTERY_DS2782=y
# CONFIG_BATTERY_SAMSUNG_SDI is not setCONFIG_BATTERY_INGENIC=y
# CONFIG_BATTERY_SBS is not setCONFIG_CHARGER_SBS=yCONFIG_MANAGER_SBS=y
# CONFIG_BATTERY_BQ27XXX is not setCONFIG_CHARGER_AXP20X=y
# CONFIG_BATTERY_AXP20X is not set
# CONFIG_AXP20X_POWER is not set
# CONFIG_BATTERY_MAX17040 is not setCONFIG_BATTERY_MAX17042=yCONFIG_BATTERY_MAX1721X=yCONFIG_BATTERY_TWL4030_MADC=y
# CONFIG_CHARGER_PCF50633 is not set
# CONFIG_BATTERY_RX51 is not set
# CONFIG_CHARGER_MAX8903 is not setCONFIG_CHARGER_TWL4030=yCONFIG_CHARGER_LP8727=y
# CONFIG_CHARGER_GPIO is not setCONFIG_CHARGER_LT3651=yCONFIG_CHARGER_LTC4162L=yCONFIG_CHARGER_MAX77976=yCONFIG_BATTERY_PM8916_BMS_VM=yCONFIG_CHARGER_PM8916_LBC=yCONFIG_CHARGER_BQ2415X=yCONFIG_CHARGER_BQ24190=y
# CONFIG_CHARGER_BQ24257 is not setCONFIG_CHARGER_BQ24735=yCONFIG_CHARGER_BQ2515X=yCONFIG_CHARGER_BQ25890=yCONFIG_CHARGER_BQ25980=yCONFIG_CHARGER_BQ256XX=yCONFIG_CHARGER_TPS65090=yCONFIG_BATTERY_GAUGE_LTC2941=yCONFIG_BATTERY_GOLDFISH=yCONFIG_BATTERY_RT5033=y
# CONFIG_CHARGER_RT5033 is not setCONFIG_CHARGER_RT9455=yCONFIG_CHARGER_SC2731=yCONFIG_FUEL_GAUGE_SC27XX=y
# CONFIG_CHARGER_BD99954 is not setCONFIG_BATTERY_UG3105=yCONFIG_FUEL_GAUGE_MM8013=yCONFIG_HWMON=yCONFIG_HWMON_VID=yCONFIG_HWMON_DEBUG_CHIP=y
#
# Native drivers
#CONFIG_SENSORS_ABITUGURU=y CONFIG_SENSORS_ABITUGURU3=y
# CONFIG_SENSORS_AD7414 is not set CONFIG_SENSORS_AD7418=y CONFIG_SENSORS_ADM1025=y CONFIG_SENSORS_ADM1026=y CONFIG_SENSORS_ADM1029=y CONFIG_SENSORS_ADM1031=y
# CONFIG_SENSORS_ADM1177 is not set CONFIG_SENSORS_ADM9240=y CONFIG_SENSORS_ADT7X10=y CONFIG_SENSORS_ADT7410=y
# CONFIG_SENSORS_ADT7411 is not set
# CONFIG_SENSORS_ADT7462 is not set CONFIG_SENSORS_ADT7470=y CONFIG_SENSORS_ADT7475=y CONFIG_SENSORS_AHT10=y
# CONFIG_SENSORS_AS370 is not set CONFIG_SENSORS_ASC7621=y CONFIG_SENSORS_AXI_FAN_CONTROL=y CONFIG_SENSORS_K8TEMP=y
# CONFIG_SENSORS_K10TEMP is not set CONFIG_SENSORS_FAM15H_POWER=y
# CONFIG_SENSORS_APPLESMC is not set CONFIG_SENSORS_ARM_SCMI=y CONFIG_SENSORS_ARM_SCPI=y
# CONFIG_SENSORS_ASB100 is not set
# CONFIG_SENSORS_ASPEED is not set
# CONFIG_SENSORS_ATXP1 is not set
# CONFIG_SENSORS_BT1_PVT is not set CONFIG_SENSORS_DRIVETEMP=y CONFIG_SENSORS_DS620=y CONFIG_SENSORS_DS1621=y CONFIG_SENSORS_DA9055=y CONFIG_SENSORS_I5K_AMB=y CONFIG_SENSORS_SPARX5=y
# CONFIG_SENSORS_F71805F is not set
# CONFIG_SENSORS_F71882FG is not set CONFIG_SENSORS_F75375S=y CONFIG_SENSORS_FSCHMD=y CONFIG_SENSORS_GL518SM=y
# CONFIG_SENSORS_GL520SM is not set CONFIG_SENSORS_G760A=y
# CONFIG_SENSORS_G762 is not set CONFIG_SENSORS_GXP_FAN_CTRL=y
# CONFIG_SENSORS_HIH6130 is not set
# CONFIG_SENSORS_HS3001 is not set CONFIG_SENSORS_IIO_HWMON=y CONFIG_SENSORS_I5500=y
# CONFIG_SENSORS_CORETEMP is not set CONFIG_SENSORS_IT87=y
# CONFIG_SENSORS_JC42 is not set
# CONFIG_SENSORS_POWR1220 is not set CONFIG_SENSORS_LAN966X=y CONFIG_SENSORS_LINEAGE=y CONFIG_SENSORS_LTC2945=y CONFIG_SENSORS_LTC2947=y CONFIG_SENSORS_LTC2947_I2C=y CONFIG_SENSORS_LTC2990=y CONFIG_SENSORS_LTC2991=y CONFIG_SENSORS_LTC2992=y CONFIG_SENSORS_LTC4151=y
# CONFIG_SENSORS_LTC4215 is not set CONFIG_SENSORS_LTC4222=y CONFIG_SENSORS_LTC4245=y CONFIG_SENSORS_LTC4260=y CONFIG_SENSORS_LTC4261=y
# CONFIG_SENSORS_MAX127 is not set CONFIG_SENSORS_MAX16065=y CONFIG_SENSORS_MAX1619=y CONFIG_SENSORS_MAX1668=y
# CONFIG_SENSORS_MAX197 is not set CONFIG_SENSORS_MAX31730=y CONFIG_SENSORS_MAX31760=y CONFIG_MAX31827=y
# CONFIG_SENSORS_MAX6620 is not set CONFIG_SENSORS_MAX6621=y CONFIG_SENSORS_MAX6639=y CONFIG_SENSORS_MAX6650=y CONFIG_SENSORS_MAX6697=y
# CONFIG_SENSORS_MAX31790 is not set
# CONFIG_SENSORS_MC34VR500 is not set CONFIG_SENSORS_MCP3021=y CONFIG_SENSORS_MLXREG_FAN=y CONFIG_SENSORS_TC654=y CONFIG_SENSORS_TPS23861=y CONFIG_SENSORS_MR75203=y
# CONFIG_SENSORS_LM63 is not set CONFIG_SENSORS_LM73=y
# CONFIG_SENSORS_LM75 is not set CONFIG_SENSORS_LM77=y
# CONFIG_SENSORS_LM78 is not set CONFIG_SENSORS_LM80=y CONFIG_SENSORS_LM83=y CONFIG_SENSORS_LM85=y CONFIG_SENSORS_LM87=y CONFIG_SENSORS_LM90=y CONFIG_SENSORS_LM92=y CONFIG_SENSORS_LM93=y CONFIG_SENSORS_LM95234=y
# CONFIG_SENSORS_LM95241 is not set
# CONFIG_SENSORS_LM95245 is not set CONFIG_SENSORS_PC87360=y CONFIG_SENSORS_PC87427=y
# CONFIG_SENSORS_NTC_THERMISTOR is not set # CONFIG_SENSORS_NCT6683 is not set CONFIG_SENSORS_NCT6775_CORE=y CONFIG_SENSORS_NCT6775=y
# CONFIG_SENSORS_NCT6775_I2C is not set CONFIG_SENSORS_NCT7802=y
# CONFIG_SENSORS_NPCM7XX is not set CONFIG_SENSORS_OCC_P8_I2C=y CONFIG_SENSORS_OCC=y CONFIG_SENSORS_PCF8591=y
# CONFIG_SENSORS_PECI_CPUTEMP is not set CONFIG_SENSORS_PECI_DIMMTEMP=y CONFIG_SENSORS_PECI=y
# CONFIG_PMBUS is not set
# CONFIG_SENSORS_PWM_FAN is not set CONFIG_SENSORS_RASPBERRYPI_HWMON=y CONFIG_SENSORS_SL28CPLD=y CONFIG_SENSORS_SBTSI=y CONFIG_SENSORS_SBRMI=y CONFIG_SENSORS_SHT15=y CONFIG_SENSORS_SHT21=y
# CONFIG_SENSORS_SHT3x is not set
# CONFIG_SENSORS_SHT4x is not set
# CONFIG_SENSORS_SHTC1 is not set CONFIG_SENSORS_SIS5595=y
# CONFIG_SENSORS_SY7636A is not set
# CONFIG_SENSORS_DME1737 is not set
# CONFIG_SENSORS_EMC1403 is not set
# CONFIG_SENSORS_EMC2103 is not set CONFIG_SENSORS_EMC2305=y
# CONFIG_SENSORS_EMC6W201 is not set CONFIG_SENSORS_SMSC47M1=y CONFIG_SENSORS_SMSC47M192=y CONFIG_SENSORS_SMSC47B397=y
# CONFIG_SENSORS_STTS751 is not set CONFIG_SENSORS_SFCTEMP=y
# CONFIG_SENSORS_ADC128D818 is not set
# CONFIG_SENSORS_ADS7828 is not set CONFIG_SENSORS_AMC6821=y CONFIG_SENSORS_INA209=y CONFIG_SENSORS_INA2XX=y CONFIG_SENSORS_INA238=y CONFIG_SENSORS_INA3221=y
# CONFIG_SENSORS_TC74 is not set CONFIG_SENSORS_THMC50=y
# CONFIG_SENSORS_TMP102 is not set CONFIG_SENSORS_TMP103=y CONFIG_SENSORS_TMP108=y CONFIG_SENSORS_TMP401=y
# CONFIG_SENSORS_TMP421 is not set CONFIG_SENSORS_TMP464=y
# CONFIG_SENSORS_TMP513 is not set CONFIG_SENSORS_VIA_CPUTEMP=y
# CONFIG_SENSORS_VIA686A is not set CONFIG_SENSORS_VT1211=y CONFIG_SENSORS_VT8231=y
# CONFIG_SENSORS_W83773G is not set CONFIG_SENSORS_W83781D=y CONFIG_SENSORS_W83791D=y CONFIG_SENSORS_W83792D=y CONFIG_SENSORS_W83793=y CONFIG_SENSORS_W83795=y CONFIG_SENSORS_W83795_FANCTRL=y
# CONFIG_SENSORS_W83L785TS is not set CONFIG_SENSORS_W83L786NG=y CONFIG_SENSORS_W83627HF=y CONFIG_SENSORS_W83627EHF=y CONFIG_SENSORS_WM831X=yCONFIG_THERMAL=yCONFIG_THERMAL_NETLINK=y
# CONFIG_THERMAL_STATISTICS is not set
# CONFIG_THERMAL_DEBUGFS is not set CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0 # CONFIG_THERMAL_HWMON is not set CONFIG_THERMAL_WRITABLE_TRIPS=y CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set # CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set # CONFIG_THERMAL_DEFAULT_GOV_BANG_BANG is not set CONFIG_THERMAL_GOV_FAIR_SHARE=y CONFIG_THERMAL_GOV_STEP_WISE=y CONFIG_THERMAL_GOV_BANG_BANG=y CONFIG_THERMAL_GOV_USER_SPACE=y
# CONFIG_THERMAL_EMULATION is not set CONFIG_K3_THERMAL=y CONFIG_ROCKCHIP_THERMAL=y CONFIG_RCAR_THERMAL=y
#
# Mediatek thermal drivers
#
# end of Mediatek thermal drivers
#
# Intel thermal drivers
#CONFIG_X86_THERMAL_VECTOR=yCONFIG_INTEL_TCC=yCONFIG_X86_PKG_TEMP_THERMAL=y
#
# ACPI INT340X thermal drivers
#
# end of ACPI INT340X thermal drivers
CONFIG_INTEL_PCH_THERMAL=yCONFIG_INTEL_TCC_COOLING=yCONFIG_INTEL_HFI_THERMAL=y
# end of Intel thermal drivers
#
# Broadcom thermal drivers
#CONFIG_BRCMSTB_THERMAL=yCONFIG_BCM_NS_THERMAL=yCONFIG_BCM_SR_THERMAL=y
# end of Broadcom thermal drivers
#
# Texas Instruments thermal drivers
#CONFIG_TI_SOC_THERMAL=y
# CONFIG_TI_THERMAL is not setCONFIG_OMAP3_THERMAL=y
# CONFIG_OMAP4_THERMAL is not set
# CONFIG_OMAP5_THERMAL is not setCONFIG_DRA752_THERMAL=y
# end of Texas Instruments thermal drivers
#
# Samsung thermal drivers
#
# end of Samsung thermal drivers
#
# NVIDIA Tegra thermal drivers
#
# CONFIG_TEGRA_SOCTHERM is not setCONFIG_TEGRA_BPMP_THERMAL=yCONFIG_TEGRA30_TSENSOR=y
# end of NVIDIA Tegra thermal drivers
# CONFIG_GENERIC_ADC_THERMAL is not set
#
# Qualcomm thermal drivers
#
# CONFIG_QCOM_TSENS is not set
# end of Qualcomm thermal drivers
# CONFIG_SPRD_THERMAL is not set
# CONFIG_WATCHDOG is not setCONFIG_SSB_POSSIBLE=yCONFIG_SSB=yCONFIG_SSB_SPROM=yCONFIG_SSB_PCIHOST_POSSIBLE=yCONFIG_SSB_PCIHOST=yCONFIG_SSB_PCMCIAHOST_POSSIBLE=yCONFIG_SSB_PCMCIAHOST=yCONFIG_SSB_DRIVER_PCICORE_POSSIBLE=yCONFIG_SSB_DRIVER_PCICORE=y
# CONFIG_SSB_DRIVER_GPIO is not setCONFIG_BCMA_POSSIBLE=yCONFIG_BCMA=yCONFIG_BCMA_HOST_PCI_POSSIBLE=y
# CONFIG_BCMA_HOST_PCI is not setCONFIG_BCMA_HOST_SOC=y
# CONFIG_BCMA_DRIVER_PCI is not setCONFIG_BCMA_DRIVER_MIPS=yCONFIG_BCMA_PFLASH=yCONFIG_BCMA_SFLASH=yCONFIG_BCMA_NFLASH=y
# CONFIG_BCMA_DRIVER_GMAC_CMN is not set
# CONFIG_BCMA_DRIVER_GPIO is not setCONFIG_BCMA_DEBUG=y
#
# Multifunction device drivers
#CONFIG_MFD_CORE=y
# CONFIG_MFD_CS5535 is not setCONFIG_MFD_SUN4I_GPADC=yCONFIG_MFD_AS3711=y
# CONFIG_MFD_SMPRO is not setCONFIG_PMIC_ADP5520=yCONFIG_MFD_AAT2870_CORE=y
# CONFIG_MFD_AT91_USART is not setCONFIG_MFD_BCM590XX=yCONFIG_MFD_BD9571MWV=yCONFIG_MFD_AXP20X=yCONFIG_MFD_AXP20X_I2C=y
# CONFIG_MFD_CROS_EC_DEV is not setCONFIG_MFD_CS42L43=yCONFIG_MFD_CS42L43_I2C=y
# CONFIG_MFD_MADERA is not set
# CONFIG_PMIC_DA903X is not set
# CONFIG_MFD_DA9052_I2C is not setCONFIG_MFD_DA9055=yCONFIG_MFD_DA9062=yCONFIG_MFD_DA9063=y
# CONFIG_MFD_DA9150 is not setCONFIG_MFD_ENE_KB3930=yCONFIG_MFD_EXYNOS_LPASS=y
# CONFIG_MFD_MC13XXX_I2C is not set
# CONFIG_MFD_MP2629 is not setCONFIG_MFD_MXS_LRADC=y
# CONFIG_MFD_MX25_TSADC is not setCONFIG_LPC_ICH=yCONFIG_LPC_SCH=y
# CONFIG_MFD_INTEL_LPSS_PCI is not setCONFIG_MFD_IQS62X=yCONFIG_MFD_JANZ_CMODIO=yCONFIG_MFD_KEMPLD=y
# CONFIG_MFD_88PM800 is not set
# CONFIG_MFD_88PM805 is not set
# CONFIG_MFD_88PM860X is not set
# CONFIG_MFD_MAX14577 is not set
# CONFIG_MFD_MAX77541 is not set
# CONFIG_MFD_MAX77693 is not setCONFIG_MFD_MAX77843=yCONFIG_MFD_MAX8907=yCONFIG_MFD_MAX8925=y
# CONFIG_MFD_MAX8997 is not set
# CONFIG_MFD_MAX8998 is not setCONFIG_MFD_MT6360=yCONFIG_MFD_MT6370=yCONFIG_MFD_MT6397=y
# CONFIG_MFD_MENF21BMC is not setCONFIG_MFD_RETU=yCONFIG_MFD_PCF50633=yCONFIG_PCF50633_ADC=yCONFIG_PCF50633_GPIO=yCONFIG_MFD_PM8XXX=yCONFIG_MFD_SY7636A=yCONFIG_MFD_RDC321X=yCONFIG_MFD_RT4831=yCONFIG_MFD_RT5033=yCONFIG_MFD_RT5120=yCONFIG_MFD_RC5T583=yCONFIG_MFD_SI476X_CORE=yCONFIG_MFD_SIMPLE_MFD_I2C=y
# CONFIG_MFD_SL28CPLD is not setCONFIG_MFD_SM501=y
# CONFIG_MFD_SM501_GPIO is not set
# CONFIG_MFD_SKY81452 is not setCONFIG_RZ_MTU3=yCONFIG_ABX500_CORE=yCONFIG_MFD_SUN6I_PRCM=yCONFIG_MFD_SYSCON=y
# CONFIG_MFD_TI_AM335X_TSCADC is not setCONFIG_MFD_LP3943=yCONFIG_MFD_LP8788=yCONFIG_MFD_TI_LMU=yCONFIG_MFD_PALMAS=y
# CONFIG_TPS6105X is not setCONFIG_TPS65010=yCONFIG_TPS6507X=y
# CONFIG_MFD_TPS65086 is not setCONFIG_MFD_TPS65090=y
# CONFIG_MFD_TI_LP873X is not setCONFIG_MFD_TPS6586X=y
# CONFIG_MFD_TPS65910 is not setCONFIG_MFD_TPS65912=yCONFIG_MFD_TPS65912_I2C=yCONFIG_MFD_TPS6594=yCONFIG_MFD_TPS6594_I2C=yCONFIG_TWL4030_CORE=yCONFIG_MFD_TWL4030_AUDIO=yCONFIG_TWL6040_CORE=y
# CONFIG_MFD_WL1273_CORE is not setCONFIG_MFD_LM3533=yCONFIG_MFD_TIMBERDALE=yCONFIG_MFD_TQMX86=y
# CONFIG_MFD_VX855 is not setCONFIG_MFD_ARIZONA=yCONFIG_MFD_ARIZONA_I2C=y
# CONFIG_MFD_CS47L24 is not set
# CONFIG_MFD_WM5102 is not set
# CONFIG_MFD_WM5110 is not setCONFIG_MFD_WM8997=y
# CONFIG_MFD_WM8998 is not set
# CONFIG_MFD_WM8400 is not setCONFIG_MFD_WM831X=yCONFIG_MFD_WM831X_I2C=y
# CONFIG_MFD_WM8350_I2C is not setCONFIG_MFD_WM8994=yCONFIG_MFD_STW481X=y
# CONFIG_MFD_STM32_LPTIMER is not setCONFIG_MFD_STM32_TIMERS=yCONFIG_MFD_WCD934X=yCONFIG_MFD_ATC260X=yCONFIG_MFD_ATC260X_I2C=yCONFIG_MFD_KHADAS_MCU=y
# CONFIG_MFD_ACER_A500_EC is not set
# CONFIG_RAVE_SP_CORE is not set
# end of Multifunction device drivers
# CONFIG_REGULATOR is not set
# CONFIG_RC_CORE is not setCONFIG_CEC_CORE=y
#
# CEC support
#
# CONFIG_MEDIA_CEC_SUPPORT is not set
# end of CEC support
CONFIG_MEDIA_SUPPORT=yCONFIG_MEDIA_SUPPORT_FILTER=y
# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set
#
# Media device types
#CONFIG_MEDIA_CAMERA_SUPPORT=yCONFIG_MEDIA_ANALOG_TV_SUPPORT=y
# CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set
# CONFIG_MEDIA_RADIO_SUPPORT is not setCONFIG_MEDIA_SDR_SUPPORT=yCONFIG_MEDIA_PLATFORM_SUPPORT=yCONFIG_MEDIA_TEST_SUPPORT=y
# end of Media device types
CONFIG_VIDEO_DEV=yCONFIG_MEDIA_CONTROLLER=y
#
# Video4Linux options
#CONFIG_VIDEO_V4L2_I2C=yCONFIG_VIDEO_V4L2_SUBDEV_API=y
# CONFIG_VIDEO_ADV_DEBUG is not set
# CONFIG_VIDEO_FIXED_MINOR_RANGES is not setCONFIG_V4L2_FLASH_LED_CLASS=yCONFIG_V4L2_FWNODE=yCONFIG_V4L2_ASYNC=yCONFIG_V4L2_CCI=yCONFIG_V4L2_CCI_I2C=y
# end of Video4Linux options
#
# Media controller options
#
# end of Media controller options
#
# Media drivers
#
#
# Drivers filtered as selected at 'Filter media drivers' #
#
# Media drivers
#
# CONFIG_MEDIA_PCI_SUPPORT is not set
# CONFIG_MEDIA_PLATFORM_DRIVERS is not set
# CONFIG_V4L_TEST_DRIVERS is not setCONFIG_VIDEOBUF2_CORE=yCONFIG_VIDEOBUF2_V4L2=yCONFIG_VIDEOBUF2_MEMOPS=yCONFIG_VIDEOBUF2_VMALLOC=y
# end of Media drivers
#
# Media ancillary drivers
#
# CONFIG_VIDEO_CAMERA_SENSOR is not set
#
# Camera ISPs
#CONFIG_VIDEO_THP7312=y
# end of Camera ISPs
#
# Lens drivers
#
# CONFIG_VIDEO_AD5820 is not set
# CONFIG_VIDEO_AK7375 is not setCONFIG_VIDEO_DW9714=yCONFIG_VIDEO_DW9719=yCONFIG_VIDEO_DW9768=y
# CONFIG_VIDEO_DW9807_VCM is not set
# end of Lens drivers
#
# Flash devices
#CONFIG_VIDEO_ADP1653=y
# CONFIG_VIDEO_LM3560 is not set
# CONFIG_VIDEO_LM3646 is not set
# end of Flash devices
#
# Audio decoders, processors and mixers
#
# CONFIG_VIDEO_CS3308 is not setCONFIG_VIDEO_CS5345=y
# CONFIG_VIDEO_CS53L32A is not setCONFIG_VIDEO_MSP3400=yCONFIG_VIDEO_SONY_BTF_MPX=y
# CONFIG_VIDEO_TDA7432 is not set
# CONFIG_VIDEO_TDA9840 is not setCONFIG_VIDEO_TEA6415C=yCONFIG_VIDEO_TEA6420=y
# CONFIG_VIDEO_TLV320AIC23B is not setCONFIG_VIDEO_TVAUDIO=yCONFIG_VIDEO_UDA1342=y
# CONFIG_VIDEO_VP27SMPX is not setCONFIG_VIDEO_WM8739=y
# CONFIG_VIDEO_WM8775 is not set
# end of Audio decoders, processors and mixers
#
# RDS decoders
#CONFIG_VIDEO_SAA6588=y
# end of RDS decoders
#
# Video decoders
#
# CONFIG_VIDEO_ADV7180 is not setCONFIG_VIDEO_ADV7183=yCONFIG_VIDEO_ADV7604=y
# CONFIG_VIDEO_ADV7604_CEC is not set
# CONFIG_VIDEO_ADV7842 is not set
# CONFIG_VIDEO_BT819 is not setCONFIG_VIDEO_BT856=yCONFIG_VIDEO_BT866=yCONFIG_VIDEO_KS0127=yCONFIG_VIDEO_ML86V7667=yCONFIG_VIDEO_SAA7110=yCONFIG_VIDEO_SAA711X=yCONFIG_VIDEO_TC358743=yCONFIG_VIDEO_TC358743_CEC=yCONFIG_VIDEO_TVP514X=yCONFIG_VIDEO_TVP5150=yCONFIG_VIDEO_TVP7002=yCONFIG_VIDEO_TW2804=yCONFIG_VIDEO_TW9903=y
# CONFIG_VIDEO_TW9906 is not setCONFIG_VIDEO_TW9910=yCONFIG_VIDEO_VPX3220=y
#
# Video and audio decoders
#CONFIG_VIDEO_SAA717X=yCONFIG_VIDEO_CX25840=y
# end of Video decoders
#
# Video encoders
#
# CONFIG_VIDEO_ADV7170 is not set
# CONFIG_VIDEO_ADV7175 is not setCONFIG_VIDEO_ADV7343=yCONFIG_VIDEO_ADV7393=y
# CONFIG_VIDEO_ADV7511 is not set
# CONFIG_VIDEO_AK881X is not set
# CONFIG_VIDEO_SAA7127 is not set
# CONFIG_VIDEO_SAA7185 is not set
# CONFIG_VIDEO_THS8200 is not set
# end of Video encoders
#
# Video improvement chips
#
# CONFIG_VIDEO_UPD64031A is not set
# CONFIG_VIDEO_UPD64083 is not set
# end of Video improvement chips
#
# Audio/Video compression chips
#CONFIG_VIDEO_SAA6752HS=y
# end of Audio/Video compression chips
#
# SDR tuner chips
#CONFIG_SDR_MAX2175=y
# end of SDR tuner chips
#
# Miscellaneous helper chips
#CONFIG_VIDEO_I2C=yCONFIG_VIDEO_M52790=y
# CONFIG_VIDEO_ST_MIPID02 is not setCONFIG_VIDEO_THS7303=y
# end of Miscellaneous helper chips
#
# Video serializers and deserializers
#
# end of Video serializers and deserializers
CONFIG_MEDIA_TUNER=y
#
# Customize TV tuners
#CONFIG_MEDIA_TUNER_E4000=yCONFIG_MEDIA_TUNER_FC0011=yCONFIG_MEDIA_TUNER_FC0012=yCONFIG_MEDIA_TUNER_FC0013=yCONFIG_MEDIA_TUNER_FC2580=y
# CONFIG_MEDIA_TUNER_IT913X is not set
# CONFIG_MEDIA_TUNER_M88RS6000T is not setCONFIG_MEDIA_TUNER_MAX2165=y
# CONFIG_MEDIA_TUNER_MC44S803 is not setCONFIG_MEDIA_TUNER_MT2060=y
# CONFIG_MEDIA_TUNER_MT2063 is not set
# CONFIG_MEDIA_TUNER_MT20XX is not setCONFIG_MEDIA_TUNER_MT2131=yCONFIG_MEDIA_TUNER_MT2266=yCONFIG_MEDIA_TUNER_MXL301RF=y
# CONFIG_MEDIA_TUNER_MXL5005S is not set
# CONFIG_MEDIA_TUNER_MXL5007T is not set
# CONFIG_MEDIA_TUNER_QM1D1B0004 is not set
# CONFIG_MEDIA_TUNER_QM1D1C0042 is not setCONFIG_MEDIA_TUNER_QT1010=y
# CONFIG_MEDIA_TUNER_R820T is not setCONFIG_MEDIA_TUNER_SI2157=y
# CONFIG_MEDIA_TUNER_SIMPLE is not setCONFIG_MEDIA_TUNER_TDA18212=yCONFIG_MEDIA_TUNER_TDA18218=y
# CONFIG_MEDIA_TUNER_TDA18250 is not setCONFIG_MEDIA_TUNER_TDA18271=yCONFIG_MEDIA_TUNER_TDA827X=yCONFIG_MEDIA_TUNER_TDA8290=yCONFIG_MEDIA_TUNER_TDA9887=y
# CONFIG_MEDIA_TUNER_TEA5761 is not setCONFIG_MEDIA_TUNER_TEA5767=y
# CONFIG_MEDIA_TUNER_TUA9001 is not setCONFIG_MEDIA_TUNER_XC2028=yCONFIG_MEDIA_TUNER_XC4000=y
# CONFIG_MEDIA_TUNER_XC5000 is not set
# end of Customize TV tuners
#
# Tools to develop new frontends
#
# end of Media ancillary drivers
#
# Graphics support
#CONFIG_APERTURE_HELPERS=yCONFIG_VIDEO_CMDLINE=yCONFIG_VIDEO_NOMODESET=yCONFIG_AUXDISPLAY=yCONFIG_CHARLCD=yCONFIG_LINEDISP=yCONFIG_HD44780_COMMON=yCONFIG_HD44780=yCONFIG_KS0108=yCONFIG_KS0108_PORT=0x378CONFIG_KS0108_DELAY=2
# CONFIG_CFAG12864B is not setCONFIG_IMG_ASCII_LCD=yCONFIG_HT16K33=y
# CONFIG_LCD2S is not setCONFIG_PARPORT_PANEL=yCONFIG_PANEL_PARPORT=0CONFIG_PANEL_PROFILE=5CONFIG_PANEL_CHANGE_MESSAGE=yCONFIG_PANEL_BOOT_MESSAGE=""
# CONFIG_CHARLCD_BL_OFF is not set
# CONFIG_CHARLCD_BL_ON is not setCONFIG_CHARLCD_BL_FLASH=yCONFIG_PANEL=yCONFIG_AGP=yCONFIG_AGP_AMD64=yCONFIG_AGP_INTEL=y
# CONFIG_AGP_SIS is not setCONFIG_AGP_VIA=yCONFIG_INTEL_GTT=y
# CONFIG_TEGRA_HOST1X is not setCONFIG_IMX_IPUV3_CORE=y
# CONFIG_DRM is not set
#
# Frame buffer Devices
#CONFIG_FB=yCONFIG_FB_HECUBA=yCONFIG_FB_SVGALIB=yCONFIG_FB_CIRRUS=y
# CONFIG_FB_PM2 is not setCONFIG_FB_CLPS711X=y
# CONFIG_FB_CYBER2000 is not set
# CONFIG_FB_ARC is not set
# CONFIG_FB_CONTROL is not set
# CONFIG_FB_ASILIANT is not set
# CONFIG_FB_IMSTT is not setCONFIG_FB_VGA16=yCONFIG_FB_UVESA=yCONFIG_FB_VESA=yCONFIG_FB_N411=y
# CONFIG_FB_HGA is not set
# CONFIG_FB_GBE is not setCONFIG_FB_PVR2=yCONFIG_FB_OPENCORES=yCONFIG_FB_S1D13XXX=y
# CONFIG_FB_NVIDIA is not setCONFIG_FB_RIVA=yCONFIG_FB_RIVA_I2C=y
# CONFIG_FB_RIVA_DEBUG is not set
# CONFIG_FB_RIVA_BACKLIGHT is not set
# CONFIG_FB_I740 is not setCONFIG_FB_MATROX=y
# CONFIG_FB_MATROX_MILLENIUM is not setCONFIG_FB_MATROX_MYSTIQUE=yCONFIG_FB_MATROX_G=yCONFIG_FB_MATROX_I2C=yCONFIG_FB_MATROX_MAVEN=yCONFIG_FB_RADEON=yCONFIG_FB_RADEON_I2C=yCONFIG_FB_RADEON_BACKLIGHT=y
# CONFIG_FB_RADEON_DEBUG is not setCONFIG_FB_ATY128=yCONFIG_FB_ATY128_BACKLIGHT=y
# CONFIG_FB_ATY is not set
# CONFIG_FB_S3 is not set
# CONFIG_FB_SAVAGE is not setCONFIG_FB_SIS=yCONFIG_FB_SIS_300=y
# CONFIG_FB_SIS_315 is not set
# CONFIG_FB_VIA is not setCONFIG_FB_NEOMAGIC=yCONFIG_FB_KYRO=yCONFIG_FB_3DFX=y
# CONFIG_FB_3DFX_ACCEL is not set
# CONFIG_FB_3DFX_I2C is not setCONFIG_FB_VT8623=yCONFIG_FB_TRIDENT=yCONFIG_FB_ARK=yCONFIG_FB_PM3=y
# CONFIG_FB_CARMINE is not set
# CONFIG_FB_WM8505 is not setCONFIG_FB_GEODE=yCONFIG_FB_GEODE_LX=yCONFIG_FB_GEODE_GX=yCONFIG_FB_GEODE_GX1=y
# CONFIG_FB_SM501 is not setCONFIG_FB_IBM_GXT4500=y
# CONFIG_FB_GOLDFISH is not setCONFIG_FB_VIRTUAL=y
# CONFIG_FB_METRONOME is not set
# CONFIG_FB_MB862XX is not setCONFIG_FB_BROADSHEET=y
# CONFIG_FB_SIMPLE is not setCONFIG_FB_SSD1307=yCONFIG_FB_SM712=y
# CONFIG_MMP_DISP is not setCONFIG_FB_CORE=yCONFIG_FB_NOTIFY=yCONFIG_FIRMWARE_EDID=y
# CONFIG_FB_DEVICE is not setCONFIG_FB_DDC=yCONFIG_FB_CFB_FILLRECT=yCONFIG_FB_CFB_COPYAREA=yCONFIG_FB_CFB_IMAGEBLIT=yCONFIG_FB_SYS_FILLRECT=yCONFIG_FB_SYS_COPYAREA=yCONFIG_FB_SYS_IMAGEBLIT=y
# CONFIG_FB_FOREIGN_ENDIAN is not setCONFIG_FB_SYSMEM_FOPS=yCONFIG_FB_DEFERRED_IO=yCONFIG_FB_IOMEM_FOPS=yCONFIG_FB_IOMEM_HELPERS=yCONFIG_FB_SYSMEM_HELPERS=yCONFIG_FB_SYSMEM_HELPERS_DEFERRED=yCONFIG_FB_BACKLIGHT=yCONFIG_FB_MODE_HELPERS=yCONFIG_FB_TILEBLITTING=y
# end of Frame buffer Devices
#
# Backlight & LCD device support
#CONFIG_LCD_CLASS_DEVICE=yCONFIG_LCD_PLATFORM=yCONFIG_BACKLIGHT_CLASS_DEVICE=yCONFIG_BACKLIGHT_KTD253=y
# CONFIG_BACKLIGHT_KTZ8866 is not setCONFIG_BACKLIGHT_LM3533=yCONFIG_BACKLIGHT_OMAP1=yCONFIG_BACKLIGHT_PWM=yCONFIG_BACKLIGHT_MAX8925=yCONFIG_BACKLIGHT_MT6370=y
# CONFIG_BACKLIGHT_QCOM_WLED is not setCONFIG_BACKLIGHT_RT4831=yCONFIG_BACKLIGHT_SAHARA=yCONFIG_BACKLIGHT_WM831X=yCONFIG_BACKLIGHT_ADP5520=yCONFIG_BACKLIGHT_ADP8860=yCONFIG_BACKLIGHT_ADP8870=yCONFIG_BACKLIGHT_PCF50633=yCONFIG_BACKLIGHT_AAT2870=y
# CONFIG_BACKLIGHT_LM3630A is not set
# CONFIG_BACKLIGHT_LM3639 is not setCONFIG_BACKLIGHT_LP855X=yCONFIG_BACKLIGHT_LP8788=yCONFIG_BACKLIGHT_MP3309C=yCONFIG_BACKLIGHT_PANDORA=y
# CONFIG_BACKLIGHT_AS3711 is not set
# CONFIG_BACKLIGHT_GPIO is not setCONFIG_BACKLIGHT_LV5207LP=yCONFIG_BACKLIGHT_BD6107=y
# CONFIG_BACKLIGHT_ARCXCNN is not set
# end of Backlight & LCD device support
CONFIG_VGASTATE=yCONFIG_VIDEOMODE_HELPERS=yCONFIG_HDMI=y
#
# Console display driver support
#CONFIG_VGA_CONSOLE=yCONFIG_DUMMY_CONSOLE=yCONFIG_DUMMY_CONSOLE_COLUMNS=80CONFIG_DUMMY_CONSOLE_ROWS=25
# CONFIG_FRAMEBUFFER_CONSOLE is not set
# end of Console display driver support
# CONFIG_LOGO is not set
# end of Graphics support
# CONFIG_SOUND is not set
# CONFIG_HID_SUPPORT is not setCONFIG_USB_OHCI_LITTLE_ENDIAN=y
# CONFIG_USB_SUPPORT is not set
# CONFIG_MMC is not set
# CONFIG_SCSI_UFSHCD is not set
# CONFIG_MEMSTICK is not setCONFIG_NEW_LEDS=yCONFIG_LEDS_CLASS=yCONFIG_LEDS_CLASS_FLASH=yCONFIG_LEDS_CLASS_MULTICOLOR=yCONFIG_LEDS_BRIGHTNESS_HW_CHANGED=y
#
# LED drivers
#
# CONFIG_LEDS_APU is not setCONFIG_LEDS_ARIEL=y
# CONFIG_LEDS_AW200XX is not setCONFIG_LEDS_LM3530=yCONFIG_LEDS_LM3532=yCONFIG_LEDS_LM3533=y
# CONFIG_LEDS_LM3642 is not setCONFIG_LEDS_MT6323=yCONFIG_LEDS_COBALT_QUBE=yCONFIG_LEDS_COBALT_RAQ=yCONFIG_LEDS_SUN50I_A100=y
# CONFIG_LEDS_PCA9532 is not set
# CONFIG_LEDS_GPIO is not setCONFIG_LEDS_LP3944=y
# CONFIG_LEDS_LP3952 is not setCONFIG_LEDS_LP50XX=y
# CONFIG_LEDS_LP8788 is not set
# CONFIG_LEDS_PCA955X is not setCONFIG_LEDS_PCA963X=y
# CONFIG_LEDS_PCA995X is not setCONFIG_LEDS_WM831X_STATUS=y
# CONFIG_LEDS_PWM is not setCONFIG_LEDS_BD2606MVV=yCONFIG_LEDS_BD2802=yCONFIG_LEDS_INTEL_SS4200=yCONFIG_LEDS_LT3593=y
# CONFIG_LEDS_ADP5520 is not setCONFIG_LEDS_NS2=y
# CONFIG_LEDS_TCA6507 is not setCONFIG_LEDS_TLC591XX=y
CONFIG_LEDS_LM355x=y
# CONFIG_LEDS_OT200 is not set
# CONFIG_LEDS_IS31FL319X is not set
#
# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM) #
# CONFIG_LEDS_BLINKM is not set
# CONFIG_LEDS_PM8058 is not set
# CONFIG_LEDS_MLXCPLD is not setCONFIG_LEDS_MLXREG=yCONFIG_LEDS_USER=yCONFIG_LEDS_TI_LMU_COMMON=yCONFIG_LEDS_LM36274=y
# CONFIG_LEDS_IP30 is not set
#
# Flash and Torch LED drivers
#
# CONFIG_LEDS_AS3645A is not setCONFIG_LEDS_LM3601X=yCONFIG_LEDS_MT6370_FLASH=yCONFIG_LEDS_RT8515=yCONFIG_LEDS_SGM3140=y
#
# RGB LED drivers
#CONFIG_LEDS_PWM_MULTICOLOR=yCONFIG_LEDS_MT6370_RGB=y
#
# LED Triggers
#CONFIG_LEDS_TRIGGERS=yCONFIG_LEDS_TRIGGER_TIMER=yCONFIG_LEDS_TRIGGER_ONESHOT=y
# CONFIG_LEDS_TRIGGER_DISK is not set
# CONFIG_LEDS_TRIGGER_MTD is not set
# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
# CONFIG_LEDS_TRIGGER_BACKLIGHT is not setCONFIG_LEDS_TRIGGER_CPU=yCONFIG_LEDS_TRIGGER_ACTIVITY=yCONFIG_LEDS_TRIGGER_GPIO=y
# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
#
# iptables trigger is under Netfilter config (LED target) # # CONFIG_LEDS_TRIGGER_TRANSIENT is not set # CONFIG_LEDS_TRIGGER_CAMERA is not set # CONFIG_LEDS_TRIGGER_PANIC is not set CONFIG_LEDS_TRIGGER_NETDEV=y # CONFIG_LEDS_TRIGGER_PATTERN is not set CONFIG_LEDS_TRIGGER_AUDIO=y CONFIG_LEDS_TRIGGER_TTY=y
#
# Simple LED drivers
#
# CONFIG_ACCESSIBILITY is not setCONFIG_INFINIBAND=y
# CONFIG_INFINIBAND_USER_MAD is not setCONFIG_INFINIBAND_USER_ACCESS=yCONFIG_INFINIBAND_USER_MEM=y
# CONFIG_INFINIBAND_ON_DEMAND_PAGING is not setCONFIG_INFINIBAND_ADDR_TRANS=yCONFIG_INFINIBAND_ADDR_TRANS_CONFIGFS=yCONFIG_INFINIBAND_VIRT_DMA=y
# CONFIG_INFINIBAND_CXGB4 is not set
# CONFIG_MLX4_INFINIBAND is not setCONFIG_MLX5_INFINIBAND=yCONFIG_INFINIBAND_MTHCA=yCONFIG_INFINIBAND_MTHCA_DEBUG=yCONFIG_INFINIBAND_OCRDMA=yCONFIG_INFINIBAND_VMWARE_PVRDMA=y
# CONFIG_INFINIBAND_RDMAVT is not set
# CONFIG_RDMA_RXE is not setCONFIG_RDMA_SIW=yCONFIG_INFINIBAND_IPOIB=y
# CONFIG_INFINIBAND_IPOIB_CM is not setCONFIG_INFINIBAND_IPOIB_DEBUG=yCONFIG_INFINIBAND_IPOIB_DEBUG_DATA=yCONFIG_INFINIBAND_SRP=y
# CONFIG_INFINIBAND_SRPT is not set
# CONFIG_INFINIBAND_ISER is not setCONFIG_INFINIBAND_RTRS=yCONFIG_INFINIBAND_RTRS_CLIENT=y
# CONFIG_INFINIBAND_RTRS_SERVER is not setCONFIG_INFINIBAND_OPA_VNIC=yCONFIG_EDAC_ATOMIC_SCRUB=yCONFIG_EDAC_SUPPORT=yCONFIG_EDAC=y
# CONFIG_EDAC_LEGACY_SYSFS is not set
# CONFIG_EDAC_DEBUG is not set
# CONFIG_EDAC_AL_MC is not setCONFIG_EDAC_E752X=yCONFIG_EDAC_I82975X=yCONFIG_EDAC_I3000=yCONFIG_EDAC_I3200=y
# CONFIG_EDAC_IE31200 is not setCONFIG_EDAC_X38=yCONFIG_EDAC_I5400=y
# CONFIG_EDAC_I5100 is not setCONFIG_EDAC_I7300=yCONFIG_EDAC_XGENE=y
# CONFIG_EDAC_ZYNQMP is not set
# CONFIG_EDAC_NPCM is not setCONFIG_EDAC_VERSAL=yCONFIG_RTC_LIB=yCONFIG_RTC_MC146818_LIB=y
# CONFIG_RTC_CLASS is not setCONFIG_DMADEVICES=y
# CONFIG_DMADEVICES_DEBUG is not set
#
# DMA Devices
#CONFIG_ASYNC_TX_ENABLE_CHANNEL_SWITCH=yCONFIG_DMA_ENGINE=yCONFIG_DMA_VIRTUAL_CHANNELS=yCONFIG_ALTERA_MSGDMA=yCONFIG_APPLE_ADMAC=yCONFIG_AXI_DMAC=yCONFIG_BCM_SBA_RAID=yCONFIG_DMA_JZ4780=y
# CONFIG_DMA_SA11X0 is not setCONFIG_DMA_SUN6I=yCONFIG_EP93XX_DMA=y
# CONFIG_IMG_MDC_DMA is not set
# CONFIG_INTEL_IDMA64 is not set
# CONFIG_INTEL_IDXD_COMPAT is not setCONFIG_INTEL_IOATDMA=y
# CONFIG_K3_DMA is not set
# CONFIG_LS2X_APB_DMA is not setCONFIG_MCF_EDMA=yCONFIG_MMP_PDMA=y
# CONFIG_MMP_TDMA is not set
# CONFIG_MV_XOR is not set
# CONFIG_MXS_DMA is not setCONFIG_NBPFAXI_DMA=y
# CONFIG_PCH_DMA is not setCONFIG_PLX_DMA=yCONFIG_STM32_DMA=yCONFIG_STM32_DMAMUX=yCONFIG_SPRD_DMA=yCONFIG_TEGRA186_GPC_DMA=yCONFIG_TEGRA20_APB_DMA=yCONFIG_TEGRA210_ADMA=y
# CONFIG_TIMB_DMA is not setCONFIG_XGENE_DMA=yCONFIG_XILINX_DMA=y
# CONFIG_XILINX_XDMA is not setCONFIG_XILINX_ZYNQMP_DMA=yCONFIG_MTK_HSDMA=yCONFIG_MTK_CQDMA=y
# CONFIG_AMD_PTDMA is not setCONFIG_QCOM_HIDMA_MGMT=yCONFIG_QCOM_HIDMA=yCONFIG_DW_DMAC_CORE=yCONFIG_DW_DMAC=y
# CONFIG_RZN1_DMAMUX is not setCONFIG_DW_DMAC_PCI=yCONFIG_HSU_DMA=y
# CONFIG_SF_PDMA is not setCONFIG_RENESAS_DMA=yCONFIG_SH_DMAE_BASE=y
# CONFIG_SH_DMAE is not setCONFIG_RCAR_DMAC=yCONFIG_RENESAS_USB_DMAC=yCONFIG_RZ_DMAC=yCONFIG_TI_EDMA=yCONFIG_DMA_OMAP=yCONFIG_TI_DMA_CROSSBAR=y
# CONFIG_INTEL_LDMA is not set
#
# DMA Clients
#CONFIG_ASYNC_TX_DMA=yCONFIG_DMATEST=yCONFIG_DMA_ENGINE_RAID=y
#
# DMABUF options
#CONFIG_SYNC_FILE=yCONFIG_SW_SYNC=y
# CONFIG_UDMABUF is not set
# CONFIG_DMABUF_MOVE_NOTIFY is not set
# CONFIG_DMABUF_DEBUG is not set
# CONFIG_DMABUF_SELFTESTS is not setCONFIG_DMABUF_HEAPS=yCONFIG_DMABUF_SYSFS_STATS=yCONFIG_DMABUF_HEAPS_SYSTEM=y
# CONFIG_DMABUF_HEAPS_CMA is not set
# end of DMABUF options
CONFIG_DCA=yCONFIG_UIO=yCONFIG_UIO_CIF=yCONFIG_UIO_PDRV_GENIRQ=yCONFIG_UIO_DMEM_GENIRQ=yCONFIG_UIO_AEC=yCONFIG_UIO_SERCOS3=y
# CONFIG_UIO_PCI_GENERIC is not setCONFIG_UIO_NETX=yCONFIG_UIO_PRUSS=y
# CONFIG_UIO_MF624 is not setCONFIG_VFIO=yCONFIG_VFIO_GROUP=yCONFIG_VFIO_CONTAINER=yCONFIG_VFIO_IOMMU_TYPE1=yCONFIG_VFIO_NOIOMMU=yCONFIG_VFIO_VIRQFD=y
# CONFIG_VFIO_DEBUGFS is not set
#
# VFIO support for PCI devices
#CONFIG_VFIO_PCI_CORE=yCONFIG_VFIO_PCI_MMAP=yCONFIG_VFIO_PCI_INTX=yCONFIG_VFIO_PCI=y
# CONFIG_VFIO_PCI_VGA is not setCONFIG_VFIO_PCI_IGD=yCONFIG_MLX5_VFIO_PCI=yCONFIG_PDS_VFIO_PCI=y
# end of VFIO support for PCI devices
#
# VFIO support for platform devices
#CONFIG_VFIO_PLATFORM_BASE=yCONFIG_VFIO_PLATFORM=yCONFIG_VFIO_AMBA=y
#
# VFIO platform reset drivers
#CONFIG_VFIO_PLATFORM_CALXEDAXGMAC_RESET=yCONFIG_VFIO_PLATFORM_AMDXGBE_RESET=y
# CONFIG_VFIO_PLATFORM_BCMFLEXRM_RESET is not set
# end of VFIO platform reset drivers # end of VFIO support for platform devices
CONFIG_IRQ_BYPASS_MANAGER=yCONFIG_VIRT_DRIVERS=yCONFIG_VBOXGUEST=yCONFIG_NITRO_ENCLAVES=yCONFIG_VIRTIO_ANCHOR=yCONFIG_VIRTIO=yCONFIG_VIRTIO_MENU=y
# CONFIG_VIRTIO_PCI is not setCONFIG_VIRTIO_VDPA=yCONFIG_VIRTIO_BALLOON=y
# CONFIG_VIRTIO_INPUT is not set
# CONFIG_VIRTIO_MMIO is not setCONFIG_VDPA=yCONFIG_VDPA_USER=y
# CONFIG_MLX5_VDPA_NET is not set
# CONFIG_MLX5_VDPA_STEERING_DEBUG is not setCONFIG_VHOST_IOTLB=y
# CONFIG_VHOST_MENU is not set
#
# Microsoft Hyper-V guest support
#
# end of Microsoft Hyper-V guest support
CONFIG_GREYBUS=yCONFIG_GREYBUS_BEAGLEPLAY=yCONFIG_COMEDI=y
# CONFIG_COMEDI_DEBUG is not setCONFIG_COMEDI_DEFAULT_BUF_SIZE_KB=2048CONFIG_COMEDI_DEFAULT_BUF_MAXSIZE_KB=20480CONFIG_COMEDI_MISC_DRIVERS=y
# CONFIG_COMEDI_BOND is not setCONFIG_COMEDI_TEST=yCONFIG_COMEDI_PARPORT=yCONFIG_COMEDI_SSV_DNP=y
# CONFIG_COMEDI_PCI_DRIVERS is not set
# CONFIG_COMEDI_PCMCIA_DRIVERS is not setCONFIG_COMEDI_8255=yCONFIG_COMEDI_8255_SA=y
# CONFIG_COMEDI_KCOMEDILIB is not setCONFIG_COMEDI_TESTS=yCONFIG_COMEDI_TESTS_EXAMPLE=y
# CONFIG_COMEDI_TESTS_NI_ROUTES is not set
# CONFIG_STAGING is not setCONFIG_CHROME_PLATFORMS=y
# CONFIG_CHROMEOS_LAPTOP is not set
# CONFIG_CHROMEOS_PSTORE is not setCONFIG_CROS_EC=yCONFIG_CROS_EC_I2C=yCONFIG_CROS_EC_PROTO=yCONFIG_CROS_KBD_LED_BACKLIGHT=yCONFIG_MELLANOX_PLATFORM=y
# CONFIG_MLXREG_HOTPLUG is not setCONFIG_MLXREG_IO=yCONFIG_MLXREG_LC=yCONFIG_NVSW_SN2201=yCONFIG_OLPC_XO175=y
# CONFIG_SURFACE_PLATFORMS is not set
# CONFIG_X86_PLATFORM_DEVICES is not setCONFIG_P2SB=y
# CONFIG_COMMON_CLK is not set
# CONFIG_HWSPINLOCK is not set
#
# Clock Source drivers
#CONFIG_TIMER_OF=yCONFIG_TIMER_PROBE=yCONFIG_CLKEVT_I8253=yCONFIG_I8253_LOCK=yCONFIG_CLKBLD_I8253=yCONFIG_CLKSRC_MMIO=y
# CONFIG_BCM2835_TIMER is not set
# CONFIG_BCM_KONA_TIMER is not set
# CONFIG_DAVINCI_TIMER is not setCONFIG_DIGICOLOR_TIMER=yCONFIG_OMAP_DM_TIMER=y
# CONFIG_DW_APB_TIMER is not setCONFIG_FTTMR010_TIMER=yCONFIG_IXP4XX_TIMER=y
# CONFIG_MESON6_TIMER is not set
# CONFIG_OWL_TIMER is not setCONFIG_RDA_TIMER=y
# CONFIG_SUN4I_TIMER is not set
# CONFIG_TEGRA_TIMER is not set
# CONFIG_VT8500_TIMER is not set
# CONFIG_NPCM7XX_TIMER is not set
# CONFIG_ASM9260_TIMER is not setCONFIG_CLKSRC_DBX500_PRCMU=y
# CONFIG_CLPS711X_TIMER is not setCONFIG_MXS_TIMER=y
# CONFIG_NSPIRE_TIMER is not setCONFIG_INTEGRATOR_AP_TIMER=yCONFIG_CLKSRC_PISTACHIO=y
# CONFIG_CLKSRC_STM32_LP is not set
# CONFIG_ARMV7M_SYSTICK is not set
# CONFIG_ATMEL_PIT is not setCONFIG_ATMEL_ST=yCONFIG_CLKSRC_SAMSUNG_PWM=y
# CONFIG_FSL_FTM_TIMER is not set
# CONFIG_MTK_TIMER is not set
# CONFIG_MTK_CPUX_TIMER is not setCONFIG_SH_TIMER_CMT=yCONFIG_SH_TIMER_MTU2=yCONFIG_RENESAS_OSTM=yCONFIG_SH_TIMER_TMU=yCONFIG_EM_TIMER_STI=y
# CONFIG_CLKSRC_PXA is not setCONFIG_TIMER_IMX_SYS_CTR=y
# CONFIG_CLKSRC_LOONGSON1_PWM is not setCONFIG_CLKSRC_ST_LPC=y
# CONFIG_GXP_TIMER is not setCONFIG_MSC313E_TIMER=y
# end of Clock Source drivers
CONFIG_MAILBOX=y
# CONFIG_IMX_MBOX is not setCONFIG_ROCKCHIP_MBOX=yCONFIG_ALTERA_MBOX=yCONFIG_POLARFIRE_SOC_MAILBOX=yCONFIG_QCOM_APCS_IPC=y
# CONFIG_BCM_PDC_MBOX is not set
# CONFIG_STM32_IPCC is not set
# CONFIG_MTK_ADSP_MBOX is not setCONFIG_MTK_CMDQ_MBOX=yCONFIG_SUN6I_MSGBOX=yCONFIG_SPRD_MBOX=yCONFIG_QCOM_IPCC=yCONFIG_IOMMU_IOVA=yCONFIG_IOMMU_API=yCONFIG_IOMMUFD_DRIVER=yCONFIG_IOMMU_SUPPORT=y
#
# Generic IOMMU Pagetable Support
#CONFIG_IOMMU_IO_PGTABLE=yCONFIG_IOMMU_IO_PGTABLE_LPAE=yCONFIG_IOMMU_IO_PGTABLE_LPAE_SELFTEST=y
# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not setCONFIG_IOMMU_IO_PGTABLE_DART=y
# end of Generic IOMMU Pagetable Support
CONFIG_IOMMU_DEBUGFS=y
# CONFIG_IOMMU_DEFAULT_DMA_STRICT is not setCONFIG_IOMMU_DEFAULT_DMA_LAZY=y
# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not setCONFIG_IOMMU_DMA=y
# CONFIG_IOMMUFD is not set
# CONFIG_OMAP_IOMMU is not setCONFIG_ROCKCHIP_IOMMU=yCONFIG_SUN50I_IOMMU=y
# CONFIG_EXYNOS_IOMMU is not setCONFIG_IPMMU_VMSA=yCONFIG_APPLE_DART=yCONFIG_ARM_SMMU=yCONFIG_ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y
# CONFIG_MTK_IOMMU is not set
# CONFIG_QCOM_IOMMU is not setCONFIG_VIRTIO_IOMMU=yCONFIG_SPRD_IOMMU=y
#
# Remoteproc drivers
#
# CONFIG_REMOTEPROC is not set
# end of Remoteproc drivers
#
# Rpmsg drivers
#CONFIG_RPMSG=yCONFIG_RPMSG_CHAR=yCONFIG_RPMSG_CTRL=yCONFIG_RPMSG_NS=yCONFIG_RPMSG_QCOM_GLINK=yCONFIG_RPMSG_QCOM_GLINK_RPM=yCONFIG_RPMSG_VIRTIO=y
# end of Rpmsg drivers
#
# SOC (System On Chip) specific Drivers
#
#
# Amlogic SoC drivers
#CONFIG_MESON_CANVAS=yCONFIG_MESON_CLK_MEASURE=y
# CONFIG_MESON_GX_SOCINFO is not setCONFIG_MESON_MX_SOCINFO=y
# end of Amlogic SoC drivers
#
# Apple SoC drivers
#CONFIG_APPLE_SART=y
# end of Apple SoC drivers
#
# ASPEED SoC drivers
#
# CONFIG_ASPEED_LPC_CTRL is not set
# CONFIG_ASPEED_LPC_SNOOP is not setCONFIG_ASPEED_UART_ROUTING=yCONFIG_ASPEED_P2A_CTRL=y
# CONFIG_ASPEED_SOCINFO is not set
# end of ASPEED SoC drivers
# CONFIG_AT91_SOC_ID is not set
# CONFIG_AT91_SOC_SFR is not set
#
# Broadcom SoC drivers
#
# CONFIG_SOC_BRCMSTB is not set
# end of Broadcom SoC drivers
#
# NXP/Freescale QorIQ SoC drivers
#
# end of NXP/Freescale QorIQ SoC drivers
#
# fujitsu SoC drivers # # end of fujitsu SoC drivers
#
# Hisilicon SoC drivers
#
# end of Hisilicon SoC drivers
#
# i.MX SoC drivers
#CONFIG_SOC_IMX8M=yCONFIG_SOC_IMX9=y
# end of i.MX SoC drivers
#
# IXP4xx SoC drivers
#
# CONFIG_IXP4XX_QMGR is not set
# CONFIG_IXP4XX_NPE is not set
# end of IXP4xx SoC drivers
#
# Enable LiteX SoC Builder specific drivers
#
# CONFIG_LITEX_SOC_CONTROLLER is not set
# end of Enable LiteX SoC Builder specific drivers
# CONFIG_LOONGSON2_GUTS is not set
#
# MediaTek SoC drivers
#CONFIG_MTK_CMDQ=yCONFIG_MTK_DEVAPC=yCONFIG_MTK_INFRACFG=yCONFIG_MTK_MMSYS=yCONFIG_MTK_SVS=y
# end of MediaTek SoC drivers
CONFIG_POLARFIRE_SOC_SYS_CTRL=yCONFIG_WPCM450_SOC=y
#
# Qualcomm SoC drivers
#CONFIG_QCOM_GENI_SE=y
# CONFIG_QCOM_GSBI is not setCONFIG_QCOM_LLCC=yCONFIG_QCOM_PDR_HELPERS=y
# CONFIG_QCOM_PMIC_PDCHARGER_ULOG is not setCONFIG_QCOM_QMI_HELPERS=yCONFIG_QCOM_RAMP_CTRL=y
# CONFIG_QCOM_RPM_MASTER_STATS is not setCONFIG_QCOM_RPMH=y
# CONFIG_QCOM_SMD_RPM is not setCONFIG_QCOM_SPM=yCONFIG_QCOM_WCNSS_CTRL=yCONFIG_QCOM_APR=yCONFIG_QCOM_ICC_BWMON=y
# end of Qualcomm SoC drivers
CONFIG_SOC_RENESAS=yCONFIG_PWC_RZV2M=yCONFIG_RST_RCAR=yCONFIG_ROCKCHIP_GRF=yCONFIG_SOC_SAMSUNG=y
# CONFIG_EXYNOS_CHIPID is not setCONFIG_EXYNOS_USI=yCONFIG_EXYNOS_REGULATOR_COUPLER=y
# CONFIG_SOC_TI is not set
# CONFIG_UX500_SOC_ID is not set
#
# Xilinx SoC drivers
#
# end of Xilinx SoC drivers # end of SOC (System On Chip) specific Drivers
#
# PM Domains
#
#
# Amlogic PM Domains
#
# end of Amlogic PM Domains
# CONFIG_ARM_SCMI_PERF_DOMAIN is not setCONFIG_ARM_SCMI_POWER_DOMAIN=yCONFIG_ARM_SCPI_POWER_DOMAIN=y
#
# Broadcom PM Domains
#
# end of Broadcom PM Domains
#
# i.MX PM Domains
#
# end of i.MX PM Domains
#
# MediaTek PM Domains
#
# end of MediaTek PM Domains
#
# Qualcomm PM Domains
#
# end of Qualcomm PM Domains
CONFIG_SYSC_RCAR=yCONFIG_SYSC_RCAR_GEN4=y
# CONFIG_SYSC_R8A77995 is not set
# CONFIG_SYSC_R8A7794 is not set
# CONFIG_SYSC_R8A77990 is not setCONFIG_SYSC_R8A7779=yCONFIG_SYSC_R8A7790=y
# CONFIG_SYSC_R8A7795 is not setCONFIG_SYSC_R8A7791=yCONFIG_SYSC_R8A77965=yCONFIG_SYSC_R8A77960=y
# CONFIG_SYSC_R8A77961 is not setCONFIG_SYSC_R8A779F0=y
# CONFIG_SYSC_R8A7792 is not set
# CONFIG_SYSC_R8A77980 is not setCONFIG_SYSC_R8A77970=y
# CONFIG_SYSC_R8A779A0 is not set
# CONFIG_SYSC_R8A779G0 is not set
# CONFIG_SYSC_RMOBILE is not set
# CONFIG_SYSC_R8A77470 is not set
# CONFIG_SYSC_R8A7745 is not setCONFIG_SYSC_R8A7742=y
# CONFIG_SYSC_R8A7743 is not set
# CONFIG_SYSC_R8A774C0 is not set
# CONFIG_SYSC_R8A774E1 is not setCONFIG_SYSC_R8A774A1=yCONFIG_SYSC_R8A774B1=yCONFIG_EXYNOS_PM_DOMAINS=yCONFIG_UX500_PM_DOMAIN=y
# end of PM Domains
# CONFIG_PM_DEVFREQ is not setCONFIG_EXTCON=y
#
# Extcon Device Drivers
#
# CONFIG_EXTCON_ADC_JACK is not setCONFIG_EXTCON_FSA9480=yCONFIG_EXTCON_GPIO=y
# CONFIG_EXTCON_MAX3355 is not set
# CONFIG_EXTCON_MAX77843 is not setCONFIG_EXTCON_PALMAS=yCONFIG_EXTCON_PTN5150=yCONFIG_EXTCON_QCOM_SPMI_MISC=yCONFIG_EXTCON_RT8973A=y
# CONFIG_EXTCON_SM5502 is not setCONFIG_EXTCON_USB_GPIO=yCONFIG_EXTCON_USBC_CROS_EC=yCONFIG_MEMORY=yCONFIG_DDR=yCONFIG_BRCMSTB_DPFE=yCONFIG_BRCMSTB_MEMC=y
# CONFIG_BT1_L2_CTL is not setCONFIG_TI_EMIF=y
# CONFIG_FSL_CORENET_CF is not setCONFIG_FSL_IFC=yCONFIG_MTK_SMI=y
# CONFIG_DA8XX_DDRCTL is not setCONFIG_RENESAS_RPCIF=yCONFIG_STM32_FMC2_EBI=y
# CONFIG_SAMSUNG_MC is not setCONFIG_IIO=yCONFIG_IIO_BUFFER=yCONFIG_IIO_BUFFER_CB=yCONFIG_IIO_BUFFER_DMA=y
# CONFIG_IIO_BUFFER_DMAENGINE is not set
# CONFIG_IIO_BUFFER_HW_CONSUMER is not setCONFIG_IIO_KFIFO_BUF=yCONFIG_IIO_TRIGGERED_BUFFER=yCONFIG_IIO_CONFIGFS=yCONFIG_IIO_GTS_HELPER=yCONFIG_IIO_TRIGGER=yCONFIG_IIO_CONSUMERS_PER_TRIGGER=2
# CONFIG_IIO_SW_DEVICE is not setCONFIG_IIO_SW_TRIGGER=yCONFIG_IIO_TRIGGERED_EVENT=y
#
# Accelerometers
#
# CONFIG_ADXL313_I2C is not set
# CONFIG_ADXL355_I2C is not set
# CONFIG_ADXL367_I2C is not setCONFIG_ADXL372=yCONFIG_ADXL372_I2C=y
# CONFIG_BMA400 is not setCONFIG_BMC150_ACCEL=yCONFIG_BMC150_ACCEL_I2C=yCONFIG_DA280=yCONFIG_DA311=y
# CONFIG_DMARD06 is not set
# CONFIG_DMARD09 is not setCONFIG_DMARD10=yCONFIG_FXLS8962AF=yCONFIG_FXLS8962AF_I2C=yCONFIG_IIO_KX022A=yCONFIG_IIO_KX022A_I2C=y
# CONFIG_KXSD9 is not setCONFIG_KXCJK1013=y
# CONFIG_MC3230 is not setCONFIG_MMA7455=yCONFIG_MMA7455_I2C=yCONFIG_MMA7660=yCONFIG_MMA8452=yCONFIG_MMA9551_CORE=y
# CONFIG_MMA9551 is not setCONFIG_MMA9553=y
# CONFIG_MSA311 is not setCONFIG_MXC4005=yCONFIG_MXC6255=yCONFIG_STK8312=yCONFIG_STK8BA50=y
# end of Accelerometers
#
# Analog to digital converters
#CONFIG_AD7091R=yCONFIG_AD7091R5=yCONFIG_AD7291=y
# CONFIG_AD7606_IFACE_PARALLEL is not setCONFIG_AD799X=y
# CONFIG_AT91_SAMA5D2_ADC is not setCONFIG_AXP20X_ADC=y
# CONFIG_AXP288_ADC is not setCONFIG_BCM_IPROC_ADC=y
# CONFIG_BERLIN2_ADC is not setCONFIG_ENVELOPE_DETECTOR=yCONFIG_EP93XX_ADC=yCONFIG_MXS_LRADC_ADC=yCONFIG_HX711=yCONFIG_INGENIC_ADC=y
# CONFIG_IMX7D_ADC is not setCONFIG_IMX8QXP_ADC=yCONFIG_IMX93_ADC=y
# CONFIG_LP8788_ADC is not setCONFIG_LPC18XX_ADC=yCONFIG_LPC32XX_ADC=y
# CONFIG_LTC2309 is not set
# CONFIG_LTC2471 is not set
# CONFIG_LTC2485 is not set
# CONFIG_LTC2497 is not set
# CONFIG_MAX1363 is not setCONFIG_MAX34408=yCONFIG_MAX9611=yCONFIG_MCP3422=y
# CONFIG_MEDIATEK_MT6360_ADC is not set
# CONFIG_MEDIATEK_MT6370_ADC is not setCONFIG_MEDIATEK_MT6577_AUXADC=yCONFIG_MEN_Z188_ADC=yCONFIG_NAU7802=yCONFIG_NPCM_ADC=y
# CONFIG_PALMAS_GPADC is not setCONFIG_QCOM_VADC_COMMON=yCONFIG_QCOM_PM8XXX_XOADC=yCONFIG_QCOM_SPMI_IADC=yCONFIG_QCOM_SPMI_VADC=yCONFIG_QCOM_SPMI_ADC5=y
# CONFIG_RCAR_GYRO_ADC is not setCONFIG_ROCKCHIP_SARADC=yCONFIG_RICHTEK_RTQ6056=yCONFIG_RZG2L_ADC=yCONFIG_SC27XX_ADC=yCONFIG_SPEAR_ADC=yCONFIG_SD_ADC_MODULATOR=y
# CONFIG_STM32_DFSDM_CORE is not set
# CONFIG_STM32_DFSDM_ADC is not setCONFIG_SUN4I_GPADC=yCONFIG_SUN20I_GPADC=yCONFIG_TI_ADC081C=y
# CONFIG_TI_ADS1015 is not set
# CONFIG_TI_ADS7924 is not set
# CONFIG_TI_ADS1100 is not setCONFIG_TWL4030_MADC=y
# CONFIG_TWL6030_GPADC is not setCONFIG_VF610_ADC=yCONFIG_XILINX_XADC=y
# CONFIG_XILINX_AMS is not set
# end of Analog to digital converters
#
# Analog to digital and digital to analog converters #
# end of Analog to digital and digital to analog converters
#
# Analog Front Ends
#CONFIG_IIO_RESCALE=y
# end of Analog Front Ends
#
# Amplifiers
#CONFIG_HMC425=y
# end of Amplifiers
#
# Capacitance to digital converters
#CONFIG_AD7150=y
# CONFIG_AD7746 is not set
# end of Capacitance to digital converters
#
# Chemical Sensors
#
# CONFIG_AOSONG_AGS02MA is not setCONFIG_ATLAS_PH_SENSOR=y
# CONFIG_ATLAS_EZO_SENSOR is not set
# CONFIG_BME680 is not set
# CONFIG_CCS811 is not set
# CONFIG_IAQCORE is not setCONFIG_PMS7003=yCONFIG_SCD30_CORE=y
# CONFIG_SCD30_I2C is not set
# CONFIG_SCD30_SERIAL is not setCONFIG_SCD4X=yCONFIG_SENSIRION_SGP30=y
# CONFIG_SENSIRION_SGP40 is not setCONFIG_SPS30=yCONFIG_SPS30_I2C=yCONFIG_SPS30_SERIAL=yCONFIG_SENSEAIR_SUNRISE_CO2=yCONFIG_VZ89X=y
# end of Chemical Sensors
#
# Hid Sensor IIO Common
#
# end of Hid Sensor IIO Common
CONFIG_IIO_INV_SENSORS_TIMESTAMP=yCONFIG_IIO_MS_SENSORS_I2C=y
#
# IIO SCMI Sensors
#CONFIG_IIO_SCMI=y
# end of IIO SCMI Sensors
#
# SSP Sensor Common
#
# end of SSP Sensor Common
CONFIG_IIO_ST_SENSORS_CORE=y
#
# Digital to analog converters
#
# CONFIG_AD5064 is not setCONFIG_AD5380=yCONFIG_AD5446=y
# CONFIG_AD5593R is not set
# CONFIG_AD5696_I2C is not setCONFIG_DPOT_DAC=yCONFIG_DS4424=yCONFIG_LPC18XX_DAC=y
# CONFIG_M62332 is not setCONFIG_MAX517=yCONFIG_MAX5821=y
# CONFIG_MCP4725 is not set
# CONFIG_MCP4728 is not setCONFIG_TI_DAC5571=yCONFIG_VF610_DAC=y
# end of Digital to analog converters
#
# IIO dummy driver
#
# end of IIO dummy driver
#
# Filters
#
# end of Filters
#
# Frequency Synthesizers DDS/PLL
#
#
# Clock Generator/Distribution
#
# end of Clock Generator/Distribution
#
# Phase-Locked Loop (PLL) frequency synthesizers
#
# end of Phase-Locked Loop (PLL) frequency synthesizers # end of Frequency Synthesizers DDS/PLL
#
# Digital gyroscope sensors
#CONFIG_BMG160=yCONFIG_BMG160_I2C=y
# CONFIG_FXAS21002C is not setCONFIG_MPU3050=yCONFIG_MPU3050_I2C=y
# CONFIG_IIO_ST_GYRO_3AXIS is not setCONFIG_ITG3200=y
# end of Digital gyroscope sensors
#
# Health Sensors
#
#
# Heart Rate Monitors
#
# CONFIG_AFE4404 is not setCONFIG_MAX30100=yCONFIG_MAX30102=y
# end of Heart Rate Monitors # end of Health Sensors
#
# Humidity sensors
#CONFIG_AM2315=y
# CONFIG_DHT11 is not setCONFIG_HDC100X=y
# CONFIG_HDC2010 is not setCONFIG_HTS221=yCONFIG_HTS221_I2C=yCONFIG_HTU21=yCONFIG_SI7005=yCONFIG_SI7020=y
# end of Humidity sensors
#
# Inertial measurement units
#
# CONFIG_BMI160_I2C is not set
# CONFIG_BMI323_I2C is not set
# CONFIG_BOSCH_BNO055_SERIAL is not set
# CONFIG_BOSCH_BNO055_I2C is not setCONFIG_FXOS8700=yCONFIG_FXOS8700_I2C=y
# CONFIG_KMX61 is not setCONFIG_INV_ICM42600=yCONFIG_INV_ICM42600_I2C=yCONFIG_INV_MPU6050_IIO=yCONFIG_INV_MPU6050_I2C=yCONFIG_IIO_ST_LSM6DSX=yCONFIG_IIO_ST_LSM6DSX_I2C=yCONFIG_IIO_ST_LSM6DSX_I3C=y
# end of Inertial measurement units
#
# Light sensors
#CONFIG_ADJD_S311=y
# CONFIG_ADUX1020 is not setCONFIG_AL3010=yCONFIG_AL3320A=yCONFIG_APDS9300=yCONFIG_APDS9960=yCONFIG_AS73211=yCONFIG_BH1750=yCONFIG_BH1780=y
# CONFIG_CM32181 is not setCONFIG_CM3232=yCONFIG_CM3323=yCONFIG_CM3605=y
# CONFIG_CM36651 is not setCONFIG_GP2AP002=y
# CONFIG_GP2AP020A00F is not setCONFIG_IQS621_ALS=yCONFIG_SENSORS_ISL29018=y
# CONFIG_SENSORS_ISL29028 is not setCONFIG_ISL29125=yCONFIG_ISL76682=y
# CONFIG_JSA1212 is not setCONFIG_ROHM_BU27008=y
# CONFIG_ROHM_BU27034 is not setCONFIG_RPR0521=y
# CONFIG_SENSORS_LM3533 is not set
# CONFIG_LTR390 is not setCONFIG_LTR501=yCONFIG_LTRF216A=y
# CONFIG_LV0104CS is not setCONFIG_MAX44000=y
# CONFIG_MAX44009 is not set
# CONFIG_NOA1305 is not set
# CONFIG_OPT3001 is not set
# CONFIG_OPT4001 is not setCONFIG_PA12203001=y
# CONFIG_SI1133 is not set
# CONFIG_SI1145 is not set
# CONFIG_STK3310 is not set
# CONFIG_ST_UVIS25 is not setCONFIG_TCS3414=yCONFIG_TCS3472=yCONFIG_SENSORS_TSL2563=y
# CONFIG_TSL2583 is not set
# CONFIG_TSL2591 is not setCONFIG_TSL2772=yCONFIG_TSL4531=yCONFIG_US5182D=yCONFIG_VCNL4000=yCONFIG_VCNL4035=yCONFIG_VEML6030=y
# CONFIG_VEML6070 is not setCONFIG_VEML6075=yCONFIG_VL6180=y
# CONFIG_ZOPT2201 is not set
# end of Light sensors
#
# Magnetometer sensors
#
# CONFIG_AK8974 is not setCONFIG_AK8975=yCONFIG_AK09911=yCONFIG_BMC150_MAGN=yCONFIG_BMC150_MAGN_I2C=yCONFIG_MAG3110=y
# CONFIG_MMC35240 is not set
# CONFIG_IIO_ST_MAGN_3AXIS is not setCONFIG_SENSORS_HMC5843=yCONFIG_SENSORS_HMC5843_I2C=y
# CONFIG_SENSORS_RM3100_I2C is not setCONFIG_TI_TMAG5273=yCONFIG_YAMAHA_YAS530=y
# end of Magnetometer sensors
#
# Multiplexers
#
# CONFIG_IIO_MUX is not set
# end of Multiplexers
#
# Inclinometer sensors
#
# end of Inclinometer sensors
#
# Triggers - standalone
#CONFIG_IIO_HRTIMER_TRIGGER=yCONFIG_IIO_INTERRUPT_TRIGGER=yCONFIG_IIO_STM32_LPTIMER_TRIGGER=yCONFIG_IIO_STM32_TIMER_TRIGGER=y
# CONFIG_IIO_TIGHTLOOP_TRIGGER is not setCONFIG_IIO_SYSFS_TRIGGER=y
# end of Triggers - standalone
#
# Linear and angular position sensors
#
# CONFIG_IQS624_POS is not set
# end of Linear and angular position sensors
#
# Digital potentiometers
#
# CONFIG_AD5110 is not setCONFIG_AD5272=yCONFIG_DS1803=yCONFIG_MAX5432=yCONFIG_MCP4018=y
# CONFIG_MCP4531 is not setCONFIG_TPL0102=y
# end of Digital potentiometers
#
# Digital potentiostats
#CONFIG_LMP91000=y
# end of Digital potentiostats
#
# Pressure sensors
#CONFIG_ABP060MG=y
# CONFIG_ROHM_BM1390 is not setCONFIG_BMP280=yCONFIG_BMP280_I2C=yCONFIG_DLHL60D=yCONFIG_DPS310=yCONFIG_HP03=yCONFIG_HSC030PA=yCONFIG_HSC030PA_I2C=yCONFIG_ICP10100=y
# CONFIG_MPL115_I2C is not setCONFIG_MPL3115=yCONFIG_MPRLS0025PA=y
# CONFIG_MS5611 is not set
# CONFIG_MS5637 is not setCONFIG_IIO_ST_PRESS=y
# CONFIG_IIO_ST_PRESS_I2C is not set
# CONFIG_T5403 is not setCONFIG_HP206C=yCONFIG_ZPA2326=yCONFIG_ZPA2326_I2C=y
# end of Pressure sensors
#
# Lightning sensors
#
# end of Lightning sensors
#
# Proximity and distance sensors
#CONFIG_CROS_EC_MKBP_PROXIMITY=yCONFIG_IRSD200=yCONFIG_ISL29501=y
# CONFIG_LIDAR_LITE_V2 is not setCONFIG_MB1232=yCONFIG_PING=yCONFIG_RFD77402=yCONFIG_SRF04=yCONFIG_SX_COMMON=yCONFIG_SX9310=yCONFIG_SX9324=yCONFIG_SX9360=yCONFIG_SX9500=yCONFIG_SRF08=yCONFIG_VCNL3020=yCONFIG_VL53L0X_I2C=y
# end of Proximity and distance sensors
#
# Resolver to digital converters
#
# end of Resolver to digital converters
#
# Temperature sensors
#CONFIG_IQS620AT_TEMP=yCONFIG_MLX90614=yCONFIG_MLX90632=yCONFIG_MLX90635=yCONFIG_TMP006=y
# CONFIG_TMP007 is not setCONFIG_TMP117=y
# CONFIG_TSYS01 is not setCONFIG_TSYS02D=yCONFIG_MAX30208=yCONFIG_MCP9600=y
# end of Temperature sensors
CONFIG_NTB=yCONFIG_NTB_AMD=yCONFIG_NTB_IDT=yCONFIG_NTB_INTEL=y
# CONFIG_NTB_SWITCHTEC is not setCONFIG_NTB_PINGPONG=yCONFIG_NTB_TOOL=y
# CONFIG_NTB_PERF is not set
# CONFIG_NTB_TRANSPORT is not setCONFIG_PWM=yCONFIG_PWM_SYSFS=y
# CONFIG_PWM_DEBUG is not set
# CONFIG_PWM_APPLE is not set
# CONFIG_PWM_BCM2835 is not set
# CONFIG_PWM_BERLIN is not setCONFIG_PWM_BRCMSTB=yCONFIG_PWM_CLK=y
# CONFIG_PWM_CLPS711X is not setCONFIG_PWM_CROS_EC=yCONFIG_PWM_DWC_CORE=yCONFIG_PWM_DWC=yCONFIG_PWM_EP93XX=yCONFIG_PWM_HIBVT=yCONFIG_PWM_IMX1=yCONFIG_PWM_IMX27=yCONFIG_PWM_INTEL_LGM=yCONFIG_PWM_IQS620A=y
# CONFIG_PWM_LP3943 is not set
# CONFIG_PWM_LPC18XX_SCT is not set
# CONFIG_PWM_LPC32XX is not setCONFIG_PWM_LPSS=y
# CONFIG_PWM_LPSS_PCI is not setCONFIG_PWM_LPSS_PLATFORM=yCONFIG_PWM_MTK_DISP=yCONFIG_PWM_MEDIATEK=yCONFIG_PWM_PCA9685=yCONFIG_PWM_PXA=yCONFIG_PWM_RASPBERRYPI_POE=yCONFIG_PWM_RCAR=y
# CONFIG_PWM_RENESAS_TPU is not setCONFIG_PWM_ROCKCHIP=y
# CONFIG_PWM_RZ_MTU3 is not setCONFIG_PWM_SAMSUNG=yCONFIG_PWM_SL28CPLD=yCONFIG_PWM_SPRD=yCONFIG_PWM_STM32=yCONFIG_PWM_STM32_LP=y
# CONFIG_PWM_TEGRA is not setCONFIG_PWM_TIECAP=y
# CONFIG_PWM_TIEHRPWM is not setCONFIG_PWM_TWL=yCONFIG_PWM_TWL_LED=y
# CONFIG_PWM_VISCONTI is not set
# CONFIG_PWM_VT8500 is not set
#
# IRQ chip support
#CONFIG_RENESAS_INTC_IRQPIN=y
# CONFIG_RENESAS_IRQC is not set
# CONFIG_RENESAS_RZA1_IRQC is not setCONFIG_RENESAS_RZG2L_IRQC=yCONFIG_SL28CPLD_INTC=yCONFIG_TS4800_IRQ=y
# CONFIG_INGENIC_TCU_IRQ is not setCONFIG_IRQ_UNIPHIER_AIDET=y
# CONFIG_MESON_IRQ_GPIO is not setCONFIG_IMX_IRQSTEER=y
# CONFIG_IMX_INTMUX is not set
# CONFIG_EXYNOS_IRQ_COMBINER is not set
# CONFIG_MST_IRQ is not set
# CONFIG_MCHP_EIC is not setCONFIG_SUNPLUS_SP7021_INTC=y
# end of IRQ chip support
CONFIG_IPACK_BUS=yCONFIG_BOARD_TPCI200=yCONFIG_SERIAL_IPOCTAL=yCONFIG_RESET_CONTROLLER=yCONFIG_RESET_A10SR=yCONFIG_RESET_ATH79=yCONFIG_RESET_AXS10X=yCONFIG_RESET_BCM6345=y
# CONFIG_RESET_BERLIN is not set
# CONFIG_RESET_BRCMSTB is not setCONFIG_RESET_BRCMSTB_RESCAL=y
# CONFIG_RESET_HSDK is not setCONFIG_RESET_IMX7=yCONFIG_RESET_LANTIQ=yCONFIG_RESET_LPC18XX=y
# CONFIG_RESET_MCHP_SPARX5 is not setCONFIG_RESET_MESON=y
# CONFIG_RESET_MESON_AUDIO_ARB is not set
# CONFIG_RESET_NPCM is not setCONFIG_RESET_NUVOTON_MA35D1=y
# CONFIG_RESET_PISTACHIO is not setCONFIG_RESET_QCOM_AOSS=yCONFIG_RESET_QCOM_PDC=yCONFIG_RESET_RASPBERRYPI=yCONFIG_RESET_RZG2L_USBPHY_CTRL=yCONFIG_RESET_SCMI=yCONFIG_RESET_SIMPLE=y
# CONFIG_RESET_SOCFPGA is not set
# CONFIG_RESET_SUNPLUS is not setCONFIG_RESET_SUNXI=yCONFIG_RESET_TI_SCI=y
# CONFIG_RESET_TI_SYSCON is not setCONFIG_RESET_TI_TPS380X=y
# CONFIG_RESET_TN48M_CPLD is not set
# CONFIG_RESET_ZYNQ is not set
# CONFIG_RESET_STARFIVE_JH7100 is not setCONFIG_COMMON_RESET_HI3660=y
# CONFIG_COMMON_RESET_HI6220 is not set
#
# PHY Subsystem
#CONFIG_GENERIC_PHY=yCONFIG_GENERIC_PHY_MIPI_DPHY=y
# CONFIG_PHY_PISTACHIO_USB is not set
# CONFIG_PHY_CAN_TRANSCEIVER is not set
#
# PHY drivers for Broadcom platforms
#
# CONFIG_PHY_BCM63XX_USBH is not setCONFIG_BCM_KONA_USB2_PHY=yCONFIG_PHY_NS2_PCIE=y
# end of PHY drivers for Broadcom platforms
CONFIG_PHY_HI6220_USB=y
# CONFIG_PHY_HI3660_USB is not set
# CONFIG_PHY_HI3670_USB is not set
# CONFIG_PHY_HI3670_PCIE is not setCONFIG_PHY_HISTB_COMBPHY=yCONFIG_PHY_HISI_INNO_USB2=y
# CONFIG_PHY_PXA_28NM_HSIC is not setCONFIG_PHY_PXA_28NM_USB2=yCONFIG_PHY_PXA_USB=y
# CONFIG_PHY_MMP3_USB is not setCONFIG_PHY_MMP3_HSIC=yCONFIG_PHY_MT7621_PCI=y
# CONFIG_PHY_RALINK_USB is not set
# CONFIG_PHY_R8A779F0_ETHERNET_SERDES is not setCONFIG_PHY_RCAR_GEN3_USB3=yCONFIG_PHY_ROCKCHIP_DPHY_RX0=yCONFIG_PHY_ROCKCHIP_PCIE=yCONFIG_PHY_ROCKCHIP_SNPS_PCIE3=yCONFIG_PHY_EXYNOS_MIPI_VIDEO=yCONFIG_PHY_SAMSUNG_USB2=y
# CONFIG_PHY_S5PV210_USB2 is not setCONFIG_PHY_ST_SPEAR1310_MIPHY=yCONFIG_PHY_ST_SPEAR1340_MIPHY=yCONFIG_PHY_STIH407_USB=y
# CONFIG_PHY_STARFIVE_JH7110_DPHY_RX is not set
# CONFIG_PHY_STARFIVE_JH7110_PCIE is not setCONFIG_PHY_TEGRA194_P2U=yCONFIG_PHY_DA8XX_USB=yCONFIG_OMAP_CONTROL_PHY=yCONFIG_TI_PIPE3=y
# CONFIG_PHY_INTEL_KEEMBAY_EMMC is not set
# CONFIG_PHY_INTEL_KEEMBAY_USB is not setCONFIG_PHY_INTEL_LGM_EMMC=yCONFIG_PHY_XILINX_ZYNQMP=y
# end of PHY Subsystem
# CONFIG_POWERCAP is not setCONFIG_MCB=y
# CONFIG_MCB_PCI is not set
# CONFIG_MCB_LPC is not set
#
# Performance monitor support
#CONFIG_ARM_CCN=yCONFIG_ARM_CMN=yCONFIG_FSL_IMX8_DDR_PMU=yCONFIG_XGENE_PMU=yCONFIG_ARM_DMC620_PMU=yCONFIG_MARVELL_CN10K_TAD_PMU=y
# CONFIG_ALIBABA_UNCORE_DRW_PMU is not setCONFIG_HNS3_PMU=yCONFIG_MARVELL_CN10K_DDR_PMU=y
# CONFIG_DWC_PCIE_PMU is not setCONFIG_ARM_CORESIGHT_PMU_ARCH_SYSTEM_PMU=yCONFIG_NVIDIA_CORESIGHT_PMU_ARCH_SYSTEM_PMU=yCONFIG_AMPERE_CORESIGHT_PMU_ARCH_SYSTEM_PMU=yCONFIG_MESON_DDR_PMU=y
# end of Performance monitor support
CONFIG_RAS=y
# CONFIG_AMD_ATL is not setCONFIG_USB4=yCONFIG_USB4_DEBUGFS_WRITE=yCONFIG_USB4_DEBUGFS_MARGINING=yCONFIG_USB4_DMA_TEST=y
#
# Android
#CONFIG_ANDROID_BINDER_IPC=y CONFIG_ANDROID_BINDERFS=y CONFIG_ANDROID_BINDER_DEVICES="binder,hwbinder,vndbinder" CONFIG_ANDROID_BINDER_IPC_SELFTEST=y
# end of Android
# CONFIG_DAX is not setCONFIG_NVMEM=y
# CONFIG_NVMEM_SYSFS is not set
# CONFIG_NVMEM_LAYOUTS is not setCONFIG_NVMEM_APPLE_EFUSES=yCONFIG_NVMEM_BCM_OCOTP=yCONFIG_NVMEM_BRCM_NVRAM=y
# CONFIG_NVMEM_IMX_IIM is not set
# CONFIG_NVMEM_IMX_OCOTP is not setCONFIG_NVMEM_LAN9662_OTPC=yCONFIG_NVMEM_LAYERSCAPE_SFP=yCONFIG_NVMEM_LPC18XX_EEPROM=y
# CONFIG_NVMEM_LPC18XX_OTP is not set
# CONFIG_NVMEM_MESON_MX_EFUSE is not setCONFIG_NVMEM_MICROCHIP_OTPC=yCONFIG_NVMEM_MTK_EFUSE=yCONFIG_NVMEM_MXS_OCOTP=yCONFIG_NVMEM_NINTENDO_OTP=yCONFIG_NVMEM_QCOM_QFPROM=yCONFIG_NVMEM_RMEM=yCONFIG_NVMEM_ROCKCHIP_EFUSE=yCONFIG_NVMEM_ROCKCHIP_OTP=y
# CONFIG_NVMEM_SC27XX_EFUSE is not setCONFIG_NVMEM_SNVS_LPGPR=yCONFIG_NVMEM_SPMI_SDAM=yCONFIG_NVMEM_SPRD_EFUSE=yCONFIG_NVMEM_STM32_ROMEM=yCONFIG_NVMEM_SUNPLUS_OCOTP=yCONFIG_NVMEM_UNIPHIER_EFUSE=y
# CONFIG_NVMEM_VF610_OCOTP is not setCONFIG_NVMEM_QORIQ_EFUSE=y
#
# HW tracing support
#CONFIG_STM=yCONFIG_STM_PROTO_BASIC=y
# CONFIG_STM_PROTO_SYS_T is not set
# CONFIG_STM_DUMMY is not set
# CONFIG_STM_SOURCE_CONSOLE is not setCONFIG_STM_SOURCE_HEARTBEAT=y
# CONFIG_STM_SOURCE_FTRACE is not setCONFIG_INTEL_TH=y
# CONFIG_INTEL_TH_PCI is not setCONFIG_INTEL_TH_GTH=yCONFIG_INTEL_TH_STH=yCONFIG_INTEL_TH_MSU=y
# CONFIG_INTEL_TH_PTI is not setCONFIG_INTEL_TH_DEBUG=y
# CONFIG_HISI_PTT is not set
# end of HW tracing support
# CONFIG_FPGA is not setCONFIG_TEE=yCONFIG_MULTIPLEXER=y
#
# Multiplexer drivers
#
# CONFIG_MUX_ADG792A is not setCONFIG_MUX_GPIO=y
# CONFIG_MUX_MMIO is not set
# end of Multiplexer drivers
CONFIG_PM_OPP=y
# CONFIG_SIOX is not setCONFIG_SLIMBUS=yCONFIG_SLIM_QCOM_CTRL=yCONFIG_SLIM_QCOM_NGD_CTRL=y
# CONFIG_INTERCONNECT is not setCONFIG_COUNTER=y
# CONFIG_104_QUAD_8 is not setCONFIG_INTEL_QEP=y
# CONFIG_INTERRUPT_CNT is not setCONFIG_RZ_MTU3_CNT=y
# CONFIG_STM32_LPTIMER_CNT is not setCONFIG_STM32_TIMER_CNT=yCONFIG_TI_ECAP_CAPTURE=y
# CONFIG_TI_EQEP is not setCONFIG_MOST=y
# CONFIG_MOST_CDEV is not setCONFIG_PECI=yCONFIG_PECI_CPU=y
# CONFIG_HTE is not setCONFIG_DPLL=y
# end of Device Drivers
#
# File systems
#CONFIG_DCACHE_WORD_ACCESS=yCONFIG_VALIDATE_FS_PARSER=yCONFIG_FS_IOMAP=yCONFIG_FS_STACK=yCONFIG_BUFFER_HEAD=yCONFIG_LEGACY_DIRECT_IO=yCONFIG_EXT2_FS=yCONFIG_EXT2_FS_XATTR=yCONFIG_EXT2_FS_POSIX_ACL=y
# CONFIG_EXT2_FS_SECURITY is not setCONFIG_EXT3_FS=yCONFIG_EXT3_FS_POSIX_ACL=y
# CONFIG_EXT3_FS_SECURITY is not setCONFIG_EXT4_FS=yCONFIG_EXT4_FS_POSIX_ACL=y
# CONFIG_EXT4_FS_SECURITY is not setCONFIG_EXT4_DEBUG=yCONFIG_JBD2=y
# CONFIG_JBD2_DEBUG is not setCONFIG_FS_MBCACHE=yCONFIG_REISERFS_FS=y
# CONFIG_REISERFS_CHECK is not set
# CONFIG_REISERFS_PROC_INFO is not set
# CONFIG_REISERFS_FS_XATTR is not set
# CONFIG_JFS_FS is not setCONFIG_XFS_FS=y
# CONFIG_XFS_SUPPORT_V4 is not set
# CONFIG_XFS_SUPPORT_ASCII_CI is not setCONFIG_XFS_QUOTA=y
# CONFIG_XFS_POSIX_ACL is not setCONFIG_XFS_RT=y
# CONFIG_XFS_ONLINE_SCRUB is not set
# CONFIG_XFS_WARN is not set
# CONFIG_XFS_DEBUG is not setCONFIG_GFS2_FS=y
# CONFIG_GFS2_FS_LOCKING_DLM is not set
# CONFIG_OCFS2_FS is not setCONFIG_BTRFS_FS=y
# CONFIG_BTRFS_FS_POSIX_ACL is not set
# CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set
# CONFIG_BTRFS_DEBUG is not set
# CONFIG_BTRFS_ASSERT is not setCONFIG_BTRFS_FS_REF_VERIFY=yCONFIG_NILFS2_FS=yCONFIG_F2FS_FS=y
# CONFIG_F2FS_STAT_FS is not setCONFIG_F2FS_FS_XATTR=y
# CONFIG_F2FS_FS_POSIX_ACL is not set
# CONFIG_F2FS_FS_SECURITY is not setCONFIG_F2FS_CHECK_FS=y
# CONFIG_F2FS_FAULT_INJECTION is not setCONFIG_F2FS_FS_COMPRESSION=yCONFIG_F2FS_FS_LZO=y
# CONFIG_F2FS_FS_LZORLE is not setCONFIG_F2FS_FS_LZ4=y
# CONFIG_F2FS_FS_LZ4HC is not setCONFIG_F2FS_FS_ZSTD=y
# CONFIG_F2FS_IOSTAT is not setCONFIG_BCACHEFS_FS=y
# CONFIG_BCACHEFS_QUOTA is not setCONFIG_BCACHEFS_ERASURE_CODING=y
# CONFIG_BCACHEFS_POSIX_ACL is not set
# CONFIG_BCACHEFS_DEBUG is not set
# CONFIG_BCACHEFS_TESTS is not setCONFIG_BCACHEFS_LOCK_TIME_STATS=y
# CONFIG_BCACHEFS_NO_LATENCY_ACCT is not set
# CONFIG_BCACHEFS_SIX_OPTIMISTIC_SPIN is not setCONFIG_ZONEFS_FS=yCONFIG_FS_POSIX_ACL=yCONFIG_EXPORTFS=yCONFIG_EXPORTFS_BLOCK_OPS=yCONFIG_FILE_LOCKING=y
# CONFIG_FS_ENCRYPTION is not setCONFIG_FS_VERITY=yCONFIG_FS_VERITY_BUILTIN_SIGNATURES=yCONFIG_FSNOTIFY=yCONFIG_DNOTIFY=yCONFIG_INOTIFY_USER=y
# CONFIG_FANOTIFY is not setCONFIG_QUOTA=y
# CONFIG_QUOTA_NETLINK_INTERFACE is not set
# CONFIG_QUOTA_DEBUG is not setCONFIG_QUOTA_TREE=yCONFIG_QFMT_V1=yCONFIG_QFMT_V2=yCONFIG_QUOTACTL=yCONFIG_AUTOFS_FS=y
# CONFIG_FUSE_FS is not setCONFIG_OVERLAY_FS=yCONFIG_OVERLAY_FS_REDIRECT_DIR=yCONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y
# CONFIG_OVERLAY_FS_INDEX is not setCONFIG_OVERLAY_FS_XINO_AUTO=yCONFIG_OVERLAY_FS_METACOPY=y
# CONFIG_OVERLAY_FS_DEBUG is not set
#
# Caches
#CONFIG_NETFS_SUPPORT=yCONFIG_NETFS_STATS=y
# CONFIG_FSCACHE is not set
# end of Caches
#
# CD-ROM/DVD Filesystems
#CONFIG_ISO9660_FS=y
# CONFIG_JOLIET is not setCONFIG_ZISOFS=y
# CONFIG_UDF_FS is not set
# end of CD-ROM/DVD Filesystems
#
# DOS/FAT/EXFAT/NT Filesystems
#CONFIG_FAT_FS=yCONFIG_MSDOS_FS=y
# CONFIG_VFAT_FS is not setCONFIG_FAT_DEFAULT_CODEPAGE=437CONFIG_EXFAT_FS=yCONFIG_EXFAT_DEFAULT_IOCHARSET="utf8"CONFIG_NTFS_FS=y
# CONFIG_NTFS_DEBUG is not setCONFIG_NTFS_RW=yCONFIG_NTFS3_FS=y
# CONFIG_NTFS3_64BIT_CLUSTER is not setCONFIG_NTFS3_LZX_XPRESS=yCONFIG_NTFS3_FS_POSIX_ACL=y
# end of DOS/FAT/EXFAT/NT Filesystems
#
# Pseudo filesystems
#CONFIG_PROC_FS=y
# CONFIG_PROC_KCORE is not set CONFIG_PROC_SYSCTL=yCONFIG_PROC_PAGE_MONITOR=yCONFIG_PROC_CHILDREN=y CONFIG_PROC_PID_ARCH_STATUS=y CONFIG_PROC_CPU_RESCTRL=yCONFIG_KERNFS=yCONFIG_SYSFS=yCONFIG_TMPFS=yCONFIG_TMPFS_POSIX_ACL=yCONFIG_TMPFS_XATTR=yCONFIG_TMPFS_INODE64=y
# CONFIG_TMPFS_QUOTA is not setCONFIG_HUGETLBFS=y
# CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP_DEFAULT_ON is not set CONFIG_HUGETLB_PAGE=y CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP=y CONFIG_ARCH_HAS_GIGANTIC_PAGE=y CONFIG_CONFIGFS_FS=y
# end of Pseudo filesystems
# CONFIG_MISC_FILESYSTEMS is not setCONFIG_NETWORK_FILESYSTEMS=y
# CONFIG_NFS_FS is not setCONFIG_NFSD=yCONFIG_NFSD_V2=yCONFIG_NFSD_V2_ACL=y
# CONFIG_NFSD_V3_ACL is not set
# CONFIG_NFSD_V4 is not setCONFIG_GRACE_PERIOD=yCONFIG_LOCKD=yCONFIG_LOCKD_V4=yCONFIG_NFS_ACL_SUPPORT=yCONFIG_NFS_COMMON=yCONFIG_SUNRPC=yCONFIG_SUNRPC_GSS=yCONFIG_RPCSEC_GSS_KRB5=yCONFIG_SUNRPC_DEBUG=yCONFIG_SUNRPC_XPRT_RDMA=yCONFIG_CEPH_FS=y
# CONFIG_CEPH_FS_POSIX_ACL is not setCONFIG_CEPH_FS_SECURITY_LABEL=y
# CONFIG_CIFS is not setCONFIG_SMB_SERVER=yCONFIG_SMB_SERVER_SMBDIRECT=yCONFIG_SMB_SERVER_CHECK_CAP_NET_ADMIN=yCONFIG_SMB_SERVER_KERBEROS5=yCONFIG_SMBFS=yCONFIG_CODA_FS=yCONFIG_AFS_FS=yCONFIG_AFS_DEBUG=yCONFIG_AFS_DEBUG_CURSOR=yCONFIG_9P_FS=y
# CONFIG_9P_FS_POSIX_ACL is not setCONFIG_9P_FS_SECURITY=yCONFIG_NLS=yCONFIG_NLS_DEFAULT="iso8859-1"CONFIG_NLS_CODEPAGE_437=yCONFIG_NLS_CODEPAGE_737=yCONFIG_NLS_CODEPAGE_775=yCONFIG_NLS_CODEPAGE_850=yCONFIG_NLS_CODEPAGE_852=yCONFIG_NLS_CODEPAGE_855=yCONFIG_NLS_CODEPAGE_857=y
# CONFIG_NLS_CODEPAGE_860 is not set
# CONFIG_NLS_CODEPAGE_861 is not setCONFIG_NLS_CODEPAGE_862=y
# CONFIG_NLS_CODEPAGE_863 is not setCONFIG_NLS_CODEPAGE_864=yCONFIG_NLS_CODEPAGE_865=yCONFIG_NLS_CODEPAGE_866=y
# CONFIG_NLS_CODEPAGE_869 is not set
# CONFIG_NLS_CODEPAGE_936 is not setCONFIG_NLS_CODEPAGE_950=yCONFIG_NLS_CODEPAGE_932=y
# CONFIG_NLS_CODEPAGE_949 is not setCONFIG_NLS_CODEPAGE_874=yCONFIG_NLS_ISO8859_8=yCONFIG_NLS_CODEPAGE_1250=y
# CONFIG_NLS_CODEPAGE_1251 is not setCONFIG_NLS_ASCII=yCONFIG_NLS_ISO8859_1=y
# CONFIG_NLS_ISO8859_2 is not setCONFIG_NLS_ISO8859_3=yCONFIG_NLS_ISO8859_4=y
# CONFIG_NLS_ISO8859_5 is not setCONFIG_NLS_ISO8859_6=yCONFIG_NLS_ISO8859_7=yCONFIG_NLS_ISO8859_9=y
# CONFIG_NLS_ISO8859_13 is not setCONFIG_NLS_ISO8859_14=yCONFIG_NLS_ISO8859_15=yCONFIG_NLS_KOI8_R=yCONFIG_NLS_KOI8_U=yCONFIG_NLS_MAC_ROMAN=y
# CONFIG_NLS_MAC_CELTIC is not set
# CONFIG_NLS_MAC_CENTEURO is not setCONFIG_NLS_MAC_CROATIAN=yCONFIG_NLS_MAC_CYRILLIC=yCONFIG_NLS_MAC_GAELIC=yCONFIG_NLS_MAC_GREEK=yCONFIG_NLS_MAC_ICELAND=y
# CONFIG_NLS_MAC_INUIT is not setCONFIG_NLS_MAC_ROMANIAN=yCONFIG_NLS_MAC_TURKISH=yCONFIG_NLS_UTF8=yCONFIG_NLS_UCS2_UTILS=yCONFIG_DLM=yCONFIG_DLM_DEBUG=y
# CONFIG_UNICODE is not setCONFIG_IO_WQ=y
# end of File systems
#
# Security options
#CONFIG_KEYS=yCONFIG_KEYS_REQUEST_CACHE=yCONFIG_PERSISTENT_KEYRINGS=y
# CONFIG_BIG_KEYS is not setCONFIG_TRUSTED_KEYS=yCONFIG_TRUSTED_KEYS_TPM=y
# CONFIG_TRUSTED_KEYS_TEE is not setCONFIG_ENCRYPTED_KEYS=yCONFIG_USER_DECRYPTED_DATA=yCONFIG_KEY_DH_OPERATIONS=yCONFIG_SECURITY_DMESG_RESTRICT=yCONFIG_SECURITY=yCONFIG_SECURITYFS=yCONFIG_SECURITY_NETWORK=yCONFIG_SECURITY_INFINIBAND=yCONFIG_SECURITY_NETWORK_XFRM=yCONFIG_SECURITY_PATH=yCONFIG_LSM_MMAP_MIN_ADDR=65536CONFIG_HARDENED_USERCOPY=y
# CONFIG_FORTIFY_SOURCE is not set
# CONFIG_STATIC_USERMODEHELPER is not setCONFIG_SECURITY_SELINUX=yCONFIG_SECURITY_SELINUX_BOOTPARAM=yCONFIG_SECURITY_SELINUX_DEVELOP=yCONFIG_SECURITY_SELINUX_AVC_STATS=y CONFIG_SECURITY_SELINUX_SIDTAB_HASH_BITS=9 CONFIG_SECURITY_SELINUX_SID2STR_CACHE_SIZE=256
# CONFIG_SECURITY_SELINUX_DEBUG is not set
# CONFIG_SECURITY_SMACK is not set
# CONFIG_SECURITY_TOMOYO is not setCONFIG_SECURITY_APPARMOR=y
# CONFIG_SECURITY_APPARMOR_DEBUG is not set
# CONFIG_SECURITY_APPARMOR_INTROSPECT_POLICY is not set
# CONFIG_SECURITY_APPARMOR_PARANOID_LOAD is not set CONFIG_SECURITY_LOADPIN=yCONFIG_SECURITY_LOADPIN_ENFORCE=y
# CONFIG_SECURITY_LOADPIN_VERITY is not setCONFIG_SECURITY_YAMA=y
# CONFIG_SECURITY_SAFESETID is not set
# CONFIG_SECURITY_LOCKDOWN_LSM is not set
# CONFIG_SECURITY_LANDLOCK is not set
# CONFIG_INTEGRITY is not setCONFIG_DEFAULT_SECURITY_SELINUX=y
# CONFIG_DEFAULT_SECURITY_APPARMOR is not set
# CONFIG_DEFAULT_SECURITY_DAC is not set CONFIG_LSM="landlock,lockdown,yama,loadpin,safesetid,selinux,smack,tomoyo,apparmor,bpf"
#
# Kernel hardening options
#
#
# Memory initialization
#CONFIG_INIT_STACK_NONE=yCONFIG_INIT_ON_ALLOC_DEFAULT_ON=y
# CONFIG_INIT_ON_FREE_DEFAULT_ON is not setCONFIG_CC_HAS_ZERO_CALL_USED_REGS=yCONFIG_ZERO_CALL_USED_REGS=y
# end of Memory initialization
#
# Hardening of kernel data structures
#CONFIG_LIST_HARDENED=y
# CONFIG_BUG_ON_DATA_CORRUPTION is not set
# end of Hardening of kernel data structures
CONFIG_RANDSTRUCT_NONE=y
# end of Kernel hardening options # end of Security options
CONFIG_XOR_BLOCKS=yCONFIG_ASYNC_CORE=yCONFIG_ASYNC_XOR=yCONFIG_ASYNC_TX_DISABLE_PQ_VAL_DMA=yCONFIG_ASYNC_TX_DISABLE_XOR_VAL_DMA=yCONFIG_CRYPTO=y
#
# Crypto core or helper
#CONFIG_CRYPTO_ALGAPI=yCONFIG_CRYPTO_ALGAPI2=yCONFIG_CRYPTO_AEAD=yCONFIG_CRYPTO_AEAD2=yCONFIG_CRYPTO_SIG2=yCONFIG_CRYPTO_SKCIPHER=yCONFIG_CRYPTO_SKCIPHER2=yCONFIG_CRYPTO_HASH=yCONFIG_CRYPTO_HASH2=yCONFIG_CRYPTO_RNG=yCONFIG_CRYPTO_RNG2=yCONFIG_CRYPTO_RNG_DEFAULT=yCONFIG_CRYPTO_AKCIPHER2=yCONFIG_CRYPTO_AKCIPHER=yCONFIG_CRYPTO_KPP2=yCONFIG_CRYPTO_KPP=yCONFIG_CRYPTO_ACOMP2=yCONFIG_CRYPTO_MANAGER=yCONFIG_CRYPTO_MANAGER2=yCONFIG_CRYPTO_USER=yCONFIG_CRYPTO_MANAGER_DISABLE_TESTS=yCONFIG_CRYPTO_NULL=yCONFIG_CRYPTO_NULL2=yCONFIG_CRYPTO_PCRYPT=yCONFIG_CRYPTO_CRYPTD=yCONFIG_CRYPTO_AUTHENC=yCONFIG_CRYPTO_SIMD=y
# end of Crypto core or helper
#
# Public-key cryptography
#CONFIG_CRYPTO_RSA=yCONFIG_CRYPTO_DH=yCONFIG_CRYPTO_DH_RFC7919_GROUPS=yCONFIG_CRYPTO_ECC=yCONFIG_CRYPTO_ECDH=yCONFIG_CRYPTO_ECDSA=y
# CONFIG_CRYPTO_ECRDSA is not setCONFIG_CRYPTO_SM2=yCONFIG_CRYPTO_CURVE25519=y
# end of Public-key cryptography
708 lines not shown · raw message
Part of this message is not shown here. View the raw message.
[tip: x86/fred] x86/fred: FRED entry/exit and dispatch code
In reply to Xin LiThe following commit has been merged into the x86/fred branch of tip:
The following commit has been merged into the x86/fred branch of tip:
Commit-ID: 6786137bf8fd717bed7ff9ce4eee34ce03a26631 Gitweb: https://git.kernel.org/tip/6786137bf8fd717bed7ff9ce4eee34ce03a26631 Author: H. Peter Anvin (Intel) <[email protected]> AuthorDate: Sat, 09 Dec 2023 13:42:14 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Tue, 30 Jan 2024 18:20:35 +01:00
x86/fred: FRED entry/exit and dispatch code
The code to actually handle kernel and event entry/exit using FRED. It is split up into two files thus:
- entry_64_fred.S contains the actual entrypoints and exit code, and saves and restores registers.
- entry_fred.c contains the two-level event dispatch code for FRED. The first-level dispatch is on the event type, and the second-level is on the event vector.
[ bp: Fold in an allmodconfig clang build fix:
https://lore.kernel.org/r/[email protected] and a CONFIG_IA32_EMULATION=n build fix: https://lore.kernel.org/r/[email protected]]
--- arch/x86/entry/Makefile | 5 +- arch/x86/entry/entry_64_fred.S | 50 +++++- arch/x86/entry/entry_fred.c | 245 +++++++++++++++++++++++++- arch/x86/include/asm/asm-prototypes.h | 1 +- arch/x86/include/asm/fred.h | 6 +- arch/x86/include/asm/ia32.h | 4 +- 6 files changed, 308 insertions(+), 3 deletions(-) create mode 100644 arch/x86/entry/entry_64_fred.S create mode 100644 arch/x86/entry/entry_fred.c
arch/x86/entry/Makefile +4 -1
@@ -18,6 +18,9 @@ obj-y += vdso/ obj-y += vsyscall/ obj-$(CONFIG_PREEMPTION) += thunk_$(BITS).o +CFLAGS_entry_fred.o += -fno-stack-protector +CFLAGS_REMOVE_entry_fred.o += -pg $(CC_FLAGS_FTRACE) +obj-$(CONFIG_X86_FRED) += entry_64_fred.o entry_fred.o + obj-$(CONFIG_IA32_EMULATION) += entry_64_compat.o syscall_32.o obj-$(CONFIG_X86_X32_ABI) += syscall_x32.o -
arch/x86/entry/entry_64_fred.S new file +50 -0
50 lines not on this page · raw message
arch/x86/entry/entry_fred.c new file +245 -0
245 lines not on this page · raw message
arch/x86/include/asm/asm-prototypes.h +1 -0
@@ -12,6 +12,7 @@#include <asm/special_insns.h> #include <asm/preempt.h> #include <asm/asm.h> +#include <asm/fred.h> #include <asm/gsseg.h> #ifndef CONFIG_X86_CMPXCHG64
arch/x86/include/asm/fred.h +6 -0
@@ -60,6 +60,12 @@ static __always_inline unsigned long fred_event_data(struct pt_regs *regs)return fred_info (regs)->edata; } +void asm_fred_entrypoint_user (void ); +void asm_fred_entrypoint_kernel (void ); + +__visible void fred_entry_from_user(struct pt_regs *regs); +__visible void fred_entry_from_kernel(struct pt_regs *regs); +#else /* CONFIG_X86_FRED */ static __always_inline unsigned long fred_event_data (struct pt_regs *regs) {return 0 ; }#endif /* CONFIG_X86_FRED */
arch/x86/include/asm/ia32.h +2 -2
@@ -69,7 +69,7 @@ extern void ia32_pick_mmap_layout(struct mm_struct *mm);extern bool __ia32_enabled; -static inline bool ia32_enabled (void ) +static __always_inline bool ia32_enabled(void) {return __ia32_enabled; }
@@ -81,7 +81,7 @@ static inline void ia32_disable(void)#else /* !CONFIG_IA32_EMULATION */ -static inline bool ia32_enabled (void ) +static __always_inline bool ia32_enabled(void) {return IS_ENABLED (CONFIG_X86_32 ); }