]> xenbits.xensource.com Git - xen.git/commit
x86/boot: Initialise the debug registers correctly
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 28 May 2018 14:18:17 +0000 (15:18 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 24 Oct 2018 13:43:05 +0000 (14:43 +0100)
commit721da6d41a70fe08b3fcd9c31a62f6709a54c6ba
treeeb97a30d4b46edea6c35bb55c65c5909f693def5
parente0b77cb77ef2b36b8cbd2273cff833f773208d0a
x86/boot: Initialise the debug registers correctly

In particular, initialising %dr6 with the value 0 is buggy, because on
hardware supporting Transactional Memory, it will cause the sticky RTM bit to
be asserted, even though a debug exception from a transaction hasn't actually
been observed.

Move X86_DR6_DEFAULT into x86-defns.h along with the other architectural
register constants, and introduce a new X86_DR7_DEFAULT.  Use the existing
write_debugreg() helper, rather than opencoded inline assembly.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
xen/arch/x86/cpu/common.c
xen/include/asm-x86/debugreg.h
xen/include/asm-x86/x86-defns.h