[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 08/17] x86: make construct_dom0 build with !CONFIG_PV



>>> On 04.10.18 at 17:43, <wei.liu2@xxxxxxxxxx> wrote:
> --- a/xen/arch/x86/dom0_build.c
> +++ b/xen/arch/x86/dom0_build.c
> @@ -509,8 +509,16 @@ int __init construct_dom0(struct domain *d, const 
> module_t *image,
>      }
>  #endif
>  
> -    rc = (is_hvm_domain(d) ? dom0_construct_pvh : dom0_construct_pv)
> -         (d, image, image_headroom, initrd, cmdline);
> +    if ( is_hvm_domain(d) )
> +        rc = dom0_construct_pvh(d, image, image_headroom, initrd, cmdline);
> +    else if ( is_pv_domain(d) )
> +        rc = dom0_construct_pv(d, image, image_headroom, initrd, cmdline);
> +    else
> +    {
> +        ASSERT_UNREACHABLE();
> +        rc = -EINVAL;
> +    }

Depending on what the plans are wrt simultaneous PV=n and HVM=n,
this may better need to be panic(). The assertion is certainly not valid
in that case - it is very much expected to get there in such a case. It
is only valid if the Kconfig change doesn't allow for that combination.
In any event I see that patch 13 doesn't change the code above
again.

Jan



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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.