> On Aug. 7, 2013, 10:30 a.m., Pawit Pornkitprasan wrote: > > I will rebase it in a few days. > > > > This patch only includes support for KVM, but the concepts used can apply > > for all hypervisors supporting PCI Passthrough so additional patches can > > add support for XenServer. (Just to be clear, I'm not planning on adding > > support for other hypervisors myself.) > > > > When used with other hypervisors, any attempt to start any VM requesting > > PCI Passthrough will gracefully fail in planning step as no host will be > > able to provide the request PCI devices.
Reminder - Hi, This review has been pending for long. Please update to "submitted" if this has already been committed. Thanks - Amogh ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/12098/#review24788 ----------------------------------------------------------- On Aug. 8, 2013, 3:44 p.m., Pawit Pornkitprasan wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/12098/ > ----------------------------------------------------------- > > (Updated Aug. 8, 2013, 3:44 p.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 00d526d > > api/src/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java > decac29 > api/src/org/apache/cloudstack/api/response/ServiceOfferingResponse.java > 5c5b369 > client/WEB-INF/classes/resources/messages.properties 4fc09ee > client/tomcatconf/applicationContext.xml.in b832b09 > 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 dd26941 > 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 > 542136a > > plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtDomainXMLParser.java > a283768 > > plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java > 6aaabc5 > server/src/com/cloud/agent/manager/allocator/impl/FirstFitAllocator.java > 088591f > server/src/com/cloud/alert/AlertManagerImpl.java c437a8c > server/src/com/cloud/api/query/dao/ServiceOfferingJoinDaoImpl.java 945e67b > server/src/com/cloud/api/query/vo/ServiceOfferingJoinVO.java 05ff5f3 > server/src/com/cloud/configuration/ConfigurationManager.java 775601a > server/src/com/cloud/configuration/ConfigurationManagerImpl.java 00503c5 > server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java b896b84 > server/src/com/cloud/hypervisor/HypervisorGuruBase.java 8a9df03 > 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 beb5f4e > server/src/com/cloud/vm/UserVmManagerImpl.java 07d5f64 > server/test/com/cloud/vpc/MockConfigurationManagerImpl.java 840f539 > setup/db/db/schema-420to430.sql 52b8391 > ui/dictionary.jsp 3dfdefe > ui/scripts/configuration.js f9c2498 > ui/scripts/docs.js e3be08c > > 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 > >