From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Wei Huang <wei@redhat.com>
Cc: qemu-devel@nongnu.org, peter.maydell@linaro.org,
drjones@redhat.com, qemu-arm@nongnu.org, abologna@redhat.com
Subject: Re: [Qemu-devel] [PATCH 1/1] mach-virt: Change default cpu and gic-version setting to "max"
Date: Mon, 9 Apr 2018 16:56:34 +0100 [thread overview]
Message-ID: <20180409155634.GO18283@redhat.com> (raw)
In-Reply-To: <20180409154921.29906-1-wei@redhat.com>
On Mon, Apr 09, 2018 at 10:49:21AM -0500, Wei Huang wrote:
> 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.
Hmm, generally we aim for the config provided by a machine type to be stable
across QEMU versions.
By specifying "max", the machine type will potentially change if new QEMU
turns on new features in the "max" CPU model, as well as also varying
depending on what the host OS supports.
This is a general conceptual problem with the "host" CPU model for all
target arches and is unfixable by design. This is fine if you accept
the caveats with using "-cpu host" and opt-in to using it knowing the
tradeoffs. I'm just not convinced it is reasonable to make "-cpu host"
be the default value for a machine type out of the box.
> 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
>
>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2018-04-09 15:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
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é [this message]
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é
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=20180409155634.GO18283@redhat.com \
--to=berrange@redhat.com \
--cc=abologna@redhat.com \
--cc=drjones@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=wei@redhat.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).