Re: KVM: VMX: fix incorrect cached cpl value with real/v8086 modes (v3)

2013-01-08 Thread Gleb Natapov
On Mon, Jan 07, 2013 at 07:27:06PM -0200, Marcelo Tosatti wrote: > > CPL is always 0 when in real mode, and always 3 when virtual 8086 mode. > > Using values other than those can cause failures on operations that > check CPL. > > Signed-off-by: Marcelo Tosatti > Reviewed-by: Gleb Natapov > d

KVM: VMX: fix incorrect cached cpl value with real/v8086 modes (v3)

2013-01-07 Thread Marcelo Tosatti
CPL is always 0 when in real mode, and always 3 when virtual 8086 mode. Using values other than those can cause failures on operations that check CPL. Signed-off-by: Marcelo Tosatti diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 55dfc37..dd2a85c 100644 --- a/arch/x86/kvm/vmx.c +++

Re: KVM: VMX: fix incorrect cached cpl value with real/v8086 modes

2013-01-04 Thread Gleb Natapov
On Thu, Jan 03, 2013 at 11:19:18AM -0200, Marcelo Tosatti wrote: > On Thu, Jan 03, 2013 at 10:11:53AM +0200, Gleb Natapov wrote: > > > FreeBSD 9.1 with -smp 2. > > I cannot reproduce. I do see boot failure on the next branch with 9.[01] > > 64 bit -smp 2 here, but it is caused but segment registers

Re: KVM: VMX: fix incorrect cached cpl value with real/v8086 modes

2013-01-03 Thread Marcelo Tosatti
On Thu, Jan 03, 2013 at 10:11:53AM +0200, Gleb Natapov wrote: > > FreeBSD 9.1 with -smp 2. > I cannot reproduce. I do see boot failure on the next branch with 9.[01] > 64 bit -smp 2 here, but it is caused but segment registers been all > incorrect on a secondary vcpu and this patch does not help. A

KVM: VMX: fix incorrect cached cpl value with real/v8086 modes (v2)

2013-01-03 Thread Marcelo Tosatti
CPL is always 0 when in real mode, and always 3 when virtual 8086 mode. Using values other than those can cause failures on operations that check CPL. Signed-off-by: Marcelo Tosatti diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 55dfc37..849f5f2 100644 --- a/arch/x86/kvm/vmx.c +++

Re: KVM: VMX: fix incorrect cached cpl value with real/v8086 modes

2013-01-03 Thread Gleb Natapov
On Tue, Jan 01, 2013 at 09:36:38PM -0200, Marcelo Tosatti wrote: > On Wed, Dec 26, 2012 at 03:33:16PM +0200, Gleb Natapov wrote: > > On Wed, Dec 26, 2012 at 11:25:24AM -0200, Marcelo Tosatti wrote: > > > On Wed, Dec 26, 2012 at 07:25:49AM +0200, Gleb Natapov wrote: > > > > On Tue, Dec 25, 2012 at 0

Re: KVM: VMX: fix incorrect cached cpl value with real/v8086 modes

2013-01-01 Thread Marcelo Tosatti
On Wed, Dec 26, 2012 at 03:33:16PM +0200, Gleb Natapov wrote: > On Wed, Dec 26, 2012 at 11:25:24AM -0200, Marcelo Tosatti wrote: > > On Wed, Dec 26, 2012 at 07:25:49AM +0200, Gleb Natapov wrote: > > > On Tue, Dec 25, 2012 at 07:37:10PM -0200, Marcelo Tosatti wrote: > > > > On Tue, Dec 25, 2012 at 0

Re: KVM: VMX: fix incorrect cached cpl value with real/v8086 modes

2013-01-01 Thread Marcelo Tosatti
On Sat, Dec 22, 2012 at 02:31:10PM +0200, Avi Kivity wrote: > On Wed, Dec 19, 2012 at 3:29 PM, Marcelo Tosatti wrote: > > > > > > > CPL is always 0 when in real mode, and always 3 when virtual 8086 mode. > > > > Using values other than those can cause failures on operations that check > > CPL. > >

Re: KVM: VMX: fix incorrect cached cpl value with real/v8086 modes

2012-12-26 Thread Gleb Natapov
On Wed, Dec 26, 2012 at 11:25:24AM -0200, Marcelo Tosatti wrote: > On Wed, Dec 26, 2012 at 07:25:49AM +0200, Gleb Natapov wrote: > > On Tue, Dec 25, 2012 at 07:37:10PM -0200, Marcelo Tosatti wrote: > > > On Tue, Dec 25, 2012 at 02:48:08PM +0200, Gleb Natapov wrote: > > > > On Sat, Dec 22, 2012 at 0

Re: KVM: VMX: fix incorrect cached cpl value with real/v8086 modes

2012-12-26 Thread Marcelo Tosatti
On Wed, Dec 26, 2012 at 07:25:49AM +0200, Gleb Natapov wrote: > On Tue, Dec 25, 2012 at 07:37:10PM -0200, Marcelo Tosatti wrote: > > On Tue, Dec 25, 2012 at 02:48:08PM +0200, Gleb Natapov wrote: > > > On Sat, Dec 22, 2012 at 02:31:10PM +0200, Avi Kivity wrote: > > > > On Wed, Dec 19, 2012 at 3:29 P

Re: KVM: VMX: fix incorrect cached cpl value with real/v8086 modes

2012-12-25 Thread Gleb Natapov
On Tue, Dec 25, 2012 at 07:37:10PM -0200, Marcelo Tosatti wrote: > On Tue, Dec 25, 2012 at 02:48:08PM +0200, Gleb Natapov wrote: > > On Sat, Dec 22, 2012 at 02:31:10PM +0200, Avi Kivity wrote: > > > On Wed, Dec 19, 2012 at 3:29 PM, Marcelo Tosatti > > > wrote: > > > > > > > > > > > > > > > CPL is

Re: KVM: VMX: fix incorrect cached cpl value with real/v8086 modes

2012-12-25 Thread Marcelo Tosatti
On Tue, Dec 25, 2012 at 02:48:08PM +0200, Gleb Natapov wrote: > On Sat, Dec 22, 2012 at 02:31:10PM +0200, Avi Kivity wrote: > > On Wed, Dec 19, 2012 at 3:29 PM, Marcelo Tosatti wrote: > > > > > > > > > > > CPL is always 0 when in real mode, and always 3 when virtual 8086 mode. > > > > > > Using va

Re: KVM: VMX: fix incorrect cached cpl value with real/v8086 modes

2012-12-25 Thread Gleb Natapov
On Sat, Dec 22, 2012 at 02:31:10PM +0200, Avi Kivity wrote: > On Wed, Dec 19, 2012 at 3:29 PM, Marcelo Tosatti wrote: > > > > > > > CPL is always 0 when in real mode, and always 3 when virtual 8086 mode. > > > > Using values other than those can cause failures on operations that check > > CPL. > >

KVM: VMX: fix incorrect cached cpl value with real/v8086 modes

2012-12-19 Thread Marcelo Tosatti
CPL is always 0 when in real mode, and always 3 when virtual 8086 mode. Using values other than those can cause failures on operations that check CPL. Signed-off-by: Marcelo Tosatti diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index a4ecf7c..3abe433 100644 --- a/arch/x86/kvm/vmx.c +++