summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/virtio_pci.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* fix virtio_pci on 32bit archssf2019-05-271-3/+9
| | | | bus_space_read/write_8 do not exist there, use two 32bit operations.
* Support virtio 1.0 for virtio_pcisf2019-05-261-65/+455
| | | | | virtio 1.0 for virtio_mmio it not yet implemented, but 0.9 devices continue to work.
* Rework virtio_negotiate_features()sf2019-05-261-13/+28
| | | | | | | | | | | | | | | | | | | | | | Add a sc_driver_features field that is automatically used by virtio_negotiate_features() and during reinit. Make virtio_negotiate_features() return an error code. Virtio 1.0 has a special status bit for feature negotiation that means that negotiation can fail. Make virtio_negotiate_features() return an error code instead of the features. Make virtio_reinit_start() automatically call virtio_negotiate_features(). Add a convenience function virtio_has_feature() to make checking bits easier. Add an error check in viomb for virtio_negotiate_features because it has some feature bits that may cause negotiation to fail. More error checking in the child drivers is still missing. ok mlarkin@
* virtio_pci: Move msix vector config into functionssf2019-05-261-15/+25
| | | | ok mlarkin@
* virtio_pci: Split bus space handlessf2019-05-261-35/+81
| | | | | | In virtio_pci 1.0, different parts of the register set may be located in different BARs. Use subregions to make the access independent of the virtio version.
* virtio: Prepare for 64 feature bitssf2019-03-241-5/+5
| | | | | | | | | | | virtio 1.0 supports an arbitrary number of feature bits. However, so far no more than 64 are used (compared to 32 in virtio 0.9). Adjust data types to support 64 feature bits. Later, we may want to use bitmaps and setbit(), ... to support even more feature bits. ok mlarkin@
* virtio: adjust virtio_setup_queue prototype for 1.0sf2019-03-241-6/+7
| | | | | | | | | Make it take an address instead of a PFN. Pass the virtqueue pointer. In virtio 1.0, more information has to be configured in the device. Also call virtio_setup_queue() after the information has been filled in. ok mlarkin@
* virtio: Introduce defines for config(8) flagssf2019-01-191-3/+3
|
* Move some PCI-specific defines to a new virtio_pcireg.h filesf2019-01-101-1/+2
| | | | Also add some virtio 1.0 status and feature bits
* Move some common defines to virtiovar.hsf2019-01-101-3/+1
| | | | And fix some comments
* virtio_pci: Support IPL_MPSAFE interrupt handlerssf2017-05-311-5/+26
|
* Switch include of virtio header from dev/pci/to dev/pv/reyk2017-01-211-3/+3
|
* Add vmmci(4) (VMM control interface), a simple guest-side driver for vmm(4) VMsreyk2017-01-131-1/+4
| | | | | | | | While we don't have ACPI in vmm(4), we need a simple way to shutdown and reboot VMs gracefully but the device also allows to add more direct communications between host and guest later. OK mlarkin@
* virtio_pci: Always allow MSI/MSI-Xsf2016-07-191-1/+7
| | | | | | | For virtio devices, ignore the black/white-listing depending on the PCI bridge. This enables MSI-X with qemu's old "82441FX" pci-bridge. Suggested by kettenis@
* Support MSI-X in virtiosf2016-07-161-31/+215
| | | | | | | | | | This increases performance for interrupt heavy loads. While suspend/resume support for MSI-X is missing, this is also missing for virtio. So no new issue there. Currently, qemu's old "82441FX" pci-bridge is still blacklisted for MSI. But MSI-X is used if qemu is started with "-M q35".
* virtio: Move interrupt handler into transport specific codesf2016-07-141-4/+4
| | | | | | | | For MSI-X (and also possibly for other transports), the interrupt handler must do different things. Move it out of virtio.c and into virtio_pci. ARM part tested by patrick@
* virtio2 at pci0 dev 3 function 0 "Qumranet Virtio Network" rev 0x00: Virtio Network Devicederaadt2015-11-151-2/+1
| | | | | becomes simply virtio2 at pci0 dev 3 function 0 "Qumranet Virtio Network" rev 0x00
* virtio_pci: Do the ISR read without kernel locksf2015-07-181-3/+12
| | | | | The ISR read is relatively expensive because it causes a vmexit. Grab the kernel lock only after it is done.
* KNF fixessf2015-07-181-23/+24
| | | | No object file changes besides line numbers in KASSERTs
* Remove some includes include-what-you-use claims don'tjsg2015-03-141-2/+1
| | | | | | | have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
* Consistency with the pci_intr_map bits.brad2014-12-151-2/+2
| | | | ok sf@
* Support MSI for virtio. This is useful for bhyve.sf2013-09-221-2/+2
|
* Rename write_queue_address -> setup_queuesf2013-03-101-4/+4
| | | | | | | | | For transports supporting several interrupts, this function needs to setup per-queue interrupts in addition of setting the queue address. No logic change. OK jasper@
* Move sc_ih to virtio_pci_softc, it is not used outside of virtio_pcisf2013-03-101-5/+8
| | | | | | and is really a transport-specific thing. OK jasper@
* Remove excessive sys/cdefs.h inclusionderaadt2012-12-051-3/+1
| | | | ok guenther millert kettenis
* Add $OpenBSD$ CVS Ids.reyk2012-10-121-0/+1
| | | | ok sf@
* make the lines printed during attach more consistent with other driversjasper2012-09-201-6/+6
| | | | ok mikeb@ sf@
* Add new drivers for virtio network (vio) and block devices (vioblk, the diskssf2012-09-191-0/+411
attach as scsi disks). These are paravirtualized devices offered by some hypervisors like kvm and virtualbox. The virtio transport driver has the pci specific parts separated out. This will make it easier to add support for mmio (e.g. for ARM) later. OK mikeb OK jasper "commit what you have" deraadt