|
@@ -3331,6 +3331,14 @@ static int kvm_vm_ioctl_get_smmu_info_hv(struct kvm *kvm,
|
|
if (radix_enabled())
|
|
if (radix_enabled())
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ * POWER7, POWER8 and POWER9 all support 32 storage keys for data.
|
|
|
|
+ * POWER7 doesn't support keys for instruction accesses,
|
|
|
|
+ * POWER8 and POWER9 do.
|
|
|
|
+ */
|
|
|
|
+ info->data_keys = 32;
|
|
|
|
+ info->instr_keys = cpu_has_feature(CPU_FTR_ARCH_207S) ? 32 : 0;
|
|
|
|
+
|
|
info->flags = KVM_PPC_PAGE_SIZES_REAL;
|
|
info->flags = KVM_PPC_PAGE_SIZES_REAL;
|
|
if (mmu_has_feature(MMU_FTR_1T_SEGMENT))
|
|
if (mmu_has_feature(MMU_FTR_1T_SEGMENT))
|
|
info->flags |= KVM_PPC_1T_SEGMENTS;
|
|
info->flags |= KVM_PPC_1T_SEGMENTS;
|