What is a driver domain? Is it an unprivileged DomU that has access to a PCI device as described in user doc section 5.3? In that case can the device it is using be virtualized for other DomUs? (I guess not but I just want to be sure there is no magic that can make this happen. ☺) I understand that HVM Domains cannot have direct access to a PCI device. What needs to be done to make this happen? From a prior discussion with Mats, I guess there needs to be a way to inform the HVM domain of the existence of that PCI device. Does a PCI frontend need to be written for the HVM domain and OS drivers need to be made "virtualization aware"? Or is it enough to just have a PCI frontend and off the shelf drivers can be used? Thanks, Aravindh Puthiyaparambil Xen Development Team Unisys, Tredyffrin PA _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> What is a driver domain? Is it an unprivileged DomU that has access to a > PCI device as described in user doc section 5.3?Yep.> In that case can the > device it is using be virtualized for other DomUs? (I guess not but I just > want to be sure there is no magic that can make this happen. ☺)In principle it can export the device to other domUs. For instance, it would use the block or network backends to provide shared access to an owned block / network device.> I understand that HVM Domains cannot have direct access to a PCI device. > What needs to be done to make this happen? From a prior discussion with > Mats, I guess there needs to be a way to inform the HVM domain of the > existence of that PCI device. Does a PCI frontend need to be written for > the HVM domain and OS drivers need to be made "virtualization aware"? Or is > it enough to just have a PCI frontend and off the shelf drivers can be > used?What you really need in a lot of cases is some kind of IOMMU: the guest won''t be able to issue correct DMA requests because it is unaware of the underlying memory structure. I''m not clear if it''s possible on any particular OSes to implement this in software via a custom bus type (where the usual DMA mapping API would be used to translate phys->mach and create bounce buffers if necessary). A hardware IOMMU would enable paravirt guests to access a PCI device without being trusted not to snoop or trash memory. It could also make it possible for an HVM guest to be given direct DMA capabilities given a Xen PCI frontend. Perhaps it would even be possible to fake out a PCI bus so that a special frontend isn''t required. The AMD folks were working on a IOMMU substitute based on the GART, IIRC. There was also some work to utilise the true IOMMU available on some big IBM boxes. HTH, Cheers, Mark -- Dave: Just a question. What use is a unicyle with no seat? And no pedals! Mark: To answer a question with a question: What use is a skateboard? Dave: Skateboards have wheels. Mark: My wheel has a wheel! _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Mark, Thanks for the answers.> What you really need in a lot of cases is some kind of IOMMU: theguest> won''t > be able to issue correct DMA requests because it is unaware of the > underlying > memory structure. I''m not clear if it''s possible on any particularOSes> to > implement this in software via a custom bus type (where the usual DMA > mapping > API would be used to translate phys->mach and create bounce buffers if > necessary).My query was w.r.t *not* having a hardware based IOMMU in the picture. I realize that true isolation cannot be achieved without hardware IOMMU. I was looking to see what it would take (amount of work, difficulty etc) to give direct PCI access to HVM domains with just software. Cheers, Aravindh _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Thu, Dec 14, 2006 at 12:13:39AM -0500, Puthiyaparambil, Aravindh wrote:> > What you really need in a lot of cases is some kind of IOMMU: the > > guest won''t be able to issue correct DMA requests because it is > > unaware of the underlying memory structure. I''m not clear if it''s > > possible on any particular OSes to implement this in software via > > a custom bus type (where the usual DMA mapping API would be used > > to translate phys->mach and create bounce buffers if necessary). > > My query was w.r.t *not* having a hardware based IOMMU in the picture. I > realize that true isolation cannot be achieved without hardware IOMMU. I > was looking to see what it would take (amount of work, difficulty etc) > to give direct PCI access to HVM domains with just software.You need a HW IOMMU anyway to give direct PCI access to HVM domains even if you ignore the isolation aspect. Consider this: the HVMy guest''s driver is not aware of the distinction between physical and machine space, so it programs the device with a *physical* address, since that''s all it knows about. However, p != m, and eventually the data needs to end in the right machine frame, so something needs to translate the physical address to a machine address. The HW IOMMU provides this functionality when the DMA is incoming to memory. Cheers, Muli _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel