arm/arm64: KVM: Clarify KVM_ARM_VCPU_INIT ABI
authorChristoffer Dall <christoffer.dall@linaro.org>
Thu, 16 Oct 2014 14:40:53 +0000 (16:40 +0200)
committerChristoffer Dall <christoffer.dall@linaro.org>
Sat, 13 Dec 2014 13:15:26 +0000 (14:15 +0100)
commitf7fa034dc8559c7d7326bfc8bd1a26175abd931a
treeaa0458365535fcc65662a40fef2dec95a43a47a0
parentb856a59141b1066d3c896a0d0231f84dabd040af
arm/arm64: KVM: Clarify KVM_ARM_VCPU_INIT ABI

It is not clear that this ioctl can be called multiple times for a given
vcpu.  Userspace already does this, so clarify the ABI.

Also specify that userspace is expected to always make secondary and
subsequent calls to the ioctl with the same parameters for the VCPU as
the initial call (which userspace also already does).

Add code to check that userspace doesn't violate that ABI in the future,
and move the kvm_vcpu_set_target() function which is currently
duplicated between the 32-bit and 64-bit versions in guest.c to a common
static function in arm.c, shared between both architectures.

Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Documentation/virtual/kvm/api.txt
arch/arm/include/asm/kvm_host.h
arch/arm/kvm/arm.c
arch/arm/kvm/guest.c
arch/arm64/include/asm/kvm_host.h
arch/arm64/kvm/guest.c