All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Piermarini <matt@partlytrue.com>
To: kvm@vger.kernel.org
Subject: PCI passthrough
Date: Wed, 23 Sep 2009 20:01:15 -0400	[thread overview]
Message-ID: <4ABAB6CB.5050803@partlytrue.com> (raw)

Hi all -

I'm trying to PCI passthrough a Digium TDM card (Tiger Jet Network Inc. 
Tiger3XX Modem/ISDN interface) used for a PBX (asterisk).  I'm not 
having any luck and thought I'd post here to see if this is even capable 
of working.   I'm using a host kernel 2.6.30.6-53 (built from a F11 
source rpm).   I've compiled qemu-kvm 10.6, libvirt 0.7.1-1, and tried 
kvm in the 2.6.30.6-53 kernel and kvm-kmod-2.6.30.1.    When starting 
the VM,  pci-stub binds to the card, and the guest can "see" the card 
(lspci -v).   But when the zaptel/dahdi drivers try to init (in the 
guest), I get this:

#modprobe wctdm
Sep 23 19:47:45 test kernel: dahdi: Telephony Interface Registered on 
major 196
Sep 23 19:47:45 test kernel: dahdi: Version: 2.2.0.2
Sep 23 19:47:45 test kernel: wctdm 0000:00:07.0: PCI INT A -> Link[LNKC] 
-> GSI 10 (level, high) -> IRQ 10
Sep 23 19:47:46 test kernel: TDM PCI Master abort
Sep 23 19:47:46 test kernel: Freshmaker version: ff
Sep 23 19:47:46 test kernel: 00 != ff
Sep 23 19:47:46 test kernel: 01 != ff
Sep 23 19:47:46 test kernel: 02 != ff
...lots of these...
Sep 23 19:47:46 test kernel: fd != ff
Sep 23 19:47:46 test kernel: fe != ff
Sep 23 19:47:46 test kernel: Freshmaker failed register test
Sep 23 19:47:46 test kernel: TDM PCI Master abort
Sep 23 19:47:47 test kernel: wctdm: probe of 0000:00:07.0 failed with 
error -5

For guests, I've tried both Centos 5.3 and Fedora 11.  Both behave 
exactly the same (and both are using virtio_net/pci).

Something I've also noticed is that once pci-stub binds and then unbinds 
to the card, the HOST behaves exactly the same (same exact errors when 
modprobe wctdm).  The only way I can get the HOST drivers to work (after 
unbind pci-stub) is to remove the pci card from the bus, then rescan the 
bus to bring it back.  This allows the HOST drivers to work, but this 
trick does not work in the guest.

echo "1" > /sys/bus/pci/devices/0000\:03\:00.0/remove
echo "1" > /sys/bus/pci/rescan

If anybody has any ideas I can try, I'd surely appreciate it.  My host 
does NOT have vt-d capable hardware, and I'm not even sure that is 
requirement - is it?  Host is an Intel ICH10/P45/Q6600.

Thanks - Matt

----------------
lspci -v for the HOST
03:00.0 Communication controller: Tiger Jet Network Inc. Tiger3XX 
Modem/ISDN interface
     Subsystem: Device b119:0003
     Flags: bus master, medium devsel, latency 64, IRQ 20
     I/O ports at d000 [size=256]
     [virtual] Memory at f4000000 (32-bit, non-prefetchable) [size=4K]
     Capabilities: [40] Power Management version 2
     Kernel driver in use: pci-stub
     Kernel modules: hisax, wctdm

lspci -v the the GUEST:

00:07.0 Communication controller: Tiger Jet Network Inc. Tiger3XX 
Modem/ISDN interface
     Subsystem: Device b119:0003
     Physical Slot: 7
     Flags: bus master, medium devsel, latency 64, IRQ 10
     I/O ports at c300 [size=256]
     Memory at f2001000 (32-bit, non-prefetchable) [size=4K]
     Kernel modules: wctdm, hisax






             reply	other threads:[~2009-09-24  0:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-24  0:01 Matt Piermarini [this message]
2009-09-24 11:46 ` PCI passthrough Avi Kivity
2009-09-24 14:03   ` Matt Piermarini
  -- strict thread matches above, loose matches on Subject: below --
2015-03-16 13:35 shacky
2015-03-16 19:56 ` Alex Williamson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ABAB6CB.5050803@partlytrue.com \
    --to=matt@partlytrue.com \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.