cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pawit Pornkitprasan" <>
Subject Review Request 12098: Add PCI Passthrough to CloudStack on KVM Hypervisor
Date Wed, 26 Jun 2013 03:02:44 GMT

This is an automatically generated e-mail. To reply, visit:

Review request for cloudstack.

Repository: cloudstack-git


This patch adds PCI Passthrough support to CloudStack on the KVM Hypervisor as previously
mentioned on the mailing list

PCI Passthrough may be useful for high-performance networking devices
or other hardware accelerators. This patch does not care what kind of
the device it is or attempt to configure it, leaving it to the guest.

Because the devices available at each agent may be different, the
available devices for passthrough are configured at the agent
configuration file (/etc/cloudstack/agent/
Configuration is a comma separated list of available PCI devices and
its given name.


At agent startup, the list of PCI devices is parsed and sent together
with StartupRoutingCommand (in a new field, not in details). The
management server then stores it in a new table “op_host_pci_devices”.
If a device is added, removed, or renamed, the table is updated
accordingly. The agent also probes libvirt which devices are currently
in-use and send it with the command in attempt to synchronize any
potential difference between the database and the actual status.

The “name” of the PCI device is what is used to assign a device. In a
compute offering, the user can specify the name of one or more PCI
devices (as a comma-separated list) and CloudStack will find a host
with the PCI device of the specified name available and assign it.

A new manager, PciDeviceManager, is created to handle the
allocation of PCI device. The manager implements StateListener and
assigns PCI devices on state change to “starting” and also release the
devices VM stop. First fit allocator and first fit planner are also
modified to check for PCI device availability accordingly.

For migration, intrusive migration is implementated. The PCI device is
detached before migration and attached it again at the target host.
This will interrupt whatever is using the device on the VM. However,
it may be desirable for networking devices where the VM can use a
bonding device to channel network traffic through the normal
virtualized network device while the PCI Passthrough device is down.


  api/src/com/cloud/agent/api/to/ PRE-CREATION 
  api/src/com/cloud/agent/api/to/ e6240ff 
  api/src/com/cloud/offering/ 45d5f38 
  api/src/com/cloud/pci/ PRE-CREATION 
  api/src/org/apache/cloudstack/api/ 8ac7c3f 
  api/src/org/apache/cloudstack/api/command/admin/offering/ decac29

  api/src/org/apache/cloudstack/api/response/ 288f76b 
  client/WEB-INF/classes/resources/ ad8d29d 
  client/tomcatconf/ ac1f3e4 
  core/src/com/cloud/agent/api/ PRE-CREATION 
  core/src/com/cloud/agent/api/ 5961ab0 
  engine/schema/src/com/cloud/host/ PRE-CREATION 
  engine/schema/src/com/cloud/host/ c814b94 
  engine/schema/src/com/cloud/host/dao/ 810b973 
  engine/schema/src/com/cloud/host/dao/ PRE-CREATION 
  engine/schema/src/com/cloud/host/dao/ PRE-CREATION 
  engine/schema/src/com/cloud/migration/ 7a49e63 
  engine/schema/src/com/cloud/service/ 9a262c5 
  plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/ 5120870

  server/src/com/cloud/agent/manager/allocator/impl/ b6286aa 
  server/src/com/cloud/alert/ 9b7cd27 
  server/src/com/cloud/api/query/dao/ 6f6e277 
  server/src/com/cloud/api/query/vo/ 05ff5f3 
  server/src/com/cloud/configuration/ 98eae37 
  server/src/com/cloud/configuration/ 704162e 
  server/src/com/cloud/deploy/ 4ef2152 
  server/src/com/cloud/hypervisor/ 50bfb30 
  server/src/com/cloud/pci/ PRE-CREATION 
  server/src/com/cloud/pci/ PRE-CREATION 
  server/src/com/cloud/resource/ fe91cb3 
  server/src/com/cloud/vm/ 66103fb 
  server/test/com/cloud/vpc/ 95230a5 
  setup/db/db/schema-410to420.sql 325924b 
  ui/dictionary.jsp 7809cdb 
  ui/scripts/configuration.js 7f0e1a5 
  ui/scripts/docs.js 5aa352a 



Testing done with Mellanox ConnectX-2 NIC with SR-IOV on Ubuntu Raring.


Pawit Pornkitprasan

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message