Displaying 6 results from an estimated 6 matches for "get_conf_word".
2015 Jan 21
2
[pciutils patch v2] add virtio vendor capability support
..._byte(d, where + 4),
+ get_conf_long(d, where + 8),
+ get_conf_long(d, where + 12));
+
+ if (type != 2 || length < 20)
+ return;
+
+ printf("\t\tmultiplier=%08x\n",
+ get_conf_long(d, where+16));
+}
+
+void
+show_vendor_caps(struct device *d, int where, int cap)
+{
+ switch (get_conf_word(d, PCI_VENDOR_ID))
+ {
+ case 0x1af4: /* Red Hat */
+ if (get_conf_word(d, PCI_DEVICE_ID) >= 0x1000 &&
+ get_conf_word(d, PCI_DEVICE_ID) <= 0x107f)
+ show_vendor_caps_virtio(d, where, cap);
+ break;
+ default:
+ printf("Vendor Specific Information: Len=%...
2015 Jan 21
2
[pciutils patch v2] add virtio vendor capability support
..._byte(d, where + 4),
+ get_conf_long(d, where + 8),
+ get_conf_long(d, where + 12));
+
+ if (type != 2 || length < 20)
+ return;
+
+ printf("\t\tmultiplier=%08x\n",
+ get_conf_long(d, where+16));
+}
+
+void
+show_vendor_caps(struct device *d, int where, int cap)
+{
+ switch (get_conf_word(d, PCI_VENDOR_ID))
+ {
+ case 0x1af4: /* Red Hat */
+ if (get_conf_word(d, PCI_DEVICE_ID) >= 0x1000 &&
+ get_conf_word(d, PCI_DEVICE_ID) <= 0x107f)
+ show_vendor_caps_virtio(d, where, cap);
+ break;
+ default:
+ printf("Vendor Specific Information: Len=%...
2015 Jan 21
2
[pciutils patch] add virtio vendor capability support
...5ef..54a64a7 100644
--- a/ls-caps.c
+++ b/ls-caps.c
@@ -1315,7 +1315,14 @@ show_caps(struct device *d, int where)
cap_ht(d, where, cap);
break;
case PCI_CAP_ID_VNDR:
- printf("Vendor Specific Information: Len=%02x <?>\n", BITS(cap, 0, 8));
+ switch (get_conf_word(d, PCI_VENDOR_ID)) {
+ case 0x1af4: /* Red Hat, devices 0x1000 -> 0x107f are virtio */
+ show_vendor_caps_virtio(d, where, cap);
+ break;
+ default:
+ printf("Vendor Specific Information: Len=%02x <?>\n", BITS(cap, 0, 8));
+ break;
+ }
break;
c...
2015 Jan 21
2
[pciutils patch] add virtio vendor capability support
...5ef..54a64a7 100644
--- a/ls-caps.c
+++ b/ls-caps.c
@@ -1315,7 +1315,14 @@ show_caps(struct device *d, int where)
cap_ht(d, where, cap);
break;
case PCI_CAP_ID_VNDR:
- printf("Vendor Specific Information: Len=%02x <?>\n", BITS(cap, 0, 8));
+ switch (get_conf_word(d, PCI_VENDOR_ID)) {
+ case 0x1af4: /* Red Hat, devices 0x1000 -> 0x107f are virtio */
+ show_vendor_caps_virtio(d, where, cap);
+ break;
+ default:
+ printf("Vendor Specific Information: Len=%02x <?>\n", BITS(cap, 0, 8));
+ break;
+ }
break;
c...
2015 Jan 19
3
[PATCH v3 00/16] virtio-pci: towards virtio 1.0 guest support
Hi,
> BTW: is there a tool (or pciutils patch) which can decode the virtio
> capabilities?
Searched for a patch today, and all google found me was this mail asking
for one :-o
So I went ahead and coded one up. Attached.
While hacking it up I've noticed spec doesn't match reality. The
"Virtio Structure PCI Capabilities" section here ...
2015 Jan 19
3
[PATCH v3 00/16] virtio-pci: towards virtio 1.0 guest support
Hi,
> BTW: is there a tool (or pciutils patch) which can decode the virtio
> capabilities?
Searched for a patch today, and all google found me was this mail asking
for one :-o
So I went ahead and coded one up. Attached.
While hacking it up I've noticed spec doesn't match reality. The
"Virtio Structure PCI Capabilities" section here ...