16cd6a6acSopenharmony_ciXen Statements 26cd6a6acSopenharmony_ci============== 36cd6a6acSopenharmony_ci 46cd6a6acSopenharmony_ciPolicy version 30 introduced the [`devicetreecon`](cil_xen_statements.md#devicetreecon) statement and also expanded the existing I/O memory range to 64 bits in order to support hardware with more than 44 bits of physical address space (32-bit count of 4K pages). 56cd6a6acSopenharmony_ci 66cd6a6acSopenharmony_ciSee the ["XSM/FLASK Configuration"](http://xenbits.xen.org/docs/4.2-testing/misc/xsm-flask.txt) document for further information ([](http://xenbits.xen.org/docs/4.2-testing/misc/xsm-flask.txt)) 76cd6a6acSopenharmony_ci 86cd6a6acSopenharmony_ciiomemcon 96cd6a6acSopenharmony_ci-------- 106cd6a6acSopenharmony_ci 116cd6a6acSopenharmony_ciLabel i/o memory. This may be a single memory location or a range. 126cd6a6acSopenharmony_ci 136cd6a6acSopenharmony_ci**Statement definition:** 146cd6a6acSopenharmony_ci 156cd6a6acSopenharmony_ci```secil 166cd6a6acSopenharmony_ci (iomemcon mem_addr|(mem_low mem_high) context_id) 176cd6a6acSopenharmony_ci``` 186cd6a6acSopenharmony_ci 196cd6a6acSopenharmony_ci**Where:** 206cd6a6acSopenharmony_ci 216cd6a6acSopenharmony_ci<table> 226cd6a6acSopenharmony_ci<colgroup> 236cd6a6acSopenharmony_ci<col width="25%" /> 246cd6a6acSopenharmony_ci<col width="75%" /> 256cd6a6acSopenharmony_ci</colgroup> 266cd6a6acSopenharmony_ci<tbody> 276cd6a6acSopenharmony_ci<tr class="odd"> 286cd6a6acSopenharmony_ci<td align="left"><p><code>iomemcon</code></p></td> 296cd6a6acSopenharmony_ci<td align="left"><p>The <code>iomemcon</code> keyword.</p></td> 306cd6a6acSopenharmony_ci</tr> 316cd6a6acSopenharmony_ci<tr class="even"> 326cd6a6acSopenharmony_ci<td align="left"><p><code>mem_addr |</code></p> 336cd6a6acSopenharmony_ci<p><code>(mem_low mem_high)</code></p></td> 346cd6a6acSopenharmony_ci<td align="left"><p>A single memory address to apply the context, or a range of addresses.</p> 356cd6a6acSopenharmony_ci<p>The entries must consist of numerics <code>[0-9]</code>.</p></td> 366cd6a6acSopenharmony_ci</tr> 376cd6a6acSopenharmony_ci<tr class="odd"> 386cd6a6acSopenharmony_ci<td align="left"><p><code>context_id</code></p></td> 396cd6a6acSopenharmony_ci<td align="left"><p>A previously declared <code>context</code> identifier or an anonymous security context (<code>user role type levelrange</code>), the range MUST be defined whether the policy is MLS/MCS enabled or not.</p></td> 406cd6a6acSopenharmony_ci</tr> 416cd6a6acSopenharmony_ci</tbody> 426cd6a6acSopenharmony_ci</table> 436cd6a6acSopenharmony_ci 446cd6a6acSopenharmony_ci**Example:** 456cd6a6acSopenharmony_ci 466cd6a6acSopenharmony_ciAn anonymous context for a memory address range of `0xfebe0-0xfebff`: 476cd6a6acSopenharmony_ci 486cd6a6acSopenharmony_ci```secil 496cd6a6acSopenharmony_ci (iomemcon (1043424 1043455) (unconfined.user object_r unconfined.object low_low)) 506cd6a6acSopenharmony_ci``` 516cd6a6acSopenharmony_ci 526cd6a6acSopenharmony_ciioportcon 536cd6a6acSopenharmony_ci--------- 546cd6a6acSopenharmony_ci 556cd6a6acSopenharmony_ciLabel i/o ports. This may be a single port or a range. 566cd6a6acSopenharmony_ci 576cd6a6acSopenharmony_ci**Statement definition:** 586cd6a6acSopenharmony_ci 596cd6a6acSopenharmony_ci```secil 606cd6a6acSopenharmony_ci (ioportcon port|(port_low port_high) context_id) 616cd6a6acSopenharmony_ci``` 626cd6a6acSopenharmony_ci 636cd6a6acSopenharmony_ci**Where:** 646cd6a6acSopenharmony_ci 656cd6a6acSopenharmony_ci<table> 666cd6a6acSopenharmony_ci<colgroup> 676cd6a6acSopenharmony_ci<col width="27%" /> 686cd6a6acSopenharmony_ci<col width="72%" /> 696cd6a6acSopenharmony_ci</colgroup> 706cd6a6acSopenharmony_ci<tbody> 716cd6a6acSopenharmony_ci<tr class="odd"> 726cd6a6acSopenharmony_ci<td align="left"><p><code>ioportcon</code></p></td> 736cd6a6acSopenharmony_ci<td align="left"><p>The <code>ioportcon</code> keyword.</p></td> 746cd6a6acSopenharmony_ci</tr> 756cd6a6acSopenharmony_ci<tr class="even"> 766cd6a6acSopenharmony_ci<td align="left"><p><code>port |</code></p> 776cd6a6acSopenharmony_ci<p><code>(port_low port_high)</code></p></td> 786cd6a6acSopenharmony_ci<td align="left"><p>A single port to apply the context, or a range of ports.</p> 796cd6a6acSopenharmony_ci<p>The entries must consist of numerics <code>[0-9]</code>.</p></td> 806cd6a6acSopenharmony_ci</tr> 816cd6a6acSopenharmony_ci<tr class="odd"> 826cd6a6acSopenharmony_ci<td align="left"><p><code>context_id</code></p></td> 836cd6a6acSopenharmony_ci<td align="left"><p>A previously declared <code>context</code> identifier or an anonymous security context (<code>user role type levelrange</code>), the range MUST be defined whether the policy is MLS/MCS enabled or not.</p></td> 846cd6a6acSopenharmony_ci</tr> 856cd6a6acSopenharmony_ci</tbody> 866cd6a6acSopenharmony_ci</table> 876cd6a6acSopenharmony_ci 886cd6a6acSopenharmony_ci**Example:** 896cd6a6acSopenharmony_ci 906cd6a6acSopenharmony_ciAn anonymous context for a single port of :`0xecc0`: 916cd6a6acSopenharmony_ci 926cd6a6acSopenharmony_ci```secil 936cd6a6acSopenharmony_ci (ioportcon 60608 (unconfined.user object_r unconfined.object low_low)) 946cd6a6acSopenharmony_ci``` 956cd6a6acSopenharmony_ci 966cd6a6acSopenharmony_cipcidevicecon 976cd6a6acSopenharmony_ci------------ 986cd6a6acSopenharmony_ci 996cd6a6acSopenharmony_ciLabel a PCI device. 1006cd6a6acSopenharmony_ci 1016cd6a6acSopenharmony_ci**Statement definition:** 1026cd6a6acSopenharmony_ci 1036cd6a6acSopenharmony_ci```secil 1046cd6a6acSopenharmony_ci (pcidevicecon device context_id) 1056cd6a6acSopenharmony_ci``` 1066cd6a6acSopenharmony_ci 1076cd6a6acSopenharmony_ci**Where:** 1086cd6a6acSopenharmony_ci 1096cd6a6acSopenharmony_ci<table> 1106cd6a6acSopenharmony_ci<colgroup> 1116cd6a6acSopenharmony_ci<col width="25%" /> 1126cd6a6acSopenharmony_ci<col width="75%" /> 1136cd6a6acSopenharmony_ci</colgroup> 1146cd6a6acSopenharmony_ci<tbody> 1156cd6a6acSopenharmony_ci<tr class="odd"> 1166cd6a6acSopenharmony_ci<td align="left"><p><code>pcidevicecon</code></p></td> 1176cd6a6acSopenharmony_ci<td align="left"><p>The <code>pcidevicecon</code> keyword.</p></td> 1186cd6a6acSopenharmony_ci</tr> 1196cd6a6acSopenharmony_ci<tr class="even"> 1206cd6a6acSopenharmony_ci<td align="left"><p><code>device</code></p></td> 1216cd6a6acSopenharmony_ci<td align="left"><p>The device number.The entries must consist of numerics <code>[0-9]</code>.</p></td> 1226cd6a6acSopenharmony_ci</tr> 1236cd6a6acSopenharmony_ci<tr class="odd"> 1246cd6a6acSopenharmony_ci<td align="left"><p><code>context_id</code></p></td> 1256cd6a6acSopenharmony_ci<td align="left"><p>A previously declared <code>context</code> identifier or an anonymous security context (<code>user role type levelrange</code>), the range MUST be defined whether the policy is MLS/MCS enabled or not.</p></td> 1266cd6a6acSopenharmony_ci</tr> 1276cd6a6acSopenharmony_ci</tbody> 1286cd6a6acSopenharmony_ci</table> 1296cd6a6acSopenharmony_ci 1306cd6a6acSopenharmony_ci**Example:** 1316cd6a6acSopenharmony_ci 1326cd6a6acSopenharmony_ciAn anonymous context for a pci device address of `0xc800`: 1336cd6a6acSopenharmony_ci 1346cd6a6acSopenharmony_ci```secil 1356cd6a6acSopenharmony_ci (pcidevicecon 51200 (unconfined.user object_r unconfined.object low_low)) 1366cd6a6acSopenharmony_ci``` 1376cd6a6acSopenharmony_ci 1386cd6a6acSopenharmony_cipirqcon 1396cd6a6acSopenharmony_ci------- 1406cd6a6acSopenharmony_ci 1416cd6a6acSopenharmony_ciLabel an interrupt level. 1426cd6a6acSopenharmony_ci 1436cd6a6acSopenharmony_ci**Statement definition:** 1446cd6a6acSopenharmony_ci 1456cd6a6acSopenharmony_ci```secil 1466cd6a6acSopenharmony_ci (pirqcon irq_level context_id) 1476cd6a6acSopenharmony_ci``` 1486cd6a6acSopenharmony_ci 1496cd6a6acSopenharmony_ci**Where:** 1506cd6a6acSopenharmony_ci 1516cd6a6acSopenharmony_ci<table> 1526cd6a6acSopenharmony_ci<colgroup> 1536cd6a6acSopenharmony_ci<col width="25%" /> 1546cd6a6acSopenharmony_ci<col width="75%" /> 1556cd6a6acSopenharmony_ci</colgroup> 1566cd6a6acSopenharmony_ci<tbody> 1576cd6a6acSopenharmony_ci<tr class="odd"> 1586cd6a6acSopenharmony_ci<td align="left"><p><code>pirqcon</code></p></td> 1596cd6a6acSopenharmony_ci<td align="left"><p>The <code>pirqcon</code> keyword.</p></td> 1606cd6a6acSopenharmony_ci</tr> 1616cd6a6acSopenharmony_ci<tr class="even"> 1626cd6a6acSopenharmony_ci<td align="left"><p><code>irq_level</code></p></td> 1636cd6a6acSopenharmony_ci<td align="left"><p>The interrupt request number. The entries must consist of numerics <code>[0-9]</code>.</p></td> 1646cd6a6acSopenharmony_ci</tr> 1656cd6a6acSopenharmony_ci<tr class="odd"> 1666cd6a6acSopenharmony_ci<td align="left"><p><code>context_id</code></p></td> 1676cd6a6acSopenharmony_ci<td align="left"><p>A previously declared <code>context</code> identifier or an anonymous security context (<code>user role type levelrange</code>), the range MUST be defined whether the policy is MLS/MCS enabled or not.</p></td> 1686cd6a6acSopenharmony_ci</tr> 1696cd6a6acSopenharmony_ci</tbody> 1706cd6a6acSopenharmony_ci</table> 1716cd6a6acSopenharmony_ci 1726cd6a6acSopenharmony_ci**Example:** 1736cd6a6acSopenharmony_ci 1746cd6a6acSopenharmony_ciAn anonymous context for IRQ 33: 1756cd6a6acSopenharmony_ci 1766cd6a6acSopenharmony_ci```secil 1776cd6a6acSopenharmony_ci (pirqcon 33 (unconfined.user object_r unconfined.object low_low)) 1786cd6a6acSopenharmony_ci``` 1796cd6a6acSopenharmony_ci 1806cd6a6acSopenharmony_cidevicetreecon 1816cd6a6acSopenharmony_ci------------- 1826cd6a6acSopenharmony_ci 1836cd6a6acSopenharmony_ciLabel device tree nodes. 1846cd6a6acSopenharmony_ci 1856cd6a6acSopenharmony_ci**Statement definition:** 1866cd6a6acSopenharmony_ci 1876cd6a6acSopenharmony_ci```secil 1886cd6a6acSopenharmony_ci (devicetreecon path context_id) 1896cd6a6acSopenharmony_ci``` 1906cd6a6acSopenharmony_ci 1916cd6a6acSopenharmony_ci**Where:** 1926cd6a6acSopenharmony_ci 1936cd6a6acSopenharmony_ci<table> 1946cd6a6acSopenharmony_ci<colgroup> 1956cd6a6acSopenharmony_ci<col width="25%" /> 1966cd6a6acSopenharmony_ci<col width="75%" /> 1976cd6a6acSopenharmony_ci</colgroup> 1986cd6a6acSopenharmony_ci<tbody> 1996cd6a6acSopenharmony_ci<tr class="odd"> 2006cd6a6acSopenharmony_ci<td align="left"><p><code>devicetreecon</code></p></td> 2016cd6a6acSopenharmony_ci<td align="left"><p>The <code>devicetreecon</code> keyword.</p></td> 2026cd6a6acSopenharmony_ci</tr> 2036cd6a6acSopenharmony_ci<tr class="even"> 2046cd6a6acSopenharmony_ci<td align="left"><p><code>path</code></p></td> 2056cd6a6acSopenharmony_ci<td align="left"><p>The device tree path. If this contains spaces enclose within <code>""</code>.</p></td> 2066cd6a6acSopenharmony_ci</tr> 2076cd6a6acSopenharmony_ci<tr class="odd"> 2086cd6a6acSopenharmony_ci<td align="left"><p><code>context_id</code></p></td> 2096cd6a6acSopenharmony_ci<td align="left"><p>A previously declared <code>context</code> identifier or an anonymous security context (<code>user role type levelrange</code>), the range MUST be defined whether the policy is MLS/MCS enabled or not.</p></td> 2106cd6a6acSopenharmony_ci</tr> 2116cd6a6acSopenharmony_ci</tbody> 2126cd6a6acSopenharmony_ci</table> 2136cd6a6acSopenharmony_ci 2146cd6a6acSopenharmony_ci**Example:** 2156cd6a6acSopenharmony_ci 2166cd6a6acSopenharmony_ciAn anonymous context for the specified path: 2176cd6a6acSopenharmony_ci 2186cd6a6acSopenharmony_ci```secil 2196cd6a6acSopenharmony_ci (devicetreecon "/this is/a/path" (unconfined.user object_r unconfined.object low_low)) 2206cd6a6acSopenharmony_ci``` 221