History

Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost

Pull virtio/vhost fixes from Michael Tsirkin: - Fixes in the iommu and balloon devices. - Disable the meta-data optimization for now - I hope we can get it fixed shortly, but there's no point in making users suffer crashes while we are working on that. * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: vhost: disable metadata prefetch optimization iommu/virtio: Update to most recent specification balloon: fix up comments mm/balloon_compaction: avoid duplicate page removal

Linus Torvalds committed 7 years ago

Commit 2a11c762 parents 45aee68 73f628e4 files · +89 −54Browse files

Showing the changes to include/uapi (1 of 4 files). Show all

Unified · Split

include/uapi/linux/virtio_iommu.h+18−14
@@ -1,8 +1,8 @@
11 /* SPDX-License-Identifier: BSD-3-Clause */
22 /*
3− * Virtio-iommu definition v0.9
3+ * Virtio-iommu definition v0.12
44 *
5− * Copyright (C) 2018 Arm Ltd.
5+ * Copyright (C) 2019 Arm Ltd.
66 */
77 #ifndef _UAPI_LINUX_VIRTIO_IOMMU_H
88 #define _UAPI_LINUX_VIRTIO_IOMMU_H
@@ -11,26 +11,31 @@ · 2 unmodified lines
1111
1212 /* Feature bits */
1313 #define VIRTIO_IOMMU_F_INPUT_RANGE 0
14−#define VIRTIO_IOMMU_F_DOMAIN_BITS 1
14+#define VIRTIO_IOMMU_F_DOMAIN_RANGE 1
1515 #define VIRTIO_IOMMU_F_MAP_UNMAP 2
1616 #define VIRTIO_IOMMU_F_BYPASS 3
1717 #define VIRTIO_IOMMU_F_PROBE 4
18+#define VIRTIO_IOMMU_F_MMIO 5
1819
19−struct virtio_iommu_range {
20− __u64 start;
21− __u64 end;
20+struct virtio_iommu_range_64 {
21+ __le64 start;
22+ __le64 end;
23+};
24+
25+struct virtio_iommu_range_32 {
26+ __le32 start;
27+ __le32 end;
2228 };
2329
2430 struct virtio_iommu_config {
2531 /* Supported page sizes */
26− __u64 page_size_mask;
32+ __le64 page_size_mask;
2733 /* Supported IOVA range */
28− struct virtio_iommu_range input_range;
34+ struct virtio_iommu_range_64 input_range;
2935 /* Max domain ID size */
30− __u8 domain_bits;
31− __u8 padding[3];
36+ struct virtio_iommu_range_32 domain_range;
3237 /* Probe buffer size */
33− __u32 probe_size;
38+ __le32 probe_size;
3439 };
3540
3641 /* Request types */
@@ -49,6 +54,7 @@ struct virtio_iommu_config { · 12 unmodified lines
4954 #define VIRTIO_IOMMU_S_RANGE 0x05
5055 #define VIRTIO_IOMMU_S_NOENT 0x06
5156 #define VIRTIO_IOMMU_S_FAULT 0x07
57+#define VIRTIO_IOMMU_S_NOMEM 0x08
5258
5359 struct virtio_iommu_req_head {
5460 __u8 type;
@@ -78,12 +84,10 @@ struct virtio_iommu_req_detach { · 23 unmodified lines
7884
7985 #define VIRTIO_IOMMU_MAP_F_READ (1 << 0)
8086 #define VIRTIO_IOMMU_MAP_F_WRITE (1 << 1)
81−#define VIRTIO_IOMMU_MAP_F_EXEC (1 << 2)
82−#define VIRTIO_IOMMU_MAP_F_MMIO (1 << 3)
87+#define VIRTIO_IOMMU_MAP_F_MMIO (1 << 2)
8388
8489 #define VIRTIO_IOMMU_MAP_F_MASK (VIRTIO_IOMMU_MAP_F_READ | \
8590 VIRTIO_IOMMU_MAP_F_WRITE | \
86− VIRTIO_IOMMU_MAP_F_EXEC | \
8791 VIRTIO_IOMMU_MAP_F_MMIO)
8892
8993 struct virtio_iommu_req_map {