[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 01/28] target-arm: Make '-cpu any' available in linux
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PULL 01/28] target-arm: Make '-cpu any' available in linux-user mode only |
Date: |
Tue, 10 Sep 2013 19:51:55 +0100 |
Make the 'any' CPU for target-arm available only in linux-user mode.
The ARM target provides a CPU named "any", which turns on support for
all user-level instruction set extensions we know about. This is
intended for linux-user emulation mode, where it is the default CPU type.
It makes no sense to try to use this for system emulation, since we don't
initialize it with any system-level information like feature register
values or implementation specific cp15 registers. (Unsurprisingly, some
boards won't boot at all, though you might get lucky in some cases where
the guest doesn't happen to prod things that aren't there.)
Prevent users from making this command line error by removing the
CPU definition from the softmmu build.
Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Andreas Färber <address@hidden>
Message-id: address@hidden
---
target-arm/cpu.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/target-arm/cpu.c b/target-arm/cpu.c
index b2556c6..827e28e 100644
--- a/target-arm/cpu.c
+++ b/target-arm/cpu.c
@@ -822,6 +822,7 @@ static void pxa270c5_initfn(Object *obj)
cpu->reset_sctlr = 0x00000078;
}
+#ifdef CONFIG_USER_ONLY
static void arm_any_initfn(Object *obj)
{
ARMCPU *cpu = ARM_CPU(obj);
@@ -834,6 +835,7 @@ static void arm_any_initfn(Object *obj)
set_feature(&cpu->env, ARM_FEATURE_V7MP);
cpu->midr = 0xffffffff;
}
+#endif
typedef struct ARMCPUInfo {
const char *name;
@@ -874,7 +876,9 @@ static const ARMCPUInfo arm_cpus[] = {
{ .name = "pxa270-b1", .initfn = pxa270b1_initfn },
{ .name = "pxa270-c0", .initfn = pxa270c0_initfn },
{ .name = "pxa270-c5", .initfn = pxa270c5_initfn },
+#ifdef CONFIG_USER_ONLY
{ .name = "any", .initfn = arm_any_initfn },
+#endif
};
static void arm_cpu_class_init(ObjectClass *oc, void *data)
--
1.7.9.5
- [Qemu-devel] [PULL 18/28] linux-user: Don't treat AArch64 cpu names specially, (continued)
- [Qemu-devel] [PULL 18/28] linux-user: Don't treat AArch64 cpu names specially, Peter Maydell, 2013/09/10
- [Qemu-devel] [PULL 24/28] linux-user: Implement cpu_set_tls() and cpu_clone_regs() for AArch64, Peter Maydell, 2013/09/10
- [Qemu-devel] [PULL 10/28] target-arm: Export cpu_env, Peter Maydell, 2013/09/10
- [Qemu-devel] [PULL 20/28] linux-user: Add syscall number definitions for AArch64, Peter Maydell, 2013/09/10
- [Qemu-devel] [PULL 07/28] abitypes.h: Remove incorrect ARM ABI_LLONG_ALIGNMENT, Peter Maydell, 2013/09/10
- [Qemu-devel] [PULL 14/28] target-arm: Disable 32 bit CPUs in 64 bit linux-user builds, Peter Maydell, 2013/09/10
- [Qemu-devel] [PULL 27/28] linux-user: Add AArch64 support, Peter Maydell, 2013/09/10
- [Qemu-devel] [PULL 22/28] linux-user: Add signal handling for AArch64, Peter Maydell, 2013/09/10
- [Qemu-devel] [PULL 16/28] target-arm: Add AArch64 translation stub, Peter Maydell, 2013/09/10
- [Qemu-devel] [PULL 03/28] target-arm: Avoid "1 << 31" undefined behaviour, Peter Maydell, 2013/09/10
- [Qemu-devel] [PULL 01/28] target-arm: Make '-cpu any' available in linux-user mode only,
Peter Maydell <=
- [Qemu-devel] [PULL 13/28] target-arm: Add new AArch64CPUInfo base class and subclasses, Peter Maydell, 2013/09/10
- [Qemu-devel] [PULL 09/28] target-arm: Extract the disas struct to a header file, Peter Maydell, 2013/09/10
- [Qemu-devel] [PULL 11/28] target-arm: Fix target_ulong/uint32_t confusions, Peter Maydell, 2013/09/10
- [Qemu-devel] [PULL 02/28] target-arm: Use sextract32() in branch decode, Peter Maydell, 2013/09/10
- [Qemu-devel] [PULL 12/28] target-arm: Pass DisasContext* to gen_set_pc_im(), Peter Maydell, 2013/09/10
- [Qemu-devel] [PULL 17/28] target-arm: Add AArch64 gdbstub support, Peter Maydell, 2013/09/10
- [Qemu-devel] [PULL 05/28] target-arm: Implement qmp query-cpu-definitions, Peter Maydell, 2013/09/10
- [Qemu-devel] [PULL 04/28] target-arm: fix ARMv7M stack alignment on reset, Peter Maydell, 2013/09/10
- [Qemu-devel] [PULL 08/28] target-arm: Abstract out load/store from a vaddr in AArch32, Peter Maydell, 2013/09/10
- [Qemu-devel] [PULL 15/28] target-arm: Prepare translation for AArch64 code, Peter Maydell, 2013/09/10