On 19/10/18 15:28, Wei Liu wrote:
> This is a bit more complicated than the HVM case because system
> domains have PV guest type. Leave them like that.
>
> Signed-off-by: Wei Liu <[email protected]>
> ---
> v2:
> 1. Remove useless ASSERTs.
> 2. Rewrite comment.
> ---
> xen/common/domain.c | 23 +++++++++++++++++++++--
> 1 file changed, 21 insertions(+), 2 deletions(-)
>
> diff --git a/xen/common/domain.c b/xen/common/domain.c
> index 65151e2..fc09088 100644
> --- a/xen/common/domain.c
> +++ b/xen/common/domain.c
> @@ -322,17 +322,36 @@ struct domain *domain_create(domid_t domid,
> }
>
> /* Sort out our idea of is_{pv,hvm}_domain(). */
> - if ( config && (config->flags & XEN_DOMCTL_CDF_hvm_guest) )
> + if ( config )
> {
> + if ( config->flags & XEN_DOMCTL_CDF_hvm_guest)
Space at the end.
> + {
> #ifdef CONFIG_HVM
> - d->guest_type = guest_type_hvm;
> + d->guest_type = guest_type_hvm;
> +#else
> + err = -EINVAL;
> + goto fail;
> +#endif
> + }
> + else
> + {
> +#ifdef CONFIG_PV
> + d->guest_type = guest_type_pv;
> #else
> err = -EINVAL;
> goto fail;
Indentation to match the HVM case?
Otherwise, Reviewed-by: Andrew Cooper <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel