Li, Xin B
2007-Oct-13 09:51 UTC
[Xen-devel] [PATCH][VMX] a small clean to vmx_world_restore
a small clean to vmx_world_restore. 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-Oct-13 10:49 UTC
Re: [Xen-devel] [PATCH][VMX] a small clean to vmx_world_restore
I think it''s correct as is and changing it in this way could break it. Whether a reference is acquired depends on new CR0.PG. Whether a reference is dropped depends on old CR0.PG. Which is how the code currently works. -- Keir On 13/10/07 10:51, "Li, Xin B" <xin.b.li@intel.com> wrote:> a small clean to vmx_world_restore. > 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-Oct-13 10:49 UTC
RE: [Xen-devel] [PATCH][VMX] a small clean to vmx_world_restore
If guest exits real mode, in vmx_world_restore, c->cr0 is equal to guest_cr0. -Xin>I think it''s correct as is and changing it in this way could break it. >Whether a reference is acquired depends on new CR0.PG. Whether >a reference >is dropped depends on old CR0.PG. Which is how the code >currently works. > > -- Keir > >On 13/10/07 10:51, "Li, Xin B" <xin.b.li@intel.com> wrote: > >> a small clean to vmx_world_restore. >> 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
Keir Fraser
2007-Oct-13 10:57 UTC
Re: [Xen-devel] [PATCH][VMX] a small clean to vmx_world_restore
The current code is correct in that case, and more generally, and also one line shorter than the proposed patch. -- Keir On 13/10/07 11:49, "Li, Xin B" <xin.b.li@intel.com> wrote:> If guest exits real mode, in vmx_world_restore, c->cr0 is equal to > guest_cr0. > -Xin > >> I think it''s correct as is and changing it in this way could break it. >> Whether a reference is acquired depends on new CR0.PG. Whether >> a reference >> is dropped depends on old CR0.PG. Which is how the code >> currently works. >> >> -- Keir >> >> On 13/10/07 10:51, "Li, Xin B" <xin.b.li@intel.com> wrote: >> >>> a small clean to vmx_world_restore. >>> 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-Oct-13 10:58 UTC
RE: [Xen-devel] [PATCH][VMX] a small clean to vmx_world_restore
In the case guest is setting PG, guest cr0 is just the value from c->cr0, why we need to have 2 if statement there. And having v->arch.guest_table = pagetable_from_pfn(mfn) in the case of PG is not set is pointless. -Xin> >The current code is correct in that case, and more generally, >and also one >line shorter than the proposed patch. > > -- Keir > >On 13/10/07 11:49, "Li, Xin B" <xin.b.li@intel.com> wrote: > >> If guest exits real mode, in vmx_world_restore, c->cr0 is equal to >> guest_cr0. >> -Xin >> >>> I think it''s correct as is and changing it in this way >could break it. >>> Whether a reference is acquired depends on new CR0.PG. Whether >>> a reference >>> is dropped depends on old CR0.PG. Which is how the code >>> currently works. >>> >>> -- Keir >>> >>> On 13/10/07 10:51, "Li, Xin B" <xin.b.li@intel.com> wrote: >>> >>>> a small clean to vmx_world_restore. >>>> 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