[libvirt] [PATCH 03/11] qemu: Pass QEMUCaps to virDomainDefPostParse

John Ferlan jferlan at redhat.com
Sat Sep 29 02:02:59 UTC 2018



On 9/20/18 1:44 PM, Marc Hartmayer wrote:
> ...although priv->qemuCaps will be NULL in almost every case when the
> post parse callback has failed. That may change in the future.
> 
> Signed-off-by: Marc Hartmayer <mhartmay at linux.ibm.com>
> Reviewed-by: Boris Fiuczynski <fiuczy at linux.ibm.com>
> ---
>  src/qemu/qemu_process.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
> index 44c63c42d618..6c5a6472d8cd 100644
> --- a/src/qemu/qemu_process.c
> +++ b/src/qemu/qemu_process.c
> @@ -5282,7 +5282,7 @@ qemuProcessInit(virQEMUDriverPtr driver,

The comment just above here could use a tweak for grammar ;-):

    /* in case when the post parse callback failed we need to re-run it
on the
      * old config prior we start the VM */

>      if (vm->def->postParseFailed) {
>          VIR_DEBUG("re-running the post parse callback");
>  
> -        if (virDomainDefPostParse(vm->def, caps, 0, driver->xmlopt, NULL) < 0)
> +        if (virDomainDefPostParse(vm->def, caps, 0, driver->xmlopt, priv->qemuCaps) < 0)

Searching through history of this line finds Peter's original commit in
this area - 7726d158, which seems to indicate a very specific reason for
providing a NULL capabilities value here.

I think from this patch on is something Peter has worked on a lot, so I
would prefer to defer to Peter on them since I'm sure he understands all
the various PostParse and Validate special conditions and various flags
usage better than I do.

I'll still provide a few comments along the way.

John

I did CC Peter just to bring his attention to the series...


>              goto cleanup;
>      }
>  
> 




More information about the libvir-list mailing list