[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 2/3] xl/libxl: Add ability to specify SMBIOS strings
- To: Jason Andryuk <jandryuk@xxxxxxxxx>
- From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
- Date: Fri, 9 Sep 2022 16:05:13 +0100
- Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
- Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Nick Rosbrook <rosbrookn@xxxxxxxxx>, "Juergen Gross" <jgross@xxxxxxxx>
- Delivery-date: Fri, 09 Sep 2022 15:05:27 +0000
- Ironport-data: A9a23:rS5LsKvWHZeLVI903OSymfEu6+fnVF1eMUV32f8akzHdYApBsoF/q tZmKWjQOf2IMzbxf9Anad62pxhT7MWBxtAyGQtp+S9kRH8V+JbJXdiXEBz9bniYRiHhoOOLz Cm8hv3odp1coqr0/0/1WlTZhSAgk/vOHtIQMcacUghpXwhoVSw9vhxqnu89k+ZAjMOwRgiAo rsemeWGULOe82MyYzl8B56r8ks15qyj4GJA5DTSWNgQ1LPgvyhNZH4gDfnZw0vQGuF8AuO8T uDf+7C1lkuxE8AFU47Nfh7TKyXmc5aKVeS8oiM+t5uK23CukhcawKcjXMfwXG8M49m/c3Kd/ /0W3XC4YV9B0qQhA43xWTEAe811FfUuFLMqvRFTGCFcpqHLWyKE/hlgMK05FYpA4N5uMWQQz 90ROhwrMhSIguyc+JvuH4GAhux7RCXqFIYWu3UmxjDFF/c2B5vERs0m5/cBgm123JoXW6+DO YxJMlKDbzyZC/FLEl4RFJI5mvbunnTleidUgFmUubA28y7YywkZPL3Fb4uFJ4XRHps9ckCwj zrvwUbAJAAjaue54iap/iuCvNaVgnauMG4VPOLhraM76LGJ/UQJDwYcT1y8ov+RhUu3WtYZI EsRkgIsorI171eDVcTmUluzp3vslgEYc8pdFas98g7l4qjd5QqDF3UHZjFEYd0i8sQxQFQCx lKP2t/kGzFrmLmUUm6GsKeZqyuoPioYJnNEYjULJTbp+PG6/tt11EiWCI8+Tujl1bUZBA0c3 RiN9DIGnoUW0/Qq3reX2wzDiDeijKDgG1tdChrsYo610u9oTNf7Odb2sgGAsakowJWxFQfY4 iVd8ySKxKVXVMzWynTQKAkYNOvxj8tpJgEwlrKG83MJ0z22s0CucolLiN2VDBc4a51UEdMFj aK6hO+w2HOwFCHwBUOPS9jtY/nGNIC5fTgfatjab8BVfr96fxKd8SdlaCa4hj6zyhZyy/hgY 87GLq5A6Er27ow+lFKLqxo1i+d3lkjSO0uILXwE8/hX+eXHPyPEIVv0GFCPcvo4/Mu5nekhy P4GbpPi9vmqeLehCsUh2dJMcAtiwLlSLcyelvG7gcbYelM6RDl4UaaLqV7jEqQ895loei7z1 inVcidlJJDX2BUr9S3ihqhfVY7S
- Ironport-hdrordr: A9a23:d8IPOKDluQRM19jlHems55DYdb4zR+YMi2TC1yhKJyC9Vvbo8/ xG/c5rsCMc5wx9ZJhNo7y90ey7MBThHP1OkOss1NWZPDUO0VHAROoJ0WKh+UyCJ8SXzJ866U 4KSclD4bPLYmRHsQ==
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Fri, Sep 09, 2022 at 08:59:09AM -0400, Jason Andryuk wrote:
> On Fri, Sep 9, 2022 at 6:19 AM Anthony PERARD <anthony.perard@xxxxxxxxxx>
> wrote:
> >
> > On Thu, Sep 08, 2022 at 03:51:12PM -0400, Jason Andryuk wrote:
> > > hvm_xs_strings.h specifies xenstore entries which can be used to set or
> > > override smbios strings. hvmloader has support for reading them, but
> > > xl/libxl support is not wired up.
> > >
> > > Allow specifying the strings with the new xl.cfg option:
> > > smbios=["bios_vendor=Xen Project","system_version=1.0"]
> >
> > I've tried something like:
> > smbios=['oem=foo=bar']
> > And only "foo" is added to the smbios string. Shouldn't we allow users
> > to have '=' in their smbios strings?
>
> Yes, you are correct. split_string_into_pair() isn't suitable since
> it terminates at the second '='. Also, we probably don't want to trim
> the strings to keep them unchanged, especially for any values. If a
> space-padded option name is provided, it'll show up in "xl: unknown
> smbios type '%s'" and the whitespace would be evident.
>
> hvmloader iterates through HVM_XS_OEM_STRINGS entries and stops
> processing when an entry is not found, or it is zero-length. So I
> think we should disallow zero-length values like "oem=" to avoid
> surprises. For example, smbios=["oem=A","oem=","oem=B"] would result
> in only oem-1 "A" making its way through to the guest.
Both suggestion sounds good.
Cheers,
--
Anthony PERARD
|