Revision 6a52d8a3
ID | 6a52d8a31177ce898234f41e4b682b59304c537b |
Hepler methods for PCI slots and device ids
Device naming:
QEMU monitor expects devices to be uniquely named. Device ids derive
from the following function:
kvm_devid = <device_type>-<part of uuid>-pci-<pci_slot>
Device ids must be reproduce-able when we want to remove them.
For that reason we store the pci slot inside the runtime file and
in case we want to remove a device we obtain its pci slot by
parsing the corresponding runtime enrty and matching the device
by its uuid.
Finding the PCI slot:
For newly added devices Hypervisor parses existing PCI allocations
(via _GetFreePCISlot() and eventually ``info pci`` monitor
command) and decides the PCI slot to plug in the device. During
instance startup hypervisor invokes _UpdatePCISlots() for every
device of the instance. Initial PCI reservations derive from KVM
default setup, that allocates 4 slots for devices other than disks
and NICs.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Files
- added
- modified
- copied
- renamed
- deleted