Li, Xin B
2007-Jul-10 15:52 UTC
[Xen-devel] [PATCH] vmwrite high 32 bits of 64bit VMCS fields when in PAE mode
vmwrite higher 32 bits of 64bit VMCS fields when in PAE mode. 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-Jul-10 17:57 UTC
Re: [Xen-devel] [PATCH] vmwrite high 32 bits of 64bit VMCS fields when in PAE mode
Is this necessary? Writes to low halves clear top halves, and these data structures will always be below 4GB, right? Are you just being super safe? :-) -- Keir On 10/7/07 16:52, "Li, Xin B" <xin.b.li@intel.com> wrote:> vmwrite higher 32 bits of 64bit VMCS fields when in PAE mode. > 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-Jul-10 22:07 UTC
Re: [Xen-devel] [PATCH] vmwrite high 32 bits of 64bit VMCS fields when in PAE mode
On 10/7/07 18:57, "Keir Fraser" <keir@xensource.com> wrote:> Is this necessary? Writes to low halves clear top halves, and these data > structures will always be below 4GB, right? > > Are you just being super safe? :-)Oh, furthermore with a 32-bit build of Xen we have to be safe for the case that VMX_BASIC_MSR[48]==1 (which Vol 3B Appendix G.1 says is true for non Intel64 CPUs like Yonah). In this case the physical pointers poked into the VMCS are limited to 32 bits. We may as well limit all such structures to below 4GB in all cases with a 32-bit build of Xen. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Li, Xin B
2007-Jul-11 03:29 UTC
RE: [Xen-devel] [PATCH] vmwrite high 32 bits of 64bit VMCS fields when in PAE mode
>-----Original Message----- >From: Keir Fraser [mailto:keir@xensource.com] >Sent: Wednesday, July 11, 2007 1:57 AM >To: Li, Xin B; xen-devel@lists.xensource.com >Subject: Re: [Xen-devel] [PATCH] vmwrite high 32 bits of 64bit >VMCS fields when in PAE mode > >Is this necessary? Writes to low halves clear top halves, and >these data structures will always be below 4GB, right?On PAE, I think it may be above 4G. -Xin _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Li, Xin B
2007-Jul-11 05:58 UTC
RE: [Xen-devel] [PATCH] vmwrite high 32 bits of 64bit VMCS fields when in PAE mode
>> Is this necessary? Writes to low halves clear top halves, and thesedata>> structures will always be below 4GB, right? >> >> Are you just being super safe? :-) > >Oh, furthermore with a 32-bit build of Xen we have to be safe for thecase>that VMX_BASIC_MSR[48]==1 (which Vol 3B Appendix G.1 says is true fornon>Intel64 CPUs like Yonah). In this case the physical pointers poked intothe>VMCS are limited to 32 bits. We may as well limit all such structuresto>below 4GB in all cases with a 32-bit build of Xen. >So we need keep this mind for all data structures referenced by pointers in a VMCS when on 32bit Xen, or maybe how about add a memory allocation function wrapper for this purpose? -Xin _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2007-Jul-11 06:59 UTC
Re: [Xen-devel] [PATCH] vmwrite high 32 bits of 64bit VMCS fields when in PAE mode
On 11/7/07 06:58, "Li, Xin B" <xin.b.li@intel.com> wrote:>> Oh, furthermore with a 32-bit build of Xen we have to be safe for the > case >> that VMX_BASIC_MSR[48]==1 (which Vol 3B Appendix G.1 says is true for > non >> Intel64 CPUs like Yonah). In this case the physical pointers poked into > the >> VMCS are limited to 32 bits. We may as well limit all such structures > to >> below 4GB in all cases with a 32-bit build of Xen. >> > > So we need keep this mind for all data structures referenced by pointers > in a VMCS when on 32bit Xen, or maybe how about add a memory allocation > function wrapper for this purpose?I think I fixed this now. Most of the structures were inside the Xen image (io_bitmap) or were allocated from Xen heap (msr_bitmap, vmcs, apic_access). The only exception was the apic_regs page -- I now restricted it to 32-bit addresses on a 32-bit build of Xen if running on an Intel CPU. Changeset 15526 in the staging tree. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel