xen-org/xen-api — pull request #1075 by robhoes (2013-03-15 10:04:58+00:00)
Title: CLEARWATER: CA-96886: Fix race for a PCI device by multiple starting VMs

When multiple simultaneously starting VMs try to grab the same PCI device, only one of them
may get it, and the others must fail to start. However, xapi considers a PCI device "assigned"
to a VM only when the VM has started and the device has been made available to the VM, which
is some time after xapi has asked xenopsd to start the VM and give it the PCI device. This means
that there is a window during which multiple VM may be given the same device.

This patch attempts to resolve this by temporarily reserving a PCI device for a VM in xapi, before telling xenopsd to start the VM.

This is a copy of #994 for Clearwater