[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
From: |
Juergen Gross |
Subject: |
Re: [Xen-devel] [PATCH v4 13/19] xen: setup Xen specific data for PVH |
Date: |
Wed, 21 Nov 2018 10:07:26 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 |
On 15/11/2018 11:03, Roger Pau Monné wrote:
> 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 <address@hidden>
>> ---
>> 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.
Correct, page alignment is a requirement (which is met currently).
I'll add a comment to point that out.
Juergen
- Re: [Xen-devel] [PATCH v4 12/19] xen: add PCI MMIO areas to memory map, (continued)
- [PATCH v4 16/19] grub-module-verifier: Ignore all_video for xenpvh, Juergen Gross, 2018/11/02
- [PATCH v4 17/19] xen_pvh: support building a standalone image, Juergen Gross, 2018/11/02
- [PATCH v4 15/19] xen_pvh: add build runes for grub-core, Juergen Gross, 2018/11/02
- [PATCH v4 19/19] xen_pvh: add support to configure, Juergen Gross, 2018/11/02
- [PATCH v4 13/19] xen: setup Xen specific data for PVH, Juergen Gross, 2018/11/02
- [PATCH v4 09/19] xen: add PVH boot entry code, Juergen Gross, 2018/11/02
- [PATCH v4 11/19] xen: get memory map from hypervisor for PVH, Juergen Gross, 2018/11/02
- [PATCH v4 06/19] xen: rearrange xen/init.c to prepare it for Xen PVH mode, Juergen Gross, 2018/11/02
- [PATCH v4 08/19] xen: add basic hooks for PVH in current code, Juergen Gross, 2018/11/02