|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 20/24] xen/passthrough: Extend XEN_DOMCTL_assign_device to support DT device
On 03/10/2015 12:52 PM, Julien Grall wrote: Hi Daniel, On 23/02/15 16:25, Daniel De Graaf wrote:On 02/20/2015 12:17 PM, Ian Campbell wrote:On Tue, 2015-01-13 at 14:25 +0000, Julien Grall wrote: OK. I was hoping that there would be a unique numeric identifier. If there is not, it may be necessary to either create one or to add a new field to device nodes (like the one for event channels) so that they can be labeled. BTW, do you have any pointer on how to write a policy for device/IRQ passthrough? There is a bit of documentation in xsm-flask.txt about device labeling, which is the hard part of making passthrough work. Labels can be set either statically in the security policy (as documented in the section "Device Labeling") or dynamically using a tool like flask-label-pci as documented in "Resource Policy". Once that is done, then rules to allow the passthrough operation can be added, similar to the example resource nic_dev_t in xen.te. In order to do static labeling for device passthrough, the nodes in a device tree need a 32-bit numeric identifier. IO memory uses the MFN, PCI devices use SBDF, and IRQs and x86 legacy IOs just use the number. If device tree nodes can be labeled in this way, they could be added as another resource type in the policy. If not, then the label of a device node will need to be set at boot using the XSM hypercalls; this label would be stored in a security field added to device tree nodes. -- Daniel De Graaf National Security Agency _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |