You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Chiradeep Vittal <ch...@gmail.com> on 2013/08/07 02:08:01 UTC

Re: Review Request 12098: Add PCI Passthrough to CloudStack on KVM Hypervisor

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12098/#review24763
-----------------------------------------------------------


Can you rebase against latest master? How does this apply to Xenserver?

- Chiradeep Vittal


On July 2, 2013, 7:12 a.m., Pawit Pornkitprasan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12098/
> -----------------------------------------------------------
> 
> (Updated July 2, 2013, 7:12 a.m.)
> 
> 
> Review request for cloudstack.
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> 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/agent.properties).
> Configuration is a comma separated list of available PCI devices and
> its given name.
> 
> pci.devices=28:00.1|10GE,28:00.2|10GE,28:00.3|10GE,28:00.4|10GE,28:00.5|10GE,28:00.6|10GE,28:00.7|10GE,28:01.0|10GE
> 
> 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.
> 
> 
> Diffs
> -----
> 
>   api/src/com/cloud/agent/api/to/PciDeviceTO.java PRE-CREATION 
>   api/src/com/cloud/agent/api/to/VirtualMachineTO.java e6240ff 
>   api/src/com/cloud/offering/ServiceOffering.java 45d5f38 
>   api/src/com/cloud/pci/PciDevice.java PRE-CREATION 
>   api/src/org/apache/cloudstack/api/ApiConstants.java 8ac7c3f 
>   api/src/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java decac29 
>   api/src/org/apache/cloudstack/api/response/ServiceOfferingResponse.java 288f76b 
>   client/WEB-INF/classes/resources/messages.properties ad8d29d 
>   client/tomcatconf/applicationContext.xml.in ac1f3e4 
>   core/src/com/cloud/agent/api/AttachPciDevicesCommand.java PRE-CREATION 
>   core/src/com/cloud/agent/api/StartupRoutingCommand.java 5961ab0 
>   engine/schema/src/com/cloud/host/HostPciDeviceVO.java PRE-CREATION 
>   engine/schema/src/com/cloud/host/HostVO.java c814b94 
>   engine/schema/src/com/cloud/host/dao/HostDaoImpl.java 810b973 
>   engine/schema/src/com/cloud/host/dao/HostPciDevicesDao.java PRE-CREATION 
>   engine/schema/src/com/cloud/host/dao/HostPciDevicesDaoImpl.java PRE-CREATION 
>   engine/schema/src/com/cloud/migration/ServiceOffering21VO.java 7a49e63 
>   engine/schema/src/com/cloud/service/ServiceOfferingVO.java 9a262c5 
>   plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java 60cde8c 
>   plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtDomainXMLParser.java a283768 
>   plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java 5120870 
>   server/src/com/cloud/agent/manager/allocator/impl/FirstFitAllocator.java b6286aa 
>   server/src/com/cloud/alert/AlertManagerImpl.java 9b7cd27 
>   server/src/com/cloud/api/query/dao/ServiceOfferingJoinDaoImpl.java 6f6e277 
>   server/src/com/cloud/api/query/vo/ServiceOfferingJoinVO.java 05ff5f3 
>   server/src/com/cloud/configuration/ConfigurationManager.java 98eae37 
>   server/src/com/cloud/configuration/ConfigurationManagerImpl.java 704162e 
>   server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java 4ef2152 
>   server/src/com/cloud/hypervisor/HypervisorGuruBase.java 50bfb30 
>   server/src/com/cloud/pci/PciDeviceManager.java PRE-CREATION 
>   server/src/com/cloud/pci/PciDeviceManagerImpl.java PRE-CREATION 
>   server/src/com/cloud/resource/ResourceManagerImpl.java fe91cb3 
>   server/src/com/cloud/vm/UserVmManagerImpl.java 66103fb 
>   server/test/com/cloud/vpc/MockConfigurationManagerImpl.java 95230a5 
>   setup/db/db/schema-410to420.sql 325924b 
>   ui/dictionary.jsp 7809cdb 
>   ui/scripts/configuration.js 7f0e1a5 
>   ui/scripts/docs.js 5aa352a 
> 
> Diff: https://reviews.apache.org/r/12098/diff/
> 
> 
> Testing
> -------
> 
> Testing done with Mellanox ConnectX-2 NIC with SR-IOV on Ubuntu Raring.
> 
> 
> Thanks,
> 
> Pawit Pornkitprasan
> 
>