Re: [PATCH 1/6] x86/entry: Introduce local_db_{save,restore}()
From: Peter Zijlstra
Date: Fri May 29 2020 - 15:05:18 EST
On Fri, May 29, 2020 at 10:28:33AM -0700, Andy Lutomirski wrote:
> > +static __always_inline unsigned long local_db_save(void)
> > +{
> > + unsigned long dr7;
> > +
> > + get_debugreg(&dr7, 7);
> > + dr7 ^= 0x400;
>
> Why xor? This seems extra confusing.
I'll do the normal mask thing ..