KVM: arm64: Separate out feature sanitisation and initialisation
authorOliver Upton <oliver.upton@linux.dev>
Fri, 9 Jun 2023 19:00:44 +0000 (19:00 +0000)
committerOliver Upton <oliver.upton@linux.dev>
Mon, 12 Jun 2023 23:08:33 +0000 (23:08 +0000)
commita7a2c72ae01483d3923b18ee18c8007de2bc5e20
tree4638b3e2c2c30e5cbc440ead9c9beabb7ee929fb
parent44c026a73be8038f03dbdeef028b642880cf1511
KVM: arm64: Separate out feature sanitisation and initialisation

kvm_vcpu_set_target() iteratively sanitises and copies feature flags in
one go. This is rather odd, especially considering the fact that bitmap
accessors can do the heavy lifting. A subsequent change will make vCPU
features VM-wide, and fitting that into the present implementation is
just a chore.

Rework the whole thing to use bitmap accessors to sanitise and copy
flags.

Link: https://lore.kernel.org/r/20230609190054.1542113-2-oliver.upton@linux.dev
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/include/asm/kvm_host.h
arch/arm64/kvm/arm.c