diff --git a/drivers/vfio/vfio_main.c b/drivers/vfio/vfio_main.c
index 7e427fc..b9bb692 100644
--- a/drivers/vfio/vfio_main.c
+++ b/drivers/vfio/vfio_main.c
@@ -490,6 +490,10 @@ static long vfio_unl_ioctl(struct file *filep,
 		ret = vfio_irq_eoi_eventfd(vdev, fd);
 		break;
 
+	case VFIO_RESET_FUNCTION:
+		ret = pci_reset_function(vdev->pdev);
+		break;
+
 	default:
 		return -EINVAL;
 	}
diff --git a/include/linux/vfio.h b/include/linux/vfio.h
index f07d8fe..47d9bb9 100644
--- a/include/linux/vfio.h
+++ b/include/linux/vfio.h
@@ -215,6 +215,9 @@ struct vfio_dma_map {
 /* Re-enable INTx via eventfd */
 #define	VFIO_IRQ_EOI_EVENTFD	_IOW(';', 110, int)
 
+/* Reset PCI function */
+#define VFIO_RESET_FUNCTION	_IO(';', 111)
+
 /*
  * Reads, writes, and mmaps determine which PCI BAR (or config space)
  * from the high level bits of the file offset
