Re: [Qemu-devel] [PATCH 3/3] target-i386: get CPL from SS.DPL

2014-05-28 Thread Paolo Bonzini
Il 27/05/2014 22:30, Bandan Das ha scritto: @@ -996,15 +995,14 @@ static inline void cpu_x86_load_seg_cache(CPUX86State *env, #endif { /* legacy / compatibility case */ -if (!(env->cr[0] & CR0_PE_MASK)) -cpl = 0; -

Re: [Qemu-devel] [PATCH 3/3] target-i386: get CPL from SS.DPL

2014-05-27 Thread Bandan Das
Paolo Bonzini writes: > CS.RPL is not equal to the CPL in the few instructions between > setting CR0.PE and reloading CS. We get this right in the common > case, because writes to CR0 do not modify the CPL, but it would > not be enough if an SMI comes exactly during that brief period. > Were thi

Re: [Qemu-devel] [PATCH 3/3] target-i386: get CPL from SS.DPL

2014-05-21 Thread Kevin O'Connor
On Wed, May 21, 2014 at 04:18:22PM +0200, Paolo Bonzini wrote: > Il 21/05/2014 16:05, Kevin O'Connor ha scritto: > >On Wed, May 21, 2014 at 01:13:21PM +0200, Paolo Bonzini wrote: > >>I cannot reproduce this. I can see the breakage with current master, and I > >>can see your patch fixing it. It ke

Re: [Qemu-devel] [PATCH 3/3] target-i386: get CPL from SS.DPL

2014-05-21 Thread Paolo Bonzini
Il 21/05/2014 16:05, Kevin O'Connor ha scritto: On Wed, May 21, 2014 at 01:13:21PM +0200, Paolo Bonzini wrote: Il 20/05/2014 23:54, Kevin O'Connor ha scritto: On Fri, May 16, 2014 at 09:59:25PM +0200, Paolo Bonzini wrote: CS.RPL is not equal to the CPL in the few instructions between setting C

Re: [Qemu-devel] [PATCH 3/3] target-i386: get CPL from SS.DPL

2014-05-21 Thread Kevin O'Connor
On Wed, May 21, 2014 at 01:13:21PM +0200, Paolo Bonzini wrote: > Il 20/05/2014 23:54, Kevin O'Connor ha scritto: > >On Fri, May 16, 2014 at 09:59:25PM +0200, Paolo Bonzini wrote: > >>CS.RPL is not equal to the CPL in the few instructions between > >>setting CR0.PE and reloading CS. We get this rig

Re: [Qemu-devel] [PATCH 3/3] target-i386: get CPL from SS.DPL

2014-05-21 Thread Paolo Bonzini
Il 20/05/2014 23:54, Kevin O'Connor ha scritto: On Fri, May 16, 2014 at 09:59:25PM +0200, Paolo Bonzini wrote: CS.RPL is not equal to the CPL in the few instructions between setting CR0.PE and reloading CS. We get this right in the common case, because writes to CR0 do not modify the CPL, but i

Re: [Qemu-devel] [PATCH 3/3] target-i386: get CPL from SS.DPL

2014-05-20 Thread Kevin O'Connor
On Fri, May 16, 2014 at 09:59:25PM +0200, Paolo Bonzini wrote: > CS.RPL is not equal to the CPL in the few instructions between > setting CR0.PE and reloading CS. We get this right in the common > case, because writes to CR0 do not modify the CPL, but it would > not be enough if an SMI comes exact

[Qemu-devel] [PATCH 3/3] target-i386: get CPL from SS.DPL

2014-05-16 Thread Paolo Bonzini
CS.RPL is not equal to the CPL in the few instructions between setting CR0.PE and reloading CS. We get this right in the common case, because writes to CR0 do not modify the CPL, but it would not be enough if an SMI comes exactly during that brief period. Were this to happen, the RSM instruction w

Re: [Qemu-devel] [PATCH 3/3] target-i386: get CPL from SS.DPL

2014-05-16 Thread Paolo Bonzini
Il 15/05/2014 20:38, Kevin O'Connor ha scritto: On Thu, May 15, 2014 at 06:56:56PM +0200, Paolo Bonzini wrote: CS.RPL is not equal to the CPL in the few instructions between setting CR0.PE and reloading CS. We get this right in the common case, because writes to CR0 do not modify the CPL, but i

Re: [Qemu-devel] [PATCH 3/3] target-i386: get CPL from SS.DPL

2014-05-15 Thread Kevin O'Connor
On Thu, May 15, 2014 at 06:56:56PM +0200, Paolo Bonzini wrote: > CS.RPL is not equal to the CPL in the few instructions between > setting CR0.PE and reloading CS. We get this right in the common > case, because writes to CR0 do not modify the CPL, but it would > not be enough if an SMI comes exact

[Qemu-devel] [PATCH 3/3] target-i386: get CPL from SS.DPL

2014-05-15 Thread Paolo Bonzini
CS.RPL is not equal to the CPL in the few instructions between setting CR0.PE and reloading CS. We get this right in the common case, because writes to CR0 do not modify the CPL, but it would not be enough if an SMI comes exactly during that brief period. Were this to happen, the RSM instruction w