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

Re: [Xen-devel] [v5][PATCH 11/16] tools/libxl: detect and avoid conflicts with RDM

On Tue, Jul 07, 2015 at 02:17:12PM +0800, Tiejun Chen wrote:
> While building a VM, HVM domain builder provides struct hvm_info_table{}
> to help hvmloader. Currently it includes two fields to construct guest
> e820 table by hvmloader, low_mem_pgend and high_mem_pgend. So we should
> check them to fix any conflict with RDM.
> RMRR can reside in address space beyond 4G theoretically, but we never
> see this in real world. So in order to avoid breaking highmem layout
> we don't solve highmem conflict. Note this means highmem rmrr could still
> be supported if no conflict.
> But in the case of lowmem, RMRR probably scatter the whole RAM space.
> Especially multiple RMRR entries would worsen this to lead a complicated
> memory layout. And then its hard to extend hvm_info_table{} to work
> hvmloader out. So here we're trying to figure out a simple solution to
> avoid breaking existing layout. So when a conflict occurs,
>     #1. Above a predefined boundary (2G)
>         - move lowmem_end below reserved region to solve conflict;
>     #2. Below a predefined boundary (2G)
>         - Check strict/relaxed policy.
>         "strict" policy leads to fail libxl. Note when both policies
>         are specified on a given region, 'strict' is always preferred.
>         "relaxed" policy issue a warning message and also mask this entry 
>         to indicate we shouldn't expose this entry to hvmloader.
> Note later we need to provide a parameter to set that predefined boundary
> dynamically.
> CC: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
> CC: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
> CC: Ian Campbell <ian.campbell@xxxxxxxxxx>
> CC: Wei Liu <wei.liu2@xxxxxxxxxx>
> Signed-off-by: Tiejun Chen <tiejun.chen@xxxxxxxxx>
> Reviewed-by: Kevin Tian <kevint.tian@xxxxxxxxx>
> ---
> v5:
> * A little change to make sure the per-device policy always override the 
> global
>   policy and correct its associated code comments.
> * Fix one typo in the patch head description
> * Rename xc_device_get_rdm() with libxl__xc_device_get_rdm(), and then replace
>   malloc() with libxl__malloc(), and finally cleanup this fallout.
> * libxl__xc_device_get_rdm() should return proper libxl error code, 
>   Then instead, the allocated RDM entries would be returned with an out 
> parameter.

This patch does what we've discussed so

Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>

Xen-devel mailing list



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