KVM: arm64: Factor out core register size determination and validation
Currently, the only code that needs to deduce the proper size of a
KVM core register on arm64 is validate_core_offset().
In order to make this code easier to reuse, this patch factors out
the size determination into a separate function
core_reg_size_from_offset().
Since validate_core_offset() can be relevant in situations where
only a register ID is available, this patch also modifies the
interface to validate_core_offset() to take a register ID instead
of a struct kvm_one_reg. In order to avoid confusion, the function
is renamed to validate_core_reg_id() to reflect the changed
semantics.
Subsequent patches will make use of these changes.
No functional change.
Signed-off-by:
Dave Martin <Dave.Martin@arm.com>
Loading
Please register or sign in to comment