cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-linux-headers-add-vfio-DMA-available-capability.patch

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