From: Wei Huang <wei@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-arm@nongnu.org, peter.maydell@linaro.org, wei@redhat.com,
drjones@redhat.com
Subject: [Qemu-devel] [PATCH 1/4] hw/arm/virt: Set default machine and CPU types for mach-virt
Date: Thu, 1 Feb 2018 12:28:08 -0500 [thread overview]
Message-ID: <1517506091-10396-1-git-send-email-wei@redhat.com> (raw)
Unlike most other QEMU architectures, the default machine type for
mach-virt is not set. This causes problems in situations where the
default machine types are not provided (e.g. qtest_start() function
in many QEMU tests). This patch designates the latest mach-virt
machine type (alias of "virt") as the default machine type. It also
changes the default CPU depending on the target.
Signed-off-by: Wei Huang <wei@redhat.com>
---
hw/arm/virt.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index b334c82..f6b1408 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -68,6 +68,7 @@
mc->desc = "QEMU " # major "." # minor " ARM Virtual Machine"; \
if (latest) { \
mc->alias = "virt"; \
+ mc->is_default = 1; \
} \
} \
static const TypeInfo machvirt_##major##_##minor##_info = { \
@@ -1603,7 +1604,12 @@ static void virt_machine_class_init(ObjectClass *oc, void *data)
mc->minimum_page_bits = 12;
mc->possible_cpu_arch_ids = virt_possible_cpu_arch_ids;
mc->cpu_index_to_instance_props = virt_cpu_index_to_props;
+#ifdef TARGET_AARCH64
+ mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a57");
+#else
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a15");
+#endif
+
mc->get_default_cpu_node_id = virt_get_default_cpu_node_id;
}
--
1.8.3.1
next reply other threads:[~2018-02-01 17:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-01 17:28 Wei Huang [this message]
2018-02-01 17:28 ` [Qemu-devel] [PATCH 2/4] tests/boot-serial-test: Add support for the aarch64 virt machine Wei Huang
2018-02-01 21:51 ` Thomas Huth
2018-02-01 17:28 ` [Qemu-devel] [PATCH 3/4] tests: Enable drive_del-test on arm/aarch64 Wei Huang
2018-02-01 17:28 ` [Qemu-devel] [PATCH 4/4] tests: Enable xhci test arm/aarch64 Wei Huang
2018-02-01 18:03 ` [Qemu-devel] [PATCH 1/4] hw/arm/virt: Set default machine and CPU types for mach-virt Peter Maydell
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=1517506091-10396-1-git-send-email-wei@redhat.com \
--to=wei@redhat.com \
--cc=drjones@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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).