diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-07-23 16:07:04 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-07-23 16:07:04 -0400 |
| commit | d1a343a0231ea34db16ab6773809f2874bcabcf8 (patch) | |
| tree | fde1ec1fe66563bbbc92fc0c30b822d90e375896 /include/uapi/linux | |
| parent | b681268cb25f6242ea56efe6ea4b6467a92e2bac (diff) | |
| parent | c9ce42f72fd0ba180fd35539829e4139dca31494 (diff) | |
Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
Pull virtio/vhost fixes from Michael Tsirkin:
"Bugfixes and documentation fixes.
Igor's patch that allows users to tweak memory table size is
borderline, but it does fix known crashes, so I merged it"
* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
vhost: add max_mem_regions module parameter
vhost: extend memory regions allocation to vmalloc
9p/trans_virtio: reset virtio device on remove
virtio/s390: rename drivers/s390/kvm -> drivers/s390/virtio
MAINTAINERS: separate section for s390 virtio drivers
virtio: define virtio_pci_cfg_cap in header.
virtio: Fix typecast of pointer in vring_init()
virtio scsi: fix unused variable warning
vhost: use binary search instead of linear in find_region()
virtio_net: document VIRTIO_NET_CTRL_GUEST_OFFLOADS
Diffstat (limited to 'include/uapi/linux')
| -rw-r--r-- | include/uapi/linux/virtio_net.h | 16 | ||||
| -rw-r--r-- | include/uapi/linux/virtio_pci.h | 6 | ||||
| -rw-r--r-- | include/uapi/linux/virtio_ring.h | 5 |
3 files changed, 26 insertions, 1 deletions
diff --git a/include/uapi/linux/virtio_net.h b/include/uapi/linux/virtio_net.h index 7bbee79ca293..ec32293a00db 100644 --- a/include/uapi/linux/virtio_net.h +++ b/include/uapi/linux/virtio_net.h | |||
| @@ -34,6 +34,7 @@ | |||
| 34 | /* The feature bitmap for virtio net */ | 34 | /* The feature bitmap for virtio net */ |
| 35 | #define VIRTIO_NET_F_CSUM 0 /* Host handles pkts w/ partial csum */ | 35 | #define VIRTIO_NET_F_CSUM 0 /* Host handles pkts w/ partial csum */ |
| 36 | #define VIRTIO_NET_F_GUEST_CSUM 1 /* Guest handles pkts w/ partial csum */ | 36 | #define VIRTIO_NET_F_GUEST_CSUM 1 /* Guest handles pkts w/ partial csum */ |
| 37 | #define VIRTIO_NET_F_CTRL_GUEST_OFFLOADS 2 /* Dynamic offload configuration. */ | ||
| 37 | #define VIRTIO_NET_F_MAC 5 /* Host has given MAC address. */ | 38 | #define VIRTIO_NET_F_MAC 5 /* Host has given MAC address. */ |
| 38 | #define VIRTIO_NET_F_GUEST_TSO4 7 /* Guest can handle TSOv4 in. */ | 39 | #define VIRTIO_NET_F_GUEST_TSO4 7 /* Guest can handle TSOv4 in. */ |
| 39 | #define VIRTIO_NET_F_GUEST_TSO6 8 /* Guest can handle TSOv6 in. */ | 40 | #define VIRTIO_NET_F_GUEST_TSO6 8 /* Guest can handle TSOv6 in. */ |
| @@ -226,4 +227,19 @@ struct virtio_net_ctrl_mq { | |||
| 226 | #define VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MIN 1 | 227 | #define VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MIN 1 |
| 227 | #define VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MAX 0x8000 | 228 | #define VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MAX 0x8000 |
| 228 | 229 | ||
| 230 | /* | ||
| 231 | * Control network offloads | ||
| 232 | * | ||
| 233 | * Reconfigures the network offloads that Guest can handle. | ||
| 234 | * | ||
| 235 | * Available with the VIRTIO_NET_F_CTRL_GUEST_OFFLOADS feature bit. | ||
| 236 | * | ||
| 237 | * Command data format matches the feature bit mask exactly. | ||
| 238 | * | ||
| 239 | * See VIRTIO_NET_F_GUEST_* for the list of offloads | ||
| 240 | * that can be enabled/disabled. | ||
| 241 | */ | ||
| 242 | #define VIRTIO_NET_CTRL_GUEST_OFFLOADS 5 | ||
| 243 | #define VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET 0 | ||
| 244 | |||
| 229 | #endif /* _LINUX_VIRTIO_NET_H */ | 245 | #endif /* _LINUX_VIRTIO_NET_H */ |
diff --git a/include/uapi/linux/virtio_pci.h b/include/uapi/linux/virtio_pci.h index 75301468359f..90007a1abcab 100644 --- a/include/uapi/linux/virtio_pci.h +++ b/include/uapi/linux/virtio_pci.h | |||
| @@ -157,6 +157,12 @@ struct virtio_pci_common_cfg { | |||
| 157 | __le32 queue_used_hi; /* read-write */ | 157 | __le32 queue_used_hi; /* read-write */ |
| 158 | }; | 158 | }; |
| 159 | 159 | ||
| 160 | /* Fields in VIRTIO_PCI_CAP_PCI_CFG: */ | ||
| 161 | struct virtio_pci_cfg_cap { | ||
| 162 | struct virtio_pci_cap cap; | ||
| 163 | __u8 pci_cfg_data[4]; /* Data for BAR access. */ | ||
| 164 | }; | ||
| 165 | |||
| 160 | /* Macro versions of offsets for the Old Timers! */ | 166 | /* Macro versions of offsets for the Old Timers! */ |
| 161 | #define VIRTIO_PCI_CAP_VNDR 0 | 167 | #define VIRTIO_PCI_CAP_VNDR 0 |
| 162 | #define VIRTIO_PCI_CAP_NEXT 1 | 168 | #define VIRTIO_PCI_CAP_NEXT 1 |
diff --git a/include/uapi/linux/virtio_ring.h b/include/uapi/linux/virtio_ring.h index 915980ac68df..c07295969b7e 100644 --- a/include/uapi/linux/virtio_ring.h +++ b/include/uapi/linux/virtio_ring.h | |||
| @@ -31,6 +31,9 @@ | |||
| 31 | * SUCH DAMAGE. | 31 | * SUCH DAMAGE. |
| 32 | * | 32 | * |
| 33 | * Copyright Rusty Russell IBM Corporation 2007. */ | 33 | * Copyright Rusty Russell IBM Corporation 2007. */ |
| 34 | #ifndef __KERNEL__ | ||
| 35 | #include <stdint.h> | ||
| 36 | #endif | ||
| 34 | #include <linux/types.h> | 37 | #include <linux/types.h> |
| 35 | #include <linux/virtio_types.h> | 38 | #include <linux/virtio_types.h> |
| 36 | 39 | ||
| @@ -143,7 +146,7 @@ static inline void vring_init(struct vring *vr, unsigned int num, void *p, | |||
| 143 | vr->num = num; | 146 | vr->num = num; |
| 144 | vr->desc = p; | 147 | vr->desc = p; |
| 145 | vr->avail = p + num*sizeof(struct vring_desc); | 148 | vr->avail = p + num*sizeof(struct vring_desc); |
| 146 | vr->used = (void *)(((unsigned long)&vr->avail->ring[num] + sizeof(__virtio16) | 149 | vr->used = (void *)(((uintptr_t)&vr->avail->ring[num] + sizeof(__virtio16) |
| 147 | + align-1) & ~(align - 1)); | 150 | + align-1) & ~(align - 1)); |
| 148 | } | 151 | } |
| 149 | 152 | ||
