Lines Matching defs:mdev_state
146 struct mdev_state *mdev_state; member
153 struct mdev_state { struct
154 struct vfio_device vdev;
155 struct eventfd_ctx *intx_evtfd;
156 struct eventfd_ctx *msi_evtfd;
157 int irq_index;
158 u8 *vconfig;
159 struct mutex ops_lock;
160 struct mdev_device *mdev;
161 struct mdev_region_info region_info[VFIO_PCI_NUM_REGIONS];
162 u32 bar_mask[VFIO_PCI_NUM_REGIONS];
163 struct list_head next;
164 struct serial_port s[2];
165 struct mutex rxtx_lock;
166 struct vfio_device_info dev_info;
167 int nr_ports;
168 enum vfio_device_mig_state state;
169 struct mutex state_mutex;
170 struct mutex reset_mutex;
171 struct mtty_migration_file *saving_migf;
172 struct mtty_migration_file *resuming_migf;
173 u8 deferred_reset:1;
174 u8 intx_mask:1;
216 static bool is_intx(struct mdev_state *mdev_state) in is_intx()
221 static bool is_msi(struct mdev_state *mdev_state) in is_msi()
226 static bool is_noirq(struct mdev_state *mdev_state) in is_noirq()
231 static void mtty_trigger_interrupt(struct mdev_state *mdev_state) in mtty_trigger_interrupt()
246 static void mtty_create_config_space(struct mdev_state *mdev_state) in mtty_create_config_space()
310 static void handle_pci_cfg_write(struct mdev_state *mdev_state, u16 offset, in handle_pci_cfg_write()
364 static void handle_bar_write(unsigned int index, struct mdev_state *mdev_state, in handle_bar_write()
532 static void handle_bar_read(unsigned int index, struct mdev_state *mdev_state, in handle_bar_read()
670 static void mdev_read_base(struct mdev_state *mdev_state) in mdev_read_base()
707 static ssize_t mdev_access(struct mdev_state *mdev_state, u8 *buf, size_t count, in mdev_access()
777 static size_t mtty_data_size(struct mdev_state *mdev_state) in mtty_data_size()
792 static void mtty_disable_files(struct mdev_state *mdev_state) in mtty_disable_files()
807 static void mtty_state_mutex_unlock(struct mdev_state *mdev_state) in mtty_state_mutex_unlock()
837 struct mdev_state *mdev_state = migf->mdev_state; in mtty_precopy_ioctl() local
932 static void mtty_save_state(struct mdev_state *mdev_state) in mtty_save_state()
948 static int mtty_load_state(struct mdev_state *mdev_state) in mtty_load_state()
972 mtty_save_device_data(struct mdev_state *mdev_state, in mtty_save_device_data()
1024 struct mdev_state *mdev_state = migf->mdev_state; in mtty_resume_write() local
1087 mtty_resume_device_data(struct mdev_state *mdev_state) in mtty_resume_device_data()
1113 static struct file *mtty_step_state(struct mdev_state *mdev_state, in mtty_step_state()
1227 struct mdev_state *mdev_state = in mtty_set_state() local
1262 struct mdev_state *mdev_state = in mtty_get_state() local
1274 struct mdev_state *mdev_state = in mtty_get_data_size() local
1314 struct mdev_state *mdev_state = in mtty_init_dev() local
1363 struct mdev_state *mdev_state; in mtty_probe() local
1384 struct mdev_state *mdev_state = in mtty_release_dev() local
1395 struct mdev_state *mdev_state = dev_get_drvdata(&mdev->dev); in mtty_remove() local
1401 static int mtty_reset(struct mdev_state *mdev_state) in mtty_reset()
1420 struct mdev_state *mdev_state = in mtty_read() local
1481 struct mdev_state *mdev_state = in mtty_write() local
1537 static void mtty_disable_intx(struct mdev_state *mdev_state) in mtty_disable_intx()
1547 static void mtty_disable_msi(struct mdev_state *mdev_state) in mtty_disable_msi()
1556 static int mtty_set_irqs(struct mdev_state *mdev_state, uint32_t flags, in mtty_set_irqs()
1720 static int mtty_get_region_info(struct mdev_state *mdev_state, in mtty_get_region_info()
1791 struct mdev_state *mdev_state = in mtty_ioctl() local
1937 struct mdev_state *mdev_state = in mtty_close() local