Li, Xin B
2007-Aug-13 14:52 UTC
[Xen-devel] [PATCH] clean up vmx_world_restore and its comments.
Clean up vmx_world_restore and its comments. Also some other small cleanups. Signed-off-by: Xin Li <xin.b.li@intel.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2007-Aug-13 16:21 UTC
Re: [Xen-devel] [PATCH] clean up vmx_world_restore and its comments.
+ /* guest setup page table in real mode, and enables PE, then PG. */ + if ( !hvm_paging_enabled(v) && v->arch.hvm_vmx.vmxassist_enabled ) + v->arch.hvm_vcpu.guest_cr[3] = c->cr3; Any reason to gate this on vmxassist_enabled? Must you avoid modifying guest_cr[3] when switching into vmxassist mode? I''d really expect this code to just look a lot like vmx_vmcs_restore(). That is, update all of CR0-CR4, then unconditionally get a reference on cr3 (if paging enabled) and drop old cr3 reference. -- Keir On 13/8/07 15:52, "Li, Xin B" <xin.b.li@intel.com> wrote:> Clean up vmx_world_restore and its comments. > Also some other small cleanups. > Signed-off-by: Xin Li <xin.b.li@intel.com> > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Li, Xin B
2007-Aug-13 16:44 UTC
RE: [Xen-devel] [PATCH] clean up vmx_world_restore and its comments.
>+ /* guest setup page table in real mode, and enables PE, >then PG. */ >+ if ( !hvm_paging_enabled(v) && v->arch.hvm_vmx.vmxassist_enabled ) >+ v->arch.hvm_vcpu.guest_cr[3] = c->cr3; > >Any reason to gate this on vmxassist_enabled? Must you avoid modifying >guest_cr[3] when switching into vmxassist mode?No, this happens only when guest exits vmxassist mode.> >I''d really expect this code to just look a lot like vmx_vmcs_restore().That>is, update all of CR0-CR4, then unconditionally get a >reference on cr3 (if paging enabled) and drop old cr3 reference. >I think it is. -Xin _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel