Ryan
2006-Apr-26 20:04 UTC
[Xen-devel] [PATCH] pciback: configuration space handlers for capability list structures
This patch adds the ability to have restricted write access to some of the structures on the capability list. Specifically, this patch adds support for reading data through the Vital Product Data capability structure and for manipulating power management of a card. A driver domain is not allowed to enable Power Management Events (the PME trace may be shared across devices in many domains), but it can put a device in its control to sleep or query it for power usage statistics. This code could possibly be expanded in the future to add support for AGP, PCI-X, and MSI/MSIX (all of which are controlled through structures on the capability list). This patch also corrects some formatting issues in the PCI backend and adds some comments to the code regarding permissive mode. This patch was previously submitted as part of a larger patch. There have been no significant changes; just made this code independent of the larger patch. Signed-off-by: Ryan Wilson <hap9@epoch.ncsc.mil> --- b/linux-2.6-xen-sparse/drivers/xen/pciback/conf_space_capability.c | 71 ++++++ b/linux-2.6-xen-sparse/drivers/xen/pciback/conf_space_capability.h | 23 + b/linux-2.6-xen-sparse/drivers/xen/pciback/conf_space_capability_pm.c | 113 +++++++++ b/linux-2.6-xen-sparse/drivers/xen/pciback/conf_space_capability_vpd.c | 42 +++ linux-2.6-xen-sparse/drivers/xen/pciback/Makefile | 5 linux-2.6-xen-sparse/drivers/xen/pciback/conf_space.c | 116 +++++++--- linux-2.6-xen-sparse/drivers/xen/pciback/conf_space.h | 38 ++- linux-2.6-xen-sparse/drivers/xen/pciback/conf_space_header.c | 56 +++- linux-2.6-xen-sparse/drivers/xen/pciback/pci_stub.c | 49 +--- linux-2.6-xen-sparse/drivers/xen/pciback/pciback.h | 8 linux-2.6-xen-sparse/drivers/xen/pciback/pciback_ops.c | 2 11 files changed, 443 insertions(+), 80 deletions(-) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel