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

4 #include "net/vhost_net.h"
5 #include "hw/virtio/vhost-backend.h"
14 /* Generic structures common for any vhost based device. */
67 /* Vhost device config space changed callback
75 * struct vhost_dev - common vhost_dev structure
90 /* the first virtqueue which would be used by this vhost dev */
92 /* one past the last vq index for the virtio device (not vhost) */
94 /* if non-zero, minimum required value for max_queues */
97 * vhost feature handling requires matching the feature set
102 * @acked_features: final negotiated features with front-end driver
115 * @protocol_features: is the vhost-user only feature set by
124 /* @started: is the vhost device started? */
155 * vhost_dev_init() - initialise the vhost interface
157 * @opaque: opaque ptr passed to backend (vhost/vhost-user/vdpa)
162 * The initialisation of the vhost device will trigger the
167 * Return: 0 on success, non-zero on error while setting errp.
174 * vhost_dev_cleanup() - tear down and cleanup vhost interface
184 * vhost_dev_enable_notifiers() - enable event notifiers
188 * Enable notifications directly to the vhost device rather than being
190 * the vhost device is started via @vhost_dev_start.
197 * vhost_dev_disable_notifiers - disable event notifications
201 * Disable direct notifications to vhost device.
208 * vhost_dev_is_started() - report status of vhost device
211 * Return the started status of the vhost device
215 return hdev->started; in vhost_dev_is_started()
219 * vhost_dev_start() - start the vhost device
224 * Starts the vhost device. From this point VirtIO feature negotiation
232 * vhost_dev_stop() - stop the vhost device
237 * Stop the vhost device. After the device is stopped the notifiers
246 * vhost_dev_force_stop() - force stop the vhost device
251 * Force stop the vhost device. After the device is stopped the notifiers
254 * attempt to flush in-flight backend requests by skipping GET_VRING_BASE
261 * DOC: vhost device configuration handling
266 * change the configuration over time the vhost handler should
274 * vhost_dev_get_config() - fetch device configuration
285 * vhost_dev_set_config() - set device configuration
296 * Return: 0 on success, non-zero on error
302 * vhost_dev_set_config_notifier() - register VhostDevConfigOps
324 * vhost_get_features() - return a sanitised set of feature bits
330 * is supported by the vhost backend (hdev->features), the supported
337 * vhost_ack_features() - set vhost acked_features
342 * This sets the internal hdev->acked_features to the intersection of
375 return -ENOSYS; in vhost_reset_device()
380 * vhost_supports_device_state(): Checks whether the back-end supports
385 * @dev: The vhost device
401 * the back-end for the purpose of migration. Data is to be transferred
405 * must take this as the end-of-transfer signal and close its FD, too.
407 * @fd is the back-end's end of the pipe: The write FD for SAVE, and the
409 * back-end, i.e. closes it in the front-end.
411 * The back-end may optionally reply with an FD of its own, if this
413 * stored in *reply_fd. The back-end will discard the FD sent to it,
414 * and the front-end must use *reply_fd for transferring state to/from
415 * the back-end.
417 * @dev: The vhost device
420 * from the back-end and stored by the front-end in the
423 * by the front-end from the migration stream and sent to
424 * the back-end to restore the saved state.
428 * @fd: Back-end's end of the pipe through which to transfer state; note
429 * that ownership is transferred to the back-end, so this function
430 * closes @fd in the front-end.
431 * @reply_fd: If the back-end wishes to use a different pipe for state
432 * transfer, this will contain an FD for the front-end to
433 * use. Otherwise, -1 is stored here.
436 * Returns 0 on success, and -errno on failure.
447 * back-end via vhost_set_device_state_fd(), i.e. once the sending end
448 * has closed the pipe, inquire the back-end to report any potential
451 * - During outgoing migration, when the source side had already started
453 * - During incoming migration, when the received state is somehow
454 * invalid and cannot be processed by the back-end
456 * @dev: The vhost device
459 * Returns 0 when the back-end reports successful state transfer and
460 * processing, and -errno when an error occurred somewhere.
465 * vhost_save_backend_state(): High-level function to receive a vhost
466 * back-end's state, and save it in @f. Uses
467 * `vhost_set_device_state_fd()` to get the data from the back-end, and
469 * respective length (be32). The end is marked by a 0-length chunk.
474 * @dev: The vhost device from which to save the state
478 * Returns 0 on success, and -errno otherwise.
486 return -ENOSYS; in vhost_save_backend_state()
491 * vhost_load_backend_state(): High-level function to load a vhost
492 * back-end's state from @f, and send it over to the back-end. Reads
494 * `vhost_set_device_state_fd()` to transfer it to the back-end.
499 * @dev: The vhost device to which to send the state
503 * Returns 0 on success, and -errno otherwise.
511 return -ENOSYS; in vhost_load_backend_state()