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

Re: [PATCH] libs/guest: Move the guest ABI check earlier into xc_dom_parse_image()


  • To: Jane Malalane <jane.malalane@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Wed, 18 Aug 2021 10:29:28 +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-SenderADCheck; bh=ZOtWLspargJ1NTS/u4DojVlB4ecGVazEMObjBACD55g=; b=IXVeSVnSV2ngn5RSw6owg2HZ+C9Q8oWcdJDCAOpSW/svPfV8dy2/FnbdhikRIj+VzwZhhPQ2x/+oIvFQEsjTj1D1xvPEs5SyxmP7tWmzf6R3IYyH+22MmPBte2SMMwZW6wpe/1XpTWx5UXqGXColOlmyqXzPeMzczeia3P4myk93HYeFvjjlUbbxKCaADoCaRWVg+Kwn/EYtU0q7f5+rnJhW+RwtADWpqoVEVFBdcdhHX6YJdLpogG+FdA2VwX/jjVu388QIRG9NQocuXWpyxQ0mKqTYutV9lo4baBshUAxyl+c9uPZ7l0fxZfC5L3LH7K2Mpw8P1n2ef5ldGvtiIQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UGM2WtPJeibjVC41XXfUJ668eNpuQwVqtrrSNsByW44dPiEW75GEoM0ZyK4+zK3+TiX1olyERHiO/OKTdHiGvJX3g8T/zET+1ePc+OgByyuvrZINtn6LUvGZUO77OTtHMknDbgmqt9c6SJDUqDwAbvumqxEeut7jdAbT8CVJd9eCTMM+kdVlygCW2f4ZjbZUliEM4Fs/ERr0X07jGgbDvQRdTdwYL9xwjEByRwnBO+ZNoVECODGzsj7nI2fwVp4P2wWZhz538jNiv5JgfxKpZtNLnKN99iagmIoJS72LP36asYUZZi0WUp4+CULGTXbnTdMyhMuyVbM3J2TOxsJJdg==
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>
  • Delivery-date: Wed, 18 Aug 2021 09:29:49 +0000
  • Ironport-hdrordr: A9a23:IBr6k6nNgBbxZi9KBEwOVm8lZjXpDfLU3DAbv31ZSRFFG/FwWf rPoB1p726PtN9xYgBYpTnuAtjlfZqxz/BICMwqTNWftWrdyQ2VxeNZnOzfKlTbckXDH6xmpM RdmsNFebjN5C1B/L3HCWeDcurJ47G8nZxB2o/loEuEWmxRAZ1I3kNcJyy1KE15XiFKCJY1fa Dsm/av3wDQAUj+z6+AakUtbqz4vtXO0Kv8ZxQLHQQq5WC15g+V1A==
  • Ironport-sdr: sXVKpHVr8ELEqU/xHB5FgUn9U6CF7vt8ZuquoJxHby3axJKnPlWHzbyUzG5JnMFEU9KFupxZ17 IuI4MSH4FWufZZ3BqaYuBKoRmY3+kW+eoBL9XxCJ9G8bMDX8CO6qD70VtPLzihmtQVMjtic5Fp /E6G7qzYtUm6dYbkDN+33y/75G14Msd0r2z+4mEI9+5LF6PQ4g6pYQFS46vhols3jBKZlSDlQL LsayTA+28lU50Bert5uZPD+0/nZ5Oj1hg4uXXzXGYOeWROUUvk3Nw3SPeNxhHsgouPxTjDLXcU T3+ayaloyWsohjxZPZw0y9lk
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 17/08/2021 16:19, Jane Malalane wrote:
> Xen may not support 32-bit PV guest for a number of reasons (lack of
> CONFIG_PV32, explicit pv=no-32 command line argument, or implicitly
> due to CET being enabled) and advertises this to the toolstack via the
> absence of xen-3.0-x86_32p ABI.
>
> Currently, when trying to boot a 32-bit PV guest, the ABI check is too
> late and the build explodes in the following manner yielding an
> unhelpful error message:
>
>   xc: error: panic: xg_dom_boot.c:121: xc_dom_boot_mem_init: can't allocate 
> low memory for domain: Out of memory
>   libxl: error: libxl_dom.c:586:libxl__build_dom: xc_dom_boot_mem_init 
> failed: Operation not supported
>   libxl: error: libxl_create.c:1573:domcreate_rebuild_done: Domain 1:cannot 
> (re-)build domain: -3
>   libxl: error: libxl_domain.c:1182:libxl__destroy_domid: Domain 
> 1:Non-existant domain
>   libxl: error: libxl_domain.c:1136:domain_destroy_callback: Domain 1:Unable 
> to destroy guest
>   libxl: error: libxl_domain.c:1063:domain_destroy_cb: Domain 1:Destruction 
> of domain failed
>
> Move the ABI check earlier into xc_dom_parse_image() along with other
> ELF-note feature checks.  With this adjustment, it now looks like
> this:
>
>   xc: error: panic: xg_dom_boot.c:88: xc_dom_compat_check: guest type 
> xen-3.0-x86_32p not supported by xen kernel, sorry: Invalid kernel
>   libxl: error: libxl_dom.c:571:libxl__build_dom: xc_dom_parse_image failed
>   domainbuilder: detail: xc_dom_release: called
>   libxl: error: libxl_create.c:1573:domcreate_rebuild_done: Domain 11:cannot 
> (re-)build domain: -3
>   libxl: error: libxl_domain.c:1182:libxl__destroy_domid: Domain 
> 11:Non-existant domain
>   libxl: error: libxl_domain.c:1136:domain_destroy_callback: Domain 11:Unable 
> to destroy guest
>   libxl: error: libxl_domain.c:1063:domain_destroy_cb: Domain 11:Destruction 
> of domain failed
>
> Suggested-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Signed-off-by: Jane Malalane <jane.malalane@xxxxxxxxxx>

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

The net behaviour of `xl create` is still not great (the -3 in
particular is ESRCH looking for qemu which isn't remotely relevant), but
at least with this change, you get "guest type xen-3.0-x86_32p not
supported by xen" out of libxc which is the root cause of the failure.

~Andrew




 


Rackspace

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