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

Re: [Xen-devel] [PATCH v2 04/11] xen/hvmlite: Allow HVMlite guests delay initializing grant table



On Mon, Feb 01, 2016 at 10:38:50AM -0500, Boris Ostrovsky wrote:
> diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c
> index c49f79e..9a239d5 100644
> --- a/drivers/xen/grant-table.c
> +++ b/drivers/xen/grant-table.c
> @@ -1147,13 +1147,13 @@ EXPORT_SYMBOL_GPL(gnttab_init);
>  
>  static int __gnttab_init(void)
>  {
> +     if (!xen_domain())
> +             return -ENODEV;
> +
>       /* Delay grant-table initialization in the PV on HVM case */
> -     if (xen_hvm_domain())
> +     if (xen_hvm_domain() && !xen_hvmlite)
>               return 0;
>  
> -     if (!xen_pv_domain())
> -             return -ENODEV;
> -
>       return gnttab_init();
>  }

For instance if we had pv types generalized then this would just be a one line
addition for __gnttab_init() to support hvmlite. Much cleaner, generalizes the
extensions and gets folks thinking about the types on all calls Xen init call
sites.

  Luis

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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