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

Re: [PATCH] libxl: Always set ao for qmp_proxy_spawn_outcome


  • To: Jason Andryuk <jandryuk@xxxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Thu, 31 Mar 2022 14:24:26 +0100
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>
  • Delivery-date: Thu, 31 Mar 2022 13:24:52 +0000
  • Ironport-data: A9a23:Q9PQiq+aMee80dONO17aDrUDln6TJUtcMsCJ2f8bNWPcYEJGY0x3n TZMWzjUPP+PZGKhKtBxOY/g8R9Uv5bVxtI2T1Nlri88E34SpcT7XtnIdU2Y0wF+jyHgoOCLy +1EN7Es+ehtFie0Si+Fa+Sn9T8mvU2xbuKU5NTsY0idfic5DnZ54f5fs7Rh2NQw2oPgW1nlV e7a+KUzBnf0g1aYDUpMg06zgEsHUCPa4W5wUvQWPJinjXeG/5UnJMt3yZKZdhMUdrJ8DO+iL 9sv+Znilo/vE7XBPfv++lrzWhVirrc/pmFigFIOM0SpqkAqSiDfTs/XnRfTAKtao2zhojx/9 DlCnd+TExUuZ7/dovxedihpFGZDAvB2+7CSdBBTseTLp6HHW37lwvEoB0AqJ4wIvO1wBAmi9 9RBdmpLNErawbvrnvTrEYGAhex6RCXvFIoZpnFnyyCfFfs8SIrPa67L+cVZzHE7gcUm8fP2O ZVENGo3MU2ojxtnNAw8Bcs+ouKShELvSQRfmneo+ql02j2GpOB2+Oe0a4eEEjCQfu1Kmm6Iq 2SA+H72ajkYO8aY0iGt6W+3i6nEmiaTcIAbErGi5+NpqFKWz20XThYRUDOTsfS/z0KzRd9bA 0gV4TY167g/8lSxSdvwVAH+p2SL1iPwQPIJTbd8slvUjPOJvUDJXQDoUwKtdvRll5UkQmU4x 2WR3PbYNDsojYLIeXGSo+L8QSyJBQAZKmoLZCkhRAQD4sX+rIxbsi8jXuqPA4bu0ISrRGiYL ySi6XFn2u5N1ZJjO7CTpwivvt66mnTeoufZDC3zV3nt0A52bZXNi2eAuQmCtqYowGp0ozC8U Jk4dyq2sbhm4XKlznXlrAAx8FeBvazt3Nr02wIHInXZ327xk0NPhKgJiN2EGG9nM9wfZRjia 1LJtAVa6fd7ZSX2PfEpPt3vUZl1kMAM8OgJsNiONLKihbArKWe6ENxGPxbMjwgBbmBy+U3AB XtrWZn1VitLYUiW5DG3W/0cwdcWKtMWngvuqWTA503/i9K2PSfNIZ9caQfmRr1pvcus/VSOm /4CZpTi9vmqeLCnCsUh2dVIdg5iwLlSLc2elvG7gcbYfFI8QTtxWqKJqV7jEqQ895loei7z1 inVcidlJJDX3yWvxdmiApy7VI7SYA==
  • Ironport-hdrordr: A9a23:7v3Pn68zyj8JP5m6glFuk+DaI+orL9Y04lQ7vn2YSXRuE/Bws/ re+8jztCWE7Ar5N0tNpTntAsa9qDbnhPhICOoqTNKftWvdyQiVxehZhOOIqVDd8m/Fh4xgPM 9bAtFD4bbLbWSS4/yV3DWF
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Wed, Mar 30, 2022 at 02:16:58PM -0400, Jason Andryuk wrote:
> diff --git a/tools/libs/light/libxl_dm.c b/tools/libs/light/libxl_dm.c
> index 9a8ddbe188..59a8dcf3a9 100644
> --- a/tools/libs/light/libxl_dm.c
> +++ b/tools/libs/light/libxl_dm.c
> @@ -2468,6 +2468,9 @@ static void spawn_stub_launch_dm(libxl__egc *egc,
>      uint32_t dm_domid = sdss->pvqemu.guest_domid;
>      int need_qemu;
>  
> +    /* Set for out label through qmp_proxy_spawn_outcome(). */
> +    sdss->qmp_proxy_spawn.ao = ao;

I don't think that's correct. I feels like `sdss->qmp_proxy_spawn`
doesn't need to be initialised before calling spawn_qmp_proxy().

Also `qmp_proxy_spawn.ao` only need to be set before calling
libxl__spawn_spawn(), so at the same time as the rest of the
initialisation of `qmp_proxy_spawn` in spawn_qmp_proxy().


Next, about the uninitialized `ao` field:
- qmp_proxy_spawn_outcome() shouldn't use `qmp_proxy_spawn.ao`, but
  instead it should use the one available in `sdss`, that is
  `sdss->dm.spawn.ao` (The one that libxl__spawn_stub_dm() or
  spawn_stub_launch_dm() is using).
- And spawn_qmp_proxy() should also use `sdss->dm.spawn.ao` for
  STATE_AO_GC() as I don't think spawn_qmp_proxy() can expect
  `qmp_proxy_spawn` to be initialised as that's the function that
  initialise it.


Thanks,

-- 
Anthony PERARD



 


Rackspace

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