cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

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

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