[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] x86/HVM: correct notion of new CPL in task switch emulation
On 01/06/17 13:11, Jan Beulich wrote: > Commit aac1df3d03 ("x86/HVM: introduce hvm_get_cpl() and respective > hook") went too far in one aspect: When emulating a task switch we > really shouldn't be looking at what hvm_get_cpl() returns, as we're > switching all segment registers. > > However, instead of reverting the relevant parts of that commit, have > the caller tell the segment loading function what the new CPL is. This > at once fixes ES being loaded before CS so far having had its checks > done against the old CPL. > > Reported-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> > Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> On further consideration, wouldn't it be better to audit all segment registers, before updating any of them in the vmcs/vmcb? This would leave us with a far lower chance of other vmentry failures. Loading the segment registers is beyond the commit point of a task switch, and the manual says that the processor will try to skip further segmentation checks in an attempt to deliver a fault in the new context. ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |