Re: [Xen-devel] [PATCH] x86emul: correct loading of %ss

2016-09-26 Thread Andrew Cooper
On 26/09/16 16:25, Jan Beulich wrote: On 26.09.16 at 15:40, wrote: >> On 21/09/16 10:05, Jan Beulich wrote: >>> - Instead of #NP, #SS needs to be raised for non-present descriptors. >>> - Loading a null selector is fine in 64-bit mode at CPL != 3, as long >>> as RPL == CPL. >>> - Don't lose

Re: [Xen-devel] [PATCH] x86emul: correct loading of %ss

2016-09-26 Thread Jan Beulich
>>> On 26.09.16 at 15:40, wrote: > On 21/09/16 10:05, Jan Beulich wrote: >> - Instead of #NP, #SS needs to be raised for non-present descriptors. >> - Loading a null selector is fine in 64-bit mode at CPL != 3, as long >> as RPL == CPL. >> - Don't lose the low two selector bits on null selector

Re: [Xen-devel] [PATCH] x86emul: correct loading of %ss

2016-09-26 Thread Jan Beulich
>>> On 26.09.16 at 15:40, wrote: > On 21/09/16 10:05, Jan Beulich wrote: >> @@ -1248,7 +1254,6 @@ protmode_load_seg( >> >> dpl = (desc.b >> 13) & 3; >> rpl = sel & 3; > > ... it occurs to me that the calculation of rpl can be moved up to its > declaration, which allows you to check (c

Re: [Xen-devel] [PATCH] x86emul: correct loading of %ss

2016-09-26 Thread Andrew Cooper
On 21/09/16 10:05, Jan Beulich wrote: > - Instead of #NP, #SS needs to be raised for non-present descriptors. > - Loading a null selector is fine in 64-bit mode at CPL != 3, as long > as RPL == CPL. > - Don't lose the low two selector bits on null selector loads (also > applies to %ds, %es, %fs