Lines Matching +full:- +full:- +full:disable +full:- +full:vhost +full:- +full:user
10 * the COPYING file in the top-level directory.
18 #include "hw/qdev-core.h"
22 #include "standard-headers/linux/virtio_config.h"
23 #include "standard-headers/linux/virtio_ring.h"
29 * between the driver frontend and the device. This bit is re-used for
30 * vhost-user to advertise VHOST_USER_F_PROTOCOL_FEATURES between QEMU
31 * and a vhost-user backend.
85 #define VIRTIO_CONFIG_IRQ_IDX -1
87 #define TYPE_VIRTIO_DEVICE "virtio-device"
102 * struct VirtIODevice - common VirtIO structure
121 * backend (e.g. vhost) and could potentially be a subset of the
139 bool use_disabled_flag; /* allow use of 'disable' flag when needed */
157 * @user_guest_notifier_mask: gate usage of ->guest_notifier_mask() callback.
159 * vhost-user devices which are asynchronous by design.
228 /* May be called even when vdev->vhost_started is false */
237 * virtio_init() - initialise the common VirtIODevice structure
304 * virtio_notify_config() - signal a change to device config
452 return virtio_has_feature(vdev->guest_features, fbit); in virtio_vdev_has_feature()
458 return virtio_has_feature(vdev->host_features, fbit); in virtio_host_has_feature()
464 assert(vdev->device_endian != VIRTIO_DEVICE_ENDIAN_UNKNOWN); in virtio_is_big_endian()
465 return vdev->device_endian == VIRTIO_DEVICE_ENDIAN_BIG; in virtio_is_big_endian()
472 * virtio_device_started() - check if device started
473 * @vdev - the VirtIO device
474 * @status - the devices status bits
477 * tracked via the @vdev->started field (to support migration),
483 if (vdev->use_started) { in virtio_device_started()
484 return vdev->started; in virtio_device_started()
491 * virtio_device_should_start() - check if device startable
492 * @vdev - the VirtIO device
493 * @status - the devices status bits
495 * This is similar to virtio_device_started() but ignores vdev->started
501 if (!vdev->vm_running) { in virtio_device_should_start()
511 vdev->start_on_kick = false; in virtio_set_started()
514 if (vdev->use_started) { in virtio_set_started()
515 vdev->started = started; in virtio_set_started()
519 static inline void virtio_set_disabled(VirtIODevice *vdev, bool disable) in virtio_set_disabled() argument
521 if (vdev->use_disabled_flag) { in virtio_set_disabled()
522 vdev->disabled = disable; in virtio_set_disabled()
528 return unlikely(vdev->disabled || vdev->broken); in virtio_device_disabled()