dom0 linux: support SBDF with "guestdev=" and remove "reassigndev="
Subsystems (2)
PATCH 1/1 dom0 linux: support SBDF with "guestdev=" and remove "reassigndev="
This patch supports SBDF with "guestdev=" boot parameter and removes "reassigndev=" boot parameter.
Currently there are three boot parameters which specifics PCI device for PCI pass-through.
pciback.hide=
guestdev=
reassigndev=
I'd like to simplify them before xen 3.4 is released. To achieve this, I'd like to make "guestdev=" boot parameter support SBDF, and remove "reassigndev=".
When we don't need to reassign resources and use device path, pciback.hide= boot parameter can be used. The parameter is also needed for backward compatibility.
pciback.hide=(00:01.0)(00:02.0)
When we need to reassign resources or use device path, guestdev= boot parameter can be used. reassign_resources boot parameter is needed to reassign resources, too.
guestdev=00:01.0,00:02.0 reassign_resources
guestdev=PNP0A08:0-1.0,PNP0A08:0-2.0
guestdev=PNP0A08:0-1.0,PNP0A08:0-2.0 reassign_resourcesWith this patch, Isaku-san will not need to add guestioemuldev boot parameter for IO space multiplexing, though it will be necessary to add a flag and omit func# from guestdev.
Thanks,
--
Yuji Shimada
Documentation/kernel-parameters.txt +3 -8
@@ -576,8 +576,9 @@ running once the system is up. gt96100eth= [NET] MIPS GT96100 Advanced Communication Controller guestdev= [PCI,ACPI] - Format: <device path>[,<device path>[,...]] - Format of device path: <hid>[:<uid>]-<dev>.<func>[-<dev>.<func>[...]] + Format: {<device path>|<sbdf>}][,{<device path>|<sbdf>}[,...]] + Format of device path: <hid>[:<uid>]-<dev>.<func>[-<dev>.<func>[,...]] + Format of sbdf: [<segment>:]<bus>:<dev>.<func> Specifies PCI device for guest domain. If PCI-PCI bridge is specified, all PCI devices behind PCI-PCI bridge are reserved.
@@ -1364,12 +1365,6 @@ running once the system is up. Run specified binary instead of /init from the ramdisk, used for early userspace startup. See initrd. - reassigndev= [PCI] - Format: [<segment>:]<bus>:<dev>.<func>[,[<segment>:]<bus>:<dev>.<func>[,...]] - Specifies device to reassign page-aligned memory - resources. PCI-PCI bridge can be specified, if - resource windows need to be expanded. - reassign_resources [PCI,ACPI] Use guestdev parameter to reassign device's resources.
drivers/pci/Makefile +0 -1
@@ -4,7 +4,6 @@ obj-y += access.o bus.o probe.o remove.o pci.o quirks.o \ pci-driver.o search.o pci-sysfs.o rom.o setup-res.o -obj-$(CONFIG_PCI_REASSIGN) += reassigndev.o obj-$(CONFIG_PROC_FS) += proc.o obj-$(CONFIG_PCI_GUESTDEV) += guestdev.o
drivers/pci/guestdev.c +271 -154
673 lines not on this page · raw message
drivers/pci/pci.h +3 -1
@@ -102,8 +102,10 @@ pci_match_one_device(const struct pci_de }#ifdef CONFIG_PCI_REASSIGN +extern void pci_disable_bridge_window (struct pci_dev *dev); +#endif +#ifdef CONFIG_PCI_GUESTDEV extern int pci_is_reassigndev (struct pci_dev *dev); -extern void pci_disable_bridge_window (struct pci_dev *dev);#else #define pci_is_reassigndev (dev) 0#endif
drivers/pci/reassigndev.c deleted +0 -87
87 lines not on this page · raw message
Quoted 3 lines · Yuji Shimada
With this patch, Isaku-san will not need to add guestioemuldev boot parameter for IO space multiplexing, though it will be necessary to add a flag and omit func# from guestdev.
Either this isn't against linux-2.6.18-xen tip or the patch is corrupted. Hardly any chunks applied with 'patch -p1'.
-- Keir
Quoted 8 lines · On Wed, 08 Apr 2009 10:17:13 +0100 Keir Fraser <[email protected]>…
Quoted 3 lines · Yuji Shimada
With this patch, Isaku-san will not need to add guestioemuldev boot parameter for IO space multiplexing, though it will be necessary to add a flag and omit func# from guestdev.
Either this isn't against linux-2.6.18-xen tip or the patch is corrupted. Hardly any chunks applied with 'patch -p1'.
In my environment, my patch applies to linux-2.6.18-xen(changeset:855).
Could you try to apply the attached file? The file is the output of 'hg' command and I tested that the file applies.
Thanks,
--
Yuji Shimada
This patch supports SBDF with "guestdev=" boot parameter and removes "reassigndev=" boot parameter.
Currently there are three boot parameters which specifics PCI device for PCI pass-through.
pciback.hide=
guestdev=
reassigndev=
I'd like to simplify them before xen 3.4 is released. To achieve this, I'd like to make "guestdev=" boot parameter support SBDF, and remove "reassigndev=".
When we don't need to reassign resources and use device path, pciback.hide= boot parameter can be used. The parameter is also needed for backward compatibility.
pciback.hide=(00:01.0)(00:02.0)
When we need to reassign resources or use device path, guestdev= boot parameter can be used. reassign_resources boot parameter is needed to reassign resources, too.
guestdev=00:01.0,00:02.0 reassign_resources
guestdev=PNP0A08:0-1.0,PNP0A08:0-2.0
guestdev=PNP0A08:0-1.0,PNP0A08:0-2.0 reassign_resourcesWith this patch, Isaku-san will not need to add guestioemuldev boot parameter for IO space multiplexing, though it will be necessary to add a flag and omit func# from guestdev.
Documentation/kernel-parameters.txt +3 -8
@@ -576,8 +576,9 @@ running once the system is up. gt96100eth= [NET] MIPS GT96100 Advanced Communication Controller guestdev= [PCI,ACPI] - Format: <device path>[,<device path>[,...]] - Format of device path: <hid>[:<uid>]-<dev>.<func>[-<dev>.<func>[...]] + Format: {<device path>|<sbdf>}][,{<device path>|<sbdf>}[,...]] + Format of device path: <hid>[:<uid>]-<dev>.<func>[-<dev>.<func>[,...]] + Format of sbdf: [<segment>:]<bus>:<dev>.<func> Specifies PCI device for guest domain. If PCI-PCI bridge is specified, all PCI devices behind PCI-PCI bridge are reserved.
@@ -1364,12 +1365,6 @@ running once the system is up. Run specified binary instead of /init from the ramdisk, used for early userspace startup. See initrd. - reassigndev= [PCI] - Format: [<segment>:]<bus>:<dev>.<func>[,[<segment>:]<bus>:<dev>.<func>[,...]] - Specifies device to reassign page-aligned memory - resources. PCI-PCI bridge can be specified, if - resource windows need to be expanded. - reassign_resources [PCI,ACPI] Use guestdev parameter to reassign device's resources.
drivers/pci/Makefile +0 -1
@@ -4,7 +4,6 @@ obj-y += access.o bus.o probe.o remove.o pci.o quirks.o \ pci-driver.o search.o pci-sysfs.o rom.o setup-res.o -obj-$(CONFIG_PCI_REASSIGN) += reassigndev.o obj-$(CONFIG_PROC_FS) += proc.o obj-$(CONFIG_PCI_GUESTDEV) += guestdev.o
drivers/pci/guestdev.c +271 -154
673 lines not on this page · raw message
drivers/pci/pci.h +3 -1
@@ -102,8 +102,10 @@ pci_match_one_device(const struct pci_de }#ifdef CONFIG_PCI_REASSIGN +extern void pci_disable_bridge_window (struct pci_dev *dev); +#endif +#ifdef CONFIG_PCI_GUESTDEV extern int pci_is_reassigndev (struct pci_dev *dev); -extern void pci_disable_bridge_window (struct pci_dev *dev);#else #define pci_is_reassigndev (dev) 0#endif
drivers/pci/reassigndev.c deleted +0 -87
87 lines not on this page · raw message
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Re: [PATCH] dom0 linux: support SBDF with "guestdev=" andremove "reassigndev="
In reply to Yuji ShimadaQuoted 22 lines
Quoted 1 line
Quoted 1 line
Yuji Shimada <[email protected]> 08.04.09 10:30 >>>
This patch supports SBDF with "guestdev=" boot parameter and removes "reassigndev=" boot parameter.
Currently there are three boot parameters which specifics PCI device for PCI pass-through.
pciback.hide=
guestdev=
reassigndev=I'd like to simplify them before xen 3.4 is released. To achieve this, I'd like to make "guestdev=" boot parameter support SBDF, and remove "reassigndev=".
When we don't need to reassign resources and use device path, pciback.hide= boot parameter can be used. The parameter is also needed for backward compatibility.
pciback.hide=(00:01.0)(00:02.0)
Quoted 7 lines
When we need to reassign resources or use device path, guestdev= boot parameter can be used.
reassign_resourcesboot parameter is needed to reassign resources, too.guestdev=00:01.0,00:02.0 reassign_resources guestdev=PNP0A08:0-1.0,PNP0A08:0-2.0 guestdev=PNP0A08:0-1.0,PNP0A08:0-2.0 reassign_resources
Which basically means reassignment of resources will become and all-or- nothing feature rather than a per-device one - is that really intended? It seems like a step backwards to me.
Jan
Re: [PATCH] dom0 linux: support SBDF with "guestdev=" andremove "reassigndev="
Quoted 26 lines · On Thu, 09 Apr 2009 11:39:45 +0100 "Jan Beulich" <[email protected]> wrote:
Quoted 26 lines
Quoted 1 line
Quoted 1 line
Yuji Shimada <[email protected]> 08.04.09 10:30 >>>
This patch supports SBDF with "guestdev=" boot parameter and removes "reassigndev=" boot parameter.
Currently there are three boot parameters which specifics PCI device for PCI pass-through.
pciback.hide=
guestdev=
reassigndev=I'd like to simplify them before xen 3.4 is released. To achieve this, I'd like to make "guestdev=" boot parameter support SBDF, and remove "reassigndev=".
When we don't need to reassign resources and use device path, pciback.hide= boot parameter can be used. The parameter is also needed for backward compatibility.
pciback.hide=(00:01.0)(00:02.0)When we need to reassign resources or use device path, guestdev= boot parameter can be used.
reassign_resourcesboot parameter is needed to reassign resources, too.
Quoted 7 lines
Quoted 3 lines
guestdev=00:01.0,00:02.0 reassign_resources guestdev=PNP0A08:0-1.0,PNP0A08:0-2.0 guestdev=PNP0A08:0-1.0,PNP0A08:0-2.0 reassign_resourcesWhich basically means reassignment of resources will become and all-or- nothing feature rather than a per-device one - is that really intended? It seems like a step backwards to me.
Reassignment of resources is all-or-nothing feature.
When reassign_resources is specified, all PCI devices specified by "guestdev=" are the targets of reassignment. Please note that PCI devices which are not specified by "guestdev=" are not the targets of reassignment.
To avoid fragmentation of resources, all-or-nothing is better than per-device. On the other hand, if there is a device which cause some issues on reassignment, per-device is needed. But I have not seen such a device yet.
Thanks,
--
Yuji Shimada