Lines Matching +full:- +full:- +full:disable +full:- +full:vhost +full:- +full:vdpa

4 #include "hw/virtio/vhost-backend.h"
13 /* Generic structures common for any vhost based device. */
66 /* Vhost device config space changed callback
74 * struct vhost_dev - common vhost_dev structure
89 /* the first virtqueue which would be used by this vhost dev */
91 /* one past the last vq index for the virtio device (not vhost) */
93 /* if non-zero, minimum required value for max_queues */
96 * vhost feature handling requires matching the feature set
101 * @acked_features: final negotiated features with front-end driver
114 * @protocol_features: is the vhost-user only feature set by
123 /* @started: is the vhost device started? */
150 * vhost_dev_init() - initialise the vhost interface
152 * @opaque: opaque ptr passed to backend (vhost/vhost-user/vdpa)
157 * The initialisation of the vhost device will trigger the
162 * Return: 0 on success, non-zero on error while setting errp.
169 * vhost_dev_cleanup() - tear down and cleanup vhost interface
179 * vhost_dev_enable_notifiers() - enable event notifiers
183 * Enable notifications directly to the vhost device rather than being
185 * the vhost device is started via @vhost_dev_start.
192 * vhost_dev_disable_notifiers - disable event notifications
196 * Disable direct notifications to vhost device.
203 * vhost_dev_is_started() - report status of vhost device
206 * Return the started status of the vhost device
210 return hdev->started; in vhost_dev_is_started()
214 * vhost_dev_start() - start the vhost device
219 * Starts the vhost device. From this point VirtIO feature negotiation
227 * vhost_dev_stop() - stop the vhost device
232 * Stop the vhost device. After the device is stopped the notifiers
241 * DOC: vhost device configuration handling
246 * change the configuration over time the vhost handler should
254 * vhost_dev_get_config() - fetch device configuration
265 * vhost_dev_set_config() - set device configuration
276 * Return: 0 on success, non-zero on error
282 * vhost_dev_set_config_notifier() - register VhostDevConfigOps
304 * vhost_get_features() - return a sanitised set of feature bits
310 * is supported by the vhost backend (hdev->features), the supported
317 * vhost_ack_features() - set vhost acked_features
322 * This sets the internal hdev->acked_features to the intersection of
355 return -ENOSYS; in vhost_reset_device()
360 * vhost_supports_device_state(): Checks whether the back-end supports
365 * @dev: The vhost device
381 * the back-end for the purpose of migration. Data is to be transferred
385 * must take this as the end-of-transfer signal and close its FD, too.
387 * @fd is the back-end's end of the pipe: The write FD for SAVE, and the
389 * back-end, i.e. closes it in the front-end.
391 * The back-end may optionally reply with an FD of its own, if this
393 * stored in *reply_fd. The back-end will discard the FD sent to it,
394 * and the front-end must use *reply_fd for transferring state to/from
395 * the back-end.
397 * @dev: The vhost device
400 * from the back-end and stored by the front-end in the
403 * by the front-end from the migration stream and sent to
404 * the back-end to restore the saved state.
408 * @fd: Back-end's end of the pipe through which to transfer state; note
409 * that ownership is transferred to the back-end, so this function
410 * closes @fd in the front-end.
411 * @reply_fd: If the back-end wishes to use a different pipe for state
412 * transfer, this will contain an FD for the front-end to
413 * use. Otherwise, -1 is stored here.
416 * Returns 0 on success, and -errno on failure.
427 * back-end via vhost_set_device_state_fd(), i.e. once the sending end
428 * has closed the pipe, inquire the back-end to report any potential
431 * - During outgoing migration, when the source side had already started
433 * - During incoming migration, when the received state is somehow
434 * invalid and cannot be processed by the back-end
436 * @dev: The vhost device
439 * Returns 0 when the back-end reports successful state transfer and
440 * processing, and -errno when an error occurred somewhere.
445 * vhost_save_backend_state(): High-level function to receive a vhost
446 * back-end's state, and save it in @f. Uses
447 * `vhost_set_device_state_fd()` to get the data from the back-end, and
449 * respective length (be32). The end is marked by a 0-length chunk.
454 * @dev: The vhost device from which to save the state
458 * Returns 0 on success, and -errno otherwise.
466 return -ENOSYS; in vhost_save_backend_state()
471 * vhost_load_backend_state(): High-level function to load a vhost
472 * back-end's state from @f, and send it over to the back-end. Reads
474 * `vhost_set_device_state_fd()` to transfer it to the back-end.
479 * @dev: The vhost device to which to send the state
483 * Returns 0 on success, and -errno otherwise.
491 return -ENOSYS; in vhost_load_backend_state()