On Fri, Mar 09, 2018 at 01:18:39PM +0000, Andrew Cooper wrote:
> Neither domcr_flags nor config are used on either side.  Drop them, making
> {hvm,pv}_domain_initialise() symmetric with all the other domain/vcpu
> initialise/destroy calls.
> 
> Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com>

Reviewed-by: Roger Pau Monné <roger....@citrix.com>

> ---
> CC: Jan Beulich <jbeul...@suse.com>
> CC: Wei Liu <wei.l...@citrix.com>
> CC: Roger Pau Monné <roger....@citrix.com>
> ---
>  xen/arch/x86/domain.c           |  4 ++--
>  xen/arch/x86/hvm/hvm.c          |  3 +--
>  xen/arch/x86/pv/domain.c        |  3 +--
>  xen/include/asm-x86/hvm/hvm.h   |  3 +--
>  xen/include/asm-x86/pv/domain.h | 11 +++--------
>  5 files changed, 8 insertions(+), 16 deletions(-)
> 
> diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
> index 36555ea..81ee992 100644
> --- a/xen/arch/x86/domain.c
> +++ b/xen/arch/x86/domain.c
> @@ -538,7 +538,7 @@ int arch_domain_create(struct domain *d, unsigned int 
> domcr_flags,
>  
>      if ( is_hvm_domain(d) )
>      {
> -        if ( (rc = hvm_domain_initialise(d, domcr_flags, config)) != 0 )
> +        if ( (rc = hvm_domain_initialise(d)) != 0 )
>              goto fail;
>      }
>      else if ( is_idle_domain(d) )
> @@ -553,7 +553,7 @@ int arch_domain_create(struct domain *d, unsigned int 
> domcr_flags,
>      }
>      else
>      {
> -        if ( (rc = pv_domain_initialise(d, domcr_flags, config)) != 0 )
> +        if ( (rc = pv_domain_initialise(d)) != 0 )
>              goto fail;
>      }

Maybe this could be:

if ( is_idle_domain(d) )
...
else
{
    rc = is_hvm_domain(d) ? hvm_domain_initialise(d)
                          : pv_domain_initialise(d);
    if ( rc )
        goto fail;
}

But that's maybe out of the scope of this patch.

Thanks, Roger.

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

Reply via email to