The number of GPA bits supported for a RISC-V Guest/VM is based on the MMU mode used by the G-stage translation. The KVM RISC-V will detect and use the best possible MMU mode for the G-stage in kvm_arch_init(). We add a generic VM capability KVM_CAP_VM_GPA_BITS which can be used by the KVM userspace to get the number of GPA (guest physical address) bits supported for a Guest/VM.
Showing the changes to include/uapi (1 of 4 files). Show all
Unified · Split
| @@ -1131,6 +1131,7 @@ struct kvm_ppc_resize_hpt { · 1130 unmodified lines | |||
| 1131 | #define KVM_CAP_EXIT_ON_EMULATION_FAILURE 204 | 1131 | #define KVM_CAP_EXIT_ON_EMULATION_FAILURE 204 |
| 1132 | #define KVM_CAP_ARM_MTE 205 | 1132 | #define KVM_CAP_ARM_MTE 205 |
| 1133 | #define KVM_CAP_VM_MOVE_ENC_CONTEXT_FROM 206 | 1133 | #define KVM_CAP_VM_MOVE_ENC_CONTEXT_FROM 206 |
| 1134 | #define KVM_CAP_VM_GPA_BITS 207 | ||
| 1134 | 1135 | ||
| 1135 | #ifdef KVM_CAP_IRQ_ROUTING | 1136 | #ifdef KVM_CAP_IRQ_ROUTING |
| 1136 | 1137 | ||