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

Re: [PATCH 2/3] xl/libxl: Add ability to specify SMBIOS strings



On Thu, Sep 8, 2022 at 8:40 AM Anthony PERARD <anthony.perard@xxxxxxxxxx> wrote:

> > ---
> > diff --git a/tools/libs/light/libxl_dom.c b/tools/libs/light/libxl_dom.c
> > index 2abaab439c..9034933ea8 100644
> > --- a/tools/libs/light/libxl_dom.c
> > +++ b/tools/libs/light/libxl_dom.c
> > @@ -771,6 +771,26 @@ static int hvm_build_set_xs_values(libxl__gc *gc,
> >              goto err;
> >      }
> >
> > +    for (int i = 0; i < info->u.hvm.num_smbios; i++) {
> > +        char *p;
> > +        path = GCSPRINTF("/local/domain/%d/"HVM_XS_BIOS_STRINGS"/%s", 
> > domid,
> > +                   libxl_smbios_type_to_string(info->u.hvm.smbios[i].key));
> > +
> > +        /* libxl defines are all "_", but the HVM_XS_ strings are "-". */
>
> "libxl defines are all "_"" seems a bit weird to me as a comment in
> the source code, maybe a better comment would the conversion we need to
> do, something like:
>
>     Convert libxl_smbios_type string to xenstore path that hvmloader
>     will use, as defined by HVM_XS_*. That is convert the '_' to '-'.

I'll use this.  All your other comments sound good, and I'll change accordingly.

Thanks for taking a look.

-Jason



 


Rackspace

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