From: Alexey Kardashevskiy Date: Mon, 7 Aug 2017 15:45:00 +0000 (+0200) Subject: KVM: PPC: Reserve KVM_CAP_SPAPR_TCE_VFIO capability number X-Git-Tag: Ubuntu-4.10.0-34.38~19 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=c6752116d81d5f4338940112a19ac2bd5e32e7f9;p=mirror_ubuntu-zesty-kernel.git KVM: PPC: Reserve KVM_CAP_SPAPR_TCE_VFIO capability number BugLink: http://bugs.launchpad.net/bugs/1686019 This adds a capability number for in-kernel support for VFIO on SPAPR platform. The capability will tell the user space whether in-kernel handlers of H_PUT_TCE can handle VFIO-targeted requests or not. If not, the user space must not attempt allocating a TCE table in the host kernel via the KVM_CREATE_SPAPR_TCE KVM ioctl because in that case TCE requests will not be passed to the user space which is desired action in the situation like that. Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson Signed-off-by: Paul Mackerras (backported from commit 4898d3f49b5b156c33f0ae0f49ede417ab86195e) [joserz: small change on file include/uapi/linux/kvm.h due to conflics with defines included by MIPS and S390 patches.] Signed-off-by: Jose Ricardo Ziviani Acked-by: Stefan Bader Acked-by: Kleber Sacilotto de Souza Signed-off-by: Kleber Sacilotto de Souza --- diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h index 1f50f21ec311..655c845be4c5 100644 --- a/include/uapi/linux/kvm.h +++ b/include/uapi/linux/kvm.h @@ -873,6 +873,7 @@ struct kvm_ppc_smmu_info { #define KVM_CAP_PPC_HTM 132 #define KVM_CAP_PPC_MMU_RADIX 134 #define KVM_CAP_PPC_MMU_HASH_V3 135 +#define KVM_CAP_SPAPR_TCE_VFIO 142 #ifdef KVM_CAP_IRQ_ROUTING