On Tuesday, May 23, 2023 9:41 PM, Peter Xu wrote: > On Tue, May 23, 2023 at 01:44:03AM +0000, Wang, Wei W wrote: > > On Tuesday, May 23, 2023 7:36 AM, Peter Xu wrote: > > > > > We may also want to trap the channel setups on num: > > > > > > > > > > migrate_params_test_apply(): > > > > > > > > > > if (params->has_multifd_channels) { > > > > > dest->multifd_channels = params->multifd_channels; > > > > > } > > > > > > > > Didn’t get this one. What do you want to add to above? > > > > > > I meant after listen() is called with an explicit number in this > > > case, should we disallow changing of multifd number of channels? > > > > Got you, thanks. That seems unnecessary to me, as the cap setting is > > required for the use of multifd and patching there already achieves below > what we want: > > - users get the error message when deferred -incoming isn’t used; > > - fail the cap setting for multifd, meaning that multifd won't be used (i.e. > > no place that will care about multifd_channels). > > It's about whether we want to protect e.g. below steps: > > 1. start dest qemu with -incoming defer > 2. "migrate-set-capabilities" to enable multifd 3. "migrate-incoming xxx" to > setup the sockets > 4. "migrate-set-parameters" to setup the num of multifd <--- will be invalid > here
Yes, step 4 is invalid, but I think nobody cares about that (i.e. no place uses the invalid value) as step2 already fails the cap setting (with error messages). > > Would that still be a problem that falls into the same category of what this > patch wants to protect qemu from? My intension was to notice the user explicitly that the deferred -incoming must be used for multifd (if not the case, stop the use of multifd). I think the patch already achieves this. Adding such check to migrate-set-parameters doesn’t cause problems, but seems a bit redundant to me. Not sure if others would also have strong preferences to do so for any reason. Thanks, Wei