Lines Matching +full:- +full:- +full:disable +full:- +full:vhost +full:- +full:net
10 * the COPYING file in the top-level directory.
18 #include "hw/qdev-core.h"
19 #include "net/net.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.
234 /* May be called even when vdev->vhost_started is false */
243 * virtio_init() - initialise the common VirtIODevice structure
310 * virtio_notify_config() - signal a change to device config
458 return virtio_has_feature(vdev->guest_features, fbit); in virtio_vdev_has_feature()
464 return virtio_has_feature(vdev->host_features, fbit); in virtio_host_has_feature()
470 assert(vdev->device_endian != VIRTIO_DEVICE_ENDIAN_UNKNOWN); in virtio_is_big_endian()
471 return vdev->device_endian == VIRTIO_DEVICE_ENDIAN_BIG; in virtio_is_big_endian()
478 * virtio_device_started() - check if device started
479 * @vdev - the VirtIO device
480 * @status - the devices status bits
483 * tracked via the @vdev->started field (to support migration),
489 if (vdev->use_started) { in virtio_device_started()
490 return vdev->started; in virtio_device_started()
497 * virtio_device_should_start() - check if device startable
498 * @vdev - the VirtIO device
499 * @status - the devices status bits
501 * This is similar to virtio_device_started() but ignores vdev->started
507 if (!vdev->vm_running) { in virtio_device_should_start()
517 vdev->start_on_kick = false; in virtio_set_started()
520 if (vdev->use_started) { in virtio_set_started()
521 vdev->started = started; in virtio_set_started()
525 static inline void virtio_set_disabled(VirtIODevice *vdev, bool disable) in virtio_set_disabled() argument
527 if (vdev->use_disabled_flag) { in virtio_set_disabled()
528 vdev->disabled = disable; in virtio_set_disabled()
534 return unlikely(vdev->disabled || vdev->broken); in virtio_device_disabled()