Re: [Xen-devel] [PATCH 03/11] x86: Initialise debug registers correctly

2018-06-08 Thread Jan Beulich
>>> On 08.06.18 at 17:42, wrote: > On 06/06/18 14:56, Jan Beulich wrote: > On 04.06.18 at 15:59, wrote: >>> --- a/xen/arch/x86/domain.c >>> +++ b/xen/arch/x86/domain.c >>> @@ -322,6 +322,14 @@ void free_vcpu_struct(struct vcpu *v) >>> free_xenheap_page(v); >>> } >>> >>> +static void

Re: [Xen-devel] [PATCH 03/11] x86: Initialise debug registers correctly

2018-06-08 Thread Andrew Cooper
On 06/06/18 14:56, Jan Beulich wrote: On 04.06.18 at 15:59, wrote: >> --- a/xen/arch/x86/domain.c >> +++ b/xen/arch/x86/domain.c >> @@ -322,6 +322,14 @@ void free_vcpu_struct(struct vcpu *v) >> free_xenheap_page(v); >> } >> >> +static void initialise_registers(struct vcpu *v) >> +{

Re: [Xen-devel] [PATCH 03/11] x86: Initialise debug registers correctly

2018-06-08 Thread Andrew Cooper
On 06/06/18 11:34, Roger Pau Monné wrote: > On Mon, Jun 04, 2018 at 02:59:07PM +0100, Andrew Cooper wrote: >> diff --git a/xen/arch/x86/cpu/common.c b/xen/arch/x86/cpu/common.c >> index 528aff1..0872466 100644 >> --- a/xen/arch/x86/cpu/common.c >> +++ b/xen/arch/x86/cpu/common.c >> @@ -3,6 +3,7 @@

Re: [Xen-devel] [PATCH 03/11] x86: Initialise debug registers correctly

2018-06-06 Thread Jan Beulich
>>> On 04.06.18 at 15:59, wrote: > --- a/xen/arch/x86/domain.c > +++ b/xen/arch/x86/domain.c > @@ -322,6 +322,14 @@ void free_vcpu_struct(struct vcpu *v) > free_xenheap_page(v); > } > > +static void initialise_registers(struct vcpu *v) > +{ > +v->arch.user_regs.eflags =

Re: [Xen-devel] [PATCH 03/11] x86: Initialise debug registers correctly

2018-06-06 Thread Roger Pau Monné
On Mon, Jun 04, 2018 at 02:59:07PM +0100, Andrew Cooper wrote: > In particular, initialising %dr6 with the value 0 is buggy, because on > hardware supporting Transnational Memory, it will cause the sticky RTM bit to > be asserted, even though a debug event from a transaction hasn't actually been >

[Xen-devel] [PATCH 03/11] x86: Initialise debug registers correctly

2018-06-04 Thread Andrew Cooper
In particular, initialising %dr6 with the value 0 is buggy, because on hardware supporting Transnational Memory, it will cause the sticky RTM bit to be asserted, even though a debug event from a transaction hasn't actually been observed. Introduce X86_DR7_DEFAULT to match the existing