]> git.karo-electronics.de Git - karo-tx-linux.git/commit
KVM: PPC: Add support for multiple-TCE hcalls
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Mon, 15 Feb 2016 01:55:09 +0000 (12:55 +1100)
committerPaul Mackerras <paulus@samba.org>
Tue, 16 Feb 2016 02:44:26 +0000 (13:44 +1100)
commitd3695aa4f452bc09c834a5010484f65fca37d87c
tree57fd47030041118378ea56619fc148f023123fcb
parent5ee7af18642ce38c79b35927872f13d292cc3e27
KVM: PPC: Add support for multiple-TCE hcalls

This adds real and virtual mode handlers for the H_PUT_TCE_INDIRECT and
H_STUFF_TCE hypercalls for user space emulated devices such as IBMVIO
devices or emulated PCI. These calls allow adding multiple entries
(up to 512) into the TCE table in one call which saves time on
transition between kernel and user space.

The current implementation of kvmppc_h_stuff_tce() allows it to be
executed in both real and virtual modes so there is one helper.
The kvmppc_rm_h_put_tce_indirect() needs to translate the guest address
to the host address and since the translation is different, there are
2 helpers - one for each mode.

This implements the KVM_CAP_PPC_MULTITCE capability. When present,
the kernel will try handling H_PUT_TCE_INDIRECT and H_STUFF_TCE if these
are enabled by the userspace via KVM_CAP_PPC_ENABLE_HCALL.
If they can not be handled by the kernel, they are passed on to
the user space. The user space still has to have an implementation
for these.

Both HV and PR-syle KVM are supported.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Documentation/virtual/kvm/api.txt
arch/powerpc/include/asm/kvm_ppc.h
arch/powerpc/kvm/book3s_64_vio.c
arch/powerpc/kvm/book3s_64_vio_hv.c
arch/powerpc/kvm/book3s_hv.c
arch/powerpc/kvm/book3s_hv_rmhandlers.S
arch/powerpc/kvm/book3s_pr_papr.c
arch/powerpc/kvm/powerpc.c