From: Cornelia Huck <cohuck@redhat.com>
To: David Hildenbrand <david@redhat.com>
Cc: qemu-s390x@nongnu.org, qemu-devel@nongnu.org,
Eduardo Habkost <ehabkost@redhat.com>,
Christian Borntraeger <borntraeger@de.ibm.com>
Subject: Re: [Qemu-devel] [PATCH v1] numa: s390x has no NUMA
Date: Mon, 26 Feb 2018 11:19:53 +0100 [thread overview]
Message-ID: <20180226111953.1e9bc50c.cohuck@redhat.com> (raw)
In-Reply-To: <20180223173657.29125-1-david@redhat.com>
On Fri, 23 Feb 2018 18:36:57 +0100
David Hildenbrand <david@redhat.com> wrote:
> Right now it is possible to crash QEMU for s390x by providing e.g.
> -numa node,nodeid=0,cpus=0-1
>
> Problem is, that numa.c uses mc->cpu_index_to_instance_props as an
> indicator whether NUMA is supported by a machine type. We don't
> implement NUMA on s390x (and that concept also doesn't really exist).
> We need mc->cpu_index_to_instance_props for query-cpus.
Is existence of cpu_index_to_instance_probs the correct indicator for
numa, then?
OTOH, your patch is straightforward...
>
> So let's fix this case.
>
> qemu-system-s390x: -numa node,nodeid=0,cpus=0-1: NUMA is not supported by
> this machine-type
>
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
> numa.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/numa.c b/numa.c
> index 7e0e789b02..3b9be613d9 100644
> --- a/numa.c
> +++ b/numa.c
> @@ -80,10 +80,16 @@ static void parse_numa_node(MachineState *ms, NumaNodeOptions *node,
> return;
> }
>
> +#ifdef TARGET_S390X
> + /* s390x provides cpu_index_to_instance_props but has no NUMA */
> + error_report("NUMA is not supported by this machine-type");
> + exit(1);
> +#else
> if (!mc->cpu_index_to_instance_props) {
> error_report("NUMA is not supported by this machine-type");
> exit(1);
> }
> +#endif
> for (cpus = node->cpus; cpus; cpus = cpus->next) {
> CpuInstanceProperties props;
> if (cpus->value >= max_cpus) {
next prev parent reply other threads:[~2018-02-26 10:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-23 17:36 [Qemu-devel] [PATCH v1] numa: s390x has no NUMA David Hildenbrand
2018-02-26 8:49 ` [Qemu-devel] [qemu-s390x] " Claudio Imbrenda
2018-02-26 9:20 ` [Qemu-devel] " Christian Borntraeger
2018-02-26 9:25 ` David Hildenbrand
2018-02-26 10:19 ` Cornelia Huck [this message]
2018-02-26 10:28 ` David Hildenbrand
2018-02-26 10:35 ` Cornelia Huck
2018-02-26 11:07 ` Christian Borntraeger
2018-02-26 11:12 ` David Hildenbrand
2018-02-26 11:23 ` Cornelia Huck
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=20180226111953.1e9bc50c.cohuck@redhat.com \
--to=cohuck@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=david@redhat.com \
--cc=ehabkost@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@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).