[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Meaning of "-smp threads" on mips_malta
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] Meaning of "-smp threads" on mips_malta |
Date: |
Mon, 14 Jan 2019 19:52:25 -0200 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
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
- [Qemu-devel] Meaning of "-smp threads" on mips_malta,
Eduardo Habkost <=