builtin-run: Abstract argument validation into a separate function

kvm_cmd_run_init() is a complex function which parses the command line
arguments, configures various aspects of a VM (the size of the RAM, the
number of CPUs, the network, the active console, the kernel command line,
creates a custom rootfs, etc), and after the recent patches, also does a
few checks against mutually exclusive kvmtool arguments.

Make the function just that little bit easier to read by moving the
argument validation into a separate function.

No functional change intended.

Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
Link: https://lore.kernel.org/r/20210923144505.60776-5-alexandru.elisei@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
1 file changed