While the Feature ID range is well defined and pretty large, it isn't inconceivable that the architecture will eventually grow some other ranges that will need to similarly be described to userspace. Add a VM ioctl to allow userspace to get writable masks for feature ID registers in below system register space: op0 = 3, op1 = {0, 1, 3}, CRn = 0, CRm = {0 - 7}, op2 = {0 - 7} This is used to support mix-and-match userspace and kernels for writable ID registers, where userspace may want to know upfront whether it can actually tweak the contents of an idreg or not. Add a new capability (KVM_CAP_ARM_SUPPORTED_FEATURE_ID_RANGES) that returns a bitmap of the valid ranges, which can subsequently be retrieved, one at a time by setting the index of the set bit as the range identifier.
Showing the changes to include/uapi (1 of 5 files). Show all
Unified · Split
| @@ -1192,6 +1192,7 @@ struct kvm_ppc_resize_hpt { · 1191 unmodified lines | ||
| 1192 | 1192 | #define KVM_CAP_COUNTER_OFFSET 227 |
| 1193 | 1193 | #define KVM_CAP_ARM_EAGER_SPLIT_CHUNK_SIZE 228 |
| 1194 | 1194 | #define KVM_CAP_ARM_SUPPORTED_BLOCK_SIZES 229 |
| 1195 | +#define KVM_CAP_ARM_SUPPORTED_REG_MASK_RANGES 230 | |
| 1195 | 1196 | |
| 1196 | 1197 | #ifdef KVM_CAP_IRQ_ROUTING |
| 1197 | 1198 | |
| @@ -1562,6 +1563,7 @@ struct kvm_s390_ucas_mapping { · 364 unmodified lines | ||
| 1562 | 1563 | #define KVM_ARM_MTE_COPY_TAGS _IOR(KVMIO, 0xb4, struct kvm_arm_copy_mte_tags) |
| 1563 | 1564 | /* Available with KVM_CAP_COUNTER_OFFSET */ |
| 1564 | 1565 | #define KVM_ARM_SET_COUNTER_OFFSET _IOW(KVMIO, 0xb5, struct kvm_arm_counter_offset) |
| 1566 | +#define KVM_ARM_GET_REG_WRITABLE_MASKS _IOR(KVMIO, 0xb6, struct reg_mask_range) | |
| 1565 | 1567 | |
| 1566 | 1568 | /* ioctl for vm fd */ |
| 1567 | 1569 | #define KVM_CREATE_DEVICE _IOWR(KVMIO, 0xe0, struct kvm_create_device) |