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

Re: [Xen-devel] [PATCH v4 13/19] xen: setup Xen specific data for PVH



On Fri, Nov 02, 2018 at 01:37:32PM +0100, Juergen Gross wrote:
> Initialize the needed Xen specific data. This is:
> 
> - the Xen start of day page containing the console and Xenstore ring
>   page PFN and event channel
> - the grant table
> - the shared info page
> 
> Write back the possibly modified memory map to the hypervisor in case
> the guest is reading it from there again.
> 
> Set the RSDP address for the guest from the start_info page passed
> as boot parameter.
> 
> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
> ---
> V4: write back memory map to Xen (Roger Pau Monné)
> ---
>  grub-core/kern/i386/xen/pvh.c | 119 
> ++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 119 insertions(+)
> 
> diff --git a/grub-core/kern/i386/xen/pvh.c b/grub-core/kern/i386/xen/pvh.c
> +static grub_uint64_t
> +grub_xen_find_page (grub_uint64_t start)
> +{
> +  unsigned int i, j;
> +  grub_uint64_t last = start;
> +
> +  /* Try to find a e820 map hole below 4G. */
> +  for (i = 0; i < nr_map_entries; i++)
> +    {
> +      if (last > map[i].addr + map[i].len)
> +     continue;
> +      if (last < map[i].addr)

Shouldn't this be last + PAGE_SIZE <= map[i].addr?

grub_xen_sort_mmap already aligns memory map entries to page
boundaries, so the result will be correct as long as 'start' is also
page aligned.

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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