diff options
author | Suzuki K Poulose <suzuki.poulose@arm.com> | 2018-09-26 18:32:42 +0200 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2018-10-01 14:50:29 +0200 |
commit | 5b6c6742b5350a6fb5c631fb99a6bc046a62739c (patch) | |
tree | d8a88083b692ead66017b06063b68a97ab7bb660 /virt | |
parent | kvm: arm64: Clean up VTCR_EL2 initialisation (diff) | |
download | linux-5b6c6742b5350a6fb5c631fb99a6bc046a62739c.tar.xz linux-5b6c6742b5350a6fb5c631fb99a6bc046a62739c.zip |
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.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/virt/kvm/arm/arm.c b/virt/kvm/arm/arm.c index c92053bc3f96..327d0fd28380 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) |