History

RISC-V: KVM: Add VM capability to allow userspace get GPA bits

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.

Anup Patel committed 4 years ago

Commit a457fd51 parent ef8949a4 files · +10 −0Browse files

Showing the changes to include/uapi (1 of 4 files). Show all

Unified · Split

include/uapi/linux/kvm.h+1−0
@@ -1131,6 +1131,7 @@ struct kvm_ppc_resize_hpt { · 1130 unmodified lines
11311131 #define KVM_CAP_EXIT_ON_EMULATION_FAILURE 204
11321132 #define KVM_CAP_ARM_MTE 205
11331133 #define KVM_CAP_VM_MOVE_ENC_CONTEXT_FROM 206
1134+#define KVM_CAP_VM_GPA_BITS 207
11341135
11351136 #ifdef KVM_CAP_IRQ_ROUTING
11361137