diff options
author | Greg Bellows <greg.bellows@linaro.org> | 2015-02-13 05:46:08 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2015-02-13 05:46:08 +0000 |
commit | fb8d6c24b095c426151b9bba8c8b0e58b03d6503 (patch) | |
tree | 94e96b64b58b6ce17a106222f301bd115af36f9d /target-arm/cpu.c | |
parent | 332261de2b979610aacde22eb15ef6e59f3c2da9 (diff) | |
download | hqemu-fb8d6c24b095c426151b9bba8c8b0e58b03d6503.zip hqemu-fb8d6c24b095c426151b9bba8c8b0e58b03d6503.tar.gz |
target-arm: Add CPU property to disable AArch64
Adds registration and get/set functions for enabling/disabling the AArch64
execution state on AArch64 CPUs. By default AArch64 execution state is enabled
on AArch64 CPUs, setting the property to off, will disable the execution state.
The below QEMU invocation would have AArch64 execution state disabled.
$ ./qemu-system-aarch64 -machine virt -cpu cortex-a57,aarch64=off
Also adds stripping of features from CPU model string in acquiring the ARM CPU
by name.
Signed-off-by: Greg Bellows <greg.bellows@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1423736974-14254-2-git-send-email-greg.bellows@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target-arm/cpu.c')
-rw-r--r-- | target-arm/cpu.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/target-arm/cpu.c b/target-arm/cpu.c index d38af74..986f04c 100644 --- a/target-arm/cpu.c +++ b/target-arm/cpu.c @@ -544,13 +544,16 @@ static ObjectClass *arm_cpu_class_by_name(const char *cpu_model) { ObjectClass *oc; char *typename; + char **cpuname; if (!cpu_model) { return NULL; } - typename = g_strdup_printf("%s-" TYPE_ARM_CPU, cpu_model); + cpuname = g_strsplit(cpu_model, ",", 1); + typename = g_strdup_printf("%s-" TYPE_ARM_CPU, cpuname[0]); oc = object_class_by_name(typename); + g_strfreev(cpuname); g_free(typename); if (!oc || !object_class_dynamic_cast(oc, TYPE_ARM_CPU) || object_class_is_abstract(oc)) { |