Skip to contentSkip to conversation

PCI backend and slot functions

DISCUSSION Tristan Gingold 3 participants 6 messages Aug 2, 2006

lore
Share & tools
lore
#0 lore raw

Hi,

Currently PCI slot functions are not virtualized. When I hide 0000:06:01.1 it appears as 0000:00:00.1 and there is no function 0 for the slot. This is an issue because on linux/ia64, functions > 0 are not probed if there is no function 0.

How is it handled on x86 ?

Should I add an option to virtualize slot functions ?

Tristan.

#1 lore raw
Quoted 8 lines · Tristan Gingold

Currently PCI slot functions are not virtualized. When I hide 0000:06:01.1 it appears as 0000:00:00.1 and there is no function 0 for the slot. This is an issue because on linux/ia64, functions > 0 are not probed if there is no function 0.

How is it handled on x86 ?

Should I add an option to virtualize slot functions ?

IIUC, when you hide 0000:06:01.1 from dom0 you want that device to appear as 0000:06:01.1 to domU. Have you looked at the PCI Backend Mode options in the xenolinux configuration? Specifically, look at the difference between XEN_PCIDEV_BACKEND_VPCI and XEN_PCIDEV_BACKEND_PASS to see if either gives what you want. I've only tried this on x86, but it sounds like what you want, but perhaps there's a bug in the ia64 implementation (I haven't looked at it yet).

-Chris

#2 lore raw
Quoted 8 lines · Chris
Quoted 7 lines · Tristan Gingold

Currently PCI slot functions are not virtualized. When I hide 0000:06:01.1 it appears as 0000:00:00.1 and there is no function 0 for the slot. This is an issue because on linux/ia64, functions > 0 are not probed if there is no function 0.

How is it handled on x86 ?

Quoted 7 lines
Quoted 1 line

Should I add an option to virtualize slot functions ?

IIUC, when you hide 0000:06:01.1 from dom0 you want that device to appear as 0000:06:01.1 to domU. Have you looked at the PCI Backend Mode options in the xenolinux configuration? Specifically, look at the difference between XEN_PCIDEV_BACKEND_VPCI and XEN_PCIDEV_BACKEND_PASS to see if either gives what you want.

Yes both works on ia64.

Quoted 3 lines

I've only tried this on x86, but
it sounds like what you want, but perhaps there's a bug in the ia64 implementation (I haven't looked at it yet).

As far as I understand pci backend and frontend work correctly but the pci cards probing seems to be different to x86.

Thank you for your comment,
Tristan.

#3 lore raw
In reply to Tristan Gingold
Quoted 10 lines · Tristan Gingold

Hi,

Currently PCI slot functions are not virtualized. When I hide 0000:06:01.1 it appears as 0000:00:00.1 and there is no function 0 for the slot. This is an issue because on linux/ia64, functions > 0 are not probed if there is no function 0.

How is it handled on x86 ?

Should I add an option to virtualize slot functions ?

Yes, I think so. The ia64 PCI discovery appears to more closely
follow the PCI spec. Both multi-function and single-function PCI devices must have configuration space at function 0. I would guess x86 may probe all functions to deal with old, buggy hardware.

Alex

Signature · 1 line
Alex Williamson                             HP Open Source & Linux Org.
#4 lore raw
Quoted 8 lines · Alex Williamson
Quoted 7 lines · Tristan Gingold

Hi,

Currently PCI slot functions are not virtualized. When I hide 0000:06:01.1 it appears as 0000:00:00.1 and there is no function 0 for the slot. This is an issue because on linux/ia64, functions > 0 are not probed if there is no function 0.

Quoted 8 lines
Quoted 3 lines

How is it handled on x86 ?

Should I add an option to virtualize slot functions ?

Yes, I think so. The ia64 PCI discovery appears to more closely
follow the PCI spec. Both multi-function and single-function PCI devices must have configuration space at function 0. I would guess x86 may probe all functions to deal with old, buggy hardware.

Ok.

Could we virtualize functions as slots (ie two functions appear as two slots)? Doing something more clever seems not that easy!

Tristan.

#5 lore raw
Quoted 9 lines · Tristan Gingold
Quoted 4 lines · Alex Williamson

Yes, I think so. The ia64 PCI discovery appears to more closely
follow the PCI spec. Both multi-function and single-function PCI devices must have configuration space at function 0. I would guess x86 may probe all functions to deal with old, buggy hardware.

Ok.

Could we virtualize functions as slots (ie two functions appear as two slots)? Doing something more clever seems not that easy!

Seems like a good start to me. I can't guarantee some drivers won't
get confused by this, but its probably a good mechanism to verify that each function could be exported to a domain and still remain functional. Thanks,

Alex

Signature · 1 line
Alex Williamson                             HP Open Source & Linux Org.