linux/arch/um/drivers
Johannes Berg 68f5d3f3b6 um: add PCI over virtio emulation driver
To support testing of PCI/PCIe drivers in UML, add a PCI bus
support driver. This driver uses virtio, which in UML is really
just vhost-user, to talk to devices, and adds the devices to
the virtual PCI bus in the system.

Since virtio already allows DMA/bus mastering this really isn't
all that hard, of course we need the logic_iomem infrastructure
that was added by a previous patch.

The protocol to talk to the device is has a few fairly simple
messages for reading to/writing from config and IO spaces, and
messages for the device to send the various interrupts (INT#,
MSI/MSI-X and while suspended PME#).

Note that currently no offical virtio device ID is assigned for
this protocol, as a consequence this patch requires defining it
in the Kconfig, with a default that makes the driver refuse to
work at all.

Finally, in order to add support for MSI/MSI-X interrupts, some
small changes are needed in the UML IRQ code, it needs to have
more interrupts, changing NR_IRQS from 64 to 128 if this driver
is enabled, but not actually use them for anything so that the
generic IRQ domain/MSI infrastructure can allocate IRQ numbers.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
2021-06-17 21:45:43 +02:00
..
chan_kern.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
chan_user.c um: tty: Fix handling of close in tty lines 2020-12-13 22:38:28 +01:00
chan_user.h um: Add an option to make serial driver non-raw 2020-01-19 22:41:50 +01:00
chan.h um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
cow_sys.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cow_user.c um: ubd: use 64-bit time_t where possible 2019-12-18 18:07:31 +01:00
cow.h treewide: remove editor modelines and cruft 2021-05-07 00:26:34 -07:00
daemon_kern.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
daemon_user.c um: Some fixes to build UML with musl 2020-10-11 23:13:06 +02:00
daemon.h um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
fd.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
harddog_kern.c compat_ioctl: move WDIOC handling into wdt drivers 2019-10-23 17:23:46 +02:00
harddog_user.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
hostaudio_kern.c um: Remove unneeded variable 'ret' 2021-04-15 23:10:33 +02:00
Kconfig um: add PCI over virtio emulation driver 2021-06-17 21:45:43 +02:00
line.c um: Support dynamic IRQ allocation 2020-12-13 22:22:08 +01:00
line.h um: line, remove put_char 2020-06-24 16:53:37 +02:00
Makefile um: add PCI over virtio emulation driver 2021-06-17 21:45:43 +02:00
mconsole_kern.c um: Support dynamic IRQ allocation 2020-12-13 22:22:08 +01:00
mconsole_kern.h um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
mconsole_user.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
mconsole.h um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
mmapper_kern.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
net_kern.c um: Support dynamic IRQ allocation 2020-12-13 22:22:08 +01:00
net_user.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
null.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
pcap_kern.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
pcap_user.c um: Some fixes to build UML with musl 2020-10-11 23:13:06 +02:00
pcap_user.h um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
port_kern.c um: Support dynamic IRQ allocation 2020-12-13 22:22:08 +01:00
port_user.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
port.h um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
pty.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
random.c um: Remove IRQ_NONE type 2020-12-13 22:22:29 +01:00
rtc_kern.c um: add a pseudo RTC 2021-02-12 21:38:52 +01:00
rtc_user.c um: add a pseudo RTC 2021-02-12 21:38:52 +01:00
rtc.h um: add a pseudo RTC 2021-02-12 21:38:52 +01:00
slip_common.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
slip_common.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
slip_kern.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
slip_user.c um: Some fixes to build UML with musl 2020-10-11 23:13:06 +02:00
slip.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
slirp_kern.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
slirp_user.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
slirp.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ssl.c um: line, remove put_char 2020-06-24 16:53:37 +02:00
stderr_console.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
stdio_console.c um: line, remove put_char 2020-06-24 16:53:37 +02:00
stdio_console.h um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
tty.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
ubd_kern.c Revert "um: allocate a guard page to helper threads" 2021-01-26 22:11:38 +01:00
ubd_user.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
ubd.h um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
umcast_kern.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
umcast_user.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
umcast.h um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
vde_kern.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
vde_user.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
vde.h um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
vector_kern.c um: Remove unused including <linux/version.h> 2021-04-15 23:10:43 +02:00
vector_kern.h um: virtio: Replace zero-length array with flexible-array 2020-06-02 22:38:00 +02:00
vector_transports.c um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00
vector_user.c um: vector: Add dynamic tap interfaces and scripting 2020-10-11 23:26:37 +02:00
vector_user.h um: Fix typo in vector driver transport option definition 2020-04-29 21:22:15 +02:00
vhost_user.h um: virtio: Replace zero-length array with flexible-array 2020-06-02 22:38:00 +02:00
virt-pci.c um: add PCI over virtio emulation driver 2021-06-17 21:45:43 +02:00
virtio_uml.c um: virtio: allow devices to be configured for wakeup 2021-02-12 21:25:46 +01:00
xterm_kern.c um: Support dynamic IRQ allocation 2020-12-13 22:22:08 +01:00
xterm.c um: chan_xterm: Fix fd leak 2020-12-13 22:38:28 +01:00
xterm.h um: Add SPDX headers for files in arch/um/drivers 2019-09-15 21:37:16 +02:00