Configure the IO Domain

The guest domain or control domain to access the any I/O (PCI) cards directly from the hardware ,usually that domain is called I/O domain or root domain.By default, two virtual I/O services that you need to configure on primary domain to provide the I/O to the guest domains.One is virtual disk (vds) for storage and another one is virtual switch(vsw) for  network communication.But in I/O domain,you can directly access the real physical LUN or physical network port.But the typical guest domain will be using the virtual I/O services.For an example, SAN LUN’s will be mapped to control domain and from there , you can map the physical LUNS to guest domains as virtual services

1. Verify that the primary domain owns several PCI buses.

primary# ldm list-bindings primary
...
IO
    DEVICE           PSEUDONYM        OPTIONS
    pci@400          pci_0
    pci@500          pci_1
    pci@600          pci_2
    pci@700          pci_3
...

2. Determine the device path of the boot disk, which needs to be retained.

For UFS file systems, run the df / command to determine the device path of the boot disk.

primary# df /
/                  (/dev/dsk/c0t1d0s0 ): 1309384 blocks   457028 files

For ZFS file systems, first run the df / command to determine the pool name, and then run the zpool status command to determine the device path of the boot disk.

primary# df /
/                  (rpool/ROOT/s10s_u8wos_08a):245176332 blocks 245176332 files
primary# zpool status rpool
 zpool status rpool
  pool: rpool
 state: ONLINE
 scrub: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        rpool       ONLINE       0     0     0
          c0t1d0s0  ONLINE       0     0     0

3. Determine the physical device to which the block device is linked.

The following example uses block device c1t0d0s0:

primary# ls -l /dev/dsk/c0t1d0s0
lrwxrwxrwx   1 root     root          49 Oct  1 10:39 /dev/dsk/c0t1d0s0 ->
../../devices/pci@400/pci@0/pci@1/scsi@0/sd@1,0:a

4. Determine the network interface that is used by the system.

primary# dladm show-dev
vsw0            link: up        speed: 1000  Mbps       duplex: full
nxge0           link: up        speed: 1000  Mbps       duplex: full
nxge1           link: unknown   speed: 0     Mbps       duplex: unknown
nxge2           link: unknown   speed: 0     Mbps       duplex: unknown
nxge3           link: unknown   speed: 0     Mbps       duplex: unknown

5. Determine the physical device to which the network interface is linked.

primary# ls -l /dev/nxge0
lrwxrwxrwx   1 root     root          46 Oct  1 10:39 /dev/nxge0 ->
../devices/pci@500/pci@0/pci@c/network@0:nxge0

6. Remove the buses that do not contain the boot disk from a domain.

primary# ldm remove-io pci@600 primary
primary# ldm remove-io pci@700 primary

7. Save this configuration to the service processor.

primary# ldm add-config io-domain

8. Reboot the primary domain so that the change takes effect. and stop to which you want to add

primary# shutdown -i6 -g0 -y
primary# ldm stop ldg1 primary# ldm unbind ldg1

9. Add the available bus to the domain that needs direct access.

primary# ldm add-io pci@600 ldg1

10. Restart the domain so that the change takes affect.

primary# ldm bind ldg1
primary# ldm start ldg1

11. Confirm that the correct bus is still assigned to the primary domain and the correct bus is assigned to domain ldg1

primary# ldm list-bindings primary ldg1
NAME          STATE   FLAGS  CONS   VCPU  MEMORY  UTIL  UPTIME
primary       active  -n-cv  SP     4     4G      0.4%  18h 25m
...
IO
    DEVICE           PSEUDONYM        OPTIONS
    pci@400          pci_0
    pci@500          pci_1
...
----------------------------------------------------------------
NAME          STATE   FLAGS  CONS   VCPU  MEMORY  UTIL  UPTIME
ldg1          active  -n---  5000   4     2G      10%   35m
...
IO
    DEVICE           PSEUDONYM        OPTIONS
    pci@600          pci_2
...

Enabling the I/O MMU Bypass Mode on a PCI Bus

primary# ldm add-io bypass=on pci@400 ldg1