On Sun, 2008-07-13 at 10:34 +0300, Avi Kivity wrote: > Muli Ben-Yehuda wrote: > > > >> On the other hand, this means that you will not be able to assign > >> devices unless you specified this when creating the VM; but I think > >> this is fair. > >> > > > > It will be nice to support hot-plugged pass-through devices some time > > in the future. > > > > > > And it should be easy to do too. The question is whether we need to > allocate the iommu domain up front (which would mean that a command line > parameter would be needed, meaning roughly 'support pci device > assignment on this guest'. Kind of like -usb, which means 'support usb > device assignment on this guest'. >
I don't think that its that simple... On a single machine you can have multiple iommu units, each of which controls certain PCI slots. To configure the iommu for a specific device you need to configure the iommu unit that controls that device. This means that we need to know the bus/dev/func of the device before we create the VT-d domain. For hot-plug devices it means that by the time we can create the domain we already have memory slots that we need to add to the VT-d mapping. In addition, some times it is desirable to be able to map the memory as late as possible. For example if the guest supports PVDMA then there is no need to map the entire guest memory, however the host can not tell if the guest supports PVDMA before the memory slots are created. In this case we would like to postpone the mapping of the entire guest memory until we know we have to. Regards, Ben -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
