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

Re: [Xen-devel] xen/arm: RAM address alignment



On Wed, 2014-10-08 at 19:27 +0530, Vijay Kilari wrote:
> Hi,
> 
>    With UEFI boot and with RAM start address is from 0xc00000, the
> set_xenheap_mappings()
> fails to map because offset becomes 0xfffff400.
> 
> base_mfn always assumes 1GB boundary so with base_mfn passed as 0xc00
> it becomes 0x0
> where as xenheap_mfn_start is 0xc00. So offset computation becomes negative.
> See below log with some debug prints
> 
> Is my observation is correct?
> 
> Question is why base_mfn should be always aligned to 1GB boundary?

Because we use gigabyte super page mappings for the xen heap.

The calculation of offset does indeed look dubious. Especially now that
it is passed to pfn_to_pdx, which surely won't cope with negative (or
actually very large underflowed unsigned values). 

offset is only used as:

        vaddr = DIRECTMAP_VIRT_START + offset*PAGE_SIZE;

I'll have to have a think about what I thought I was doing here...

Ian.


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