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

Re: [Xen-devel] [PATCH] xen: arm: remove hardcoded gnttab location from dom0



On Wed, Dec 4, 2013 at 5:58 PM, Ian Campbell <Ian.Campbell@xxxxxxxxxx> wrote:
> On Wed, 2013-12-04 at 02:18 +0800, Chen Baozi wrote:
>> On Dec 3, 2013, at 23:04, Ian Campbell <Ian.Campbell@xxxxxxxxxx> wrote:
>>
>> > The DT provided to guests (including dom0) includes a Xen node which, among
>> > other things, describes an MMIO region which can be safely used for grant
>> > table mappings (i.e. it is a hole in the physical address space). For domU 
>> > we
>> > provide a hardcoded values based on our hardcoded guest virtual machine
>> > layout. However for dom0 we need to fit in with the underlying platform.
>> > Leaving this hardcoded was an oversight which on some platforms could 
>> > result
>> > in the grant table overlaying RAM or MMIO regions which are in use by 
>> > domain
>> > 0.
>> >
>> > For the 4.4 release do as we did with the dom0 evtchn PPI and provide a 
>> > hook
>> > for the platform code to supply a suitable hardcoded address for the 
>> > platform
>> > (derived from reading the data sheet). Platforms which do not provide the 
>> > hook
>> > get the existing address as a default.
>> >
>> > After 4.4 we should switch to selecting a region of host RAM which is not 
>> > RAM
>> > in the guest address map. This should be more flexible and safer but the 
>> > patch
>> > was looking too complex for 4.4.
>> >
>> > Platform        Gnttab Address
>> > ========        ==============
>> > exynos5.c       0xb0000000, confirmed with Julien.
>> > sunxi.c         0x01d00000, confirmed in data sheet.
>> > midway.c        0xff800000, confirmed with Andre, boot tested.
>> > vexpress.c      0xb0000000, existing hardcoded value was selected for 
>> > vexpress.
>> > omap5.c         0xb0000000, no datasheet, looks safe in DTB.
>> According to OMAP5432 data sheet, 0x80000000~0xbfffffff is the DRAM
>> address space. So this is Ok.
>
> If this is DRAM address space then it's not OK -- what if the guest has
> RAM mapped there?
>
> Looks like there are reserved regions at 0x4b000000 or 0x58800000, which
> ought to be suitable I think.

Sorry, I misunderstood it.

Yes, 0x4b000000 ~ 0x4bffffff and 0x58800000 ~ 0x58ffffff are reserved
area. Besides, there are also other reserved regions of memory space,
such as 0x30000000 ~ 0x3fffffff.

Thanks,

Baozi

>
>
>> Acked-by: Chen Baozi <baozich@xxxxxxxxx>
>>
>> Cheers,
>>
>> Baozi
>
>

_______________________________________________
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®.