|
|
c687bc |
From b50c47e1a9fbe8876e231afbb5ed85945c8038da Mon Sep 17 00:00:00 2001
|
|
|
c687bc |
From: Cornelia Huck <cohuck@redhat.com>
|
|
|
c687bc |
Date: Tue, 19 Jan 2021 12:50:40 -0500
|
|
|
c687bc |
Subject: [PATCH 1/7] linux-headers: add vfio DMA available capability
|
|
|
c687bc |
|
|
|
c687bc |
RH-Author: Cornelia Huck <cohuck@redhat.com>
|
|
|
c687bc |
Message-id: <20210119125046.472811-2-cohuck@redhat.com>
|
|
|
c687bc |
Patchwork-id: 100674
|
|
|
c687bc |
O-Subject: [RHEL-8.4.0 qemu-kvm PATCH 1/7] linux-headers: add vfio DMA available capability
|
|
|
c687bc |
Bugzilla: 1905391
|
|
|
c687bc |
RH-Acked-by: David Hildenbrand <david@redhat.com>
|
|
|
c687bc |
RH-Acked-by: Auger Eric <eric.auger@redhat.com>
|
|
|
c687bc |
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
|
|
c687bc |
|
|
|
c687bc |
UPSTREAM: RHEL only
|
|
|
c687bc |
|
|
|
c687bc |
This is the part of 53ba2eee52bf ("linux-headers: update against
|
|
|
c687bc |
5.10-rc1") required for DMA limiting.
|
|
|
c687bc |
|
|
|
c687bc |
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
|
|
|
c687bc |
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
|
|
c687bc |
---
|
|
|
c687bc |
linux-headers/linux/vfio.h | 15 +++++++++++++++
|
|
|
c687bc |
1 file changed, 15 insertions(+)
|
|
|
c687bc |
|
|
|
c687bc |
diff --git a/linux-headers/linux/vfio.h b/linux-headers/linux/vfio.h
|
|
|
c687bc |
index 9e227348b30..f660bd7bace 100644
|
|
|
c687bc |
--- a/linux-headers/linux/vfio.h
|
|
|
c687bc |
+++ b/linux-headers/linux/vfio.h
|
|
|
c687bc |
@@ -751,6 +751,21 @@ struct vfio_iommu_type1_info_cap_iova_range {
|
|
|
c687bc |
struct vfio_iova_range iova_ranges[];
|
|
|
c687bc |
};
|
|
|
c687bc |
|
|
|
c687bc |
+/*
|
|
|
c687bc |
+ * The DMA available capability allows to report the current number of
|
|
|
c687bc |
+ * simultaneously outstanding DMA mappings that are allowed.
|
|
|
c687bc |
+ *
|
|
|
c687bc |
+ * The structure below defines version 1 of this capability.
|
|
|
c687bc |
+ *
|
|
|
c687bc |
+ * avail: specifies the current number of outstanding DMA mappings allowed.
|
|
|
c687bc |
+ */
|
|
|
c687bc |
+#define VFIO_IOMMU_TYPE1_INFO_DMA_AVAIL 3
|
|
|
c687bc |
+
|
|
|
c687bc |
+struct vfio_iommu_type1_info_dma_avail {
|
|
|
c687bc |
+ struct vfio_info_cap_header header;
|
|
|
c687bc |
+ __u32 avail;
|
|
|
c687bc |
+};
|
|
|
c687bc |
+
|
|
|
c687bc |
#define VFIO_IOMMU_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 12)
|
|
|
c687bc |
|
|
|
c687bc |
/**
|
|
|
c687bc |
--
|
|
|
c687bc |
2.27.0
|
|
|
c687bc |
|