Home
last modified time | relevance | path

Searched refs:dr7 (Results 1 – 25 of 27) sorted by relevance

12

/linux-6.6.21/arch/x86/include/asm/
Ddebugreg.h119 unsigned long dr7; in local_db_save() local
124 get_debugreg(dr7, 7); in local_db_save()
125 dr7 &= ~0x400; /* architecturally set bit */ in local_db_save()
126 if (dr7) in local_db_save()
135 return dr7; in local_db_save()
138 static __always_inline void local_db_restore(unsigned long dr7) in local_db_restore() argument
146 if (dr7) in local_db_restore()
147 set_debugreg(dr7, 7); in local_db_restore()
Dhw_breakpoint.h70 int decode_dr7(unsigned long dr7, int bpnum, unsigned *len, unsigned *type);
Dsvm.h323 u64 dr7; member
380 u64 dr7; member
469 u64 dr7; member
Dkvm_host.h906 unsigned long dr7; member
/linux-6.6.21/arch/x86/kernel/
Dhw_breakpoint.c77 int decode_dr7(unsigned long dr7, int bpnum, unsigned *len, unsigned *type) in decode_dr7() argument
79 int bp_info = dr7 >> (DR_CONTROL_SHIFT + bpnum * DR_CONTROL_SIZE); in decode_dr7()
84 return (dr7 >> (bpnum * DR_ENABLE_SIZE)) & 0x3; in decode_dr7()
99 unsigned long *dr7; in arch_install_hw_breakpoint() local
119 dr7 = this_cpu_ptr(&cpu_dr7); in arch_install_hw_breakpoint()
120 *dr7 |= encode_dr7(i, info->len, info->type); in arch_install_hw_breakpoint()
128 set_debugreg(*dr7, 7); in arch_install_hw_breakpoint()
147 unsigned long dr7; in arch_uninstall_hw_breakpoint() local
164 dr7 = this_cpu_read(cpu_dr7); in arch_uninstall_hw_breakpoint()
165 dr7 &= ~__encode_dr7(i, info->len, info->type); in arch_uninstall_hw_breakpoint()
[all …]
Dptrace.c498 int dr7 = 0; in ptrace_get_dr7() local
504 dr7 |= encode_dr7(i, info->len, info->type); in ptrace_get_dr7()
508 return dr7; in ptrace_get_dr7()
Dtraps.c951 unsigned long dr7 = local_db_save(); in exc_debug_kernel() local
1008 local_db_restore(dr7); in exc_debug_kernel()
Dsev.c108 unsigned long dr7; member
1049 vmsa->dr7 = DR7_RESET_VALUE; in wakeup_cpu_via_vmgexit()
1639 data->dr7 = val; in vc_handle_dr7_write()
1657 *reg = data->dr7; in vc_handle_dr7_read()
/linux-6.6.21/tools/perf/arch/x86/tests/
Dbp-modify.c63 unsigned long rip = 0, dr7 = 1; in bp_modify1() local
96 offsetof(struct user, u_debugreg[7]), dr7)) { in bp_modify1()
140 unsigned long rip = 0, dr7 = 1; in bp_modify2() local
166 offsetof(struct user, u_debugreg[7]), dr7)) { in bp_modify2()
/linux-6.6.21/tools/testing/selftests/x86/
Dmov_ss_trap.c64 unsigned long dr0, dr1, dr7; in enable_watchpoint() local
68 dr7 = ((1UL << 1) | /* G0 */ in enable_watchpoint()
85 if (ptrace(PTRACE_POKEUSER, parent, (void *)offsetof(struct user, u_debugreg[7]), dr7) != 0) in enable_watchpoint()
88 printf("\tDR0 = %lx, DR1 = %lx, DR7 = %lx\n", dr0, dr1, dr7); in enable_watchpoint()
/linux-6.6.21/tools/testing/selftests/breakpoints/
Dbreakpoint_test.c59 unsigned long vdr7, dr7; in toggle_breakpoint() local
88 dr7 = ptrace(PTRACE_PEEKUSER, child_pid, in toggle_breakpoint()
104 dr7 |= vdr7; in toggle_breakpoint()
106 dr7 &= ~vdr7; in toggle_breakpoint()
109 offsetof(struct user, u_debugreg[7]), dr7); in toggle_breakpoint()
/linux-6.6.21/arch/x86/kvm/
Dsmm.h59 u32 dr7; member
130 u64 dr7; member
Dsmm.c52 CHECK_SMRAM32_OFFSET(dr7, 0xFFC8); in check_smram_offsets()
99 CHECK_SMRAM64_OFFSET(dr7, 0xFF60); in check_smram_offsets()
201 smram->dr7 = (u32)val; in enter_smm_save_state_32()
247 smram->dr7 = val; in enter_smm_save_state_64()
482 if (kvm_set_dr(vcpu, 7, smstate->dr7)) in rsm_load_state_32()
534 if (kvm_set_dr(vcpu, 7, smstate->dr7)) in rsm_load_state_64()
Dx86.c1348 unsigned long dr7; in kvm_update_dr7() local
1351 dr7 = vcpu->arch.guest_debug_dr7; in kvm_update_dr7()
1353 dr7 = vcpu->arch.dr7; in kvm_update_dr7()
1354 static_call(kvm_x86_set_dr7)(vcpu, dr7); in kvm_update_dr7()
1356 if (dr7 & DR7_BP_EN_MASK) in kvm_update_dr7()
1393 vcpu->arch.dr7 = (val & DR7_VOLATILE) | DR7_FIXED_1; in kvm_set_dr()
1416 *val = vcpu->arch.dr7; in kvm_get_dr()
5365 dbgregs->dr7 = vcpu->arch.dr7; in kvm_vcpu_ioctl_x86_get_debugregs()
5376 if (!kvm_dr7_valid(dbgregs->dr7)) in kvm_vcpu_ioctl_x86_set_debugregs()
5382 vcpu->arch.dr7 = dbgregs->dr7; in kvm_vcpu_ioctl_x86_set_debugregs()
[all …]
Demulate.c2929 ulong desc_addr, dr7; in emulator_do_task_switch() local
3013 ops->get_dr(ctxt, 7, &dr7); in emulator_do_task_switch()
3014 ops->set_dr(ctxt, 7, dr7 & ~(DR_LOCAL_ENABLE_MASK | DR_LOCAL_SLOWDOWN)); in emulator_do_task_switch()
3868 unsigned long dr7; in check_dr7_gd() local
3870 ctxt->ops->get_dr(ctxt, 7, &dr7); in check_dr7_gd()
3872 return dr7 & DR7_GD; in check_dr7_gd()
/linux-6.6.21/arch/x86/kernel/cpu/mce/
Dcore.c2147 unsigned long dr7; in DEFINE_IDTENTRY_MCE() local
2149 dr7 = local_db_save(); in DEFINE_IDTENTRY_MCE()
2151 local_db_restore(dr7); in DEFINE_IDTENTRY_MCE()
2157 unsigned long dr7; in DEFINE_IDTENTRY_MCE_USER() local
2159 dr7 = local_db_save(); in DEFINE_IDTENTRY_MCE_USER()
2161 local_db_restore(dr7); in DEFINE_IDTENTRY_MCE_USER()
2167 unsigned long dr7; in DEFINE_IDTENTRY_RAW() local
2169 dr7 = local_db_save(); in DEFINE_IDTENTRY_RAW()
2174 local_db_restore(dr7); in DEFINE_IDTENTRY_RAW()
/linux-6.6.21/arch/x86/kvm/svm/
Dnested.c288 if (CC(!kvm_dr6_valid(save->dr6)) || CC(!kvm_dr7_valid(save->dr7))) in __nested_vmcb_check_save()
393 to->dr7 = from->dr7; in __nested_copy_vmcb_save_to_cache()
586 vmcb02->save.dr7 = svm->nested.save.dr7 | DR7_FIXED_1; in nested_vmcb02_prepare_save()
1010 vmcb12->save.dr7 = vmcb02->save.dr7; in nested_svm_vmexit()
1117 svm->vcpu.arch.dr7 = DR7_FIXED_1; in nested_svm_vmexit()
1403 if (vcpu->arch.dr7 & DR7_GD) { in nested_svm_inject_exception_vmexit()
1404 vcpu->arch.dr7 &= ~DR7_GD; in nested_svm_inject_exception_vmexit()
Dsvm.h121 u64 dr7; member
Dsvm.c2039 vcpu->arch.dr7 = svm->vmcb->save.dr7; in svm_sync_dirty_debug_regs()
2051 svm->vmcb->save.dr7 = value; in svm_set_dr7()
2105 kvm_run->debug.arch.dr7 = svm->vmcb->save.dr7; in db_interception()
3429 "dr6:", save->dr6, "dr7:", save->dr7); in dump_vmcb()
Dsev.c577 if (svm->vcpu.guest_debug || (svm->vmcb->save.dr7 & ~DR7_FIXED_1)) in sev_es_sync_vmsa()
/linux-6.6.21/tools/arch/x86/include/uapi/asm/
Dkvm.h289 __u64 dr7; member
374 __u64 dr7; member
/linux-6.6.21/arch/x86/include/uapi/asm/
Dkvm.h289 __u64 dr7; member
374 __u64 dr7; member
/linux-6.6.21/tools/testing/selftests/kvm/lib/x86_64/
Dsvm.c94 asm volatile ("mov %%dr7, %0" : "=r"(save->dr7) : : "memory"); in generic_svm_setup()
/linux-6.6.21/tools/testing/selftests/kvm/include/x86_64/
Dsvm.h214 u64 dr7; member
/linux-6.6.21/arch/x86/kvm/vmx/
Dvmx.c5311 kvm_run->debug.arch.dr7 = vmcs_readl(GUEST_DR7); in handle_exception_nmi()
5532 int dr, dr7, reg; in handle_dr() local
5545 dr7 = vmcs_readl(GUEST_DR7); in handle_dr()
5546 if (dr7 & DR7_GD) { in handle_dr()
5554 vcpu->run->debug.arch.dr7 = dr7; in handle_dr()
5599 vcpu->arch.dr7 = vmcs_readl(GUEST_DR7); in vmx_sync_dirty_debug_regs()

12