> -----Original Message-----
> From: Jan Beulich [mailto:jbeul...@suse.com]
> Sent: 29 January 2019 11:48
> To: Paul Durrant <paul.durr...@citrix.com>
> Cc: Andrew Cooper <andrew.coop...@citrix.com>; Roger Pau Monne
> <roger....@citrix.com>; Wei Liu <wei.l...@citrix.com>; xen-
> de...@lists.xenproject.org
> Subject: Re: [PATCH v2 1/8] viridian: add init hooks
> 
> >>> Paul Durrant <paul.durr...@citrix.com> 01/08/19 4:18 PM >>>
> >--- a/xen/arch/x86/hvm/hvm.c
> >+++ b/xen/arch/x86/hvm/hvm.c
> >@@ -665,12 +665,18 @@ int hvm_domain_initialise(struct domain *d)
> >if ( hvm_tsc_scaling_supported )
> >d->arch.hvm.tsc_scaling_ratio = hvm_default_tsc_scaling_ratio;
>  >
> >+    rc = viridian_domain_init(d);
> >+    if ( rc )
> >+        goto fail2;
> >+
> >rc = hvm_funcs.domain_initialise(d);
> >if ( rc != 0 )
> >-        goto fail2;
> >+        goto fail3;
>  >
> >return 0;
>  >
> >+ fail3:
> >+    viridian_domain_deinit(d);
> >fail2:
> >rtc_deinit(d);
> >stdvga_deinit(d);
> 
> In order to avoid the addition of such extra new labels, and in line with
> Andrew's request for de-init functions to be idempotent, couldn't you
> arrange for the two de-init functions here to remain idempotent (they
> look to be at present), in which case you could move there invocations
> from the init paths here down past all the other cleanup functions which
> can only be called when their respective init code has run?

Yes, sure. I'll do that.

  Paul

> 
> Jan
> 


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to