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

2021-07-22 Thread wangyanan (Y)
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 parse

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

2021-07-22 Thread Paolo Bonzini
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 wil

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

2021-07-22 Thread wangyanan (Y)
On 2021/7/22 21:55, Paolo Bonzini wrote: On 22/07/21 15:37, Andrew Jones wrote: This doesn't mention zero inputs and even implies non-zero inputs. I'm not sure if we need to worry about the odd command line that used zero for some parameters. What do you think? I think I agree as well, howe

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

2021-07-22 Thread Paolo Bonzini
On 22/07/21 15:37, Andrew Jones wrote: This doesn't mention zero inputs and even implies non-zero inputs. I'm not sure if we need to worry about the odd command line that used zero for some parameters. What do you think? I think I agree as well, however the patch that Yanan sent has unnecessa

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

2021-07-22 Thread Cornelia Huck
On Thu, Jul 22 2021, Andrew Jones wrote: > On Thu, Jul 22, 2021 at 08:02:16AM +0200, Cornelia Huck wrote: >> On Thu, Jul 22 2021, Yanan Wang wrote: >> >> > In the SMP configuration, we should either specify a topology >> > parameter with a reasonable value (equal to or greater than 1) >> > or j

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

2021-07-22 Thread Andrew Jones
On Thu, Jul 22, 2021 at 08:02:16AM +0200, Cornelia Huck wrote: > On Thu, Jul 22 2021, Yanan Wang wrote: > > > In the SMP configuration, we should either specify a topology > > parameter with a reasonable value (equal to or greater than 1) > > or just leave it omitted and QEMU will calculate its v

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

2021-07-22 Thread wangyanan (Y)
On 2021/7/22 14:02, Cornelia Huck wrote: On Thu, Jul 22 2021, Yanan Wang wrote: In the SMP configuration, we should either specify a topology parameter with a reasonable value (equal to or greater than 1) or just leave it omitted and QEMU will calculate its value. Configurations which explicit

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

2021-07-21 Thread Cornelia Huck
On Thu, Jul 22 2021, Yanan Wang wrote: > In the SMP configuration, we should either specify a topology > parameter with a reasonable value (equal to or greater than 1) > or just leave it omitted and QEMU will calculate its value. > Configurations which explicitly specify the topology parameters >

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

2021-07-21 Thread Yanan Wang
In the SMP configuration, we should either specify a topology parameter with a reasonable value (equal to or greater than 1) or just leave it omitted and QEMU will calculate its value. Configurations which explicitly specify the topology parameters as zero like "sockets=0" are meaningless, so disal