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

Re: [Xen-devel] [PATCH 17/17] PVH xen: PVH dom0 creation....



>>> On 10.05.13 at 03:53, Mukesh Rathor <mukesh.rathor@xxxxxxxxxx> wrote:
> On Fri, 26 Apr 2013 08:22:08 +0100
> "Jan Beulich" <JBeulich@xxxxxxxx> wrote:
> 
>> >>> On 26.04.13 at 03:18, Mukesh Rathor <mukesh.rathor@xxxxxxxxxx>
>> >>> wrote:
>> > On Wed, 24 Apr 2013 10:28:35 +0100
>> > "Jan Beulich" <JBeulich@xxxxxxxx> wrote:
>> > 
>> >> >>> On 23.04.13 at 23:26, Mukesh Rathor <mukesh.rathor@xxxxxxxxxx>
>> >> >>> wrote:
>> >> > +    /* If the e820 ended under 4GB, we must map the remaining
>> >> > space upto 4GB */
>> >> > +    if ( end < GB(4) )
>> >> > +    {
>> >> > +        start_pfn = PFN_UP(end);
>> >> > +        end_pfn = (GB(4)) >> PAGE_SHIFT;
>> >> > +        nump = end_pfn - start_pfn;
>> >> > +        rc = domctl_memory_mapping(d, start_pfn, start_pfn,
>> >> > nump, 1);
>> >> > +        BUG_ON(rc);
>> >> > +    }
>> >> 
>> >> That's necessary, but not sufficient. Or did I overlook MMIO ranges
>> >> getting added somewhere else for Dom0, when they sit above the
>> >> highest E820 covered address?
>> > 
>> > construct_dom0() adds the entire range:
>> > 
>> >     /* DOM0 is permitted full I/O capabilities. */
>> >     rc |= ioports_permit_access(dom0, 0, 0xFFFF);
>> >     rc |= iomem_permit_access(dom0, 0UL, ~0UL);
>> 
>> Which does not create any mappings at all - these are just
>> permissions being granted.
> 
> Right. I'm not sure where its happening for dom0.

So if you don't know where you do this, I have to guess you don't
do this at all. But you obviously need to. Your main problem is that
you likely don't want to waste memory on page tables to cover the
whole (up to 52 bit wide) address space, so I assume you will need
to add these tables on demand. Yet then again iirc IOMMU faults
aren't recoverable up to now, so perhaps you have no way around
setting them up in their entirety during boot, unless you want to
get into the business of interacting with the MMIO assignment being
done for PCI devices in the BIOS and Dom0.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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