History

KVM: Allow 2048-bit register access via ioctl interface

The Arm SVE architecture defines registers that are up to 2048 bits in size (with some possibility of further future expansion). In order to avoid the need for an excessively large number of ioctls when saving and restoring a vcpu's registers, this patch adds a #define to make support for individual 2048-bit registers through the KVM_{GET,SET}_ONE_REG ioctl interface official. This will allow each SVE register to be accessed in a single call. There are sufficient spare bits in the register id size field for this change, so there is no ABI impact, providing that KVM_GET_REG_LIST does not enumerate any 2048-bit register unless userspace explicitly opts in to the relevant architecture-specific features.

Dave Martin committed 8 years ago

Commit 2b953ea1 parent b43b5dd1 file · +1 −0Browse files

Showing the changes to include/uapi/linux (1 of 1 file). Show all

Unified · Split

include/uapi/linux/kvm.h+1−0
@@ -1145,6 +1145,7 @@ struct kvm_dirty_tlb { · 1144 unmodified lines
1145#define KVM_REG_SIZE_U256 0x0050000000000000ULL1145#define KVM_REG_SIZE_U256 0x0050000000000000ULL
1146#define KVM_REG_SIZE_U512 0x0060000000000000ULL1146#define KVM_REG_SIZE_U512 0x0060000000000000ULL
1147#define KVM_REG_SIZE_U1024 0x0070000000000000ULL1147#define KVM_REG_SIZE_U1024 0x0070000000000000ULL
1148#define KVM_REG_SIZE_U2048 0x0080000000000000ULL
1148 1149
1149struct kvm_reg_list {1150struct kvm_reg_list {
1150 __u64 n; /* number of regs */1151 __u64 n; /* number of regs */