search for: virtio_pci_cfg_cap

Displaying 20 results from an estimated 24 matches for "virtio_pci_cfg_cap".

2016 Aug 30
4
[PATCH v2 2/2] vfio: add virtio pci quirk
...bar), > + &bar); > + pci_read_config_dword(dev, common + offsetof(struct virtio_pci_cap, > + offset), > + &offset); > + > + /* Program cfg capability for dword access into common cfg. */ > + pci_write_config_byte(dev, cfg + offsetof(struct virtio_pci_cfg_cap, > + cap.bar), > + bar); > + pci_write_config_dword(dev, cfg + offsetof(struct virtio_pci_cfg_cap, > + cap.length), > + 0x4); > + > + /* Select features dword that has VIRTIO_F_IOMMU_PLATFORM. */ > + pci_write_config_dword(dev, cfg + offsetof(...
2016 Aug 30
4
[PATCH v2 2/2] vfio: add virtio pci quirk
...bar), > + &bar); > + pci_read_config_dword(dev, common + offsetof(struct virtio_pci_cap, > + offset), > + &offset); > + > + /* Program cfg capability for dword access into common cfg. */ > + pci_write_config_byte(dev, cfg + offsetof(struct virtio_pci_cfg_cap, > + cap.bar), > + bar); > + pci_write_config_dword(dev, cfg + offsetof(struct virtio_pci_cfg_cap, > + cap.length), > + 0x4); > + > + /* Select features dword that has VIRTIO_F_IOMMU_PLATFORM. */ > + pci_write_config_dword(dev, cfg + offsetof(...
2015 Jul 02
0
[PATCH] virtio: define virtio_pci_cfg_cap in header.
...rtio_pci.h b/include/uapi/linux/virtio_pci.h index 7530146..90007a1 100644 --- a/include/uapi/linux/virtio_pci.h +++ b/include/uapi/linux/virtio_pci.h @@ -157,6 +157,12 @@ struct virtio_pci_common_cfg { __le32 queue_used_hi; /* read-write */ }; +/* Fields in VIRTIO_PCI_CAP_PCI_CFG: */ +struct virtio_pci_cfg_cap { + struct virtio_pci_cap cap; + __u8 pci_cfg_data[4]; /* Data for BAR access. */ +}; + /* Macro versions of offsets for the Old Timers! */ #define VIRTIO_PCI_CAP_VNDR 0 #define VIRTIO_PCI_CAP_NEXT 1 -- MST
2015 Jul 02
0
[PATCH] virtio: define virtio_pci_cfg_cap in header.
...rtio_pci.h b/include/uapi/linux/virtio_pci.h index 7530146..90007a1 100644 --- a/include/uapi/linux/virtio_pci.h +++ b/include/uapi/linux/virtio_pci.h @@ -157,6 +157,12 @@ struct virtio_pci_common_cfg { __le32 queue_used_hi; /* read-write */ }; +/* Fields in VIRTIO_PCI_CAP_PCI_CFG: */ +struct virtio_pci_cfg_cap { + struct virtio_pci_cap cap; + __u8 pci_cfg_data[4]; /* Data for BAR access. */ +}; + /* Macro versions of offsets for the Old Timers! */ #define VIRTIO_PCI_CAP_VNDR 0 #define VIRTIO_PCI_CAP_NEXT 1 -- MST
2016 Apr 18
1
[PATCH RFC 3/3] vfio: add virtio pci quirk
...bar), > + &bar); > + pci_read_config_dword(dev, common + offsetof(struct virtio_pci_cap, > + offset), > + &offset); > + > + /* Program cfg capability for dword access into common cfg. */ > + pci_write_config_byte(dev, cfg + offsetof(struct virtio_pci_cfg_cap, > + cap.bar), > + bar); > + pci_write_config_dword(dev, cfg + offsetof(struct virtio_pci_cfg_cap, > + cap.length), > + 0x4); > + > + /* Select features dword that has VIRTIO_F_IOMMU_PLATFORM. */ > + pci_write_config_dword(dev, cfg + offsetof(...
2016 Apr 18
1
[PATCH RFC 3/3] vfio: add virtio pci quirk
...bar), > + &bar); > + pci_read_config_dword(dev, common + offsetof(struct virtio_pci_cap, > + offset), > + &offset); > + > + /* Program cfg capability for dword access into common cfg. */ > + pci_write_config_byte(dev, cfg + offsetof(struct virtio_pci_cfg_cap, > + cap.bar), > + bar); > + pci_write_config_dword(dev, cfg + offsetof(struct virtio_pci_cfg_cap, > + cap.length), > + 0x4); > + > + /* Select features dword that has VIRTIO_F_IOMMU_PLATFORM. */ > + pci_write_config_dword(dev, cfg + offsetof(...
2016 Aug 30
2
[PATCH v2 2/2] vfio: add virtio pci quirk
...read_config_dword(dev, common + offsetof(struct virtio_pci_cap, > > > + offset), > > > + &offset); > > > + > > > + /* Program cfg capability for dword access into common cfg. */ > > > + pci_write_config_byte(dev, cfg + offsetof(struct virtio_pci_cfg_cap, > > > + cap.bar), > > > + bar); > > > + pci_write_config_dword(dev, cfg + offsetof(struct virtio_pci_cfg_cap, > > > + cap.length), > > > + 0x4); > > > + > > > + /* Select features dword that has VIRTIO_F...
2016 Aug 30
2
[PATCH v2 2/2] vfio: add virtio pci quirk
...read_config_dword(dev, common + offsetof(struct virtio_pci_cap, > > > + offset), > > > + &offset); > > > + > > > + /* Program cfg capability for dword access into common cfg. */ > > > + pci_write_config_byte(dev, cfg + offsetof(struct virtio_pci_cfg_cap, > > > + cap.bar), > > > + bar); > > > + pci_write_config_dword(dev, cfg + offsetof(struct virtio_pci_cfg_cap, > > > + cap.length), > > > + 0x4); > > > + > > > + /* Select features dword that has VIRTIO_F...
2016 Apr 18
0
[PATCH RFC 3/3] vfio: add virtio pci quirk
...offsetof(struct virtio_pci_cap, + bar), + &bar); + pci_read_config_dword(dev, common + offsetof(struct virtio_pci_cap, + offset), + &offset); + + /* Program cfg capability for dword access into common cfg. */ + pci_write_config_byte(dev, cfg + offsetof(struct virtio_pci_cfg_cap, + cap.bar), + bar); + pci_write_config_dword(dev, cfg + offsetof(struct virtio_pci_cfg_cap, + cap.length), + 0x4); + + /* Select features dword that has VIRTIO_F_IOMMU_PLATFORM. */ + pci_write_config_dword(dev, cfg + offsetof(struct virtio_pci_cfg_cap, + cap....
2016 Aug 30
0
[PATCH v2 2/2] vfio: add virtio pci quirk
...offsetof(struct virtio_pci_cap, + bar), + &bar); + pci_read_config_dword(dev, common + offsetof(struct virtio_pci_cap, + offset), + &offset); + + /* Program cfg capability for dword access into common cfg. */ + pci_write_config_byte(dev, cfg + offsetof(struct virtio_pci_cfg_cap, + cap.bar), + bar); + pci_write_config_dword(dev, cfg + offsetof(struct virtio_pci_cfg_cap, + cap.length), + 0x4); + + /* Select features dword that has VIRTIO_F_IOMMU_PLATFORM. */ + pci_write_config_dword(dev, cfg + offsetof(struct virtio_pci_cfg_cap, + cap....
2016 Aug 30
6
[PATCH v2 0/2] vfio: blacklist legacy virtio devices
Legacy virtio devices always bypassed an IOMMU, so using them with vfio was never safe. This adds a quirk detecting these and disabling VFIO unless the noiommu mode is used. At the moment, this only applies to virtio-pci devices. The patch might make sense on stable as well. Michael S. Tsirkin (2): vfio: report group noiommu status vfio: add virtio pci quirk
2016 Aug 30
6
[PATCH v2 0/2] vfio: blacklist legacy virtio devices
Legacy virtio devices always bypassed an IOMMU, so using them with vfio was never safe. This adds a quirk detecting these and disabling VFIO unless the noiommu mode is used. At the moment, this only applies to virtio-pci devices. The patch might make sense on stable as well. Michael S. Tsirkin (2): vfio: report group noiommu status vfio: add virtio pci quirk
2016 Aug 30
0
[PATCH v2 2/2] vfio: add virtio pci quirk
...mp;bar); > > + pci_read_config_dword(dev, common + offsetof(struct virtio_pci_cap, > > + offset), > > + &offset); > > + > > + /* Program cfg capability for dword access into common cfg. */ > > + pci_write_config_byte(dev, cfg + offsetof(struct virtio_pci_cfg_cap, > > + cap.bar), > > + bar); > > + pci_write_config_dword(dev, cfg + offsetof(struct virtio_pci_cfg_cap, > > + cap.length), > > + 0x4); > > + > > + /* Select features dword that has VIRTIO_F_IOMMU_PLATFORM. */ > > + pci...
2016 Apr 18
5
[PATCH RFC 0/3] virtio-pci: iommu support
This is an attempt to allow enabling IOMMU for DMA. Design: - new feature bit IOMMU_PLATFORM which means host won't bypass IOMMU - virtio core uses DMA API if it sees IOMMU_PLATFORM - add quirk for vfio to disable device unless IOMMU_PLATFORM is set or the no-iommu mode is enabled - while I'm not sure how it will be used, it seems like a good idea to also have
2016 Apr 18
5
[PATCH RFC 0/3] virtio-pci: iommu support
This is an attempt to allow enabling IOMMU for DMA. Design: - new feature bit IOMMU_PLATFORM which means host won't bypass IOMMU - virtio core uses DMA API if it sees IOMMU_PLATFORM - add quirk for vfio to disable device unless IOMMU_PLATFORM is set or the no-iommu mode is enabled - while I'm not sure how it will be used, it seems like a good idea to also have
2016 Aug 30
0
[PATCH v2 2/2] vfio: add virtio pci quirk
...mmon + offsetof(struct virtio_pci_cap, > > > > + offset), > > > > + &offset); > > > > + > > > > + /* Program cfg capability for dword access into common cfg. */ > > > > + pci_write_config_byte(dev, cfg + offsetof(struct virtio_pci_cfg_cap, > > > > + cap.bar), > > > > + bar); > > > > + pci_write_config_dword(dev, cfg + offsetof(struct virtio_pci_cfg_cap, > > > > + cap.length), > > > > + 0x4); > > > > + > > > > + /* Sele...
2015 Jul 15
1
[PULL] vhost: cleanups and fixes
...io Igor Mammedov (3): vhost: use binary search instead of linear in find_region() vhost: extend memory regions allocation to vmalloc vhost: add max_mem_regions module parameter Michael S. Tsirkin (2): virtio_net: document VIRTIO_NET_CTRL_GUEST_OFFLOADS virtio: define virtio_pci_cfg_cap in header. Pierre Morel (1): 9p/trans_virtio: reset virtio device on remove Stephen Rothwell (1): virtio scsi: fix unused variable warning Thomas Huth (1): virtio: Fix typecast of pointer in vring_init() include/uapi/linux/virtio_net.h | 16 ++++++++ include/uapi/li...
2015 Jul 15
1
[PULL] vhost: cleanups and fixes
...io Igor Mammedov (3): vhost: use binary search instead of linear in find_region() vhost: extend memory regions allocation to vmalloc vhost: add max_mem_regions module parameter Michael S. Tsirkin (2): virtio_net: document VIRTIO_NET_CTRL_GUEST_OFFLOADS virtio: define virtio_pci_cfg_cap in header. Pierre Morel (1): 9p/trans_virtio: reset virtio device on remove Stephen Rothwell (1): virtio scsi: fix unused variable warning Thomas Huth (1): virtio: Fix typecast of pointer in vring_init() include/uapi/linux/virtio_net.h | 16 ++++++++ include/uapi/li...
2015 Jul 23
0
[PULL v2] virtio/vhost: fixes for 4.2
...io Igor Mammedov (3): vhost: use binary search instead of linear in find_region() vhost: extend memory regions allocation to vmalloc vhost: add max_mem_regions module parameter Michael S. Tsirkin (2): virtio_net: document VIRTIO_NET_CTRL_GUEST_OFFLOADS virtio: define virtio_pci_cfg_cap in header. Pierre Morel (1): 9p/trans_virtio: reset virtio device on remove Stephen Rothwell (1): virtio scsi: fix unused variable warning Thomas Huth (1): virtio: Fix typecast of pointer in vring_init() include/uapi/linux/virtio_net.h | 16 ++++++++ include/uapi/li...
2015 Jul 23
0
[PULL v2] virtio/vhost: fixes for 4.2
...io Igor Mammedov (3): vhost: use binary search instead of linear in find_region() vhost: extend memory regions allocation to vmalloc vhost: add max_mem_regions module parameter Michael S. Tsirkin (2): virtio_net: document VIRTIO_NET_CTRL_GUEST_OFFLOADS virtio: define virtio_pci_cfg_cap in header. Pierre Morel (1): 9p/trans_virtio: reset virtio device on remove Stephen Rothwell (1): virtio scsi: fix unused variable warning Thomas Huth (1): virtio: Fix typecast of pointer in vring_init() include/uapi/linux/virtio_net.h | 16 ++++++++ include/uapi/li...