|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC PATCH v2 1/3] arch, arm: allow dom0 access to I/O memory of mapped devices
On 03/10/2014 12:30 PM, Julien Grall wrote:
> Hello Arianna,
>
Hello,
thank you again for the feedback.
> On 03/10/2014 08:25 AM, Arianna Avanzini wrote:
>> Currently, dom0 is not allowed access to the I/O memory ranges
>> used to access devices exposed to it. This commit attempts
>> to give it access to those memory ranges during domain build
>> by adding the ranges to dom0's iomem_caps.
>>
>> Signed-off-by: Arianna Avanzini <avanzini.arianna@xxxxxxxxx>
>> Cc: Dario Faggioli <dario.faggioli@xxxxxxxxxx>
>> Cc: Paolo Valente <paolo.valente@xxxxxxxxxx>
>> Cc: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
>> Cc: Julien Grall <julien.grall@xxxxxxxxxx>
>> Cc: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
>> Cc: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
>> Cc: Eric Trudeau <etrudeau@xxxxxxxxxxxx>
>> Cc: Viktor Kleinik <viktor.kleinik@xxxxxxxxxxxxxxx>
>> ---
>> xen/arch/arm/domain_build.c | 10 ++++++++++
>> 1 file changed, 10 insertions(+)
>>
>> diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
>> index 5ca2f15..0b283d8 100644
>> --- a/xen/arch/arm/domain_build.c
>> +++ b/xen/arch/arm/domain_build.c
>> @@ -11,6 +11,7 @@
>> #include <xen/device_tree.h>
>> #include <xen/libfdt/libfdt.h>
>> #include <xen/guest_access.h>
>> +#include <xen/iocap.h>
>> #include <asm/setup.h>
>> #include <asm/platform.h>
>> #include <asm/psci.h>
>> @@ -733,6 +734,15 @@ static int map_device(struct domain *d, const struct
>> dt_device_node *dev)
>> DPRINT("addr %u = 0x%"PRIx64" - 0x%"PRIx64"\n",
>> i, addr, addr + size - 1);
>>
>> + res = iomem_permit_access(d, paddr_to_pfn(addr & PAGE_MASK),
>> + paddr_to_pfn(PAGE_ALIGN(addr + size -
>> 1)));
>> + if ( res )
>> + {
>> + printk(XENLOG_ERR "Unable to permit to dom0 access to"
>
> Can you print the right domain id instead of using "dom0"?
>
Sure, thank you for pointing that out.
> I have a patch to remove the other hardcoded "dom0" in this function.
>
> Regards,
>
--
/*
* Arianna Avanzini
* avanzini.arianna@xxxxxxxxx
* 73628@xxxxxxxxxxxxxxxxxxx
*/
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |