CLEARWATER: CA-96886: Fix race for a PCI device by multiple starting VMs #1075

Merged
merged 1 commit into from Apr 8, 2013

Conversation

Projects
None yet
2 participants
Owner

robhoes commented Mar 15, 2013

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

@ghost ghost assigned malcolmcrossley Mar 15, 2013

Hi Rob, Sorry about the delay but I was trying to keep the clearwater-ring3 branch clean whilst trying to get the "clearwater-trunk-merge" branch in.

Can you rebase this pull request onto of the current clearwater branch please?

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.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Owner

robhoes commented Apr 8, 2013

@malcolmcrossley Ok, done.

malcolmcrossley pushed a commit that referenced this pull request Apr 8, 2013

Merge pull request #1075 from robhoes/ca96886-cw
CLEARWATER: CA-96886: Fix race for a PCI device by multiple starting VMs

@malcolmcrossley malcolmcrossley merged commit 37dbc4a into xapi-project:clearwater Apr 8, 2013

1 check was pending

default Merged build triggered.

@robhoes robhoes deleted the robhoes:ca96886-cw branch Apr 12, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment