diff options
Diffstat (limited to 'kernel/include')
| -rw-r--r-- | kernel/include/nvidia-vgpu-vfio.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/kernel/include/nvidia-vgpu-vfio.h b/kernel/include/nvidia-vgpu-vfio.h index 7f778ee..3ca5cf6 100644 --- a/kernel/include/nvidia-vgpu-vfio.h +++ b/kernel/include/nvidia-vgpu-vfio.h @@ -90,6 +90,9 @@ struct nv_vgpu_migration_state { }; struct nv_vgpu_device { + /* VFIO device for VFIO group - must be first for vfio_alloc_device */ + struct vfio_device vfio_dev; + struct mdev_device *mdev; struct pci_dev *pdev; struct device dev; @@ -123,9 +126,18 @@ struct nv_vgpu_device { bool dry_run; /* PCI Config Space for VFIO mdev */ - u8 pci_config[256]; + u8 pci_config[4096]; bool config_space_dirty; -}; + + /* VFIO device open/close tracking */ + atomic_t vfio_dev_open_count; + wait_queue_head_t vfio_dev_close_wait; + + /* VFIO device registration state */ + bool vfio_dev_registered; + }; + +typedef struct nv_vgpu_device nv_vgpu_device; struct nv_vgpu_driver_data { struct mutex lock; |
