Red Hat Bugzilla – Bug 830097
Update 'Adding a PCI device with virsh' section document
Last modified: 2013-02-25 19:54:59 EST
I found this
but it still doesn't have the changes. I asked Alex Williamson and the limit is 8 functions, so I would phrase the paragraph before procedure 12.1 like this:
Each PCI device can have up to 8 functions. Functions are independent parts of the PCI device, and a device can be assigned to a guest with function granularity. Up to 8 assigned functions per guest are supported; these can be placed in 1 multifunction PCI slot, or in 8 single-function PCI slots, or any combination in between.
The number of available PCI slots in a guest is limited by the virtualized system architecture. Out of a total of 32 PCI slots in a guest, KVM reserves 4 that are always defined and not removable. The remaining 28 PCI slots are available for additional devices used by the guest, both emulated (such as USB controllers or virtio-blk disks) and assigned.
*** Bug 853297 has been marked as a duplicate of this bug. ***
For reference: the following summary of supported device types and numbers has been confirmed by Alex Williamson and Ronen Hod.
> >> Red Hat Enterprise Linux 6 exposes three classes of device to its
> >> virtual machines:
> >> * Emulated devices are purely virtual devices that mimic real
> >> hardware, allowing unmodified guest operating systems to work with
> >> them using their standard in-box drivers.
> >> * Virtio devices are purely virtual devices designed to work
> >> optimally in a virtual machine. Virtio devices are similar to
> >> emulated devices, however, non-Linux virtual machines do not
> >> include the drivers they require by default. Virtualization
> >> management software like the Virtual Machine Manager
> >> (virt-manager) and the Red Hat Enterprise Virtualization
> >> Hypervisor install these drivers automatically for supported
> >> non-Linux guest operating systems.
> >> * Assigned devices are physical devices that are exposed to the
> >> virtual machine. This method is also known as 'passthrough'.
> >> Red Hat Enterprise Linux 6 supports 32 PCI device slots per
> >> virtual machine, and 8 PCI functions per device slot. This gives a
> >> theoretical maximum of 256 PCI functions per guest.
> >> However, this theoretical maximum is subject to the following
> >> limitations:
> >> * Each virtual machine supports a maximum of 8 assigned device
> >> functions.
> >> * 4 PCI device slots are configured with emulated devices by
> >> default. However, users can explicitly remove 2 of the emulated
> >> devices that are configured by default (the video adapter device
> >> in slot 2, and the memory balloon driver device in slot 3). This
> >> gives users a supported functional maximum of 30 PCI device slots
> >> per virtual machine.
> >> Note that PCI device hotplugging operates at the slot level and
> >> does not support multi-function PCI devices. Multi-function PCI
> >> devices are therefore recommended for configuring static devices
> >> only.
*** Bug 848992 has been marked as a duplicate of this bug. ***
*** Bug 843023 has been marked as a duplicate of this bug. ***