qemu-patch-raspberry4/hw
Alexey Kardashevskiy 9bb62a0702 spapr_iommu: Make in-kernel TCE table optional
POWER KVM supports an KVM_CAP_SPAPR_TCE capability which allows allocating
TCE tables in the host kernel memory and handle H_PUT_TCE requests
targeted to specific LIOBN (logical bus number) right in the host without
switching to QEMU. At the moment this is used for emulated devices only
and the handler only puts TCE to the table. If the in-kernel H_PUT_TCE
handler finds a LIOBN and corresponding table, it will put a TCE to
the table and complete hypercall execution. The user space will not be
notified.

Upcoming VFIO support is going to use the same sPAPRTCETable device class
so KVM_CAP_SPAPR_TCE is going to be used as well. That means that TCE
tables for VFIO are going to be allocated in the host as well.
However VFIO operates with real IOMMU tables and simple copying of
a TCE to the real hardware TCE table will not work as guest physical
to host physical address translation is requited.

So until the host kernel gets VFIO support for H_PUT_TCE, we better not
to register VFIO's TCE in the host.

This adds a place holder for KVM_CAP_SPAPR_TCE_VFIO capability. It is not
in upstream yet and being discussed so now it is always false which means
that in-kernel VFIO acceleration is not supported.

This adds a bool @vfio_accel flag to the sPAPRTCETable device telling
that sPAPRTCETable should not try allocating TCE table in the host kernel
for VFIO. The flag is false now as at the moment there is no VFIO.

This adds an vfio_accel parameter to spapr_tce_new_table(), the semantic
is the same. Since there is only emulated PCI and VIO now, the flag is set
to false. Upcoming VFIO support will set it to true.

This is a preparation patch so no change in behaviour is expected

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Alexander Graf <agraf@suse.de>
2014-06-27 13:48:23 +02:00
..
9pfs virtio: Drop superfluous conditionals around g_free() 2014-06-19 16:41:53 +03:00
acpi qmp: convert ACPI_DEVICE_OST event 2014-06-23 11:12:28 -04:00
alpha machine: Conversion of QEMUMachineInitArgs to MachineState 2014-05-28 17:35:01 +02:00
arm Use PSCI v0.2 compatible string when KVM or TCG provides it 2014-06-19 18:33:05 +01:00
audio audio: fmopl: drop INLINE macro 2014-06-23 11:01:24 -04:00
block qapi: adjust existing defines 2014-06-23 11:01:25 -04:00
bt Preparation for usb-bt-dongle conditional build 2013-09-10 11:14:41 +02:00
char virtio-serial: remove useless set_config function 2014-06-24 20:01:24 +04:00
core qapi event: convert DEVICE_DELETED 2014-06-23 11:12:27 -04:00
cpu icc_bus: QOM'ify ICC 2013-12-24 18:02:18 +01:00
cris machine: Conversion of QEMUMachineInitArgs to MachineState 2014-05-28 17:35:01 +02:00
display spice: fix 32bit build 2014-06-20 16:22:07 +01:00
dma savevm: Remove all the unneeded version_minimum_id_old (x86) 2014-06-16 04:55:26 +02:00
gpio savevm: Remove all the unneeded version_minimum_id_old (arm) 2014-05-13 16:09:35 +01:00
i2c savevm: Remove all the unneeded version_minimum_id_old (rest) 2014-05-14 15:24:51 +02:00
i386 pc & q35: Add new machine opt max-ram-below-4g 2014-06-23 18:02:41 +03:00
ide qapi: adjust existing defines 2014-06-23 11:01:25 -04:00
input Fix new typos (found by codespell) 2014-06-24 20:01:24 +04:00
intc spapr: Fix RTAS token numbers 2014-06-27 13:48:22 +02:00
ipack savevm: Remove all the unneeded version_minimum_id_old (rest) 2014-05-14 15:24:51 +02:00
isa acpi: implement ospm_status() method for PIIX4/ICH9_LPC devices 2014-06-19 18:44:22 +03:00
lm32 machine: Conversion of QEMUMachineInitArgs to MachineState 2014-05-28 17:35:01 +02:00
m68k machine: Conversion of QEMUMachineInitArgs to MachineState 2014-05-28 17:35:01 +02:00
mem qmp: add query-memory-devices command 2014-06-19 18:44:22 +03:00
microblaze ssi: Name the CS GPIO 2014-05-28 17:36:21 +02:00
mips gt64xxx_pci: Add VMStateDescription 2014-06-20 23:40:16 +02:00
misc qapi event: convert GUEST_PANICKED 2014-06-23 11:12:28 -04:00
moxie hw/moxie/moxiesim.c: Remove unused moxie_intc_create() 2014-06-24 20:01:24 +04:00
net Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into staging 2014-06-24 13:06:13 +01:00
nvram spapr: Fix RTAS token numbers 2014-06-27 13:48:22 +02:00
openrisc machine: Conversion of QEMUMachineInitArgs to MachineState 2014-05-28 17:35:01 +02:00
pci pcie: coding style tweak 2014-06-23 17:49:49 +03:00
pci-bridge hw/pcie: implement power controller functionality 2014-06-23 17:48:42 +03:00
pci-host apb: Fix out-of-bounds array write access 2014-06-20 23:52:49 +01:00
pcmcia qom: Add check() argument to object_property_add_link() 2014-03-19 22:23:13 +01:00
ppc spapr_iommu: Make in-kernel TCE table optional 2014-06-27 13:48:23 +02:00
s390x s390x: cleanup interrupt injection 2014-06-10 09:50:27 +02:00
scsi qapi: adjust existing defines 2014-06-23 11:01:25 -04:00
sd hw/sd/sd.c: Drop unused sd_acmd_type[] array 2014-06-10 19:39:34 +04:00
sh4 machine: Conversion of QEMUMachineInitArgs to MachineState 2014-05-28 17:35:01 +02:00
sparc tcx: move initialisation from realizefn to initfn 2014-06-05 20:51:57 +01:00
sparc64 machine: Conversion of QEMUMachineInitArgs to MachineState 2014-05-28 17:35:01 +02:00
ssi ssi: Name the CS GPIO 2014-05-28 17:36:21 +02:00
timer qapi event: convert RTC_CHANGE 2014-06-23 11:12:27 -04:00
tpm aio / timers: Untangle include files 2013-08-22 19:10:27 +02:00
unicore32 machine: Conversion of QEMUMachineInitArgs to MachineState 2014-05-28 17:35:01 +02:00
usb migration: Remove unneeded minimum_version_id_old 2014-06-23 19:14:52 +02:00
virtio Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into staging 2014-06-24 13:06:13 +01:00
watchdog qapi event: convert WATCHDOG 2014-06-23 11:12:27 -04:00
xen trivial patches for 2014-05-07 2014-05-07 18:38:39 +01:00
xenpv machine: Conversion of QEMUMachineInitArgs to MachineState 2014-05-28 17:35:01 +02:00
xtensa machine: Conversion of QEMUMachineInitArgs to MachineState 2014-05-28 17:35:01 +02:00
Makefile.objs pc: implement pc-dimm device abstraction 2014-06-19 16:41:47 +03:00