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. -- Gleb. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
- Re: [PATCH v2 3/3] KVM: x86 emulator: Al... Gleb Natapov
- Re: [PATCH v2 3/3] KVM: x86 emulato... Avi Kivity
- Re: [PATCH v2 3/3] KVM: x86 emulator: Allow PM/V... Kevin Wolf
- Re: [PATCH v2 3/3] KVM: x86 emulator: Allow ... Gleb Natapov
- Re: [PATCH v2 3/3] KVM: x86 emulator: Allow ... Avi Kivity
- Re: [PATCH v2 3/3] KVM: x86 emulator: Al... Kevin Wolf
- Re: [PATCH v2 3/3] KVM: x86 emulato... Avi Kivity
- Re: [PATCH v2 3/3] KVM: x86 emu... Kevin Wolf
- Re: [PATCH v2 3/3] KVM: x86 emu... Avi Kivity
- Re: [PATCH v2 3/3] KVM: x86 emu... Takuya Yoshikawa
- Re: [PATCH v2 3/3] KVM: x86 emu... Gleb Natapov
- Re: [PATCH v2 3/3] KVM: x86 emu... Avi Kivity
- Re: [PATCH v2 0/3] Fix task switches into/out of VM86 Gleb Natapov
- Re: [PATCH v2 0/3] Fix task switches into/out of VM8... Kevin Wolf
- Re: [PATCH v2 0/3] Fix task switches into/out of... Gleb Natapov
- Re: [PATCH v2 0/3] Fix task switches into/ou... Gleb Natapov
- Re: [PATCH v2 0/3] Fix task switches into/ou... Kevin Wolf
- Re: [PATCH v2 0/3] Fix task switches int... Avi Kivity
- Re: [PATCH v2 0/3] Fix task switche... Gleb Natapov
- Re: [PATCH v2 0/3] Fix task swi... Avi Kivity
- Re: [PATCH v2 0/3] Fix task swi... Gleb Natapov