|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 17/18 V2]: PVH xen: PVH dom0 creation...
>>> On 29.03.13 at 01:32, Mukesh Rathor <mukesh.rathor@xxxxxxxxxx> wrote:
> On Mon, 18 Mar 2013 13:01:23 +0000
> "Jan Beulich" <JBeulich@xxxxxxxx> wrote:
>
>> >>> On 16.03.13 at 02:06, Mukesh Rathor <mukesh.rathor@xxxxxxxxxx>
>> >>> wrote:
>> > @@ -307,6 +309,65 @@ static void __init
>> > process_dom0_ioports_disable(void) }
>> > }
>> >
>> > +/*
>> > + * Set the 1:1 map for all non-RAM regions for dom 0. Thus, dom0
>> > will have
>> > + * the entire io region mapped in the EPT/NPT.
>> > + */
>> > +static __init void pvh_map_all_iomem(struct domain *d)
>> > +{
>> > + unsigned long start = 0;
>> > + const struct e820entry *entry;
>> > + int rc, i, nump;
>> > +
>> > + for (i = 0, entry = e820.map; i < e820.nr_map; i++, entry++) {
>> > + unsigned long end = entry->addr + entry->size;
>> > +
>> > + if (entry->type == E820_RAM || i == e820.nr_map - 1) {
>> > + unsigned long start_pfn = PFN_DOWN(start);
>> > + unsigned long end_pfn = PFN_UP(end);
>> > +
>> > + if (entry->type == E820_RAM)
>> > + end_pfn = PFN_UP(entry->addr);
>> > +
>> > + if (start_pfn < end_pfn) {
>> > + nump = end_pfn - start_pfn + 1;
>> > + rc = domctl_memory_mapping(d, start_pfn,
>> > start_pfn, nump, 1);
>> > + BUG_ON(rc);
>> > + }
>> > + start = end;
>> > + }
>> > + }
>>
>> At least E820_UNUSABLE must be excluded here.
>>
>> And as you're mapping the holes only - how do you deal with
>> the MMIO range past end of RAM? And perhaps even more
>> important - how do you deal with the split between RAM and
>> MMIO not being at the end of currently populated RAM, but
>> at the end of possible hotpluggable regions.
>
> Right now, phase I, no support for hotplug. Are there any other cases
> of this, can you please give an example if yes?
On a system with just 2Gb (and no hotplug) the code as I read it
stops mapping at the 2Gb boundary, i.e. all MMIO regions (up to
4Gb as well as beyond) would remain unmapped.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |