On 22/07/21 16:12, wangyanan (Y) wrote:
The smp_parse and pc_smp_parse are going to be converted into a
generic parser, and the added sanity-check in this patch will also be
tested in an unit test. So is it probably better to keep the check in the
parser instead of the caller? The duplication will be eliminated anyway
when there is one single parser.

But I can also implement the check in machine_set_smp as you mentioned
if it's more reasonable and preferred. :)

Yes, I would prefer to avoid having duplicate code. There are some common checks already in machine_set_smp, e.g. comparing ms->smp.cpus against mc->min_cpus and mc->max_cpus.

Paolo


Reply via email to