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

Re: [PATCH v2 4/7] tools: Make init-xenstore-domain use xc_domain_getinfolist()


  • To: Alejandro Vallejo <alejandro.vallejo@xxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Fri, 28 Apr 2023 13:40:50 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=DpKa27AMU53aPXOAAvM5i4G0m4kr25JUg9B4mnhTNiI=; b=T3Q1lrCK+BXBevCz97ZWtmpPryP14uSNVBHP32OGdcTQ5F9limyTDImIGTSUF+WgOfYG5KO6XhagYkIMG+kxyPVcxM8Fr2JlceekH8YfAixZyb29jIEyUSpOf3qDL/B1aXWxVP0XcYyYjLbTW1uKLb8Sl57W6DN2tAMHd3CPXYDh8DcC5jjE4IR0EnPX5aJINr+O/0O0m3ZMxaKcOpAlqKhDu/s4pAXbIqFNq1PXwnfzJJpTfQhPmKI9nguhfSXeSSPJv0syHQSKGR30H7vkpo/lru2fcmJYei0lC0deBh14CJGI8JE41JGslFjDQ9pOd1aeG8CafRipfY4paIwcjg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fZYMGiBk0dgItz90vl1YTpbPQOJnRM5gauSyZNyrWU7OupgGftnpOvBVKY0YTSs7RylrPstSqoUeHnGOGL2jMsjRRLQWKOMXtTceTOrDN0hXU/VT5JrNznx8FSwPSl3aL+YqR09pNngr2J4E2NI5UCWheQIalTnLsfoeOfhC8ZzDG1IgFx4GVnwrsk5PS98JpIdhGdaQmkpSSYVgs/bcDKUzvzA9tnMIEtc88XMXWIJlA809kzn3Pj2FdDOcs4l1Tg9qKr7H6L+woEKlCueZOOzjPlKj36Gjz7k7dY4lnWJlVYYj1gNQEwP0d0aG7q3g43OXoSIGqY0bvRghhdD4dw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Wei Liu <wl@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>
  • Delivery-date: Fri, 28 Apr 2023 12:41:19 +0000
  • Ironport-data: A9a23:A0HsSKoG+VSvTpdqBp9XYMS7cx5eBmLZZBIvgKrLsJaIsI4StFCzt garIBmFPvzbYWKjed11PNnlp0wPup/Wn983Sgs/rSg9QigR85uZCYyVIHmrMnLJJKUvbq7FA +Y2MYCccZ9uHhcwgj/3b9ANeFEljfngqoLUUbKCYWYpA1c/Ek/NsDo788YhmIlknNOlNA2Ev NL2sqX3NUSsnjV5KQr40YrawP9UlKm06WJwUmAWP6gR5weCzSlNUPrzGInqR5fGatgMdgKFb 76rIIGRpgvx4xorA9W5pbf3GmVirmn6ZFXmZtJ+AsBOszAazsAA+v9T2Mk0MC+7vw6hjdFpo OihgLTrIesf0g8gr8xGO/VQO3kW0aSrY9YrK1Dn2SCY5xWun3cBX5yCpaz5VGEV0r8fPI1Ay RAXAAoXTlO5rf+O+aq2U+VVu/w6DPesMZxK7xmMzRmBZRonabbqZvyToPV+jHI3jM0IGuvCb c0EbzYpdA7HfxBEJlYQDtQ5gfusgX78NTZfrTp5p4JuuzSVkFM3jeiraYSFEjCJbZw9ckKwj 2TK5WnmRDodM8SS02Gt+XOwnO7f2yj8Xer+EZXhrqA33APLnjB75Bs+flWnn6HmkEiEftNgF h0I4wEPp7Ep6xn+JjX6d1jiyJKehTYVX9dSGus28gbL1KPQ5wubAUAPSjlcZJots8pebSwn0 BqFks3kARRrsaaJUjSN+7GMtzSwNCMJa2gYakcsUg8t89Tl5oYpgXrnTNl5F7WupsboAjy2x CqFxBXSnJ0WhM8Pkq+9rVbOhmv1ooCTF1BloALKQmii8wV1Ipa/YJCl4kTa6vAGK5uFSl6Gv z4PnM32AP0yMKxhXRelGI0ldIxFLd7cYVUwXXYH80EdygmQ
  • Ironport-hdrordr: A9a23:495DDatuZs0Ylkq0eiZblpmf7skCEIAji2hC6mlwRA09TyXGra 2TdaUgvyMc1gx7ZJhBo7+90We7MArhHO1OkO4s1NCZLXTbUQqTXftfBO7ZrwEIdBeOldK1uZ 0QFpSWTeeAdmSS7vyKnjVQcexB/DDvysnB64bjJjVWPHlXgslbnnhE422gYylLrWd9dPwE/d anl6h6T23KQwVqUi33PAhNY8Hz4/nw0L72ax8PABAqrCGIkDOT8bb/VzSIwxsEVDtL4LE6tU zIiRbw6KmPu+yyjka07R6f071m3P/ajvdTDs2FjcYYbh3qlwaTfYxkH5GSoTwvp+mryVAy1P 3BuQ0pMchf427YOku1vRzu8Q/91ytG0Q6p9XaoxV/Y5eDpTjMzDMRMwapfbxvi8kIl+PVxyr hC0W61v4deSUqoplW32/H4EzVR0makq3srluAey1RZTIslcbdU6agS5llcHpssFD/zrKonDO 5tJsfB4+s+SyLTU1np+k1UhPC8VHU6GRmLBmAEp8yuyjBT2Et0ykMJrfZv6ksoxdYYcd1p9u 7EOqNnmPVlVckNd59wA+8HXI+eFnHNaQikChPSHX3XUIU8f17doZ/+57s4oMuwfoYT8Zc0kJ PdFHtFqG8JfV70A8Hm5uwEzvn0ehT/Yd3R8LAd23Ag0YeMAYYDcBfzB2zGqvHQ48n2WabgKr KO0JE/OY6XEYKhI/cP4+TEYeggFZAvarxlhj8FYSP/nivqEPycigWJSoekGJPdVRAZZ0jYPl wvGBDOGeQo1DHYZpa/ummcZ0/Q
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 28/04/2023 11:41 am, Alejandro Vallejo wrote:
> diff --git a/tools/helpers/init-xenstore-domain.c 
> b/tools/helpers/init-xenstore-domain.c
> index 0950ba7dc5..e210a2677e 100644
> --- a/tools/helpers/init-xenstore-domain.c
> +++ b/tools/helpers/init-xenstore-domain.c
> @@ -322,16 +323,19 @@ err:
>  
>  static int check_domain(xc_interface *xch)
>  {
> -    xc_dominfo_t info;
> +    xc_domaininfo_t info[8];

I'm recommend having a comment here, saying something like /* Commonly
dom0 is the only domain, but buffer a little for efficiency. */

Because this is also the justification for why we don't need to ask for
32k domains at once to find XEN_DOMINF_xs_domain in a race-free way.

Can be fixed on commit if you're happy with the adjustment.

~Andrew



 


Rackspace

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