]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: Book3S HV: Report storage key support to userspace
authorPaul Mackerras <paulus@ozlabs.org>
Fri, 25 Aug 2017 09:53:39 +0000 (19:53 +1000)
committerPaul Mackerras <paulus@ozlabs.org>
Thu, 31 Aug 2017 02:36:44 +0000 (12:36 +1000)
commit8d643e8c82404b73096bc254c3635265e50aca58
treed25664397d385eacb80af22aba6c8f0bc95db613
parent5b115661ddbb00cb3c1b1edceb68bd1cc464a7fb
KVM: PPC: Book3S HV: Report storage key support to userspace

This adds information about storage keys to the struct returned by
the KVM_PPC_GET_SMMU_INFO ioctl.  The new fields replace a pad field,
which was zeroed by previous kernel versions.  Thus userspace that
knows about the new fields will see zeroes when running on an older
kernel, indicating that storage keys are not supported.  The size of
the structure has not changed.

The number of keys is hard-coded for the CPUs supported by HV KVM,
which is just POWER7, POWER8 and POWER9.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/kvm/book3s_hv.c
include/uapi/linux/kvm.h