/linux-6.6.21/tools/testing/selftests/kvm/x86_64/ |
D | set_sregs_test.c | 47 uint64_t cr4; in calc_supported_cr4_feature_bits() local 49 cr4 = X86_CR4_VME | X86_CR4_PVI | X86_CR4_TSD | X86_CR4_DE | in calc_supported_cr4_feature_bits() 53 cr4 |= X86_CR4_UMIP; in calc_supported_cr4_feature_bits() 55 cr4 |= X86_CR4_LA57; in calc_supported_cr4_feature_bits() 57 cr4 |= X86_CR4_VMXE; in calc_supported_cr4_feature_bits() 59 cr4 |= X86_CR4_SMXE; in calc_supported_cr4_feature_bits() 61 cr4 |= X86_CR4_FSGSBASE; in calc_supported_cr4_feature_bits() 63 cr4 |= X86_CR4_PCIDE; in calc_supported_cr4_feature_bits() 65 cr4 |= X86_CR4_OSXSAVE; in calc_supported_cr4_feature_bits() 67 cr4 |= X86_CR4_SMEP; in calc_supported_cr4_feature_bits() [all …]
|
D | cr4_cpuid_sync_test.c | 24 uint64_t cr4 = get_cr4(); in cr4_cpuid_is_sync() local 26 return (this_cpu_has(X86_FEATURE_OSXSAVE) == !!(cr4 & X86_CR4_OSXSAVE)); in cr4_cpuid_is_sync() 31 uint64_t cr4; in guest_code() local 34 cr4 = get_cr4(); in guest_code() 35 cr4 |= X86_CR4_OSXSAVE; in guest_code() 36 set_cr4(cr4); in guest_code() 69 sregs.cr4 &= ~X86_CR4_OSXSAVE; in main()
|
D | sync_regs_test.c | 137 __u64 *cr4 = &run->s.regs.sregs.cr4; in race_sregs_cr4() local 138 __u64 pae_enabled = *cr4; in race_sregs_cr4() 139 __u64 pae_disabled = *cr4 & ~X86_CR4_PAE; in race_sregs_cr4() 143 WRITE_ONCE(*cr4, pae_enabled); in race_sregs_cr4() 147 WRITE_ONCE(*cr4, pae_disabled); in race_sregs_cr4() 180 TEST_ASSERT((run->s.regs.sregs.cr4 & X86_CR4_PAE) && in race_sync_regs() 183 !!(run->s.regs.sregs.cr4 & X86_CR4_PAE), in race_sync_regs()
|
D | amx_test.c | 129 uint64_t cr4, xcr0; in init_regs() local 134 cr4 = get_cr4(); in init_regs() 135 cr4 |= X86_CR4_OSXSAVE; in init_regs() 136 set_cr4(cr4); in init_regs()
|
/linux-6.6.21/drivers/misc/lkdtm/ |
D | bugs.c | 501 unsigned long cr4; in lkdtm_UNSET_SMEP() local 504 cr4 = native_read_cr4(); in lkdtm_UNSET_SMEP() 506 if ((cr4 & X86_CR4_SMEP) != X86_CR4_SMEP) { in lkdtm_UNSET_SMEP() 510 cr4 &= ~(X86_CR4_SMEP); in lkdtm_UNSET_SMEP() 513 native_write_cr4(cr4); in lkdtm_UNSET_SMEP() 514 if (cr4 == native_read_cr4()) { in lkdtm_UNSET_SMEP() 516 cr4 |= X86_CR4_SMEP; in lkdtm_UNSET_SMEP() 518 native_write_cr4(cr4); in lkdtm_UNSET_SMEP() 548 direct_write_cr4(cr4); in lkdtm_UNSET_SMEP() 553 cr4 |= X86_CR4_SMEP; in lkdtm_UNSET_SMEP() [all …]
|
/linux-6.6.21/arch/x86/kvm/ |
D | smm.c | 30 CHECK_SMRAM32_OFFSET(cr4, 0xFF14); in check_smram_offsets() 96 CHECK_SMRAM64_OFFSET(cr4, 0xFF48); in check_smram_offsets() 222 smram->cr4 = kvm_read_cr4(vcpu); in enter_smm_save_state_32() 251 smram->cr4 = kvm_read_cr4(vcpu); in enter_smm_save_state_64() 423 u64 cr0, u64 cr3, u64 cr4) in rsm_enter_protected_mode() argument 430 if (cr4 & X86_CR4_PCIDE) { in rsm_enter_protected_mode() 444 bad = kvm_set_cr4(vcpu, cr4 & ~X86_CR4_PCIDE); in rsm_enter_protected_mode() 452 if (cr4 & X86_CR4_PCIDE) { in rsm_enter_protected_mode() 453 bad = kvm_set_cr4(vcpu, cr4); in rsm_enter_protected_mode() 507 smstate->cr3, smstate->cr4); in rsm_load_state_32() [all …]
|
D | smm.h | 31 u32 cr4; member 127 u64 cr4; member
|
/linux-6.6.21/arch/x86/power/ |
D | hibernate_asm_32.S | 55 jecxz 1f # cr4 Pentium and higher, skip if zero 57 movl %ecx, %cr4; # turn off PGE 89 jecxz 1f # cr4 Pentium and higher, skip if zero 90 movl %ecx, %cr4; # turn PGE back on
|
D | hibernate_asm_64.S | 36 movq %rdx, %cr4; # turn off PGE 39 movq %rax, %cr4; # turn PGE back on 127 movq %rcx, %cr4; # turn off PGE 130 movq %rbx, %cr4; # turn PGE back on
|
D | cpu.c | 126 ctxt->cr4 = __read_cr4(); in __save_processor_state() 206 if (ctxt->cr4) in __restore_processor_state() 207 __write_cr4(ctxt->cr4); in __restore_processor_state() 211 __write_cr4(ctxt->cr4); in __restore_processor_state()
|
/linux-6.6.21/arch/x86/kernel/ |
D | sev_verify_cbit.S | 35 movq %cr4, %rsi 40 movq %rdx, %cr4 71 movq %rsi, %cr4
|
D | relocate_kernel_64.S | 71 movq %cr4, %rax 126 movq %cr4, %rax 128 movq %rax, %cr4 154 movq %rax, %cr4 238 movq %rax, %cr4
|
D | process_32.c | 62 unsigned long cr0 = 0L, cr2 = 0L, cr3 = 0L, cr4 = 0L; in __show_regs() local 83 cr4 = __read_cr4(); in __show_regs() 85 log_lvl, cr0, cr2, cr3, cr4); in __show_regs()
|
D | head_64.S | 177 movq %cr4, %rcx 191 movq %rcx, %cr4 219 movq %cr4, %rcx 222 movq %rcx, %cr4 223 movq %rax, %cr4
|
D | relocate_kernel_32.S | 56 movl %cr4, %eax 129 movl %eax, %cr4 207 movl %eax, %cr4
|
/linux-6.6.21/arch/x86/platform/pvh/ |
D | head.S | 74 mov %cr4, %eax 76 mov %eax, %cr4 133 mov %cr4, %eax 135 mov %eax, %cr4
|
/linux-6.6.21/arch/x86/kernel/cpu/mtrr/ |
D | cyrix.c | 135 static u32 cr4, ccr3; variable 143 cr4 = __read_cr4(); in prepare_set() 144 __write_cr4(cr4 & ~X86_CR4_PGE); in prepare_set() 176 __write_cr4(cr4); in post_set()
|
/linux-6.6.21/arch/x86/include/asm/ |
D | tlbflush.h | 129 unsigned long cr4; member 180 this_cpu_write(cpu_tlbstate.cr4, __read_cr4()); in cr4_init_shadow() 422 static inline void __native_tlb_flush_global(unsigned long cr4) in __native_tlb_flush_global() argument 424 native_write_cr4(cr4 ^ X86_CR4_PGE); in __native_tlb_flush_global() 425 native_write_cr4(cr4); in __native_tlb_flush_global()
|
D | suspend_32.h | 20 unsigned long cr0, cr2, cr3, cr4; member
|
/linux-6.6.21/arch/x86/mm/ |
D | mem_encrypt_boot.S | 102 mov %cr4, %rdx 104 mov %rdx, %cr4 106 mov %rdx, %cr4
|
/linux-6.6.21/include/xen/interface/hvm/ |
D | hvm_vcpu.h | 25 uint32_t cr4; member 88 uint64_t cr4; member
|
/linux-6.6.21/tools/testing/selftests/kvm/lib/x86_64/ |
D | vmx.c | 121 unsigned long cr4; in prepare_for_vmx_operation() local 133 __asm__ __volatile__("mov %%cr4, %0" : "=r"(cr4) : : "memory"); in prepare_for_vmx_operation() 134 cr4 &= rdmsr(MSR_IA32_VMX_CR4_FIXED1); in prepare_for_vmx_operation() 135 cr4 |= rdmsr(MSR_IA32_VMX_CR4_FIXED0); in prepare_for_vmx_operation() 137 cr4 |= X86_CR4_VMXE; in prepare_for_vmx_operation() 138 __asm__ __volatile__("mov %0, %%cr4" : : "r"(cr4) : "memory"); in prepare_for_vmx_operation()
|
/linux-6.6.21/arch/x86/platform/olpc/ |
D | xo1-wakeup.S | 30 movl %eax, %cr4 64 movl %cr4, %edx
|
/linux-6.6.21/arch/x86/kernel/cpu/ |
D | common.c | 452 unsigned long newval, cr4 = this_cpu_read(cpu_tlbstate.cr4); in cr4_update_irqsoff() local 456 newval = (cr4 & ~clear) | set; in cr4_update_irqsoff() 457 if (newval != cr4) { in cr4_update_irqsoff() 458 this_cpu_write(cpu_tlbstate.cr4, newval); in cr4_update_irqsoff() 467 return this_cpu_read(cpu_tlbstate.cr4); in cr4_read_shadow() 473 unsigned long cr4 = __read_cr4(); in cr4_init() local 476 cr4 |= X86_CR4_PCIDE; in cr4_init() 478 cr4 = (cr4 & ~cr4_pinned_mask) | cr4_pinned_bits; in cr4_init() 480 __write_cr4(cr4); in cr4_init() 483 this_cpu_write(cpu_tlbstate.cr4, cr4); in cr4_init() [all …]
|
/linux-6.6.21/arch/x86/boot/compressed/ |
D | head_64.S | 169 movl %cr4, %eax 171 movl %eax, %cr4 553 movl %cr4, %eax 555 movl %eax, %cr4
|