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

Re: [Xen-devel] [RFC PATCH 2/3] arch, arm32: add the XEN_DOMCTL_memory_mapping hypercall



On 03/04/2014 03:42 AM, Julien Grall wrote:
> Hi Dario,
> 
> On 03/03/14 23:33, Dario Faggioli wrote:
>> On lun, 2014-03-03 at 23:20 +0800, Julien Grall wrote:
>>> On 03/03/14 19:56, Dario Faggioli wrote:
>>
>>>> Right. FTR, xen/arch/x86/domain_build.c, has this (also in
>>>> construct_dom0):
>>>>
>>>>       /* DOM0 is permitted full I/O capabilities. */
>>>>       rc |= ioports_permit_access(dom0, 0, 0xFFFF);
>>>>       rc |= iomem_permit_access(dom0, 0UL, ~0UL);
>>>>       rc |= irqs_permit_access(dom0, 1, nr_irqs_gsi - 1);
>>>>
>>>> Do you want a patch to that/similar effect?
>>>
>>> Yes. Maybe a bit more smarter than permitting full I/0 caps for dom0.
>>>
>> EhEh... do you mean to say that x86 is "not smart" ? :-)
> 
> No :).
> 
>>
>>>> So, this is probably me messing up with the terminology, but what
>>>> 'devices passthrough to it [dom0]' would mean, for example in cases
>>>> where we don't have an IOMMU (like cubie* boards), and hence where
>>>> proper passtrhogh will never be, I think, supported? Or do we plan to
>>>> have it working there too?
>>>
>>> My term seems to be wrong for dom0 :).
>>>
>>> On ARM, some device is used by Xen and therefore not exposed to dom0. By
>>> passthrough to dom0 I meant every device that are given to dom0, no
>>> matter if the platform has an IOMMU.
>>>
>> Ok, now I got it.
>>
>>> I think DOM0 should only be able to map theses devices to a guest. It
>>> seems stupid to allow dom0 mapping RAM or the UART used by Xen.
>>>
>> I see, and it does make sense.
>>
>> Of course, I really don't know what these devices are and what the best
>> approach would be to hide/revoke permissions to their iomem/irqs (e.g.,
>> allow everything and then revoke some, allow selectively in the first
>> place, etc.).
> 
> I think the best place to permit access is in map_device
> (xen/arch/arm/domain_build.c).
> 
> This function is called for every devices used  by dom0 to map I/O mem and 
> IRQ.
> 

Thank you both for making this point more clear to me. I have tried to fix as
specified.

>>
>> I'm quite sure Arianna is keen on helping with this, but it better be,
>> if possible, someone of you ARM folks suggesting her what, where and
>> how. :-)
> 
> Either the ML or #xenarm channel on Freenode are the best to ask question.
> Arianna, I advice you to join the IRC channel if it's not already the case ;).
> 
> Cheers,
> 


-- 
/*
 * Arianna Avanzini
 * avanzini.arianna@xxxxxxxxx
 * 73628@xxxxxxxxxxxxxxxxxxx
 */

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