On Mon, Jan 30, 2012 at 04:26:06PM +0100, Kevin Wolf wrote:
Would that be enough or would we have to avoid clearing it in all other
places as well? Where would it be initialised if it's not enough?
Maybe vmx_vcpu_reset().
Do all CPL changes go through set_cr0/segment/rflags/cpl? I
On 01/31/2012 11:37 AM, Gleb Natapov wrote:
On Mon, Jan 30, 2012 at 04:26:06PM +0100, Kevin Wolf wrote:
Would that be enough or would we have to avoid clearing it in all other
places as well? Where would it be initialised if it's not enough?
Maybe vmx_vcpu_reset().
Do all CPL
On 01/27/2012 09:23 PM, Kevin Wolf wrote:
Task switches can switch between Protected Mode and VM86. The current
mode must be updated during the task switch emulation so that the new
segment selectors are interpreted correctly and privilege checks
succeed.
VMX code calculates the CPL from the
On Mon, Jan 30, 2012 at 12:24:11PM +0200, Avi Kivity wrote:
+
ctxt-ops-set_segment(ctxt, selector, desc, base3, seg);
}
@@ -2273,6 +2281,24 @@ static int load_state_from_tss32(struct
x86_emulate_ctxt *ctxt,
return emulate_gp(ctxt, 0);
ctxt-_eip = tss-eip;
Am 30.01.2012 11:24, schrieb Avi Kivity:
On 01/27/2012 09:23 PM, Kevin Wolf wrote:
Task switches can switch between Protected Mode and VM86. The current
mode must be updated during the task switch emulation so that the new
segment selectors are interpreted correctly and privilege checks
On Mon, Jan 30, 2012 at 12:05:37PM +0100, Kevin Wolf wrote:
+
+ /*
+ * If we're switching between Protected Mode and VM86, we need to make
+ * sure to update the mode before loading the segment descriptors so
+ * that the selectors are interpreted correctly.
+ *
+ * Need
On 01/30/2012 12:56 PM, Gleb Natapov wrote:
On Mon, Jan 30, 2012 at 12:24:11PM +0200, Avi Kivity wrote:
+
ctxt-ops-set_segment(ctxt, selector, desc, base3, seg);
}
@@ -2273,6 +2281,24 @@ static int load_state_from_tss32(struct
x86_emulate_ctxt *ctxt,
return
On Mon, Jan 30, 2012 at 02:02:14PM +0200, Avi Kivity wrote:
On 01/30/2012 12:56 PM, Gleb Natapov wrote:
On Mon, Jan 30, 2012 at 12:24:11PM +0200, Avi Kivity wrote:
+
ctxt-ops-set_segment(ctxt, selector, desc, base3, seg);
}
@@ -2273,6 +2281,24 @@ static int
On 01/30/2012 01:05 PM, Kevin Wolf wrote:
Am 30.01.2012 11:24, schrieb Avi Kivity:
On 01/27/2012 09:23 PM, Kevin Wolf wrote:
Task switches can switch between Protected Mode and VM86. The current
mode must be updated during the task switch emulation so that the new
segment selectors are
On 01/30/2012 02:04 PM, Gleb Natapov wrote:
On Mon, Jan 30, 2012 at 02:02:14PM +0200, Avi Kivity wrote:
On 01/30/2012 12:56 PM, Gleb Natapov wrote:
On Mon, Jan 30, 2012 at 12:24:11PM +0200, Avi Kivity wrote:
+
ctxt-ops-set_segment(ctxt, selector, desc, base3, seg);
}
Am 30.01.2012 14:23, schrieb Avi Kivity:
On 01/30/2012 01:05 PM, Kevin Wolf wrote:
Am 30.01.2012 11:24, schrieb Avi Kivity:
On 01/27/2012 09:23 PM, Kevin Wolf wrote:
Task switches can switch between Protected Mode and VM86. The current
mode must be updated during the task switch emulation so
On 01/30/2012 04:01 PM, Kevin Wolf wrote:
Am 30.01.2012 14:23, schrieb Avi Kivity:
On 01/30/2012 01:05 PM, Kevin Wolf wrote:
Am 30.01.2012 11:24, schrieb Avi Kivity:
On 01/27/2012 09:23 PM, Kevin Wolf wrote:
Task switches can switch between Protected Mode and VM86. The current
mode must
Am 30.01.2012 15:32, schrieb Avi Kivity:
On 01/30/2012 04:01 PM, Kevin Wolf wrote:
Am 30.01.2012 14:23, schrieb Avi Kivity:
On 01/30/2012 01:05 PM, Kevin Wolf wrote:
Am 30.01.2012 11:24, schrieb Avi Kivity:
On 01/27/2012 09:23 PM, Kevin Wolf wrote:
Task switches can switch between Protected
On 01/30/2012 05:26 PM, Kevin Wolf wrote:
My bet is that it will be 3 if eflags.vm=1 and unchanged otherwise --
the cpl update happens when the segment cache is updated. But that's
just a guess.
Does even anyone see the new CPL in error cases? An exception is thrown
immediately, so cs
On Mon, 30 Jan 2012 16:26:06 +0100
Kevin Wolf kw...@redhat.com wrote:
The other case is what we're looking at, task switch. To actually
update cpl, set_segment() needs to look at cr0.pe and eflags, but these
might not have been committed yet. It's all solvable but the solution
involves
Task switches can switch between Protected Mode and VM86. The current
mode must be updated during the task switch emulation so that the new
segment selectors are interpreted correctly and privilege checks
succeed.
VMX code calculates the CPL from the code segment selector and rflags,
so it needs
16 matches
Mail list logo