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

Re: [Xen-devel] [PATCH v3] tools/libxl: Improve videoram setting



> > >   I know that it might seem counterintuitive but we try to keep all the
> > > significant informations about the platform within libxl. So if 8MB is
> > > an important limit of the platform that libxl should know about it,
> > > while xl should stay as dumb as possible.
> > > 
> > 
> > I tried to move the check within libxl_create.c, at the point where it sets
> > video_memkb default value, but I couldn't make it exit in case of failure.
> > Also I'm not sure if the check should go there. Can you help me to do it
> > please?
> 
> Sure.
> I was thinking something like this:
> 
> diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
> index c6daec9..3bf8026e 100644
> --- a/tools/libxl/libxl_create.c
> +++ b/tools/libxl/libxl_create.c
> @@ -628,6 +628,13 @@ static void initiate_domain_create(libxl__egc *egc,

A better place for this check is libxl__domain_build_info_setdefault,
which is more like "set defaults and validate what is already there"
than the name would suggest.

>          goto error_out;
>      }
>  
> +    if (d_config->b_info.type == LIBXL_DOMAIN_TYPE_HVM &&
> +        d_config->b_info.video_memkb < 8192) {
> +        LOG(ERROR, "videoram must be at least 8MB");
> +        ret = ERROR_INVAL;
> +        goto error_out;
> +    }
> +

Ian.



_______________________________________________
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®.