aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kvm/guest.c
diff options
context:
space:
mode:
authorJonathan Austin <jonathan.austin@arm.com>2013-09-26 11:49:28 -0400
committerChristoffer Dall <christoffer.dall@linaro.org>2013-10-12 20:45:30 -0400
commite8c2d99f8277d68d28a9f99d16289712bc2aee7f (patch)
tree26f87c5f4aa7f952fb9b3e4ad28894556cee06b5 /arch/arm/kvm/guest.c
parent5e497046f005528464f9600a4ee04f49df713596 (diff)
KVM: ARM: Add support for Cortex-A7
This patch adds support for running Cortex-A7 guests on Cortex-A7 hosts. As Cortex-A7 is architecturally compatible with A15, this patch is largely just generalising existing code. Areas where 'implementation defined' behaviour is identical for A7 and A15 is moved to allow it to be used by both cores. The check to ensure that coprocessor register tables are sorted correctly is also moved in to 'common' code to avoid each new cpu doing its own check (and possibly forgetting to do so!) Signed-off-by: Jonathan Austin <jonathan.austin@arm.com> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Diffstat (limited to 'arch/arm/kvm/guest.c')
-rw-r--r--arch/arm/kvm/guest.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/kvm/guest.c b/arch/arm/kvm/guest.c
index ec98209fda71..20f8d97904af 100644
--- a/arch/arm/kvm/guest.c
+++ b/arch/arm/kvm/guest.c
@@ -190,6 +190,8 @@ int __attribute_const__ kvm_target_cpu(void)
190 return -EINVAL; 190 return -EINVAL;
191 191
192 switch (part_number) { 192 switch (part_number) {
193 case ARM_CPU_PART_CORTEX_A7:
194 return KVM_ARM_TARGET_CORTEX_A7;
193 case ARM_CPU_PART_CORTEX_A15: 195 case ARM_CPU_PART_CORTEX_A15:
194 return KVM_ARM_TARGET_CORTEX_A15; 196 return KVM_ARM_TARGET_CORTEX_A15;
195 default: 197 default:
@@ -202,7 +204,7 @@ int kvm_vcpu_set_target(struct kvm_vcpu *vcpu,
202{ 204{
203 unsigned int i; 205 unsigned int i;
204 206
205 /* We can only do a cortex A15 for now. */ 207 /* We can only cope with guest==host and only on A15/A7 (for now). */
206 if (init->target != kvm_target_cpu()) 208 if (init->target != kvm_target_cpu())
207 return -EINVAL; 209 return -EINVAL;
208 210