9ae3a8
From 576a2f71ac459b96deb1caee171fb6ff45915688 Mon Sep 17 00:00:00 2001
9ae3a8
From: Alex Williamson <alex.williamson@redhat.com>
9ae3a8
Date: Tue, 5 Nov 2013 17:31:05 +0100
9ae3a8
Subject: [PATCH 18/25] linux-headers: Update to include vfio pci hot reset support
9ae3a8
9ae3a8
RH-Author: Alex Williamson <alex.williamson@redhat.com>
9ae3a8
Message-id: <20131105173105.19372.39854.stgit@bling.home>
9ae3a8
Patchwork-id: 55439
9ae3a8
O-Subject: [RHEL7 qemu-kvm PATCH 1/2] linux-headers: Update to include vfio pci hot reset support
9ae3a8
Bugzilla: 1025472
9ae3a8
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
9ae3a8
RH-Acked-by: Bandan Das <bsd@redhat.com>
9ae3a8
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
9ae3a8
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
9ae3a8
9ae3a8
Bugzilla: 1025472
9ae3a8
Upstream commit: Subset of 4f265607
9ae3a8
9ae3a8
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
9ae3a8
---
9ae3a8
 linux-headers/linux/vfio.h |   38 ++++++++++++++++++++++++++++++++++++++
9ae3a8
 1 file changed, 38 insertions(+)
9ae3a8
9ae3a8
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
---
9ae3a8
 linux-headers/linux/vfio.h |   38 ++++++++++++++++++++++++++++++++++++++
9ae3a8
 1 files changed, 38 insertions(+), 0 deletions(-)
9ae3a8
9ae3a8
diff --git a/linux-headers/linux/vfio.h b/linux-headers/linux/vfio.h
9ae3a8
index 9e6df92..d341312 100644
9ae3a8
--- a/linux-headers/linux/vfio.h
9ae3a8
+++ b/linux-headers/linux/vfio.h
9ae3a8
@@ -323,6 +323,44 @@ enum {
9ae3a8
 	VFIO_PCI_NUM_IRQS
9ae3a8
 };
9ae3a8
 
9ae3a8
+/**
9ae3a8
+ * VFIO_DEVICE_GET_PCI_HOT_RESET_INFO - _IORW(VFIO_TYPE, VFIO_BASE + 12,
9ae3a8
+ *					      struct vfio_pci_hot_reset_info)
9ae3a8
+ *
9ae3a8
+ * Return: 0 on success, -errno on failure:
9ae3a8
+ *	-enospc = insufficient buffer, -enodev = unsupported for device.
9ae3a8
+ */
9ae3a8
+struct vfio_pci_dependent_device {
9ae3a8
+	__u32	group_id;
9ae3a8
+	__u16	segment;
9ae3a8
+	__u8	bus;
9ae3a8
+	__u8	devfn; /* Use PCI_SLOT/PCI_FUNC */
9ae3a8
+};
9ae3a8
+
9ae3a8
+struct vfio_pci_hot_reset_info {
9ae3a8
+	__u32	argsz;
9ae3a8
+	__u32	flags;
9ae3a8
+	__u32	count;
9ae3a8
+	struct vfio_pci_dependent_device	devices[];
9ae3a8
+};
9ae3a8
+
9ae3a8
+#define VFIO_DEVICE_GET_PCI_HOT_RESET_INFO	_IO(VFIO_TYPE, VFIO_BASE + 12)
9ae3a8
+
9ae3a8
+/**
9ae3a8
+ * VFIO_DEVICE_PCI_HOT_RESET - _IOW(VFIO_TYPE, VFIO_BASE + 13,
9ae3a8
+ *				    struct vfio_pci_hot_reset)
9ae3a8
+ *
9ae3a8
+ * Return: 0 on success, -errno on failure.
9ae3a8
+ */
9ae3a8
+struct vfio_pci_hot_reset {
9ae3a8
+	__u32	argsz;
9ae3a8
+	__u32	flags;
9ae3a8
+	__u32	count;
9ae3a8
+	__s32	group_fds[];
9ae3a8
+};
9ae3a8
+
9ae3a8
+#define VFIO_DEVICE_PCI_HOT_RESET	_IO(VFIO_TYPE, VFIO_BASE + 13)
9ae3a8
+
9ae3a8
 /* -------- API for Type1 VFIO IOMMU -------- */
9ae3a8
 
9ae3a8
 /**
9ae3a8
-- 
9ae3a8
1.7.1
9ae3a8