WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] PCI passthrough working on Xen 3!

Hi Ryan,

On Thu, Feb 23, 2006 at 08:39:19AM -0500, Ryan wrote:
> Are you giving all 5 of your usb controllers to your domU? I'm assuming
> the lspci output above is from your domU, but I just want to be sure. I
> believe the 5 controllers work together to cover all of your USB ports.

Yes, I gave all 5 to domU.

> If the device doesn't show up in your domU, does it show up in dom0? Can
> you share /proc/interrupts from your dom0 as well? Also, what kind of
> information to you find in your dom0 kernel logs? Can you share anything
> in 'dmesg' that relates to your USB devices (look for statements that
> match the PCI slot - if you have an ACPI system, you should see some
> ACPI log entries about interrupts).

Today I am using xen-unstable.hg:
# hg identify
13e9fdaeed27 tip

If a USB device is physically connected to the USB port when the domU is
started, the domU sees it.  Disconnecting the device is also recognized.
Plugging it back in, however, goes unnoticed.

Since the UHCI/EHCI controllers are hidden from dom0, nothing shows up in
dom0; lsusb has no output.

Here is the /proc/interrupts from dom0:

# cat /proc/interrupts
           CPU0       CPU1
  1:       4582          0        Phys-irq  i8042
  7:          0          0        Phys-irq  parport0
  8:          0          0        Phys-irq  rtc
  9:          0          0        Phys-irq  acpi
 12:      49114          0        Phys-irq  i8042
 14:         72          0        Phys-irq  ide0
 16:       3435          0        Phys-irq  HDA Intel
 17:      22893          0        Phys-irq  eth0
 20:          2          0        Phys-irq  ohci1394
 22:      70055          0        Phys-irq  libata
256:     334858          0     Dynamic-irq  timer0
257:     157373          0     Dynamic-irq  resched0
258:         29          0     Dynamic-irq  callfunc0
259:          0     222619     Dynamic-irq  resched1
260:          0        270     Dynamic-irq  callfunc1
261:          0    3811263     Dynamic-irq  timer1
262:          0          0     Dynamic-irq  xenbus
263:          0          0     Dynamic-irq  console
NMI:          0          0
LOC:          0          0
ERR:          0
MIS:          0

Here is some dom0 dmesg data:

# dmesg|grep 00:1d
Bootdata ok (command line is root=/dev/ram0 init=/linuxrc ramdisk=65536 
real_root=/dev/sata1/root udev dolvm2 
pciback.hide=(06:04.0)(06:05.0)(00:1d.0)(00:1d.1)(00:1d.2)(00:1d.3)(00:1d.7)(05:05.0))
Kernel command line: root=/dev/ram0 init=/linuxrc ramdisk=65536 
real_root=/dev/sata1/root udev dolvm2 
pciback.hide=(06:04.0)(06:05.0)(00:1d.0)(00:1d.1)(00:1d.2)(00:1d.3)(00:1d.7)(05:05.0)
pciback: seizing PCI device 0000:00:1d.0
pciback: seizing PCI device 0000:00:1d.1
pciback: seizing PCI device 0000:00:1d.2
pciback: seizing PCI device 0000:00:1d.3
pciback: seizing PCI device 0000:00:1d.7
ACPI: PCI Interrupt 0000:00:1d.7[A] -> GSI 21 (level, low) -> IRQ 18
ACPI: PCI interrupt for device 0000:00:1d.7 disabled
ACPI: PCI Interrupt 0000:00:1d.3[D] -> GSI 23 (level, low) -> IRQ 19
ACPI: PCI interrupt for device 0000:00:1d.3 disabled
ACPI: PCI Interrupt 0000:00:1d.2[C] -> GSI 18 (level, low) -> IRQ 20
ACPI: PCI interrupt for device 0000:00:1d.2 disabled
ACPI: PCI Interrupt 0000:00:1d.1[B] -> GSI 22 (level, low) -> IRQ 21
ACPI: PCI interrupt for device 0000:00:1d.1 disabled
ACPI: PCI Interrupt 0000:00:1d.0[A] -> GSI 21 (level, low) -> IRQ 18
ACPI: PCI interrupt for device 0000:00:1d.0 disabled

Now, when I start domU, I get the following dmesg output in dom0:

pciback: vpci: 0000:06:04.0: assign to virtual slot 0
pciback: vpci: 0000:00:1d.0: assign to virtual slot 1
pciback: vpci: 0000:00:1d.1: assign to virtual slot 1 func 1
pciback: vpci: 0000:00:1d.2: assign to virtual slot 1 func 2
pciback: vpci: 0000:00:1d.3: assign to virtual slot 1 func 3
pciback: vpci: 0000:00:1d.7: assign to virtual slot 1 func 7
pciback: vpci: 0000:05:05.0: assign to virtual slot 2
device vif1.0 entered promiscuous mode
br0: port 2(vif1.0) entering learning state
br0: topology change detected, propagating
br0: port 2(vif1.0) entering forwarding state
PCI: Enabling device 0000:00:1d.7 (0000 -> 0002)
ACPI: PCI Interrupt 0000:00:1d.7[A] -> GSI 21 (level, low) -> IRQ 18
PCI: Setting latency timer of device 0000:00:1d.7 to 64
PCI: Enabling device 0000:00:1d.0 (0000 -> 0001)
ACPI: PCI Interrupt 0000:00:1d.0[A] -> GSI 21 (level, low) -> IRQ 18
PCI: Setting latency timer of device 0000:00:1d.0 to 64
PCI: Enabling device 0000:00:1d.1 (0000 -> 0001)
ACPI: PCI Interrupt 0000:00:1d.1[B] -> GSI 22 (level, low) -> IRQ 21
PCI: Setting latency timer of device 0000:00:1d.1 to 64
PCI: Enabling device 0000:00:1d.2 (0000 -> 0001)
ACPI: PCI Interrupt 0000:00:1d.2[C] -> GSI 18 (level, low) -> IRQ 20
PCI: Setting latency timer of device 0000:00:1d.2 to 64
PCI: Enabling device 0000:00:1d.3 (0000 -> 0001)
ACPI: PCI Interrupt 0000:00:1d.3[D] -> GSI 23 (level, low) -> IRQ 19
PCI: Setting latency timer of device 0000:00:1d.3 to 64
PCI: Enabling device 0000:06:04.0 (0000 -> 0003)
ACPI: PCI Interrupt 0000:06:04.0[A] -> GSI 16 (level, low) -> IRQ 16

