WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 4/5] pciback: user-space quirks policy

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 4/5] pciback: user-space quirks policy
From: Chris <hap10@xxxxxxxxxxxxxx>
Date: Mon, 17 Jul 2006 15:15:59 -0400
Delivery-date: Mon, 17 Jul 2006 12:18:31 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.4 (X11/20060614)
The attached patch contains two policy files written in what is intended
to be human-readable SXP.

1. xend-pci-quirks.sxp:

Specifies which PCI device(s) may write to a set of PCI configuration
space registers.  A quirky PCI device is identified by its vendor ID,
device ID, subvendor ID, and subdevice ID.  If a matching entry is
found, the corresponding fields will be sent to the PCI bus manager.
Fields are composed of a register, size, and mask -- although the mask
field is currently unused.

The included policy file is for a range of tg3 devices, which is the
only type of quirky device I know about.  Users with other quirky
devices are invited to either add entries to this policy file or add an
entry in the permissive file, described next.  In either case, send an
email to the xen-devel list to make the device known.

2. xend-pci-permissive.sxp

Lists PCI devices that pciback should not prevent from writing to their
configuration space.  This can be necessary if, for example, a new
Tigon3 devices is released with different PCI vendor/device values such
that no entry in xend-pci-quirks.sxp is triggered.

Signed-off-by: Chris Bookholt <hap10@xxxxxxxxxxxxxx>
diff -r b20580cf7fc1 -r 94a0a82c91d1 tools/examples/Makefile
--- a/tools/examples/Makefile   Wed Jul 12 16:34:39 2006 +0100
+++ b/tools/examples/Makefile   Thu Jul 13 13:38:57 2006 -0400
@@ -18,6 +18,8 @@ XEN_CONFIGS += xmexample2
 XEN_CONFIGS += xmexample2
 XEN_CONFIGS += xmexample.hvm
 XEN_CONFIGS += xmexample.vti
+XEN_CONFIGS += xend-pci-quirks.sxp
+XEN_CONFIGS += xend-pci-permissive.sxp
 
 # Xen script dir and scripts to go there.
 XEN_SCRIPT_DIR = /etc/xen/scripts
