From 9da9560c4dd3556519cd391a04f0db157dc3c295 Mon Sep 17 00:00:00 2001 From: Bryan Venteicher Date: Tue, 19 Jan 2021 04:55:23 +0000 Subject: virtio: Add VirtIO PCI modern (V1) support Use the existing legacy PCI driver as the basis for shared code between the legacy and modern PCI drivers. The existing virtio_pci kernel module will contain both the legacy and modern drivers. Changes to the virtqueue and each device driver (network, block, etc) for V1 support come in later commits. Update the MMIO driver to reflect the VirtIO bus method changes, but the modern compliance can be improved on later. Note that the modern PCI driver requires bus_map_resource() to be implemented, which is not the case on all archs. The hw.virtio.pci.transitional tunable default value is zero so transitional devices will continue to be driven via the legacy driver. Reviewed by: grehan (mentor) Differential Revision: https://reviews.freebsd.org/D27856 --- sys/dev/virtio/virtqueue.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/dev/virtio/virtqueue.h') diff --git a/sys/dev/virtio/virtqueue.h b/sys/dev/virtio/virtqueue.h index 7b2db673f7ae..6ac5899cf0c3 100644 --- a/sys/dev/virtio/virtqueue.h +++ b/sys/dev/virtio/virtqueue.h @@ -70,8 +70,8 @@ struct vq_alloc_info { uint64_t virtqueue_filter_features(uint64_t features); int virtqueue_alloc(device_t dev, uint16_t queue, uint16_t size, - int align, vm_paddr_t highaddr, struct vq_alloc_info *info, - struct virtqueue **vqp); + bus_size_t notify_offset, int align, vm_paddr_t highaddr, + struct vq_alloc_info *info, struct virtqueue **vqp); void *virtqueue_drain(struct virtqueue *vq, int *last); void virtqueue_free(struct virtqueue *vq); int virtqueue_reinit(struct virtqueue *vq, uint16_t size); -- cgit v1.3