Skip to content

Commit 1252b33

Browse files
Marc Zyngierchazy
authored andcommitted
arm64: KVM: Enable minimalistic support for Cortex-A53
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>
1 parent c814ca0 commit 1252b33

4 files changed

Lines changed: 7 additions & 1 deletion

File tree

‎arch/arm64/include/asm/cputype.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141

4242
#define ARM_CPU_PART_AEM_V8 0xD0F0
4343
#define ARM_CPU_PART_FOUNDATION 0xD000
44+
#define ARM_CPU_PART_CORTEX_A53 0xD030
4445
#define ARM_CPU_PART_CORTEX_A57 0xD070
4546

4647
#define APM_CPU_PART_POTENZA 0x0000

‎arch/arm64/include/uapi/asm/kvm.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@ struct kvm_regs {
5757
#define KVM_ARM_TARGET_FOUNDATION_V8 1
5858
#define KVM_ARM_TARGET_CORTEX_A57 2
5959
#define KVM_ARM_TARGET_XGENE_POTENZA 3
60+
#define KVM_ARM_TARGET_CORTEX_A53 4
6061

61-
#define KVM_ARM_NUM_TARGETS 4
62+
#define KVM_ARM_NUM_TARGETS 5
6263

6364
/* KVM_ARM_SET_DEVICE_ADDR ioctl id encoding */
6465
#define KVM_ARM_DEVICE_TYPE_SHIFT 0

‎arch/arm64/kvm/guest.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,8 @@ int __attribute_const__ kvm_target_cpu(void)
214214
return KVM_ARM_TARGET_AEM_V8;
215215
case ARM_CPU_PART_FOUNDATION:
216216
return KVM_ARM_TARGET_FOUNDATION_V8;
217+
case ARM_CPU_PART_CORTEX_A53:
218+
return KVM_ARM_TARGET_CORTEX_A53;
217219
case ARM_CPU_PART_CORTEX_A57:
218220
return KVM_ARM_TARGET_CORTEX_A57;
219221
};

‎arch/arm64/kvm/sys_regs_generic_v8.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ static int __init sys_reg_genericv8_init(void)
8888
&genericv8_target_table);
8989
kvm_register_target_sys_reg_table(KVM_ARM_TARGET_FOUNDATION_V8,
9090
&genericv8_target_table);
91+
kvm_register_target_sys_reg_table(KVM_ARM_TARGET_CORTEX_A53,
92+
&genericv8_target_table);
9193
kvm_register_target_sys_reg_table(KVM_ARM_TARGET_CORTEX_A57,
9294
&genericv8_target_table);
9395
kvm_register_target_sys_reg_table(KVM_ARM_TARGET_XGENE_POTENZA,

0 commit comments

Comments
 (0)