When I destroy the domU:

br0: port 2(vif1.0) entering disabled state
ACPI: PCI interrupt for device 0000:06:04.0 disabled
ACPI: PCI interrupt for device 0000:00:1d.0 disabled
ACPI: PCI interrupt for device 0000:00:1d.1 disabled
ACPI: PCI interrupt for device 0000:00:1d.2 disabled
ACPI: PCI interrupt for device 0000:00:1d.3 disabled
ACPI: PCI interrupt for device 0000:00:1d.7 disabled
device vif1.0 left promiscuous mode
br0: port 2(vif1.0) entering disabled state

Also, at this point, the mouse goes dead (the optical emitter is off.)

Now, if I play with domU (i.e., cat /dev/input/mice) I can watch mouse data.

Here are dome domU kernel messages:

usbcore: registered new driver usbfs
usbcore: registered new driver hub
PCI: Enabling device 0000:00:01.7 (0000 -> 0002)
PCI: Setting latency timer of device 0000:00:01.7 to 64
ehci_hcd 0000:00:01.7: EHCI Host Controller
ehci_hcd 0000:00:01.7: debug port 1
PCI: cache line size of 128 is not supported by device 0000:00:01.7
ehci_hcd 0000:00:01.7: new USB bus registered, assigned bus number 1
ehci_hcd 0000:00:01.7: irq 18, io mem 0xffa80800
ehci_hcd 0000:00:01.7: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 8 ports detected
usbcore: registered new driver hiddev
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.6:USB HID core driver
Initializing USB Mass Storage driver...
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
USB Universal Host Controller Interface driver v2.3
PCI: Enabling device 0000:00:01.0 (0000 -> 0001)
PCI: Setting latency timer of device 0000:00:01.0 to 64
uhci_hcd 0000:00:01.0: UHCI Host Controller
uhci_hcd 0000:00:01.0: new USB bus registered, assigned bus number 2
uhci_hcd 0000:00:01.0: irq 18, io base 0x0000ff80
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
PCI: Enabling device 0000:00:01.1 (0000 -> 0001)
PCI: Setting latency timer of device 0000:00:01.1 to 64
uhci_hcd 0000:00:01.1: UHCI Host Controller
uhci_hcd 0000:00:01.1: new USB bus registered, assigned bus number 3
uhci_hcd 0000:00:01.1: irq 21, io base 0x0000ff60
usb usb3: configuration #1 chosen from 1 choice
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 2 ports detected
PCI: Enabling device 0000:00:01.2 (0000 -> 0001)
PCI: Setting latency timer of device 0000:00:01.2 to 64
uhci_hcd 0000:00:01.2: UHCI Host Controller
uhci_hcd 0000:00:01.2: new USB bus registered, assigned bus number 4
uhci_hcd 0000:00:01.2: irq 20, io base 0x0000ff40
usb usb4: configuration #1 chosen from 1 choice
hub 4-0:1.0: USB hub found
hub 4-0:1.0: 2 ports detected
PCI: Enabling device 0000:00:01.3 (0000 -> 0001)
PCI: Setting latency timer of device 0000:00:01.3 to 64
uhci_hcd 0000:00:01.3: UHCI Host Controller
uhci_hcd 0000:00:01.3: new USB bus registered, assigned bus number 5
uhci_hcd 0000:00:01.3: irq 19, io base 0x0000ff20
usb usb5: configuration #1 chosen from 1 choice
hub 5-0:1.0: USB hub found
hub 5-0:1.0: 2 ports detected
ohci_hcd: 2005 April 22 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)
sl811: driver sl811-hcd, 19 May 2005
usb 5-1: new low speed USB device using uhci_hcd and address 2
usb 5-1: configuration #1 chosen from 1 choice
input: Logitech USB Mouse as /class/input/input0
input: USB HID v1.10 Mouse [Logitech USB Mouse] on usb-0000:00:01.3-1
e100: Intel(R) PRO/100 Network Driver, 3.5.10-k2-NAPI
e100: Copyright(c) 1999-2005 Intel Corporation
PCI: Enabling device 0000:00:00.0 (0000 -> 0003)
e100: eth1: e100_probe: addr 0xf0001000, irq 16, MAC addr 00:90:27:FC:49:F6

When I unplug the mouse from the USB port, domU sayeth:

usb 5-1: USB disconnect, address 2

When I plug it back in, neither domU or dom0 produce any messages.

Please let me know if I can do any other tests.  As you can see from
the above output, I have an Intel e100 card on eth1.  This card seems
to work just fine in domU.

Regards,

Jeff

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