target/arm/kvm: scratch vcpu: Preserve input kvm_vcpu_init features
commit0cdb4020b34b455fb9ef1e6283407d952cb02e63
authorAndrew Jones <drjones@redhat.com>
Thu, 31 Oct 2019 14:27:32 +0000 (31 15:27 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 1 Nov 2019 20:40:59 +0000 (1 20:40 +0000)
treef3b791236324578026b8ddfc007e51af90d3ae8c
parent14e99e0fbbc6b5d99ad99ab32183e1ffe40f8984
target/arm/kvm: scratch vcpu: Preserve input kvm_vcpu_init features

kvm_arm_create_scratch_host_vcpu() takes a struct kvm_vcpu_init
parameter. Rather than just using it as an output parameter to
pass back the preferred target, use it also as an input parameter,
allowing a caller to pass a selected target if they wish and to
also pass cpu features. If the caller doesn't want to select a
target they can pass -1 for the target which indicates they want
to use the preferred target and have it passed back like before.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Tested-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
Reviewed-by: Beata Michalska <beata.michalska@linaro.org>
Message-id: 20191031142734.8590-8-drjones@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target/arm/kvm.c
target/arm/kvm32.c
target/arm/kvm64.c