Home
last modified time | relevance | path

Searched refs:cr4 (Results 1 – 25 of 82) sorted by relevance

1234

/linux-6.12.1/tools/testing/selftests/kvm/x86_64/
Dset_sregs_test.c46 uint64_t cr4; in calc_supported_cr4_feature_bits() local
48 cr4 = X86_CR4_VME | X86_CR4_PVI | X86_CR4_TSD | X86_CR4_DE | in calc_supported_cr4_feature_bits()
52 cr4 |= X86_CR4_UMIP; in calc_supported_cr4_feature_bits()
54 cr4 |= X86_CR4_LA57; in calc_supported_cr4_feature_bits()
56 cr4 |= X86_CR4_VMXE; in calc_supported_cr4_feature_bits()
58 cr4 |= X86_CR4_SMXE; in calc_supported_cr4_feature_bits()
60 cr4 |= X86_CR4_FSGSBASE; in calc_supported_cr4_feature_bits()
62 cr4 |= X86_CR4_PCIDE; in calc_supported_cr4_feature_bits()
64 cr4 |= X86_CR4_OSXSAVE; in calc_supported_cr4_feature_bits()
66 cr4 |= X86_CR4_SMEP; in calc_supported_cr4_feature_bits()
[all …]
Dcr4_cpuid_sync_test.c24 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()
Dsync_regs_test.c138 __u64 *cr4 = &run->s.regs.sregs.cr4; in race_sregs_cr4() local
139 __u64 pae_enabled = *cr4; in race_sregs_cr4()
140 __u64 pae_disabled = *cr4 & ~X86_CR4_PAE; in race_sregs_cr4()
144 WRITE_ONCE(*cr4, pae_enabled); in race_sregs_cr4()
148 WRITE_ONCE(*cr4, pae_disabled); in race_sregs_cr4()
178 TEST_ASSERT((run->s.regs.sregs.cr4 & X86_CR4_PAE) && in race_sync_regs()
181 !!(run->s.regs.sregs.cr4 & X86_CR4_PAE), in race_sync_regs()
Damx_test.c127 uint64_t cr4, xcr0; in init_regs() local
132 cr4 = get_cr4(); in init_regs()
133 cr4 |= X86_CR4_OSXSAVE; in init_regs()
134 set_cr4(cr4); in init_regs()
/linux-6.12.1/arch/x86/kvm/
Dsmm.c30 CHECK_SMRAM32_OFFSET(cr4, 0xFF14); in check_smram_offsets()
96 CHECK_SMRAM64_OFFSET(cr4, 0xFF48); in check_smram_offsets()
219 smram->cr4 = kvm_read_cr4(vcpu); in enter_smm_save_state_32()
244 smram->cr4 = kvm_read_cr4(vcpu); in enter_smm_save_state_64()
415 u64 cr0, u64 cr3, u64 cr4) in rsm_enter_protected_mode() argument
422 if (cr4 & X86_CR4_PCIDE) { in rsm_enter_protected_mode()
436 bad = kvm_set_cr4(vcpu, cr4 & ~X86_CR4_PCIDE); in rsm_enter_protected_mode()
444 if (cr4 & X86_CR4_PCIDE) { in rsm_enter_protected_mode()
445 bad = kvm_set_cr4(vcpu, cr4); in rsm_enter_protected_mode()
499 smstate->cr3, smstate->cr4); in rsm_load_state_32()
[all …]
Dsmm.h31 u32 cr4; member
127 u64 cr4; member
/linux-6.12.1/drivers/misc/lkdtm/
Dbugs.c558 unsigned long cr4; in lkdtm_UNSET_SMEP() local
561 cr4 = native_read_cr4(); in lkdtm_UNSET_SMEP()
563 if ((cr4 & X86_CR4_SMEP) != X86_CR4_SMEP) { in lkdtm_UNSET_SMEP()
567 cr4 &= ~(X86_CR4_SMEP); in lkdtm_UNSET_SMEP()
570 native_write_cr4(cr4); in lkdtm_UNSET_SMEP()
571 if (cr4 == native_read_cr4()) { in lkdtm_UNSET_SMEP()
573 cr4 |= X86_CR4_SMEP; in lkdtm_UNSET_SMEP()
575 native_write_cr4(cr4); in lkdtm_UNSET_SMEP()
605 direct_write_cr4(cr4); in lkdtm_UNSET_SMEP()
610 cr4 |= X86_CR4_SMEP; in lkdtm_UNSET_SMEP()
[all …]
/linux-6.12.1/arch/x86/power/
Dhibernate_asm_32.S55 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
Dhibernate_asm_64.S36 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
Dcpu.c126 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.12.1/arch/x86/kernel/
Dsev_verify_cbit.S35 movq %cr4, %rsi
40 movq %rdx, %cr4
71 movq %rsi, %cr4
Drelocate_kernel_64.S73 movq %cr4, %rax
128 movq %cr4, %rax
130 movq %rax, %cr4
158 movq %r13, %cr4
240 movq %rax, %cr4
Dprocess_32.c62 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()
Drelocate_kernel_32.S56 movl %cr4, %eax
129 movl %eax, %cr4
207 movl %eax, %cr4
Dprocess.c683 unsigned long newval, cr4 = this_cpu_read(cpu_tlbstate.cr4); in cr4_toggle_bits_irqsoff() local
685 newval = cr4 ^ mask; in cr4_toggle_bits_irqsoff()
686 if (newval != cr4) { in cr4_toggle_bits_irqsoff()
687 this_cpu_write(cpu_tlbstate.cr4, newval); in cr4_toggle_bits_irqsoff()
/linux-6.12.1/arch/x86/kernel/cpu/mtrr/
Dcyrix.c135 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.12.1/arch/x86/include/asm/
Dtlbflush.h129 unsigned long cr4; member
180 this_cpu_write(cpu_tlbstate.cr4, __read_cr4()); in cr4_init_shadow()
421 static inline void __native_tlb_flush_global(unsigned long cr4) in __native_tlb_flush_global() argument
423 native_write_cr4(cr4 ^ X86_CR4_PGE); in __native_tlb_flush_global()
424 native_write_cr4(cr4); in __native_tlb_flush_global()
/linux-6.12.1/arch/x86/kernel/acpi/
Dmadt_playdead.S18 movq %cr4, %rdx
20 movq %rdx, %cr4
/linux-6.12.1/arch/x86/mm/
Dmem_encrypt_boot.S102 mov %cr4, %rdx
104 mov %rdx, %cr4
106 mov %rdx, %cr4
/linux-6.12.1/arch/x86/boot/compressed/
Dhead_64.S169 movl %cr4, %eax
171 movl %eax, %cr4
402 movq %cr4, %rax
404 movq %rax, %cr4
558 movl %cr4, %eax
560 movl %eax, %cr4
/linux-6.12.1/arch/x86/platform/pvh/
Dhead.S95 mov %cr4, %eax
97 mov %eax, %cr4
209 mov %cr4, %eax
211 mov %eax, %cr4
/linux-6.12.1/include/xen/interface/hvm/
Dhvm_vcpu.h25 uint32_t cr4; member
88 uint64_t cr4; member
/linux-6.12.1/tools/testing/selftests/kvm/lib/x86_64/
Dvmx.c121 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.12.1/arch/x86/platform/olpc/
Dxo1-wakeup.S30 movl %eax, %cr4
64 movl %cr4, %edx
/linux-6.12.1/arch/x86/kernel/cpu/
Dcommon.c451 unsigned long newval, cr4 = this_cpu_read(cpu_tlbstate.cr4); in cr4_update_irqsoff() local
455 newval = (cr4 & ~clear) | set; in cr4_update_irqsoff()
456 if (newval != cr4) { in cr4_update_irqsoff()
457 this_cpu_write(cpu_tlbstate.cr4, newval); in cr4_update_irqsoff()
466 return this_cpu_read(cpu_tlbstate.cr4); in cr4_read_shadow()
472 unsigned long cr4 = __read_cr4(); in cr4_init() local
475 cr4 |= X86_CR4_PCIDE; in cr4_init()
477 cr4 = (cr4 & ~cr4_pinned_mask) | cr4_pinned_bits; in cr4_init()
479 __write_cr4(cr4); in cr4_init()
482 this_cpu_write(cpu_tlbstate.cr4, cr4); in cr4_init()
[all …]

1234