This adds a KVM_PPC_NO_HASH flag to the flags field of the kvm_ppc_smmu_info struct, and arranges for it to be set when running as a nested hypervisor, as an unambiguous indication to userspace that HPT guests are not supported. Reporting the KVM_CAP_PPC_MMU_HASH_V3 capability as false could be taken as indicating only that the new HPT features in ISA V3.0 are not supported, leaving it ambiguous whether pre-V3.0 HPT features are supported.
Showing the changes to include/uapi/linux (1 of 3 files). Show all
Unified · Split
| @@ -719,6 +719,7 @@ struct kvm_ppc_one_seg_page_size { · 718 unmodified lines | |||
| 719 | 719 | ||
| 720 | #define KVM_PPC_PAGE_SIZES_REAL 0x00000001 | 720 | #define KVM_PPC_PAGE_SIZES_REAL 0x00000001 |
| 721 | #define KVM_PPC_1T_SEGMENTS 0x00000002 | 721 | #define KVM_PPC_1T_SEGMENTS 0x00000002 |
| 722 | #define KVM_PPC_NO_HASH 0x00000004 | ||
| 722 | 723 | ||
| 723 | struct kvm_ppc_smmu_info { | 724 | struct kvm_ppc_smmu_info { |
| 724 | __u64 flags; | 725 | __u64 flags; |