summaryrefslogtreecommitdiffstats
path: root/virt
diff options
context:
space:
mode:
authorSuzuki K Poulose <suzuki.poulose@arm.com>2018-09-26 17:32:42 +0100
committerMarc Zyngier <marc.zyngier@arm.com>2018-10-01 13:50:29 +0100
commit5b6c6742b5350a6fb5c631fb99a6bc046a62739c (patch)
treed8a88083b692ead66017b06063b68a97ab7bb660 /virt
parentb2df44ffba363bd90274340e0adfd8137f5cd878 (diff)
downloadop-kernel-dev-5b6c6742b5350a6fb5c631fb99a6bc046a62739c.zip
op-kernel-dev-5b6c6742b5350a6fb5c631fb99a6bc046a62739c.tar.gz
kvm: arm/arm64: Allow arch specific configurations for VM
Allow the arch backends to perform VM specific initialisation. This will be later used to handle IPA size configuration and per-VM VTCR configuration on arm64. Cc: Marc Zyngier <marc.zyngier@arm.com> Cc: Christoffer Dall <cdall@kernel.org> Reviewed-by: Eric Auger <eric.auger@redhat.com> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'virt')
-rw-r--r--virt/kvm/arm/arm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/virt/kvm/arm/arm.c b/virt/kvm/arm/arm.c
index c92053b..327d0fd 100644
--- a/virt/kvm/arm/arm.c
+++ b/virt/kvm/arm/arm.c
@@ -120,8 +120,9 @@ int kvm_arch_init_vm(struct kvm *kvm, unsigned long type)
{
int ret, cpu;
- if (type)
- return -EINVAL;
+ ret = kvm_arm_config_vm(kvm, type);
+ if (ret)
+ return ret;
kvm->arch.last_vcpu_ran = alloc_percpu(typeof(*kvm->arch.last_vcpu_ran));
if (!kvm->arch.last_vcpu_ran)
OpenPOWER on IntegriCloud