Skip to contentSkip to conversation

take 2: PCIe IO space multiplexing: Linux part: guestdev kernel paremeter enhance

PATCH New Isaku Yamahata 1 participant 1 message Apr 17, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 3/5 take 2: PCIe IO space multiplexing: Linux part: guestdev kernel paremeter enhance

pci/guestdev: enhance guestdev to accept +iomul.

enhance guestdev to accept +iomul and use it.

Documentation/kernel-parameters.txt +6 -2
@@ -577,11 +577,15 @@ running once the system is up.
 
 	guestdev=	[PCI,ACPI]
 			Format: {<device path>|<sbdf>}][,{<device path>|<sbdf>}[,...]]
-			Format of device path: <hid>[:<uid>]-<dev>.<func>[-<dev>.<func>[,...]]
-			Format of sbdf: [<segment>:]<bus>:<dev>.<func>
+			Format of device path: <hid>[:<uid>]-<dev>.<func>[-<dev>.<func>[,...]][+iomul]
+			Format of sbdf: [<segment>:]<bus>:<dev>.<func>[+iomul]
 			Specifies PCI device for guest domain.
 			If PCI-PCI bridge is specified, all PCI devices
 			behind PCI-PCI bridge are reserved.
+			+iomul means that this PCI function will share
+			IO ports with other +iomul functions under same
+			switch. NOTE: if +iomul is specfied, all the functions
+			of the device will share IO ports.
 
 	guestiomuldev=	[PCI]
 			Format: [sbd][,<sbd>][,...]
drivers/pci/guestdev.c +125 -18

261 lines not on this page · raw message

drivers/pci/iomulti.c +3 -1
@@ -27,6 +27,7 @@
 #include <asm/setup.h>
 #include <asm/uaccess.h>
 
+#include "pci.h"
 #include "iomulti.h"
 
 #define PCI_NUM_BARS		6
@@ -423,7 +424,8 @@ static int pci_is_iomul_dev_param(struct
 			break;
 	}
 
-	return 0;
+	/* check guestcev=<device>+iomul option */
+	return pci_is_iomuldev(pdev);
 }
 
 /*
drivers/pci/pci.h +5 -1
@@ -105,9 +105,13 @@ pci_match_one_device(const struct pci_de
 extern void pci_disable_bridge_window(struct pci_dev *dev);
 #endif
 #ifdef CONFIG_PCI_GUESTDEV
+extern int pci_is_guestdev(struct pci_dev *dev);
 extern int pci_is_reassigndev(struct pci_dev *dev);
+extern int pci_is_iomuldev(struct pci_dev *dev);
 #else
-#define pci_is_reassigndev(dev) 0
+#define pci_is_guestdev(dev)	0
+#define pci_is_reassigndev(dev)	0
+#define pci_is_iomuldev(dev)	0
 #endif
 
 #ifdef CONFIG_PCI_GUESTDEV

pci/guestdev: enhance guestdev to accept +iomul.

enhance guestdev to accept +iomul and use it.

Documentation/kernel-parameters.txt +6 -2
@@ -577,11 +577,15 @@ running once the system is up.
 
 	guestdev=	[PCI,ACPI]
 			Format: {<device path>|<sbdf>}][,{<device path>|<sbdf>}[,...]]
-			Format of device path: <hid>[:<uid>]-<dev>.<func>[-<dev>.<func>[,...]]
-			Format of sbdf: [<segment>:]<bus>:<dev>.<func>
+			Format of device path: <hid>[:<uid>]-<dev>.<func>[-<dev>.<func>[,...]][+iomul]
+			Format of sbdf: [<segment>:]<bus>:<dev>.<func>[+iomul]
 			Specifies PCI device for guest domain.
 			If PCI-PCI bridge is specified, all PCI devices
 			behind PCI-PCI bridge are reserved.
+			+iomul means that this PCI function will share
+			IO ports with other +iomul functions under same
+			switch. NOTE: if +iomul is specfied, all the functions
+			of the device will share IO ports.
 
 	guestiomuldev=	[PCI]
 			Format: [sbd][,<sbd>][,...]
drivers/pci/guestdev.c +125 -18

261 lines not on this page · raw message

drivers/pci/iomulti.c +3 -1
@@ -27,6 +27,7 @@
 #include <asm/setup.h>
 #include <asm/uaccess.h>
 
+#include "pci.h"
 #include "iomulti.h"
 
 #define PCI_NUM_BARS		6
@@ -423,7 +424,8 @@ static int pci_is_iomul_dev_param(struct
 			break;
 	}
 
-	return 0;
+	/* check guestcev=<device>+iomul option */
+	return pci_is_iomuldev(pdev);
 }
 
 /*
drivers/pci/pci.h +5 -1
@@ -105,9 +105,13 @@ pci_match_one_device(const struct pci_de
 extern void pci_disable_bridge_window(struct pci_dev *dev);
 #endif
 #ifdef CONFIG_PCI_GUESTDEV
+extern int pci_is_guestdev(struct pci_dev *dev);
 extern int pci_is_reassigndev(struct pci_dev *dev);
+extern int pci_is_iomuldev(struct pci_dev *dev);
 #else
-#define pci_is_reassigndev(dev) 0
+#define pci_is_guestdev(dev)	0
+#define pci_is_reassigndev(dev)	0
+#define pci_is_iomuldev(dev)	0
 #endif
 
 #ifdef CONFIG_PCI_GUESTDEV

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