[asterisk-users] New VirtualBox Beta Has PCI Pass-Through Support

Tzafrir Cohen tzafrir.cohen at xorcom.com
Sun Jul 10 03:11:54 CDT 2011


On Fri, Jul 08, 2011 at 07:28:39PM -0400, Doug Lytle wrote:
> Can you say a Virtualized Asterisk with a PRI card!
>
> http://www.phoronix.com/scan.php?page=news_item&px=OTY0OQ

I'm not sure this is relevant to your everyday PRI card.

Simple pass-through of PCI is rather simple to implement. It has been
implemented for quite some time in e.g. qemu, IIRC.

But there's one important feature that is tricky to implement: DMA.
DMA allows a PCI card to basically free access to the memory of the
system, without the CPU getting in the middle. Emulating this with the
host CPU in the middle will work, but is exepnsive. But the host does
not want to give the guest free access to the host's memory.

The solution: IOMMU: http://en.wikipedia.org/wiki/Iommu .
The CPU of the system has a Memory Management Unit (MMU) that
maps virtual address spaces to processes. Likewise we know prevent the
IO card from seeing physical addresses. Rather, it sees virtual
addresses mapped by the IOMMU. Just like the operating system maps
addresses for processes, the hypervisor maps address ranger to IO cards.

See also the link in that Phoronix article:
http://www.ibm.com/developerworks/linux/library/l-pci-passthrough/

I'm not well familiar with the relevant hardware, but I believe that not
only not every CPU supports this, but many (most?) PCI cards don't
support IOMMU.

-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen at xorcom.com
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir



More information about the asterisk-users mailing list