qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Yang Zhong" <yang.zhong@intel.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Andrew Jones" <drjones@redhat.com>,
	"Samuel Ortiz" <sameo@linux.intel.com>,
	"Rob Bradford" <robert.bradford@intel.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>,
	qemu-arm@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>
Subject: [Qemu-devel] [PATCH v4 4/8] RFC target/arm: Restrict pre-ARMv7 cpus to TCG
Date: Mon,  1 Jul 2019 21:49:38 +0200	[thread overview]
Message-ID: <20190701194942.10092-5-philmd@redhat.com> (raw)
In-Reply-To: <20190701194942.10092-1-philmd@redhat.com>

KVM requires at least a ARMv7 cpu.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 target/arm/cpu.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index ca718fb38f..290ef16e52 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -1643,6 +1643,8 @@ static ObjectClass *arm_cpu_class_by_name(const char *cpu_model)
 /* CPU models. These are not needed for the AArch64 linux-user build. */
 #if !defined(CONFIG_USER_ONLY) || !defined(TARGET_AARCH64)
 
+#ifdef CONFIG_TCG
+
 static void arm926_initfn(Object *obj)
 {
     ARMCPU *cpu = ARM_CPU(obj);
@@ -1853,6 +1855,8 @@ static void cortex_m0_initfn(Object *obj)
     cpu->midr = 0x410cc200;
 }
 
+#endif
+
 static void cortex_m3_initfn(Object *obj)
 {
     ARMCPU *cpu = ARM_CPU(obj);
@@ -2234,6 +2238,8 @@ static void cortex_a15_initfn(Object *obj)
     define_arm_cp_regs(cpu, cortexa15_cp_reginfo);
 }
 
+#ifdef CONFIG_TCG
+
 static void ti925t_initfn(Object *obj)
 {
     ARMCPU *cpu = ARM_CPU(obj);
@@ -2402,6 +2408,8 @@ static void pxa270c5_initfn(Object *obj)
     cpu->reset_sctlr = 0x00000078;
 }
 
+#endif
+
 #ifndef TARGET_AARCH64
 /* -cpu max: if KVM is enabled, like -cpu host (best possible with this host);
  * otherwise, a CPU with as many features enabled as our emulation supports.
@@ -2470,6 +2478,7 @@ struct ARMCPUInfo {
 
 static const ARMCPUInfo arm_cpus[] = {
 #if !defined(CONFIG_USER_ONLY) || !defined(TARGET_AARCH64)
+#ifdef CONFIG_TCG
     { .name = "arm926",      .initfn = arm926_initfn },
     { .name = "arm946",      .initfn = arm946_initfn },
     { .name = "arm1026",     .initfn = arm1026_initfn },
@@ -2482,6 +2491,7 @@ static const ARMCPUInfo arm_cpus[] = {
     { .name = "arm1176",     .initfn = arm1176_initfn },
     { .name = "arm11mpcore", .initfn = arm11mpcore_initfn },
     { .name = "cortex-m0",   .initfn = cortex_m0_initfn,
+#endif
                              .class_init = arm_v7m_class_init },
     { .name = "cortex-m3",   .initfn = cortex_m3_initfn,
                              .class_init = arm_v7m_class_init },
@@ -2495,6 +2505,7 @@ static const ARMCPUInfo arm_cpus[] = {
     { .name = "cortex-a8",   .initfn = cortex_a8_initfn },
     { .name = "cortex-a9",   .initfn = cortex_a9_initfn },
     { .name = "cortex-a15",  .initfn = cortex_a15_initfn },
+#ifdef CONFIG_TCG
     { .name = "ti925t",      .initfn = ti925t_initfn },
     { .name = "sa1100",      .initfn = sa1100_initfn },
     { .name = "sa1110",      .initfn = sa1110_initfn },
@@ -2511,6 +2522,7 @@ static const ARMCPUInfo arm_cpus[] = {
     { .name = "pxa270-b1",   .initfn = pxa270b1_initfn },
     { .name = "pxa270-c0",   .initfn = pxa270c0_initfn },
     { .name = "pxa270-c5",   .initfn = pxa270c5_initfn },
+#endif
 #ifndef TARGET_AARCH64
     { .name = "max",         .initfn = arm_max_initfn },
 #endif
-- 
2.20.1



  parent reply	other threads:[~2019-07-01 22:16 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-01 19:49 [Qemu-devel] [PATCH v4 0/8] Support disabling TCG on ARM Philippe Mathieu-Daudé
2019-07-01 19:49 ` [Qemu-devel] [PATCH v4 1/8] target/arm: Move debug routines to debug_helper.c Philippe Mathieu-Daudé
2019-07-01 19:49 ` [Qemu-devel] [PATCH v4 2/8] target/arm: Restrict semi-hosting to TCG Philippe Mathieu-Daudé
2019-07-02 13:58   ` Peter Maydell
2019-07-01 19:49 ` [Qemu-devel] [PATCH v4 3/8] target/arm/helper: Move M profile routines to m_helper.c Philippe Mathieu-Daudé
2019-07-02 14:01   ` Peter Maydell
2019-07-02 14:18     ` Philippe Mathieu-Daudé
2019-07-01 19:49 ` Philippe Mathieu-Daudé [this message]
2019-07-01 19:49 ` [Qemu-devel] [PATCH v4 5/8] RFC target/arm: Do not build pre-ARMv7 cpus when using KVM Philippe Mathieu-Daudé
2019-07-01 19:49 ` [Qemu-devel] [PATCH v4 6/8] RFC target/arm: Restrict R and M profiles to TCG Philippe Mathieu-Daudé
2019-07-01 19:49 ` [Qemu-devel] [PATCH v4 7/8] RFC target/arm: Do not build A/M-profile cpus when using KVM Philippe Mathieu-Daudé
2019-07-01 19:49 ` [Qemu-devel] [PATCH v4 8/8] target/arm: Do not build TCG objects when TCG is off Philippe Mathieu-Daudé
2019-07-02 14:08 ` [Qemu-devel] [PATCH v4 0/8] Support disabling TCG on ARM Peter Maydell
2019-08-09 20:22   ` Philippe Mathieu-Daudé
2019-08-12  9:06     ` Philippe Mathieu-Daudé
2019-07-02 17:47 ` no-reply
2019-07-03 14:03 ` no-reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190701194942.10092-5-philmd@redhat.com \
    --to=philmd@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=drjones@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=robert.bradford@intel.com \
    --cc=sameo@linux.intel.com \
    --cc=thuth@redhat.com \
    --cc=yang.zhong@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).