KVM: arm64/sve: Simplify KVM_REG_ARM64_SVE_VLS array sizing
A complicated DIV_ROUND_UP() expression is currently written out explicitly in multiple places in order to specify the size of the bitmap exchanged with userspace to represent the value of the KVM_REG_ARM64_SVE_VLS pseudo-register. To make this more readable, this patch replaces these with a single define. Since the number of words in a bitmap is just the index of the last word used + 1, this patch expresses the bound that way instead. This should make it clearer what is being expressed. Since use of DIV_ROUND_UP() was the only reason for including <linux/kernel.h> in guest.c, this patch removes that #include. No functional change. Suggested-by:Andrew Jones <drjones@redhat.com> Signed-off-by:
Dave Martin <Dave.Martin@arm.com>
Loading
Please register or sign in to comment