Lines Matching +full:d +full:- +full:bus
28 #include "hw/qdev-core.h"
32 #define TYPE_VIRTIO_BUS "virtio-bus"
42 void (*notify)(DeviceState *d, uint16_t vector);
43 void (*save_config)(DeviceState *d, QEMUFile *f);
44 void (*save_queue)(DeviceState *d, int n, QEMUFile *f);
45 void (*save_extra_state)(DeviceState *d, QEMUFile *f);
46 int (*load_config)(DeviceState *d, QEMUFile *f);
47 int (*load_queue)(DeviceState *d, int n, QEMUFile *f);
48 int (*load_done)(DeviceState *d, QEMUFile *f);
49 int (*load_extra_state)(DeviceState *d, QEMUFile *f);
50 bool (*has_extra_state)(DeviceState *d);
51 bool (*query_guest_notifiers)(DeviceState *d);
52 int (*set_guest_notifiers)(DeviceState *d, int nvqs, bool assign);
53 int (*set_host_notifier_mr)(DeviceState *d, int n,
55 void (*vmstate_change)(DeviceState *d, bool running);
60 void (*pre_plugged)(DeviceState *d, Error **errp);
63 * This is called by virtio-bus just after the device is plugged.
65 void (*device_plugged)(DeviceState *d, Error **errp);
68 * This is called by virtio-bus just before the device is unplugged.
70 void (*device_unplugged)(DeviceState *d);
71 int (*query_nvectors)(DeviceState *d);
77 bool (*ioeventfd_enabled)(DeviceState *d);
83 int (*ioeventfd_assign)(DeviceState *d, EventNotifier *notifier,
88 bool (*queue_enabled)(DeviceState *d, int n);
95 AddressSpace *(*get_dma_as)(DeviceState *d);
96 bool (*iommu_enabled)(DeviceState *d);
119 void virtio_bus_reset(VirtioBusState *bus);
120 void virtio_bus_device_unplugged(VirtIODevice *bus);
122 uint16_t virtio_bus_get_vdev_id(VirtioBusState *bus);
124 size_t virtio_bus_get_vdev_config_len(VirtioBusState *bus);
126 uint32_t virtio_bus_get_vdev_bad_features(VirtioBusState *bus);
128 void virtio_bus_get_vdev_config(VirtioBusState *bus, uint8_t *config);
130 void virtio_bus_set_vdev_config(VirtioBusState *bus, uint8_t *config);
132 static inline VirtIODevice *virtio_bus_get_device(VirtioBusState *bus) in virtio_bus_get_device() argument
134 BusState *qbus = &bus->parent_obj; in virtio_bus_get_device()
135 BusChild *kid = QTAILQ_FIRST(&qbus->children); in virtio_bus_get_device()
136 DeviceState *qdev = kid ? kid->child : NULL; in virtio_bus_get_device()
145 bool virtio_bus_ioeventfd_enabled(VirtioBusState *bus);
147 int virtio_bus_start_ioeventfd(VirtioBusState *bus);
149 void virtio_bus_stop_ioeventfd(VirtioBusState *bus);
150 /* Tell the bus that vhost is grabbing the ioeventfd. */
151 int virtio_bus_grab_ioeventfd(VirtioBusState *bus);
152 /* bus that vhost is not using the ioeventfd anymore. */
153 void virtio_bus_release_ioeventfd(VirtioBusState *bus);
155 int virtio_bus_set_host_notifier(VirtioBusState *bus, int n, bool assign);
156 /* Tell the bus that the ioeventfd handler is no longer required. */
157 void virtio_bus_cleanup_host_notifier(VirtioBusState *bus, int n);