On Tue, Mar 14, 2017 at 9:02 PM, Julien Grall <julien.gr...@arm.com> wrote:
> Hello Vijay,
>
> On 13/03/17 11:43, vijay.kil...@gmail.com wrote:
>>
>> From: Vijaya Kumar K <vijaya.ku...@cavium.com>
>>
>> On ARM, virt_to_mfn uses the hardware for address
>> translation. So if the virtual address is not mapped translation
>> fault is raised.On ARM, DIRECTMAP_VIRT region is direct mapped.
>
>
> This is not true. As I said before, all the memory will be direct mapped on
> ARM64 but not on ARM32.
>
> For ARM32, only xenheap will be direct mapped. So you may want to return
> is_xenheap_mfn(...). Or even return false in all the case. Either is fine by
> me, but it would need to be explained in the code.

Is this ok?.

/*
 * On ARM64 DIRECTMAP_VIRT region is directly mapped. Hence return true;
 * On ARM only xenheap memory is directly mapped. Hence return false.
 */
static inline bool_t arch_mfn_below_directmap_max_mfn(unsigned long mfn)
{
#ifdef CONFIG_ARM_64
    return true;
#else
    return false;
#endif
}

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

Reply via email to