qemu-patch-raspberry4/hw
Alex Williamson c958c51d2e vfio/quirks: ioeventfd quirk acceleration
The NVIDIA BAR0 quirks virtualize the PCI config space mirrors found
in device MMIO space.  Normally PCI config space is considered a slow
path and further optimization is unnecessary, however NVIDIA uses a
register here to enable the MSI interrupt to re-trigger.  Exiting to
QEMU for this MSI-ACK handling can therefore rate limit our interrupt
handling.  Fortunately the MSI-ACK write is easily detected since the
quirk MemoryRegion otherwise has very few accesses, so simply looking
for consecutive writes with the same data is sufficient, in this case
10 consecutive writes with the same data and size is arbitrarily
chosen.  We configure the KVM ioeventfd with data match, so there's
no risk of triggering for the wrong data or size, but we do risk that
pathological driver behavior might consume all of QEMU's file
descriptors, so we cap ourselves to 10 ioeventfds for this purpose.

In support of the above, generic ioeventfd infrastructure is added
for vfio quirks.  This automatically initializes an ioeventfd list
per quirk, disables and frees ioeventfds on exit, and allows
ioeventfds marked as dynamic to be dropped on device reset.  The
rationale for this latter feature is that useful ioeventfds may
depend on specific driver behavior and since we necessarily place a
cap on our use of ioeventfds, a machine reset is a reasonable point
at which to assume a new driver and re-profile.

Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2018-06-05 08:23:17 -06:00
..
9pfs hw: make virtio devices configurable via default-configs/ 2018-06-01 15:14:31 +02:00
acpi acpi, vhost, misc: fixes, features 2018-06-04 10:15:16 +01:00
adc Include qapi/error.h exactly where needed 2018-02-09 13:50:17 +01:00
alpha hw/alpha/dp264: Use the TYPE_SMC37C669_SUPERIO 2018-03-12 16:12:49 +01:00
arm migration/next for 20180604 2018-06-04 12:54:00 +01:00
audio hw/i2c: Use DeviceClass::realize instead of I2CSlaveClass::init 2018-06-01 15:14:31 +02:00
block acpi, vhost, misc: fixes, features 2018-06-04 10:15:16 +01:00
bt hw/bt: Replace fprintf(stderr, "*\n" with error_report() 2018-01-22 09:51:00 +01:00
char hw: make virtio devices configurable via default-configs/ 2018-06-01 15:14:31 +02:00
core * Linux header upgrade (Peter) 2018-06-01 18:24:16 +01:00
cpu hw: use "qemu/osdep.h" as first #include in source files 2017-12-18 17:07:02 +03:00
cris hw: Do not include "sysemu/block-backend.h" if it is not necessary 2018-06-01 14:15:10 +02:00
display Two little vga fixes. 2018-06-04 15:46:15 +01:00
dma xlnx-zdma: Correct mem leaks and memset to zero on desc unaligned errors 2018-05-31 14:50:52 +01:00
gpio hw/i2c: Use DeviceClass::realize instead of I2CSlaveClass::init 2018-06-01 15:14:31 +02:00
hppa acpi, vhost, misc: fixes, features 2018-06-04 10:15:16 +01:00
i2c hw/i2c: Use DeviceClass::realize instead of I2CSlaveClass::init 2018-06-01 15:14:31 +02:00
i386 migration/next for 20180604 2018-06-04 12:54:00 +01:00
ide acpi, vhost, misc: fixes, features 2018-06-04 10:15:16 +01:00
input hw: make virtio devices configurable via default-configs/ 2018-06-01 15:14:31 +02:00
intc acpi, vhost, misc: fixes, features 2018-06-04 10:15:16 +01:00
ipack pci: Add INTERFACE_CONVENTIONAL_PCI_DEVICE to Conventional PCI devices 2017-10-15 05:54:43 +03:00
ipmi ipmi: Use proper struct reference for KCS vmstate 2018-06-01 15:13:46 +02:00
isa hw/isa/superio: Fix inconsistent use of Chardev->be 2018-06-01 15:13:46 +02:00
lm32 hw: Do not include "sysemu/block-backend.h" if it is not necessary 2018-06-01 14:15:10 +02:00
m68k hw: Do not include "exec/address-spaces.h" if it is not necessary 2018-06-01 14:15:10 +02:00
mem nvdimm: fix typo in label-size definition 2018-05-23 17:02:03 +03:00
microblaze hw: Do not include "sysemu/block-backend.h" if it is not necessary 2018-06-01 14:15:10 +02:00
mips hw: Do not include "sysemu/blockdev.h" if it is not necessary 2018-06-01 14:15:10 +02:00
misc hw/i2c: Use DeviceClass::realize instead of I2CSlaveClass::init 2018-06-01 15:14:31 +02:00
moxie Change references to serial_hds[] to serial_hd() 2018-04-26 13:57:00 +01:00
net acpi, vhost, misc: fixes, features 2018-06-04 10:15:16 +01:00
nios2 Change references to serial_hds[] to serial_hd() 2018-04-26 13:57:00 +01:00
nvram * Linux header upgrade (Peter) 2018-06-01 18:24:16 +01:00
openrisc Change references to serial_hds[] to serial_hd() 2018-04-26 13:57:00 +01:00
pci virtio,vhost,pci,pc: features, cleanups 2018-03-20 15:48:34 +00:00
pci-bridge virtio,vhost,pci,pc: features, fixes and cleanups 2018-02-13 16:33:31 +00:00
pci-host hw: Do not include "exec/address-spaces.h" if it is not necessary 2018-06-01 14:15:10 +02:00
pcmcia hw: Clean up includes 2016-01-29 15:07:25 +00:00
ppc acpi, vhost, misc: fixes, features 2018-06-04 10:15:16 +01:00
rdma hw/rdma: Fix possible out of bounds access to port GID index 2018-05-03 20:52:29 +03:00
riscv hw: Do not include "exec/address-spaces.h" if it is not necessary 2018-06-01 14:15:10 +02:00
s390x * Linux header upgrade (Peter) 2018-06-01 18:24:16 +01:00
scsi acpi, vhost, misc: fixes, features 2018-06-04 10:15:16 +01:00
sd acpi, vhost, misc: fixes, features 2018-06-04 10:15:16 +01:00
sh4 hw: Do not include "sysemu/block-backend.h" if it is not necessary 2018-06-01 14:15:10 +02:00
smbios Move include qemu/option.h from qemu-common.h to actual users 2018-02-09 13:52:16 +01:00
sparc Change references to serial_hds[] to serial_hd() 2018-04-26 13:57:00 +01:00
sparc64 serial-isa: Use MAX_ISA_SERIAL_PORTS instead of MAX_SERIAL_PORTS 2018-04-26 13:57:00 +01:00
ssi xilinx_spips: Correct SNOOP_NONE state when flushing the txfifo 2018-04-26 11:04:40 +01:00
timer hw/i2c: Use DeviceClass::realize instead of I2CSlaveClass::init 2018-06-01 15:14:31 +02:00
tpm tpm: extend TPM TIS with state migration support 2018-05-24 12:07:04 -04:00
tricore hw: Do not include "sysemu/block-backend.h" if it is not necessary 2018-03-12 16:12:46 +01:00
unicore32 hw/input/i8042: Extract declarations from i386/pc.h into input/i8042.h 2018-03-12 16:12:48 +01:00
usb acpi, vhost, misc: fixes, features 2018-06-04 10:15:16 +01:00
vfio vfio/quirks: ioeventfd quirk acceleration 2018-06-05 08:23:17 -06:00
virtio acpi, vhost, misc: fixes, features 2018-06-04 10:15:16 +01:00
watchdog qapi: Empty out qapi-schema.json 2018-03-02 13:45:50 -06:00
xen * Linux header upgrade (Peter) 2018-06-01 18:24:16 +01:00
xenpv hw/xen*: Replace fprintf(stderr, "*\n" with error_report() 2018-02-06 18:29:46 +01:00
xtensa hw: Do not include "sysemu/block-backend.h" if it is not necessary 2018-06-01 14:15:10 +02:00
Makefile.objs hw: allow compiling out SCSI 2018-06-01 15:14:31 +02:00