[clug] KVM and PCI pass-through

Scott Ferguson scott.ferguson.clug at gmail.com
Tue Jun 2 22:11:51 MDT 2015

On 03/06/15 09:35, Bob Edwards wrote:
> Anyone on list had any experience with PCI pass-through in KVM?
> We have had some partial success in getting an old PCI DAQ card
> "passed-through" to an ancient copy of Windows 2000 running as a
> KVM guest on a Debian Jessie host. There were issues with shared
> interrupts causing some problems which we were able to resolve,
> but we still have some issues with reading some memory areas from
> the DAQ card.
> Have also tried it with VirtualBox with less success.
> Next step is to try it with a Linux guest and write some code on
> the guest side to see what we can see.
> Any other tips or warnings?

Yes, and, no. :)
I've little experience with KVM, but some with VirtualBox which I'll put
here in case someone else uses it.

VirtualBox supports PCI-passthrough if:-
;VirtualBox extensions is installed
;the host box has IOMMU hardware support (AMD-Vi, Intel VT-d) *and* it's
enabled in the BIOS, *or* some PCI serial cards *if* host bus mastering
is disabled for the device
;some PCI-Express cards if GART is *not* used
;the guest is configured for nested paging and AMD-V/VT-d
;the host kernel has IOMMU, DMA remapping, and the PCI stub driver
(standard in kernel > 2.6.31) *and* uses the IOMMU modules (grep -i
'dmar\|pci-dma' dmesg) (may also require "intel_iommu=on" boot option)
;the card doesn't share interrupts (support 'can' be flaky when IRQs are
;you "attach" the device (VBoxManage modifyvm "VM name" --pciattach

In your instance it 'should' work if your host hardware supports it, you
may also need to customize the guest BIOS settings. I've done similar
with an old PCI video-processing card in an XP guest.

> cheers,
> Bob Edwards.

Kind regards

More information about the linux mailing list