arm64: KVM: Enable minimalistic support for Cortex-A53
authorMarc Zyngier <marc.zyngier@arm.com>
Tue, 20 May 2014 17:06:03 +0000 (18:06 +0100)
committerChristoffer Dall <christoffer.dall@linaro.org>
Thu, 2 Oct 2014 15:18:47 +0000 (17:18 +0200)
In order to allow KVM to run on Cortex-A53 implementations, wire the
minimal support required.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
(cherry picked from commit 1252b3313642c3d0dff5b951b625468bf0dcd059)
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
arch/arm64/include/asm/cputype.h
arch/arm64/include/uapi/asm/kvm.h
arch/arm64/kvm/guest.c
arch/arm64/kvm/sys_regs_generic_v8.c

index 5fe138e0b828f130e55bd93b56e9d9e8492f1060..343f7f73797084c2d47a2101b8aea6c84d776af7 100644 (file)
@@ -41,6 +41,7 @@
 
 #define ARM_CPU_PART_AEM_V8    0xD0F0
 #define ARM_CPU_PART_FOUNDATION        0xD000
+#define ARM_CPU_PART_CORTEX_A53        0xD030
 #define ARM_CPU_PART_CORTEX_A57        0xD070
 
 #define APM_CPU_PART_POTENZA   0x0000
index e6471daf3fb5ddfdd7147f5af0efb6886bd50690..e633ff8cdec8d8bc93bfcb4f486f03a74b3f9f59 100644 (file)
@@ -57,8 +57,9 @@ struct kvm_regs {
 #define KVM_ARM_TARGET_FOUNDATION_V8   1
 #define KVM_ARM_TARGET_CORTEX_A57      2
 #define KVM_ARM_TARGET_XGENE_POTENZA   3
+#define KVM_ARM_TARGET_CORTEX_A53      4
 
-#define KVM_ARM_NUM_TARGETS            4
+#define KVM_ARM_NUM_TARGETS            5
 
 /* KVM_ARM_SET_DEVICE_ADDR ioctl id encoding */
 #define KVM_ARM_DEVICE_TYPE_SHIFT      0
index 08745578d54de84466f6bbc800e4dc984e0e1c4f..60b5c31f3c10e58e72029d8854f13f527d84a097 100644 (file)
@@ -214,6 +214,8 @@ int __attribute_const__ kvm_target_cpu(void)
                        return KVM_ARM_TARGET_AEM_V8;
                case ARM_CPU_PART_FOUNDATION:
                        return KVM_ARM_TARGET_FOUNDATION_V8;
+               case ARM_CPU_PART_CORTEX_A53:
+                       return KVM_ARM_TARGET_CORTEX_A53;
                case ARM_CPU_PART_CORTEX_A57:
                        return KVM_ARM_TARGET_CORTEX_A57;
                };
index 8fe6f76b0edce8b80adc3640b82605a116c66315..475fd29293102649ea45ee411c077cca64f37782 100644 (file)
@@ -88,6 +88,8 @@ static int __init sys_reg_genericv8_init(void)
                                          &genericv8_target_table);
        kvm_register_target_sys_reg_table(KVM_ARM_TARGET_FOUNDATION_V8,
                                          &genericv8_target_table);
+       kvm_register_target_sys_reg_table(KVM_ARM_TARGET_CORTEX_A53,
+                                         &genericv8_target_table);
        kvm_register_target_sys_reg_table(KVM_ARM_TARGET_CORTEX_A57,
                                          &genericv8_target_table);
        kvm_register_target_sys_reg_table(KVM_ARM_TARGET_XGENE_POTENZA,