3118-armv8-aarch32-Add-KVM-support-for-AArch32-on-ARMv8.patch 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. From 44914d3b7baff0f96c3584e4d46aa992e402ef4f Mon Sep 17 00:00:00 2001
  2. From: Ying Zhang <ying.zhang22455@nxp.com>
  3. Date: Thu, 29 Sep 2016 11:16:16 +0800
  4. Subject: [PATCH 118/124] armv8: aarch32: Add KVM support for AArch32 on ARMv8
  5. This patch is to add KVM support for AArch32 execution state on ARMv8.
  6. Signed-off-by: Alison Wang <alison.wang@nxp.com>
  7. ---
  8. arch/arm/include/asm/cputype.h | 2 ++
  9. arch/arm/kvm/guest.c | 1 +
  10. 2 files changed, 3 insertions(+)
  11. --- a/arch/arm/include/asm/cputype.h
  12. +++ b/arch/arm/include/asm/cputype.h
  13. @@ -76,6 +76,8 @@
  14. #define ARM_CPU_PART_CORTEX_A15 0x4100c0f0
  15. #define ARM_CPU_PART_MASK 0xff00fff0
  16. +#define ARM_CPU_PART_CORTEX_AARCH32_A53 0x4100d030
  17. +
  18. #define ARM_CPU_XSCALE_ARCH_MASK 0xe000
  19. #define ARM_CPU_XSCALE_ARCH_V1 0x2000
  20. #define ARM_CPU_XSCALE_ARCH_V2 0x4000
  21. --- a/arch/arm/kvm/guest.c
  22. +++ b/arch/arm/kvm/guest.c
  23. @@ -247,6 +247,7 @@ int __attribute_const__ kvm_target_cpu(v
  24. {
  25. switch (read_cpuid_part()) {
  26. case ARM_CPU_PART_CORTEX_A7:
  27. + case ARM_CPU_PART_CORTEX_AARCH32_A53:
  28. return KVM_ARM_TARGET_CORTEX_A7;
  29. case ARM_CPU_PART_CORTEX_A15:
  30. return KVM_ARM_TARGET_CORTEX_A15;