[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 1/1] Xen PV support for hugepages



On Wednesday 05 November 2008, Jan Beulich wrote:
> The return value handling seems correct, but the call to map_pages_to_xen()
> at the end of get_page_from_l2e() doesn't: Simply or-ing the guest-provided
> flags into PAGE_HYPERVISOR definitely isn't correct. The cache attributes
> must be extracted, converted to L1 notion, and then be or-ed in.

Oops.  I thought I'd fixed that.  Apparently I looked at it and got 
sidetracked.  I'll fix.

> Also, the special code to deal with LDT pages in put_page_from_l1e() should
> now also be required in put_page_from_l2e(). Perhaps that logic could be
> moved into put_data_page()?

It looks to me like this is only done for PGT_seg_desc_page.  I don't think 
any hugepage can be of this type.  I can add it to put_data_page() if you 
think we need to be sure.

> Further, with L2_DISALLOW_MASK now permitting _PAGE_PSE, the use
> site in mod_l2_entry() must certainly also be modified, i.e. the subsequent
> l2e_has_changed() would need to include _PAGE_PSE, and the case of
> _PAGE_RW toggling when _PAGE_PSE was and will be set needs to be
> taken care of.
>
> Next, adjust_guest_l2e() would apparently also need to be modified.

I'll look more closely into those.

> Finally, no longer hiding X86_FEATURE_PSE from the guest seems rather
> risky: I'm pretty sure the pv-ops kernel relies on this flag being clear -
> when set, it would blindly (i.e. without ensuring the underlying memory is
> contiguous and suitably aligned) try to use 2Mb mappings for e.g. the 1:1
> mapping. I would think this capability ought to be propagated by another
> means. Likewise I'm uncertain about letting X86_CR4_PSE shine through.
>
> And a general question: How is a trivial DomU going to be able to make
> use of this, without being permitted to allocate non-order-zero chunks of
> memory?

This is the point of having hugepages a command line option.  It should only 
be turned on if you intend to run guests who enforce the alignment rules.  
I'm working on ways to get guests to run in aligned memory.

Dave McCracken
Oracle Corp.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.