Dave McCracken
2009-Sep-14 17:27 UTC
[Xen-devel] [PATCH xen-unstable] Remove PSE flag from guest CR4
When I originally did the Xen hypervisor hugepage patch I also allowed guests to see the PSE flag in CR4. This has proven to be a mistake. Here is a patch to remove that functionality. All Linux kernels will still allow userspace hugepages without the flag. Dave McCracken _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2009-Sep-14 17:42 UTC
[Xen-devel] Re: [PATCH xen-unstable] Remove PSE flag from guest CR4
If you hide PSE in CR4 and CPUID, how does the guest know it can use superpages? -- Keir On 14/09/2009 18:27, "Dave McCracken" <dcm@mccr.org> wrote:> > When I originally did the Xen hypervisor hugepage patch I also allowed guests > to see the PSE flag in CR4. This has proven to be a mistake. Here is a patch > to remove that functionality. > > All Linux kernels will still allow userspace hugepages without the flag. > > Dave McCracken_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Dave McCracken
2009-Sep-14 17:53 UTC
[Xen-devel] Re: [PATCH xen-unstable] Remove PSE flag from guest CR4
On Monday 14 September 2009, Keir Fraser wrote:> If you hide PSE in CR4 and CPUID, how does the guest know it can use > superpages?Linux assumes it will just work. Since hugepages in Linux are an optional feature the kernel will boot even on a machine that doesn''t support PSE. Applications that use hugepages will get a nasty error. With the PSE bit set in CPUID Linux tries to do things like map the entire kernel in hugepages. Dave McCracken _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jeremy Fitzhardinge
2009-Sep-14 19:07 UTC
[Xen-devel] Re: [PATCH xen-unstable] Remove PSE flag from guest CR4
On 09/14/09 10:53, Dave McCracken wrote:> Linux assumes it will just work. > > Since hugepages in Linux are an optional feature the kernel will boot even on > a machine that doesn''t support PSE. Applications that use hugepages will get > a nasty error. >That sounds like a Linux bug; at the very least, it sounds very fragile to rely on this behaviour. J _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Dave McCracken
2009-Sep-14 19:47 UTC
[Xen-devel] Re: [PATCH xen-unstable] Remove PSE flag from guest CR4
On Monday 14 September 2009, Jeremy Fitzhardinge wrote:> On 09/14/09 10:53, Dave McCracken wrote: > > Linux assumes it will just work. > > > > Since hugepages in Linux are an optional feature the kernel will boot > > even on a machine that doesn''t support PSE. Applications that use > > hugepages will get a nasty error. > > That sounds like a Linux bug; at the very least, it sounds very fragile > to rely on this behaviour.Perhaps, but hugepages has always worked like that. I think the reality is that any machine small enough/old enough to not support PSE is way too small for hugepages to be useful on it, so no one tries to run it on those machines. Dave McCracken _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel