summaryrefslogtreecommitdiffstats
path: root/include/uapi
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@ozlabs.org>2017-08-25 11:53:39 +0200
committerPaul Mackerras <paulus@ozlabs.org>2017-08-31 04:36:44 +0200
commite3bfed1df379c18f20feb06427d952b766e2c00f (patch)
treed25664397d385eacb80af22aba6c8f0bc95db613 /include/uapi
parentKVM: PPC: Book3S HV: Fix case where HDEC is treated as 32-bit on POWER9 (diff)
downloadlinux-e3bfed1df379c18f20feb06427d952b766e2c00f.tar.xz
linux-e3bfed1df379c18f20feb06427d952b766e2c00f.zip
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>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/kvm.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
index 6cd63c18708a..838887587411 100644
--- a/include/uapi/linux/kvm.h
+++ b/include/uapi/linux/kvm.h
@@ -711,7 +711,8 @@ struct kvm_ppc_one_seg_page_size {
struct kvm_ppc_smmu_info {
__u64 flags;
__u32 slb_size;
- __u32 pad;
+ __u16 data_keys; /* # storage keys supported for data */
+ __u16 instr_keys; /* # storage keys supported for instructions */
struct kvm_ppc_one_seg_page_size sps[KVM_PPC_PAGE_SIZES_MAX_SZ];
};