Red Hat ENTERPRISE LINUX 5 - VIRTUALIZATION GUIDE Manual page 220

Hide thumbs Also See for ENTERPRISE LINUX 5 - VIRTUALIZATION GUIDE:
Table of Contents

Advertisement

Chapter 14. SR-IOV
# virsh nodedev-dumpxml pci_8086_10ca
# virsh nodedev-dumpxml pci_8086_10ca_0
<device>
<name>pci_8086_10ca_0</name>
<parent>pci_8086_3408</parent>
<driver>
<name>igbvf</name>
</driver>
<capability type='pci'>
<domain>0</domain>
<bus>3</bus>
<slot>16</slot>
<function>1</function>
<product id='0x10ca'>82576 Virtual Function</product>
<vendor id='0x8086'>Intel Corporation</vendor>
</capability>
</device>
This example adds the Virtual Function pci_8086_10ca_0 to the guest in
slot and function parameters of the Virtual Function, these are required for adding the device.
Detach the Virtual Functions
8.
Devices attached to a host cannot be attached to guests. Linux automatically attaches new
devices to the host. Detach the Virtual Function from the host so that the Virtual Function can be
used by the guest.
# virsh nodedev-dettach pci_8086_10ca
Device pci_8086_10ca dettached
# virsh nodedev-dettach pci_8086_10ca_0
Device pci_8086_10ca_0 dettached
Add the Virtual Function to the guest
9.
a.
Shut down the guest.
b.
Use the output from the virsh nodedev-dumpxml pci_8086_10ca_0 command to
calculate the values for the configuration file. Convert slot and function values to hexadecimal
values (from decimal) to get the PCI bus addresses. Append "0x" to the beginning of the
output to tell the computer that the value is a hexadecimal number.
The example device has the following values: bus = 3, slot = 16 and function = 1. Use the
printf utility to convert decimal values to hexadecimal values.
$ printf %x 3
3
$ printf %x 16
10
$ printf %x 1
1
This example would use the following values in the configuration file:
bus='0x03'
slot='0x10'
function='0x01'
206
Step
9. Note the bus,

Advertisement

Table of Contents
loading

Table of Contents