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
Showing the changes to include/uapi/linux (1 of 4 files). Show all
Unified · Split
| @@ -1,8 +1,8 @@ | |||
| 1 | /* SPDX-License-Identifier: BSD-3-Clause */ | 1 | /* SPDX-License-Identifier: BSD-3-Clause */ |
| 2 | /* | 2 | /* |
| 3 | * Virtio-iommu definition v0.9 | 3 | * Virtio-iommu definition v0.12 |
| 4 | * | 4 | * |
| 5 | * Copyright (C) 2018 Arm Ltd. | 5 | * Copyright (C) 2019 Arm Ltd. |
| 6 | */ | 6 | */ |
| 7 | #ifndef _UAPI_LINUX_VIRTIO_IOMMU_H | 7 | #ifndef _UAPI_LINUX_VIRTIO_IOMMU_H |
| 8 | #define _UAPI_LINUX_VIRTIO_IOMMU_H | 8 | #define _UAPI_LINUX_VIRTIO_IOMMU_H |
| @@ -11,26 +11,31 @@ · 2 unmodified lines | |||
| 11 | 11 | ||
| 12 | /* Feature bits */ | 12 | /* Feature bits */ |
| 13 | #define VIRTIO_IOMMU_F_INPUT_RANGE 0 | 13 | #define VIRTIO_IOMMU_F_INPUT_RANGE 0 |
| 14 | #define VIRTIO_IOMMU_F_DOMAIN_BITS 1 | 14 | #define VIRTIO_IOMMU_F_DOMAIN_RANGE 1 |
| 15 | #define VIRTIO_IOMMU_F_MAP_UNMAP 2 | 15 | #define VIRTIO_IOMMU_F_MAP_UNMAP 2 |
| 16 | #define VIRTIO_IOMMU_F_BYPASS 3 | 16 | #define VIRTIO_IOMMU_F_BYPASS 3 |
| 17 | #define VIRTIO_IOMMU_F_PROBE 4 | 17 | #define VIRTIO_IOMMU_F_PROBE 4 |
| 18 | #define VIRTIO_IOMMU_F_MMIO 5 | ||
| 18 | 19 | ||
| 19 | struct virtio_iommu_range { | 20 | struct virtio_iommu_range_64 { |
| 20 | __u64 start; | 21 | __le64 start; |
| 21 | __u64 end; | 22 | __le64 end; |
| 23 | }; | ||
| 24 | |||
| 25 | struct virtio_iommu_range_32 { | ||
| 26 | __le32 start; | ||
| 27 | __le32 end; | ||
| 22 | }; | 28 | }; |
| 23 | 29 | ||
| 24 | struct virtio_iommu_config { | 30 | struct virtio_iommu_config { |
| 25 | /* Supported page sizes */ | 31 | /* Supported page sizes */ |
| 26 | __u64 page_size_mask; | 32 | __le64 page_size_mask; |
| 27 | /* Supported IOVA range */ | 33 | /* Supported IOVA range */ |
| 28 | struct virtio_iommu_range input_range; | 34 | struct virtio_iommu_range_64 input_range; |
| 29 | /* Max domain ID size */ | 35 | /* Max domain ID size */ |
| 30 | __u8 domain_bits; | 36 | struct virtio_iommu_range_32 domain_range; |
| 31 | __u8 padding[3]; | ||
| 32 | /* Probe buffer size */ | 37 | /* Probe buffer size */ |
| 33 | __u32 probe_size; | 38 | __le32 probe_size; |
| 34 | }; | 39 | }; |
| 35 | 40 | ||
| 36 | /* Request types */ | 41 | /* Request types */ |
| @@ -49,6 +54,7 @@ struct virtio_iommu_config { · 12 unmodified lines | |||
| 49 | #define VIRTIO_IOMMU_S_RANGE 0x05 | 54 | #define VIRTIO_IOMMU_S_RANGE 0x05 |
| 50 | #define VIRTIO_IOMMU_S_NOENT 0x06 | 55 | #define VIRTIO_IOMMU_S_NOENT 0x06 |
| 51 | #define VIRTIO_IOMMU_S_FAULT 0x07 | 56 | #define VIRTIO_IOMMU_S_FAULT 0x07 |
| 57 | #define VIRTIO_IOMMU_S_NOMEM 0x08 | ||
| 52 | 58 | ||
| 53 | struct virtio_iommu_req_head { | 59 | struct virtio_iommu_req_head { |
| 54 | __u8 type; | 60 | __u8 type; |
| @@ -78,12 +84,10 @@ struct virtio_iommu_req_detach { · 23 unmodified lines | |||
| 78 | 84 | ||
| 79 | #define VIRTIO_IOMMU_MAP_F_READ (1 << 0) | 85 | #define VIRTIO_IOMMU_MAP_F_READ (1 << 0) |
| 80 | #define VIRTIO_IOMMU_MAP_F_WRITE (1 << 1) | 86 | #define VIRTIO_IOMMU_MAP_F_WRITE (1 << 1) |
| 81 | #define VIRTIO_IOMMU_MAP_F_EXEC (1 << 2) | 87 | #define VIRTIO_IOMMU_MAP_F_MMIO (1 << 2) |
| 82 | #define VIRTIO_IOMMU_MAP_F_MMIO (1 << 3) | ||
| 83 | 88 | ||
| 84 | #define VIRTIO_IOMMU_MAP_F_MASK (VIRTIO_IOMMU_MAP_F_READ | \ | 89 | #define VIRTIO_IOMMU_MAP_F_MASK (VIRTIO_IOMMU_MAP_F_READ | \ |
| 85 | VIRTIO_IOMMU_MAP_F_WRITE | \ | 90 | VIRTIO_IOMMU_MAP_F_WRITE | \ |
| 86 | VIRTIO_IOMMU_MAP_F_EXEC | \ | ||
| 87 | VIRTIO_IOMMU_MAP_F_MMIO) | 91 | VIRTIO_IOMMU_MAP_F_MMIO) |
| 88 | 92 | ||
| 89 | struct virtio_iommu_req_map { | 93 | struct virtio_iommu_req_map { |