All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jane Malalane <jane.malalane@citrix.com>,
	Xen-devel <xen-devel@lists.xenproject.org>
Cc: Ian Jackson <iwj@xenproject.org>, Wei Liu <wl@xen.org>,
	Juergen Gross <jgross@suse.com>
Subject: Re: [PATCH] libs/guest: Move the guest ABI check earlier into xc_dom_parse_image()
Date: Wed, 18 Aug 2021 10:29:28 +0100	[thread overview]
Message-ID: <51d8928b-34cc-d74c-4833-a7124d61a7cb@citrix.com> (raw)
In-Reply-To: <20210817151924.6674-1-jane.malalane@citrix.com>

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@citrix.com>
> Signed-off-by: Jane Malalane <jane.malalane@citrix.com>

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

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



  reply	other threads:[~2021-08-18  9:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-17 15:19 [PATCH] libs/guest: Move the guest ABI check earlier into xc_dom_parse_image() Jane Malalane
2021-08-18  9:29 ` Andrew Cooper [this message]
2021-08-19 17:26   ` Ian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51d8928b-34cc-d74c-4833-a7124d61a7cb@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=iwj@xenproject.org \
    --cc=jane.malalane@citrix.com \
    --cc=jgross@suse.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.