Date: Wed, 6 May 2020 23:31:30 +0000 (UTC) From: Jessica Clarke <jrtc27@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360723 - in head/sys/dev/virtio: balloon console random scsi Message-ID: <202005062331.046NVUPW081638@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jrtc27 Date: Wed May 6 23:31:30 2020 New Revision: 360723 URL: https://svnweb.freebsd.org/changeset/base/360723 Log: virtio: Support MMIO bus for all devices The bus is independent of the device, so all devices can be attached to either a PCI bus or an MMIO bus. For example, QEMU's virtio-rng-device gives the MMIO variant of virtio-rng-pci, and is now detected. Reviewed by: andrew, br, brooks (mentor) Approved by: andrew, br, brooks (mentor) Differential Revision: https://reviews.freebsd.org/D24730 Modified: head/sys/dev/virtio/balloon/virtio_balloon.c head/sys/dev/virtio/console/virtio_console.c head/sys/dev/virtio/random/virtio_random.c head/sys/dev/virtio/scsi/virtio_scsi.c Modified: head/sys/dev/virtio/balloon/virtio_balloon.c ============================================================================== --- head/sys/dev/virtio/balloon/virtio_balloon.c Wed May 6 23:28:51 2020 (r360722) +++ head/sys/dev/virtio/balloon/virtio_balloon.c Wed May 6 23:31:30 2020 (r360723) @@ -153,6 +153,8 @@ static driver_t vtballoon_driver = { }; static devclass_t vtballoon_devclass; +DRIVER_MODULE(virtio_balloon, virtio_mmio, vtballoon_driver, + vtballoon_devclass, 0, 0); DRIVER_MODULE(virtio_balloon, virtio_pci, vtballoon_driver, vtballoon_devclass, 0, 0); MODULE_VERSION(virtio_balloon, 1); @@ -160,6 +162,7 @@ MODULE_DEPEND(virtio_balloon, virtio, 1, 1, 1); VIRTIO_SIMPLE_PNPTABLE(virtio_balloon, VIRTIO_ID_BALLOON, "VirtIO Balloon Adapter"); +VIRTIO_SIMPLE_PNPINFO(virtio_mmio, virtio_balloon); VIRTIO_SIMPLE_PNPINFO(virtio_pci, virtio_balloon); static int Modified: head/sys/dev/virtio/console/virtio_console.c ============================================================================== --- head/sys/dev/virtio/console/virtio_console.c Wed May 6 23:28:51 2020 (r360722) +++ head/sys/dev/virtio/console/virtio_console.c Wed May 6 23:31:30 2020 (r360723) @@ -256,6 +256,8 @@ static driver_t vtcon_driver = { }; static devclass_t vtcon_devclass; +DRIVER_MODULE(virtio_console, virtio_mmio, vtcon_driver, vtcon_devclass, + vtcon_modevent, 0); DRIVER_MODULE(virtio_console, virtio_pci, vtcon_driver, vtcon_devclass, vtcon_modevent, 0); MODULE_VERSION(virtio_console, 1); @@ -263,6 +265,7 @@ MODULE_DEPEND(virtio_console, virtio, 1, 1, 1); VIRTIO_SIMPLE_PNPTABLE(virtio_console, VIRTIO_ID_CONSOLE, "VirtIO Console Adapter"); +VIRTIO_SIMPLE_PNPINFO(virtio_mmio, virtio_console); VIRTIO_SIMPLE_PNPINFO(virtio_pci, virtio_console); static int Modified: head/sys/dev/virtio/random/virtio_random.c ============================================================================== --- head/sys/dev/virtio/random/virtio_random.c Wed May 6 23:28:51 2020 (r360722) +++ head/sys/dev/virtio/random/virtio_random.c Wed May 6 23:31:30 2020 (r360723) @@ -96,6 +96,8 @@ static driver_t vtrnd_driver = { }; static devclass_t vtrnd_devclass; +DRIVER_MODULE(virtio_random, virtio_mmio, vtrnd_driver, vtrnd_devclass, + vtrnd_modevent, 0); DRIVER_MODULE(virtio_random, virtio_pci, vtrnd_driver, vtrnd_devclass, vtrnd_modevent, 0); MODULE_VERSION(virtio_random, 1); @@ -104,6 +106,7 @@ MODULE_DEPEND(virtio_random, random_device, 1, 1, 1); VIRTIO_SIMPLE_PNPTABLE(virtio_random, VIRTIO_ID_ENTROPY, "VirtIO Entropy Adapter"); +VIRTIO_SIMPLE_PNPINFO(virtio_mmio, virtio_random); VIRTIO_SIMPLE_PNPINFO(virtio_pci, virtio_random); static int Modified: head/sys/dev/virtio/scsi/virtio_scsi.c ============================================================================== --- head/sys/dev/virtio/scsi/virtio_scsi.c Wed May 6 23:28:51 2020 (r360722) +++ head/sys/dev/virtio/scsi/virtio_scsi.c Wed May 6 23:31:30 2020 (r360723) @@ -228,6 +228,8 @@ static driver_t vtscsi_driver = { }; static devclass_t vtscsi_devclass; +DRIVER_MODULE(virtio_scsi, virtio_mmio, vtscsi_driver, vtscsi_devclass, + vtscsi_modevent, 0); DRIVER_MODULE(virtio_scsi, virtio_pci, vtscsi_driver, vtscsi_devclass, vtscsi_modevent, 0); MODULE_VERSION(virtio_scsi, 1); @@ -235,6 +237,7 @@ MODULE_DEPEND(virtio_scsi, virtio, 1, 1, 1); MODULE_DEPEND(virtio_scsi, cam, 1, 1, 1); VIRTIO_SIMPLE_PNPTABLE(virtio_scsi, VIRTIO_ID_SCSI, "VirtIO SCSI Adapter"); +VIRTIO_SIMPLE_PNPINFO(virtio_mmio, virtio_scsi); VIRTIO_SIMPLE_PNPINFO(virtio_pci, virtio_scsi); static int
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005062331.046NVUPW081638>