search for: virtio_pci_cap_type_mask

Displaying 18 results from an estimated 18 matches for "virtio_pci_cap_type_mask".

2014 Dec 30
0
[PATCH RFC v2 4/7] virtio-pci: define layout for virtio 1.0
...y length */ + __u8 type_and_bar; /* Upper 3 bits: bar. + * Lower 3 is VIRTIO_PCI_CAP_*_CFG. */ + __le32 offset; /* Offset within bar. */ + __le32 length; /* Length. */ +}; + +#define VIRTIO_PCI_CAP_BAR_SHIFT 5 +#define VIRTIO_PCI_CAP_BAR_MASK 0x7 +#define VIRTIO_PCI_CAP_TYPE_SHIFT 0 +#define VIRTIO_PCI_CAP_TYPE_MASK 0x7 + +struct virtio_pci_notify_cap { + struct virtio_pci_cap cap; + __le32 notify_off_multiplier; /* Multiplier for queue_notify_off. */ +}; + +/* Fields in VIRTIO_PCI_CAP_COMMON_CFG: */ +struct virtio_pci_common_cfg { + /* About the whole device. */ + __le32 device_feature_select; /* read-write *...
2015 Jan 20
0
[PATCH 01/05] fixup! virtio_pci: modern driver
...s = pci_find_next_capability(dev, pos, PCI_CAP_ID_VNDR)) { - u8 type_and_bar, type, bar; + u8 type, bar; pci_read_config_byte(dev, pos + offsetof(struct virtio_pci_cap, - type_and_bar), - &type_and_bar); - - type = (type_and_bar >> VIRTIO_PCI_CAP_TYPE_SHIFT) & - VIRTIO_PCI_CAP_TYPE_MASK; - bar = (type_and_bar >> VIRTIO_PCI_CAP_BAR_SHIFT) & - VIRTIO_PCI_CAP_BAR_MASK; + cfg_type), + &type); + pci_read_config_byte(dev, pos + offsetof(struct virtio_pci_cap, + bar), + &bar); /* Ignore structures with reserved BAR values */ if...
2015 Jan 20
0
[PATCH 03/05] fixup! virtio_pci: macros for PCI layout offsets
...include/uapi/linux/virtio_pci.h +++ b/include/uapi/linux/virtio_pci.h @@ -124,11 +124,6 @@ struct virtio_pci_cap { __le32 length; /* Length of the structure, in bytes. */ }; -#define VIRTIO_PCI_CAP_BAR_SHIFT 5 -#define VIRTIO_PCI_CAP_BAR_MASK 0x7 -#define VIRTIO_PCI_CAP_TYPE_SHIFT 0 -#define VIRTIO_PCI_CAP_TYPE_MASK 0x7 - struct virtio_pci_notify_cap { struct virtio_pci_cap cap; __le32 notify_off_multiplier; /* Multiplier for queue_notify_off. */ @@ -164,11 +159,12 @@ struct virtio_pci_common_cfg { #define VIRTIO_PCI_CAP_VNDR 0 #define VIRTIO_PCI_CAP_NEXT 1 #define VIRTIO_PCI_CAP_LEN 2 -#define VIRT...
2014 Dec 30
0
[PATCH RFC v2 4/7] virtio-pci: define layout for virtio 1.0
...y length */ + __u8 type_and_bar; /* Upper 3 bits: bar. + * Lower 3 is VIRTIO_PCI_CAP_*_CFG. */ + __le32 offset; /* Offset within bar. */ + __le32 length; /* Length. */ +}; + +#define VIRTIO_PCI_CAP_BAR_SHIFT 5 +#define VIRTIO_PCI_CAP_BAR_MASK 0x7 +#define VIRTIO_PCI_CAP_TYPE_SHIFT 0 +#define VIRTIO_PCI_CAP_TYPE_MASK 0x7 + +struct virtio_pci_notify_cap { + struct virtio_pci_cap cap; + __le32 notify_off_multiplier; /* Multiplier for queue_notify_off. */ +}; + +/* Fields in VIRTIO_PCI_CAP_COMMON_CFG: */ +struct virtio_pci_common_cfg { + /* About the whole device. */ + __le32 device_feature_select; /* read-write *...
2015 Jan 20
0
[PATCH 01/05] fixup! virtio_pci: modern driver
...s = pci_find_next_capability(dev, pos, PCI_CAP_ID_VNDR)) { - u8 type_and_bar, type, bar; + u8 type, bar; pci_read_config_byte(dev, pos + offsetof(struct virtio_pci_cap, - type_and_bar), - &type_and_bar); - - type = (type_and_bar >> VIRTIO_PCI_CAP_TYPE_SHIFT) & - VIRTIO_PCI_CAP_TYPE_MASK; - bar = (type_and_bar >> VIRTIO_PCI_CAP_BAR_SHIFT) & - VIRTIO_PCI_CAP_BAR_MASK; + cfg_type), + &type); + pci_read_config_byte(dev, pos + offsetof(struct virtio_pci_cap, + bar), + &bar); /* Ignore structures with reserved BAR values */ if...
2015 Jan 20
0
[PATCH 03/05] fixup! virtio_pci: macros for PCI layout offsets
...include/uapi/linux/virtio_pci.h +++ b/include/uapi/linux/virtio_pci.h @@ -124,11 +124,6 @@ struct virtio_pci_cap { __le32 length; /* Length of the structure, in bytes. */ }; -#define VIRTIO_PCI_CAP_BAR_SHIFT 5 -#define VIRTIO_PCI_CAP_BAR_MASK 0x7 -#define VIRTIO_PCI_CAP_TYPE_SHIFT 0 -#define VIRTIO_PCI_CAP_TYPE_MASK 0x7 - struct virtio_pci_notify_cap { struct virtio_pci_cap cap; __le32 notify_off_multiplier; /* Multiplier for queue_notify_off. */ @@ -164,11 +159,12 @@ struct virtio_pci_common_cfg { #define VIRTIO_PCI_CAP_VNDR 0 #define VIRTIO_PCI_CAP_NEXT 1 #define VIRTIO_PCI_CAP_LEN 2 -#define VIRT...
2015 Jan 21
14
[PATCH pre-squash 00/14] virtio 1.0: virtio-pci fixup
This is just the full patchset reposted with fixups in correct order, before squashing them. I also tweaked commit log for patch "virtio_pci: modern driver" I also included Gerd's tag: Tested-by: Gerd Hoffmann <kraxel at redhat.com> You can find it all before the rebase -i --autosquash in my tree: git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git virtio-next
2015 Jan 21
14
[PATCH pre-squash 00/14] virtio 1.0: virtio-pci fixup
This is just the full patchset reposted with fixups in correct order, before squashing them. I also tweaked commit log for patch "virtio_pci: modern driver" I also included Gerd's tag: Tested-by: Gerd Hoffmann <kraxel at redhat.com> You can find it all before the rebase -i --autosquash in my tree: git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git virtio-next
2014 Dec 11
6
[PATCH RFC 0/5] virtio_pci: modern driver
Based on Rusty's patches. Coding style and funny jokes are his. Bugs and a star wars reference (should be easy to spot) are mine. Untested, but useful as basis for beginning the qemu work. TODO: = simplify probing: use a common probe function, probe with modern driver first, if that fails - probe with legacy driver. BUGS: ATM legacy driver can win and drive a transitional device
2014 Dec 11
6
[PATCH RFC 0/5] virtio_pci: modern driver
Based on Rusty's patches. Coding style and funny jokes are his. Bugs and a star wars reference (should be easy to spot) are mine. Untested, but useful as basis for beginning the qemu work. TODO: = simplify probing: use a common probe function, probe with modern driver first, if that fails - probe with legacy driver. BUGS: ATM legacy driver can win and drive a transitional device
2014 Dec 15
6
[PATCH RFC 0/5] virtio pci: virtio 1.0 support
This is on top of 3.19 master + my bugfix patches, and adds virtio 1.0 support to virtio pci. This is 3.20 material I think. Would like to get feedback on s390 change as it's untested. Michael S Tsirkin (2): pci: add pci_iomap_range s390: add pci_iomap_range Michael S. Tsirkin (2): virtio_pci: modern driver virtio_pci: macros for PCI layout offsets. Rusty Russell (1): virtio-pci:
2014 Dec 15
6
[PATCH RFC 0/5] virtio pci: virtio 1.0 support
This is on top of 3.19 master + my bugfix patches, and adds virtio 1.0 support to virtio pci. This is 3.20 material I think. Would like to get feedback on s390 change as it's untested. Michael S Tsirkin (2): pci: add pci_iomap_range s390: add pci_iomap_range Michael S. Tsirkin (2): virtio_pci: modern driver virtio_pci: macros for PCI layout offsets. Rusty Russell (1): virtio-pci:
2015 Jan 21
9
[PATCH post-squash 0/9] virtio 1.0: virtio-pci fixup
This is just repost of all patches with fixups squashed in - convenient if you just want to remove old ones from queue and apply new ones. I also tweaked commit log for patch "virtio_pci: modern driver" I also included Gerd's tag: Tested-by: Gerd Hoffmann <kraxel at redhat.com> You can find it all before the rebase -i --autosquash in my tree:
2015 Jan 21
9
[PATCH post-squash 0/9] virtio 1.0: virtio-pci fixup
This is just repost of all patches with fixups squashed in - convenient if you just want to remove old ones from queue and apply new ones. I also tweaked commit log for patch "virtio_pci: modern driver" I also included Gerd's tag: Tested-by: Gerd Hoffmann <kraxel at redhat.com> You can find it all before the rebase -i --autosquash in my tree:
2014 Dec 30
0
[PATCH RFC v2 5/7] virtio_pci: modern driver
...> 0; + pos = pci_find_next_capability(dev, pos, PCI_CAP_ID_VNDR)) { + u8 type_and_bar, type, bar; + pci_read_config_byte(dev, pos + offsetof(struct virtio_pci_cap, + type_and_bar), + &type_and_bar); + + type = (type_and_bar >> VIRTIO_PCI_CAP_TYPE_SHIFT) & + VIRTIO_PCI_CAP_TYPE_MASK; + bar = (type_and_bar >> VIRTIO_PCI_CAP_BAR_SHIFT) & + VIRTIO_PCI_CAP_BAR_MASK; + + if (type == cfg_type) { + if (pci_resource_flags(dev, bar) & ioresource_types) + return pos; + } + } + return 0; +} + +/* the PCI probing function */ +int virtio_pci_modern_probe(struct pci_...
2014 Dec 30
0
[PATCH RFC v2 5/7] virtio_pci: modern driver
...> 0; + pos = pci_find_next_capability(dev, pos, PCI_CAP_ID_VNDR)) { + u8 type_and_bar, type, bar; + pci_read_config_byte(dev, pos + offsetof(struct virtio_pci_cap, + type_and_bar), + &type_and_bar); + + type = (type_and_bar >> VIRTIO_PCI_CAP_TYPE_SHIFT) & + VIRTIO_PCI_CAP_TYPE_MASK; + bar = (type_and_bar >> VIRTIO_PCI_CAP_BAR_SHIFT) & + VIRTIO_PCI_CAP_BAR_MASK; + + if (type == cfg_type) { + if (pci_resource_flags(dev, bar) & ioresource_types) + return pos; + } + } + return 0; +} + +/* the PCI probing function */ +int virtio_pci_modern_probe(struct pci_...
2015 Jan 14
22
[PATCH v3 00/16] virtio-pci: towards virtio 1.0 guest support
Changes since v2: handling for devices without config space (e.g. rng) reduce # of mappings for VQs These patches seem to work fine on my virtio-1.0 qemu branch. There haven't been any bugs since v2: just minor cleanups and enhancements. QEMU side is still undergoing polishing, but is already testable. Rusty, what do you think? Let's merge these for 3.20? Also - will you be doing that
2015 Jan 14
22
[PATCH v3 00/16] virtio-pci: towards virtio 1.0 guest support
Changes since v2: handling for devices without config space (e.g. rng) reduce # of mappings for VQs These patches seem to work fine on my virtio-1.0 qemu branch. There haven't been any bugs since v2: just minor cleanups and enhancements. QEMU side is still undergoing polishing, but is already testable. Rusty, what do you think? Let's merge these for 3.20? Also - will you be doing that