Enabling I/O Virtualization for a PCIe Bus
The following example shows how to enable I/O virtualization by using the ldm add-io
and ldm set-io
commands.
The following SPARC T4-2 I/O configuration shows that bus pci_1
already has been removed from the primary
domain.
primary# ldm list-io NAME TYPE BUS DOMAIN STATUS ---- ---- --- ------ ------ /SYS/PM0/CMP0/NIU_CORE NIU niu_0 primary /SYS/PM0/CMP1/NIU_CORE NIU niu_1 primary /SYS/PM0/CMP0/PXE BUS pci_0 primary /SYS/PM0/CMP1/PXE BUS pci_1 primary /SYS/MB/PCIE0 PCIE pci_0 primary OCC /SYS/MB/PCIE2 PCIE pci_0 primary OCC /SYS/MB/PCIE4 PCIE pci_0 primary OCC /SYS/MB/PCIE6 PCIE pci_0 primary EMP /SYS/MB/PCIE8 PCIE pci_0 primary EMP /SYS/MB/SASHBA PCIE pci_0 primary OCC /SYS/MB/NET0 PCIE pci_0 primary OCC /SYS/MB/PCIE1 PCIE pci_1 UNK /SYS/MB/PCIE3 PCIE pci_1 UNK /SYS/MB/PCIE5 PCIE pci_1 UNK /SYS/MB/PCIE7 PCIE pci_1 UNK /SYS/MB/PCIE9 PCIE pci_1 UNK /SYS/MB/NET2 PCIE pci_1 UNK /SYS/MB/NET0/IOVNET.PF0 PF pci_0 primary /SYS/MB/NET0/IOVNET.PF1 PF pci_0 primary
The following listing shows that the guest domains are in the bound state:
primary# ldm list
NAME STATE FLAGS CONS VCPU MEMORY UTIL NORM UPTIME
primary active -n-cv- UART 8 8G 0.6% 0.6% 8m
rootdom1 bound ------ 5000 8 4G
ldg2 bound ------ 5001 8 4G
ldg3 bound ------ 5002 8 4G
The following ldm add-io
command adds the pci_1
bus to the rootdom1
domain with I/O virtualization enabled for that bus. The ldm start-domain
command starts the rootdom1
domain.
primary# ldm add-io iov=on pci_1 rootdom1 primary# ldm start-domain rootdom1 LDom rootdom1 started
If a specified PCIe bus is assigned already to a root domain, use the ldm set-io
command to enable I/O virtualization.
primary# ldm start-reconf rootdom1 primary# ldm set-io iov=on pci_1 primary# ldm stop-domain -r rootdom1
The root domain must be running its OS before you can configure the I/O devices. Connect to the console of the rootdom1
guest domain and then boot the OS of the rootdom1
root domain if your guest domains are not already set to autoboot.
primary# telnet localhost 5000 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Connecting to console "rootdom1" in group "rootdom1" .... Press ~? for control options .. ok> boot ... primary#
The following command shows that the pci_1
PCIe bus and its children are now owned by the rootdom1
root domain.
primary# ldm list-io NAME TYPE BUS DOMAIN STATUS ---- ---- --- ------ ------ /SYS/PM0/CMP0/PXE BUS pci_0 primary /SYS/PM0/CMP1/PXE BUS pci_1 primary /SYS/PM0/CMP0/NIU_CORE NIU niu_0 primary /SYS/PM0/CMP1/NIU_CORE NIU niu_1 primary /SYS/MB/PCIE0 PCIE pci_0 primary OCC /SYS/MB/PCIE2 PCIE pci_0 primary OCC /SYS/MB/PCIE4 PCIE pci_0 primary OCC /SYS/MB/PCIE6 PCIE pci_0 primary EMP /SYS/MB/PCIE8 PCIE pci_0 primary EMP /SYS/MB/SASHBA PCIE pci_0 primary OCC /SYS/MB/NET0 PCIE pci_0 primary OCC /SYS/MB/PCIE1 PCIE pci_1 rootdom1 OCC /SYS/MB/PCIE3 PCIE pci_1 rootdom1 OCC /SYS/MB/PCIE5 PCIE pci_1 rootdom1 OCC /SYS/MB/PCIE7 PCIE pci_1 rootdom1 OCC /SYS/MB/PCIE9 PCIE pci_1 rootdom1 EMP /SYS/MB/NET2 PCIE pci_1 rootdom1 OCC /SYS/MB/NET0/IOVNET.PF0 PF pci_0 primary /SYS/MB/NET0/IOVNET.PF1 PF pci_0 primary /SYS/MB/PCIE5/IOVNET.PF0 PF pci_1 rootdom1 /SYS/MB/PCIE5/IOVNET.PF1 PF pci_1 rootdom1 /SYS/MB/NET2/IOVNET.PF0 PF pci_1 rootdom1 /SYS/MB/NET2/IOVNET.PF1 PF pci_1 rootdom1