Skip to contentSkip to conversation

PATCH: add a new pci backend mode: slot

PATCH Tristan Gingold 1 participant 1 message Aug 3, 2006

lore
Share & tools
lore
#0 lore raw

Hi,

this patch add a new pci backend mode to be used by ia64 (although it should work on x86 too). This backend creates a slot for every device.

Tested on ia64.

Tristan.

# HG changeset patch
# User gingold@virtu10
# Node ID 73d97b5a30f8dc637fd18c01da08297396e5a3b9 # Parent 5c6e96a81364c5b6f11d73d70ffc607776f4ddff New virtual pci backend: slot

This backend use a slot per pci device. Contrary to vpci two functions from one slot appear as two slots.
This is useful on ia64 because it doesn't scan functions > 0 if function 0 does not exist.

linux-2.6-xen-sparse/drivers/xen/Kconfig +10 -1
diff -r 5c6e96a81364 -r 73d97b5a30f8 linux-2.6-xen-sparse/drivers/xen/Kconfig
@@ -117,7 +117,7 @@ config XEN_PCIDEV_BACKEND_VPCI
 	  This PCI Backend hides the true PCI topology and makes the frontend
 	  think there is a single PCI bus with only the exported devices on it.
 	  For example, a device at 03:05.0 will be re-assigned to 00:00.0. A
-	  second device at 02:1a.0 will be re-assigned to 00:01.0.
+	  second device at 02:1a.1 will be re-assigned to 00:01.1.
 
 config XEN_PCIDEV_BACKEND_PASS
 	bool "Passthrough"
@@ -129,6 +129,15 @@ config XEN_PCIDEV_BACKEND_PASS
 	  which depend on finding their hardward in certain bus/slot
 	  locations.
 
+config XEN_PCIDEV_BACKEND_SLOT
+	bool "Slot"
+	---help---
+	  This PCI Backend hides the true PCI topology and makes the frontend
+	  think there is a single PCI bus with only the exported devices on it.
+	  Contrary to the virtual PCI backend, a function becomes a new slot.
+	  For example, a device at 03:05.2 will be re-assigned to 00:00.0. A
+	  second device at 02:1a.1 will be re-assigned to 00:01.0.
+
 endchoice
 
 config XEN_PCIDEV_BE_DEBUG
linux-2.6-xen-sparse/drivers/xen/pciback/Makefile +1 -0
diff -r 5c6e96a81364 -r 73d97b5a30f8 linux-2.6-xen-sparse/drivers/xen/pciback/Makefile
@@ -7,6 +7,7 @@ pciback-y += conf_space.o conf_space_hea
 	     conf_space_capability_pm.o \
              conf_space_quirks.o
 pciback-$(CONFIG_XEN_PCIDEV_BACKEND_VPCI) += vpci.o
+pciback-$(CONFIG_XEN_PCIDEV_BACKEND_SLOT) += slot.o
 pciback-$(CONFIG_XEN_PCIDEV_BACKEND_PASS) += passthrough.o
 
 ifeq ($(CONFIG_XEN_PCIDEV_BE_DEBUG),y)
linux-2.6-xen-sparse/drivers/xen/pciback/slot.c new file +151 -0

151 lines not on this page · raw message

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel