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

Re: [PATCH v2 7/7] domctl: Modify XEN_DOMCTL_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: Fri, 28 Apr 2023 15:05:26 +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=VmXfpfamU0nc/ZxZH7bT9Vh4vN5MLQouDVIikVOw4Y8=; b=kMouGy5PGMktCeDGD4ZN7e5q3PUyLEZ4oHn2Esk8ywSH2dvrgRMtf8xfiEJ9xCahFUwNEteU0bq6QPTtOFgWrtPyOV3Y7n0wamXc5JBrRrvB2qBT2qcQWfrvY64tF2UnaPLhBtNAhw0VDjzkS54w5Gg8YQZsAoQAPRCeWJaInqc2JV73VIUHGCSnGDDT2GhJTpKRTJ8W/SiSqxCu87IcxaIkr9RCa2MBc7KliH2ytNEcRxxzvaVV5iuJ8w6mSw2P3GlK0HIeiKF1Ro5K8gq8Zx9UwiM/tpThqVJs6hC07l+O8yPQlKlHnPh7YynkIZKONx+tpEfTIi4CWa0pvQQV/A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H73FYkH4vY5t+VjGqn54K6qrZYctbi1C0Bcn7MY+te6JB8TpeFGbuctgr9LWEk19RIVwenlorK/yplvusuJwPNj8fOBWGTOASsgQXR0sny04IP6RqP5Tr49Snrcq8a/0f6Uj4umK6vGf4iNIBgYHWB1eqmweMLMHOpQBWi982kzG6U7erz3aGisFd5mb58qEpCIBWd5Pdgwal69/JGwy53Km7Y1JrOxZmW8W5QB2W+EzCCJ2+drB57k8SZPUMqMKC1q/G3JFg3uEgwUm5cNazJSFi9AJu5Hb9jdf6cirDmTlT1LHJujeL4jNLeMfpzzF0ViFqrtB7AatNJrWwts93g==
  • 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: Fri, 28 Apr 2023 14:05:59 +0000
  • Ironport-data: A9a23:SHx9KKy/A5h/SL5IR+56t+fMxyrEfRIJ4+MujC+fZmUNrF6WrkVRn GZJWTuFa/iNZ2OhedAlbtnlpk0AuJCByd5nGgI+pSAxQypGp/SeCIXCJC8cHc8wwu7rFxs7s ppEOrEsCOhuExcwcz/0auCJQUFUjP3OHfykTrafYEidfCc8IA85kxVvhuUltYBhhNm9Emult Mj75sbSIzdJ4RYtWo4vw//F+UIHUMja4mtC5QRiP6AT4DcyqlFOZH4hDfDpR5fHatE88t6SH 47r0Ly/92XFyBYhYvvNfmHTKxBirhb6ZGBiu1IOM0SQqkEqSh8ai87XAME0e0ZP4whlqvgqo Dl7WT5cfi9yVkHEsLx1vxC1iEiSN4UekFPMCSDXXcB+UyQq2pYjqhljJBheAGEWxgp4KUxyr fxANhw9Uh+aiPC82ZCcQfVHie12eaEHPKtH0p1h5RfwKK9+BLrlHODN79Ie2yosjMdTG/qYf 9AedTdkcBXHZVtIJ0sTD5U92uyvgxETcRUB8A7T+fVxvDCVlVQruFTuGIO9ltiibMNZhEuH4 EnB+Hz0GEoyP92D0zuVtHmrg4cjmAuiAN1MT+fjq6UCbFu79HwNIwwNcGqB/Keal0mzRd5nc ndLw397xUQ13AnxJjXnZDWxpHOGtxgQQd0WDeQ+7AyPzYLf5wGECi4PSTspQMwrsoo6SCIn0 neNnsj1Hnp/vbuNU3Wf+7yI6zSoNkA9L2UPeCsFRgst+MT4rcc4iRenZtR+FK+4iPXlFDe2x CqFxAAlnKkah8MP06S9/HjEjiiqq5yPSRQ6ji3IWkq14wU/Y5SqD6Sq5kLc9u1oN5uCQx+Ku 31spiSFxOUHDJXInirSRuwIRemt/6zcaGeahkNzFZ488Tjr42SkYY1b/DB5IgFuL9oAfjjqJ kTUvGu9+aNuAZdjVocvC6rZNijg5fOI+QjNPhwMUudzXw==
  • Ironport-hdrordr: A9a23:UAZJh6kH58m77v5fY/YbMl7fk83pDfIK3DAbv31ZSRFFG/Fwwf re5sjz8SWE8Qr5P0tQ/+xoWZPwJk80kKQe3WB/B8bAYOCLgguVxeJZnO/fKl/bak/DH7VmpN 9dmsFFYbWaMbEQt7ee3ODXKbcd6ejC2Ly0g/zT1nJ8JDsaEJ2ILD0UNu9YKCBLrcV9aqbR3a Dz2vZ6
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 28/04/2023 11:41 am, 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>

You haven't (in theory) changed this patch, so should have retained my
R-by from v1, except...

> diff --git a/tools/libs/guest/xg_dom_boot.c b/tools/libs/guest/xg_dom_boot.c
> index 1dea534bba..dc858a1567 100644
> --- a/tools/libs/guest/xg_dom_boot.c
> +++ b/tools/libs/guest/xg_dom_boot.c
> @@ -178,7 +178,7 @@ int xc_dom_boot_image(struct xc_dom_image *dom)
>      {
>          xc_dom_panic(dom->xch, XC_INTERNAL_ERROR,
>                       "%s: getdomaininfo failed (errno=%d)",
> -                     __FUNCTION__, rc, errno);
> +                     __FUNCTION__, errno);
>          return -1;
>      }
>      dom->shared_info_mfn = info.shared_info_frame;

... this hunk means the patch 6 build is broken.

~Andrew



 


Rackspace

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