[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-users] Example PCI hiding in dom0 and direct access in domU


  • To: xen-users@xxxxxxxxxxxxxxxxxxx
  • From: Brian McEntire <brian.mcentire@xxxxxxxxx>
  • Date: Mon, 28 Nov 2005 00:41:43 -0500
  • Delivery-date: Mon, 28 Nov 2005 05:41:47 +0000
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=aAUSkHb3jd0oX6AzU/n8GuD/or7FfRquvzM0W6YF8r6Um1WzVrbsY5bifoplh/aRm4PX8nYRB1II6v3px4f3P3dAGeFquE5TUhg7GGuiTY8rGabimOd5/wLEPMBGdmmbcs5aHuaLEzd8fe+yWzC61/J8edzrcnZ5gGtmr4nQXh0=
  • List-id: Xen user discussion <xen-users.lists.xensource.com>

Hello all,
  I'm new to the list and working my way up the Xen learning curve. This is exciting technology and my initial experience has been very positive!!

  I've set up several dom0 and single domU VMs on different computers to get my feet wet.

  Now I'm trying to get set up an Asterisk server in a domU VM so I can take one of my home computers offline (and hopefully save on the electric bill.)

  I'm using a Zaptel TDM422B PCI card. That may or may not mean something to most people on the list, but the short of it is, it's a PCI card that interfaces the Asterisk Open Source PBX system to plain old telephone service lines. I have this card working on a Debian Testing install an also in a Debian Stable Linux system. Now I'd like to get it working inside a Xen virtual machine.

  Here is the grub menu.lst config in Dom0:

title Xen 2.0.7 / XenLinux 2.6
  kernel /boot/xen-2.0.7.gz dom0_mem=262144 physdev_dom0_hide=(03:01.0)
  module /boot/vmlinuz-2.6-xen0 root=/dev/hda1 ro console=tty0

Before booting with the physdev_dom0_hide parameter, lspci showed the following information about the Zaptel PCI card:
  0000:03:01.0 Communication controller: Tiger Jet Network Inc. Tiger3XX Modem/ISDN interface

The trouble I'm having is being able to see this card inside of a DomU after it is confirmed/successfully hidden from domO.

My DomU config has this line and, other than not seeing the PCI card, works fine:
  pci = ['03,01,0']

I'm running Xen 2.0.7 built from source using make-world. It appeared to grab the latest 2.6.11 kernel and patch it during the build process. The result is Xen 2.0.7 running a 2.6.11.12-xen0 kernel.

After booting dom0, I use xm create -c asterisk to start the asterisk domU instance. It boots fine, but it does not successfully load the wctdm module (which I built in dom0 by setting KSRC to domU's kernel source location. I also copied the /lib/modules/2.6.11.12-xenU tree into the domU file system so it would have access to the compiled modules.)

Inside the booted domU, modprobe gives this error:

# modprobe wctdm
Zapata Telephony Interface Registered on major 196
ZT_CHANCONFIG failed on channel 1: No such device or address (6)
FATAL: Error running install command for wctdm

lspci inside of domU does not work:

# lspci
pcilib: Cannot open /sys/bus/pci/devices
pcilib: Cannot open /proc/bus/pci
lspci: Cannot find any working access method.

However, at least /proc is mounted and looks normal.


I have tried recompiling the domU kernel and changing these options to Y in the .config:
> CONFIG_XEN_PRIVILEGED_GUEST=y
> CONFIG_XEN_PHYSDEV_ACCESS=y

(in fact, I tried all four combinations -- NN, YN, NY, YY -- none of these allowed the card to work in domU)


Can anyone walk me through hiding a device from dom0 and getting it to work in domU, or point out the mistakes in what I tried above?

For now, I am successfully running the card in dom0 (after undo'ing the hiding parameter in grub and rebooting).

Thank you!
  Brian
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.