diff mbox

[RFC,2/3] target-arm/kvm64: Add cortex-a72 cpu support

Message ID 1472025743-11484-3-git-send-email-zhaoshenglong@huawei.com
State New
Headers show

Commit Message

Shannon Zhao Aug. 24, 2016, 8:02 a.m. UTC
From: Shannon Zhao <shannon.zhao@linaro.org>


Enable cortex-a72 cpu support for KVM.

Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>

---
 linux-headers/asm-arm64/kvm.h | 3 ++-
 target-arm/cpu64.c            | 1 +
 target-arm/kvm-consts.h       | 2 ++
 3 files changed, 5 insertions(+), 1 deletion(-)

-- 
2.0.4
diff mbox

Patch

diff --git a/linux-headers/asm-arm64/kvm.h b/linux-headers/asm-arm64/kvm.h
index 7d82d1f..1e9ef4b 100644
--- a/linux-headers/asm-arm64/kvm.h
+++ b/linux-headers/asm-arm64/kvm.h
@@ -65,8 +65,9 @@  struct kvm_regs {
 #define KVM_ARM_TARGET_CORTEX_A53	4
 /* Generic ARM v8 target */
 #define KVM_ARM_TARGET_GENERIC_V8	5
+#define KVM_ARM_TARGET_CORTEX_A72	6
 
-#define KVM_ARM_NUM_TARGETS		6
+#define KVM_ARM_NUM_TARGETS		7
 
 /* KVM_ARM_SET_DEVICE_ADDR ioctl id encoding */
 #define KVM_ARM_DEVICE_TYPE_SHIFT	0
diff --git a/target-arm/cpu64.c b/target-arm/cpu64.c
index 1a4ecf5..dc9beaf 100644
--- a/target-arm/cpu64.c
+++ b/target-arm/cpu64.c
@@ -219,6 +219,7 @@  static void aarch64_a72_initfn(Object *obj)
     set_feature(&cpu->env, ARM_FEATURE_V8_PMULL);
     set_feature(&cpu->env, ARM_FEATURE_CRC);
     set_feature(&cpu->env, ARM_FEATURE_EL3);
+    cpu->kvm_target = QEMU_KVM_ARM_TARGET_CORTEX_A72;
     cpu->midr = 0x410fd081;
     cpu->revidr = 0x00000000;
     cpu->reset_fpsid = 0x41034080;
diff --git a/target-arm/kvm-consts.h b/target-arm/kvm-consts.h
index a2c9518..93f2eec 100644
--- a/target-arm/kvm-consts.h
+++ b/target-arm/kvm-consts.h
@@ -128,6 +128,7 @@  MISMATCH_CHECK(QEMU_PSCI_RET_DISABLED, PSCI_RET_DISABLED)
 #define QEMU_KVM_ARM_TARGET_CORTEX_A57 2
 #define QEMU_KVM_ARM_TARGET_XGENE_POTENZA 3
 #define QEMU_KVM_ARM_TARGET_CORTEX_A53 4
+#define QEMU_KVM_ARM_TARGET_CORTEX_A72 6
 
 /* There's no kernel define for this: sentinel value which
  * matches no KVM target value for either 64 or 32 bit
@@ -140,6 +141,7 @@  MISMATCH_CHECK(QEMU_KVM_ARM_TARGET_FOUNDATION_V8, KVM_ARM_TARGET_FOUNDATION_V8)
 MISMATCH_CHECK(QEMU_KVM_ARM_TARGET_CORTEX_A57, KVM_ARM_TARGET_CORTEX_A57)
 MISMATCH_CHECK(QEMU_KVM_ARM_TARGET_XGENE_POTENZA, KVM_ARM_TARGET_XGENE_POTENZA)
 MISMATCH_CHECK(QEMU_KVM_ARM_TARGET_CORTEX_A53, KVM_ARM_TARGET_CORTEX_A53)
+MISMATCH_CHECK(QEMU_KVM_ARM_TARGET_CORTEX_A72, KVM_ARM_TARGET_CORTEX_A72)
 #else
 MISMATCH_CHECK(QEMU_KVM_ARM_TARGET_CORTEX_A15, KVM_ARM_TARGET_CORTEX_A15)
 MISMATCH_CHECK(QEMU_KVM_ARM_TARGET_CORTEX_A7, KVM_ARM_TARGET_CORTEX_A7)