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 changes go through set_cr0/segment/rflags/cpl? I guess yes, > > so initialising on reset and keeping it valid all the time should be > > possible indeed. > > > CPL can be changed while guest is running. SVM saves it for us in cpl > field. VMX does not, so we either will have to update cpl on each exit > (cpl = cs & 3) or somehow mark it not up-to-date and recalculate on > access. Can VMX exit while cpl != cs & 3 or can this happen only during > emulation? If it can we cannot know real cpl after exit. > Perhaps it can, with unrestricted guests, but I think we don't allow those conditions (we trap cr0 writes). -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html