qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/1] mach-virt: Change default cpu and gic-version setting to "max"
@ 2018-04-09 15:49 Wei Huang
  2018-04-09 15:55 ` Peter Maydell
  2018-04-09 15:56 ` Daniel P. Berrangé
  0 siblings, 2 replies; 9+ messages in thread
From: Wei Huang @ 2018-04-09 15:49 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-arm, peter.maydell, drjones, abologna

Running mach-virt machine types (i.e. "-M virt") on different systems can
result in various misleading warnings if -cpu and/or gic-version not specified.
For KVM, this can be solved mostly by using "host" type. But the "host" type
doesn't work for TCG. Compared with "host", the "max" type not only supports
auto detection under KVM mode, but also works with TCG. So this patch set
"max" as the default types for both -cpu and gic-version.

Signed-off-by: Wei Huang <wei@redhat.com>
---
 hw/arm/virt.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 94dcb125d3..1a9d68b8d5 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -1555,7 +1555,7 @@ 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;
-    mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a15");
+    mc->default_cpu_type = ARM_CPU_TYPE_NAME("max");
     mc->get_default_cpu_node_id = virt_get_default_cpu_node_id;
 }
 
@@ -1609,13 +1609,13 @@ static void virt_2_12_instance_init(Object *obj)
                                     "Set on/off to enable/disable using "
                                     "physical address space above 32 bits",
                                     NULL);
-    /* Default GIC type is v2 */
-    vms->gic_version = 2;
+    /* Default GIC type is max */
+    vms->gic_version = -1;
     object_property_add_str(obj, "gic-version", virt_get_gic_version,
                         virt_set_gic_version, NULL);
     object_property_set_description(obj, "gic-version",
-                                    "Set GIC version. "
-                                    "Valid values are 2, 3 and host", NULL);
+                                    "Set GIC version. Valid values are 2, 3, "
+                                    "host, and max", NULL);
 
     if (vmc->no_its) {
         vms->its = false;
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-04-12  8:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-09 15:49 [Qemu-devel] [PATCH 1/1] mach-virt: Change default cpu and gic-version setting to "max" Wei Huang
2018-04-09 15:55 ` Peter Maydell
2018-04-09 16:42   ` Wei Huang
2018-04-09 15:56 ` Daniel P. Berrangé
2018-04-09 16:29   ` Wei Huang
2018-04-10  7:41     ` Andrea Bolognani
2018-04-10  8:52       ` Daniel P. Berrangé
2018-04-11 15:35         ` Andrea Bolognani
2018-04-12  8:19           ` Daniel P. Berrangé

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).