Re: [Xen-devel] [PATCH 2/3] x86/pv: Introduce and use x86emul_write_dr()

2018-04-13 Thread Jan Beulich
>>> On 13.04.18 at 13:37, wrote: > On 13/04/18 09:39, Jan Beulich wrote: > On 12.04.18 at 18:55, wrote: >>> @@ -2029,7 +2035,17 @@ long set_debugreg(struct vcpu *v, unsigned int reg, > unsigned long value) >>> if ( v == curr )

Re: [Xen-devel] [PATCH 2/3] x86/pv: Introduce and use x86emul_write_dr()

2018-04-13 Thread Andrew Cooper
On 13/04/18 09:39, Jan Beulich wrote: On 12.04.18 at 18:55, wrote: >> @@ -2029,7 +2035,17 @@ long set_debugreg(struct vcpu *v, unsigned int reg, >> unsigned long value) >> if ( v == curr ) >> write_debugreg(3, value); >> break; >> +

Re: [Xen-devel] [PATCH 2/3] x86/pv: Introduce and use x86emul_write_dr()

2018-04-13 Thread Jan Beulich
>>> On 12.04.18 at 18:55, wrote: > @@ -2029,7 +2035,17 @@ long set_debugreg(struct vcpu *v, unsigned int reg, > unsigned long value) > if ( v == curr ) > write_debugreg(3, value); > break; > + > +case 4: > +if (

[Xen-devel] [PATCH 2/3] x86/pv: Introduce and use x86emul_write_dr()

2018-04-12 Thread Andrew Cooper
set_debugreg() has several bugs: * %dr4/5 should function correctly as aliases of %dr6/7 when CR4.DE is clear. * Attempting to set the upper 32 bits of %dr6/7 should fail with #GP[0] rather than be silently corrected and complete. * For emulation, the #UD and #GP[0] cases need properly