]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/traps: Initialize DR7 by writing its architectural reset value
authorXin Li (Intel) <xin@zytor.com>
Fri, 20 Jun 2025 23:15:04 +0000 (16:15 -0700)
committerDave Hansen <dave.hansen@linux.intel.com>
Tue, 24 Jun 2025 20:15:52 +0000 (13:15 -0700)
commitfa7d0f83c5c4223a01598876352473cb3d3bd4d7
tree984f664e2f605c15ae589c47af83d80b8d7f1e0b
parent5f465c148c61e876b6d6eacd8e8e365f2d47758f
x86/traps: Initialize DR7 by writing its architectural reset value

Initialize DR7 by writing its architectural reset value to always set
bit 10, which is reserved to '1', when "clearing" DR7 so as not to
trigger unanticipated behavior if said bit is ever unreserved, e.g. as
a feature enabling flag with inverted polarity.

Signed-off-by: Xin Li (Intel) <xin@zytor.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Reviewed-by: Sohil Mehta <sohil.mehta@intel.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Sean Christopherson <seanjc@google.com>
Tested-by: Sohil Mehta <sohil.mehta@intel.com>
Cc:stable@vger.kernel.org
Link: https://lore.kernel.org/all/20250620231504.2676902-3-xin%40zytor.com
arch/x86/include/asm/debugreg.h
arch/x86/include/asm/kvm_host.h
arch/x86/kernel/cpu/common.c
arch/x86/kernel/kgdb.c
arch/x86/kernel/process_32.c
arch/x86/kernel/process_64.c
arch/x86/kvm/x86.c