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"
116 DeviceState *vdev = DEVICE(&dev->vdev);
120 qdev_realize(vdev, BUS(&vpci_dev->bus), errp);
129 set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
131 k->realize = virtio_blk_pci_realize;
132 pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
133 pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_BLOCK;
134 pcidev_k->revision = VIRTIO_PCI_ABI_VERSION;
135 pcidev_k->class_id = PCI_CLASS_STORAGE_SCSI;
142 virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
144 object_property_add_alias(obj, "bootindex", OBJECT(&dev->vdev),
150 .generic_name = "virtio-blk-pci",
151 .transitional_name = "virtio-blk-pci-transitional",
152 .non_transitional_name = "virtio-blk-pci-non-transitional",
160 it's properties to the PCI device.
164 ------------------------
171 * in a separate process (a.k.a. vhost-user)
177 which has to work with either vhost or vhost-user uses
181 For vhost-user devices you also need to add code to track the
183 between QEMU and the external vhost-user process.
185 If you only need to implement a vhost-user backed the other option is
186 a use a QOM-ified version of vhost-user.
195 g->vhost = VHOST_USER_BACKEND(object_new(TYPE_VHOST_USER_BACKEND));
197 OBJECT(g->vhost), "chardev");
211 sub-structure tracks both the ``vhost_dev`` and ``CharDev`` types