From 66a1016a3548e244f4d96773bfa8985262e4d4b4 Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Mon, 20 Mar 2017 14:36:48 +0000 Subject: arm, kvm: Override the kernel's default MPIDR value The kernel and gem5 derive MPIDR values from CPU IDs in slightly different ways. This means that guests running in a multi-CPU setup sometimes fail to bring up secondary CPUs. Fix this by overriding the MPIDR value in virtual CPUs just after they have been instantiated. Change-Id: I916d44978a9c855ab89c80a083af45b0cea6edac Signed-off-by: Andreas Sandberg Reviewed-by: Curtis Dunham Reviewed-by: Sascha Bischoff Reviewed-on: https://gem5-review.googlesource.com/2461 Reviewed-by: Weiping Liao --- src/arch/arm/kvm/armv8_cpu.hh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/arch/arm/kvm/armv8_cpu.hh') diff --git a/src/arch/arm/kvm/armv8_cpu.hh b/src/arch/arm/kvm/armv8_cpu.hh index d3e390b4f..63e03908f 100644 --- a/src/arch/arm/kvm/armv8_cpu.hh +++ b/src/arch/arm/kvm/armv8_cpu.hh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 ARM Limited + * Copyright (c) 2015, 2017 ARM Limited * All rights reserved * * The license below extends only to copyright in the software and shall @@ -83,6 +83,8 @@ class ArmV8KvmCPU : public BaseArmKvmCPU ArmV8KvmCPU(ArmV8KvmCPUParams *params); virtual ~ArmV8KvmCPU(); + void startup() override; + void dump() const override; protected: @@ -132,6 +134,8 @@ class ArmV8KvmCPU : public BaseArmKvmCPU static const std::vector intRegMap; /** Mapping between gem5 misc registers registers and registers in kvm */ static const std::vector miscRegMap; + /** Mapping between gem5 ID misc registers registers and registers in kvm */ + static const std::vector miscRegIdMap; /** Cached mapping between system registers in kvm and misc regs in gem5 */ mutable std::vector sysRegMap; -- cgit v1.2.3