From: Eduardo Habkost <ehabkost@redhat.com>
To: qemu-devel@nongnu.org
Cc: Aurelien Jarno <aurelien@aurel32.net>,
Aleksandar Rikalo <arikalo@wavecomp.com>,
Stefan Markovic <smarkovic@wavecomp.com>,
Aleksandar Markovic <amarkovic@wavecomp.com>,
Igor Mammedov <imammedo@redhat.com>
Subject: [Qemu-devel] Meaning of "-smp threads" on mips_malta
Date: Mon, 14 Jan 2019 19:52:25 -0200 [thread overview]
Message-ID: <20190114215225.GA16760@habkost.net> (raw)
Hi,
I'm trying to refactor the SMP topology code in QEMU and I found
some suspicious code on mips_malta.c:
static void malta_mips_config(MIPSCPU *cpu)
{
CPUMIPSState *env = &cpu->env;
CPUState *cs = CPU(cpu);
env->mvp->CP0_MVPConf0 |= ((smp_cpus - 1) << CP0MVPC0_PVPE) |
((smp_cpus * cs->nr_threads - 1) << CP0MVPC0_PTC);
}
The (smp_cpus * cs->nr_threads) expression here doesn't make
sense to me (because smp_cpus is already supposed to be a
multiple of smp_threads), and seems to indicate that the code has
some unusual assumptions about the semantics of the -smp option.
So, I'd like to know: do all the examples below make sense for
Malta?
-smp 1
-smp 2
-smp 2,threads=1
-smp 2,threads=2
-smp 1,threads=2 [*]
-smp 2,threads=3 [*]
The generic -smp parsing code considers the last 2 entries
above[*] to be invalid. If they make sense for Malta, we need to
find a way to fix that. Replacing "-smp threads=..." with a
"-cpu" or "-machine" option seems like the best alternative.
--
Eduardo
next reply other threads:[~2019-01-14 21:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-14 21:52 Eduardo Habkost [this message]
2019-01-15 2:28 ` [Qemu-devel] Meaning of "-smp threads" on mips_malta Aleksandar Markovic
2019-01-16 15:30 ` Eduardo Habkost
2019-01-16 17:56 ` Aleksandar Markovic
2019-01-17 9:21 ` Andrew Jones
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=20190114215225.GA16760@habkost.net \
--to=ehabkost@redhat.com \
--cc=amarkovic@wavecomp.com \
--cc=arikalo@wavecomp.com \
--cc=aurelien@aurel32.net \
--cc=imammedo@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=smarkovic@wavecomp.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).