Lines Matching +full:virtio +full:- +full:pci

5 Writing VirtIO backends for QEMU
10 implementing VirtIO devices. For VirtIO the frontend is the driver
12 do to handle the emulation of the VirtIO device. This can be done
15 (vhost-user).
17 VirtIO Transports
18 -----------------
20 VirtIO supports a number of different transports. While the details of
23 transport they use. For example -device virtio-foo represents the foo
24 device using mmio and -device virtio-foo-pci is the same class of
25 device using the PCI transport.
28 ---------------------------------
31 however VirtIO devices should be based on ``TYPE_VIRTIO_DEVICE`` which
45 support multiple device types. For example the Virtio GPU device:
75 defines a base class for the VirtIO GPU and then specialises two
77 vhost-user version.
85 Probably due to legacy from the pre-QOM days PCI VirtIO devices don't
87 on the VirtIOPCIProxy class and the specific VirtIO instance is
93 * virtio-blk-pci: This extends VirtioPCIProxy.
95 #define TYPE_VIRTIO_BLK_PCI "virtio-blk-pci-base"
115 DeviceState *vdev = DEVICE(&dev->vdev);
119 qdev_realize(vdev, BUS(&vpci_dev->bus), errp);
128 set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
130 k->realize = virtio_blk_pci_realize;
131 pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
132 pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_BLOCK;
133 pcidev_k->revision = VIRTIO_PCI_ABI_VERSION;
134 pcidev_k->class_id = PCI_CLASS_STORAGE_SCSI;
141 virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
143 object_property_add_alias(obj, "bootindex", OBJECT(&dev->vdev),
149 .generic_name = "virtio-blk-pci",
150 .transitional_name = "virtio-blk-pci-transitional",
151 .non_transitional_name = "virtio-blk-pci-non-transitional",
159 it's properties to the PCI device.
163 ------------------------
170 * in a separate process (a.k.a. vhost-user)
176 which has to work with either vhost or vhost-user uses
180 For vhost-user devices you also need to add code to track the
182 between QEMU and the external vhost-user process.
184 If you only need to implement a vhost-user backed the other option is
185 a use a QOM-ified version of vhost-user.
194 g->vhost = VHOST_USER_BACKEND(object_new(TYPE_VHOST_USER_BACKEND));
196 OBJECT(g->vhost), "chardev");
210 sub-structure tracks both the ``vhost_dev`` and ``CharDev`` types