diff -r b20580cf7fc1 -r 94a0a82c91d1 tools/examples/xend-pci-permissive.sxp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/examples/xend-pci-permissive.sxp    Thu Jul 13 13:38:57 2006 -0400
@@ -0,0 +1,33 @@
+###############################################################################
+# Configuration file for granting quiry PCI devices full write access to their 
+# configuration space.  This file should only be used when you are unable to 
+# determine the exact registers required by your device.  Even so, it should 
+# be used only temporarily.
+# 
+# SEND A MESSAGE TO xen-devel@xxxxxxxxxxxxxxxxxxx IF YOU USE THIS FILE.
+# 
+# Using this file should NOT be necessary.  If you must use it to make some
+# device work, send a message to the above list with as much information about 
+# your device as possible so the developers can make accomodations for it.  
+# Once developers make the necessary updates you can remove the corresponding
+# entry for your device. 
+###############################################################################
+# This is a bogus entry to show how a new device would be added to the list.
+# Entries are formated like the following:  'domain:bus:slot:function'
+#  
+# Case 1: The file is originally empty.  Add the following lines, adapted with
+#         your device's domain, bus, slot, and function.
+#
+#  (unconstrained_dev_ids
+#    ('0000:02:00.0')  # first entry
+#  )
+#
+# 
+# Case 2: Appending to an existing list.  Entries are comma delimited.
+#  
+#  (unconstrained_dev_ids
+#    ('XXXX:XX:XX.X',  # existing entry
+#     '0000:02:00.0')   # new entry
+#  )
+#
+###############################################################################
diff -r b20580cf7fc1 -r 94a0a82c91d1 tools/examples/xend-pci-quirks.sxp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/examples/xend-pci-quirks.sxp        Thu Jul 13 13:38:57 2006 -0400
@@ -0,0 +1,96 @@
+###############################################################################
+# Configuration file for quirky PCI devices that require write-access to 
+# parts of the configuration space.  Use this file to specific PCI device
+# IDs and the configuration space fields to which those devices must be
+# able to write.
+#
+# Length is important, so be sure to match new entries with the 
+# lengths of comparable existing entries. 
+#
+# Additions to this file take effect as soon as a new domain with a 
+# matching device is started.  However, to remove a field that was 
+# previously applied to a device you must unbind the device from 
+# pciback.
+###############################################################################
+# This is a bogus entry to show how a new device would be added to the list
+#
+# (new_quirky_dev_name
+#    (pci_ids 
+#       ('0123:4567:890A:BCEF') 
+#    )
+#
+#    (pci_config_space_fields 
+#       ('12345678:1:00000000')
+#    )
+# )
+###############################################################################
+
+(tg3
+    # pci_ids are specified in hex hex with the following format:
+    #    'vendor_id:device_id:subvendor_id:subdevice_id'
+    (pci_ids
+        ('14e4:1644:ffff:ffff'   # Broadcom Tigon3 5700
+        '14e4:1645:ffff:ffff'   # Broadcom Tigon3 5701
+         '14e4:1646:ffff:ffff'   # Broadcom Tigon3 5702
+         '14e4:1647:ffff:ffff'   # Broadcom Tigon3 5703
+         '14e4:1648:ffff:ffff'   # Broadcom Tigon3 5704
+         '14e4:164d:ffff:ffff'   # Broadcom Tigon3 5702FE
+         '14e4:1653:ffff:ffff'   # Broadcom Tigon3 5705
+         '14e4:1654:ffff:ffff'   # Broadcom Tigon3 5705_2
+         '14e4:165d:ffff:ffff'   # Broadcom Tigon3 5705M
+         '14e4:165e:ffff:ffff'   # Broadcom Tigon3 5705M_2
+         '14e4:16a6:ffff:ffff'   # Broadcom Tigon3 5702X
+         '14e4:16a7:ffff:ffff'   # Broadcom Tigon3 5703X
+         '14e4:16a8:ffff:ffff'   # Broadcom Tigon3 5704S
+         '14e4:16c6:ffff:ffff'   # Broadcom Tigon3 5702A3
+         '14e4:16c7:ffff:ffff'   # Broadcom Tigon3 5703A3
+         '14e4:1696:ffff:ffff'   # Broadcom Tigon3 5782
+         '14e4:169c:ffff:ffff'   # Broadcom Tigon3 5788
+         '14e4:169d:ffff:ffff'   # Broadcom Tigon3 5789
+         '14e4:170d:ffff:ffff'   # Broadcom Tigon3 5901
+         '14e4:1649:ffff:ffff'   # Broadcom Tigon3 5704S_2
+         '14e4:166e:ffff:ffff'   # Broadcom Tigon3 5705F
+         '14e4:1658:ffff:ffff'   # Broadcom Tigon3 5720
+         '14e4:1659:ffff:ffff'   # Broadcom Tigon3 5721
+         '14e4:1676:ffff:ffff'   # Broadcom Tigon3 5750
+         '14e4:1677:ffff:ffff'   # Broadcom Tigon3 5751
+         '14e4:167c:ffff:ffff'   # Broadcom Tigon3 5750M
+         '14e4:167d:ffff:ffff'   # Broadcom Tigon3 5751M
+         '14e4:167e:ffff:ffff'   # Broadcom Tigon3 5751F
+         '14e4:1600:ffff:ffff'   # Broadcom Tigon3 5752
+         '14e4:1601:ffff:ffff'   # Broadcom Tigon3 5752M
+         '14e4:16f7:ffff:ffff'   # Broadcom Tigon3 5753
+         '14e4:16fd:ffff:ffff'   # Broadcom Tigon3 5753M
+         '14e4:16fe:ffff:ffff'   # Broadcom Tigon3 5753F
+         '14e4:1668:ffff:ffff'   # Broadcom Tigon3 5714
+         '14e4:1678:ffff:ffff'   # Broadcom Tigon3 5715
+         '14e4:166a:ffff:ffff'   # Broadcom Tigon3 5780
+         '14e4:166b:ffff:ffff'   # Broadcom Tigon3 5780S
+         '14e4:16dd:ffff:ffff'   # Broadcom Tigon3 5781
+         '1148:4400:ffff:ffff'   # Syskonnect 9DXX
+         '1148:4500:ffff:ffff'   # Syskonnect 9MXX
+         '173b:03e8:ffff:ffff'   # Altima AC1000
+         '173b:03e9:ffff:ffff'   # Altima AC1001
+         '173b:03eb:ffff:ffff'   # Altima AC1003
+         '173b:03ea:ffff:ffff'   # Altima AC9100
+         '106b:1645:ffff:ffff')  # Apple Tigon3
+    )
+
+    # Fields are specified in hex with the following format:
+    #     'register:size:mask'
+    # size is measured in bytes (1,2,4 are valid sizes)
+    # mask is currently unused
+    (pci_config_space_fields
+        ('00000078:4:00000000'   # TG3PCI_REG_BASE_ADDR
+         '0000007c:4:00000000'   # TG3PCI_MEM_WIN_BASE_ADDR
+         '00000080:4:00000000'   # TG3PCI_REG_DATA
+         '00000084:4:00000000'   # TG3PCI_MEM_WIN_DATA
+         '00000090:4:00000000'   # TG3PCI_MISC_LOCAL_CTRL
+         '00000068:4:00000000'   # TG3PCI_MISC_HOST_CTRL
+         '0000009C:4:00000000'   # TG3PCI_STD_RING_PROD_IDX + TG3_64BIT_REG_LOW
+         '00000098:4:00000000'   # TG3PCI_STD_RING_PROD_IDX + 
TG3_64BIT_REG_HIGH
+         '000000a4:4:00000000'   # TG3PCI_RCV_RET_RING_CON_IDX + 
TG3_64BIT_REG_LOW
+         '000000a0:4:00000000'   # TG3PCI_RCV_RET_RING_CON_IDX + 
TG3_64BIT_REG_HIGH
+         '00000070:4:00000000')  # TG3PCI_PCISTATE
+    )
+)

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>