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