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
1131#define KVM_CAP_EXIT_ON_EMULATION_FAILURE 2041131#define KVM_CAP_EXIT_ON_EMULATION_FAILURE 204
1132#define KVM_CAP_ARM_MTE 2051132#define KVM_CAP_ARM_MTE 205
1133#define KVM_CAP_VM_MOVE_ENC_CONTEXT_FROM 2061133#define KVM_CAP_VM_MOVE_ENC_CONTEXT_FROM 206
1134#define KVM_CAP_VM_GPA_BITS 207
1134 1135
1135#ifdef KVM_CAP_IRQ_ROUTING1136#ifdef KVM_CAP_IRQ_ROUTING
1136 1137