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

Re: [PATCH 7/7] domctl: Modify getdomaininfo to fail if domid is not found


  • To: Alejandro Vallejo <alejandro.vallejo@xxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Thu, 27 Apr 2023 12:15:49 +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=sM11ygwuR02diH497+xYmRjJrONKzsLSOcjSgvC8yxE=; b=Rdfn0H0ESZcmcLMh3EOs8dR3uHqMkUx2MZvjB1rg2lUMpD4mYdJfkVTKxTUbhNI2CKIowYQCD6nhc+Vt173lofdxINCn8/uSSAxWtJ3L3ZS43IedfCa2qzOZhJZ8S5/vUDylWyu3butop8IXPZ/CT+T5ytqc9TOQBdDS0lwFB1a3tIB6oId+f1iI0v2iukpdQAH0x9BPznvDG6rPerjITEQN42j72CTtw0Qn+JtDID2n9vI526/+F07bjp5q6Z7Exe/04rzn/xAUMxQVSTo7l12eTDnodq3rcMN5oevvudkdJtBQ0Ec1L+WGdtvgJYaSXyatPwf7kQKK9Y3gJZG63A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QOi3jRAPcGcrXvJIg6LxSXPLxK38pOoEcn1HsvalCfOfmuXgoUyu44cYAfqrK7d5h/ku/yb2YCbAtmWrRPPsYZdSEKr2HqPt4SNP3ycC3quy84RS+mvIm0SAwmMA/5Rt+e7AZTPgj/83z10QW2X570oohU0cYEkrAUM/Jre/O1WHtKLamGXCiCJqtw2gwB3lXTYZrPe7g4mEizmFolefkABIqMOzXGk0mztoZQNOy8hJnloIC0XVQ8K6dceZwfA1eKET/A3AAcN0hKidyr60oiz1LJPQLZtEx5wiLBLS8QXCvpoaYLhZDsddpsja28QI+KRoCDOQcghf42oxdTR9Ww==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: George Dunlap <george.dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>
  • Delivery-date: Thu, 27 Apr 2023 11:16:10 +0000
  • Ironport-data: A9a23:/QMusa//rbq0O3SNQUSqDrUDe3+TJUtcMsCJ2f8bNWPcYEJGY0x3z GofWm3SM6qPMTDxLo9zYY/k80hQ6MTczIdiGlY+qno8E34SpcT7XtnIdU2Y0wF+jCHgZBk+s 5hBMImowOQcFCK0SsKFa+C5xZVE/fjUAOG6UKicYXoZqTZMEE8JkQhkl/MynrlmiN24BxLlk d7pqojUNUTNNwRcawr40Ire7kI+1BjOkGlA5AdmOaoU5AW2e0Q9V/rzG4ngdxMUfaEMdgKKb 76r5K20+Grf4yAsBruN+losWhRXKlJ6FVHmZkt+A8BOsDAbzsAB+v9T2M4nQVVWk120c+VZk 72hg3ASpTABZcUgkMxFO/VR/roX0aduoNcrKlDn2SCfItGvn9IBDJyCAWlvVbD09NqbDkl07 s40EWokZCyu2d2Wz7TjdLVWi+88eZyD0IM34hmMzBn/JNN/GdXmfP+P4tVVmjAtmspJAPDSI dIDbiZiZwjBZBsJPUoLDJU5n6GjgXyXnz9w8QrJ4/ZopTWOilUpitABM/KMEjCObexTklyVu STt+GPhDwtBHNee1SCE4jSngeqncSbTAdpNSOLgq6cy6LGV7lQiTw0MFkeynfyGpVCnSvkBD kAd0TV7+MDe82TuFLERRSaQqXqJvBcaV8BXVfMz7AWAyK386AKeG2RCRTlEAPQ2uclzSTE02 1uhm9LyGScpoLCTUWia9LqfsXW1Iyd9BW0IaDIATAAFy8L+u4x1hRXKJv5hDaq0g9vdCTz2h TeQo0AWnK4PhMQG06G6+1HvgD+2oJXNCAkv6W3/QWaN/g5/Iom/aOSA61fB6u1bBJ2EVVTHt 38B8/Vy98gLBJCJ0SmSGuMEGejx4+7faWWGx1lyA5Mm6jKhvWa5epxd6y1/I0EvNdsYfTjuY wnYvgY5CIJvAUZGpJRfO+qZY/nGB4C5fTg5fpg4tuZzX6U=
  • Ironport-hdrordr: A9a23:CqgkkK+yUIUiGFJdPEtuk+DJI+orL9Y04lQ7vn2ZKCY5TiX8ra vFoB11726WtN9vYgBDpTntAse9qBDnmaKdg7NwAV7KZmCPhILCFu5fBOXZogEIEheOk9Jg6Q ==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 26/04/2023 3:59 pm, Alejandro Vallejo wrote:
> It previously mimicked the getdomaininfo sysctl semantics by returning
> the first domid higher than the requested domid that does exist. This
> unintuitive behaviour causes quite a few mistakes and makes the call
> needlessly slow in its error path.
>
> This patch removes the fallback search, returning -ESRCH if the requested
> domain doesn't exist. Domain discovery can still be done through the sysctl
> interface as that performs a linear search on the list of domains.
>
> With this modification the xc_domain_getinfo() function is deprecated and
> removed to make sure it's not mistakenly used expecting the old behaviour.
> The new xc wrapper is xc_domain_getinfo_single().
>
> All previous callers of xc_domain_getinfo() have been updated to use
> xc_domain_getinfo_single() or xc_domain_getinfolist() instead. This also
> means xc_dominfo_t is no longer used by anything and can be purged.
>
> Resolves: xen-project/xen#105
> Signed-off-by: Alejandro Vallejo <alejandro.vallejo@xxxxxxxxx>
> ---
> Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Cc: George Dunlap <george.dunlap@xxxxxxxxxx>
> Cc: Jan Beulich <jbeulich@xxxxxxxx>
> Cc: Julien Grall <julien@xxxxxxx>
> Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>
> Cc: Wei Liu <wl@xxxxxxx>
> Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>
> Cc: Juergen Gross <jgross@xxxxxxxx>
> ---
>  tools/include/xenctrl.h     | 43 -----------------------
>  tools/libs/ctrl/xc_domain.c | 70 -------------------------------------
>  xen/common/domctl.c         | 32 ++---------------
>  3 files changed, 2 insertions(+), 143 deletions(-)

Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Good riddance to this disaster of an interface...



 


Rackspace

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