[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH for-6.1 0/1] machine: Disallow specifying topology parameters

From: wangyanan (Y)
Subject: Re: [PATCH for-6.1 0/1] machine: Disallow specifying topology parameters as zero
Date: Thu, 22 Jul 2021 23:00:12 +0800
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0

On 2021/7/22 22:38, Paolo Bonzini wrote:
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.

Ok, I will send a v2.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]