From: Simon Gaiser <simon@invisiblethingslab.com>
To: xen-devel@lists.xenproject.org
Cc: "Wei Liu" <wei.liu2@citrix.com>,
"Ian Jackson" <ian.jackson@eu.citrix.com>,
"Roger Pau Monné" <roger.pau@citrix.com>
Subject: libx[lc]: Improve error reporting for invalid kernel images
Date: Thu, 8 Feb 2018 22:49:07 +0100 [thread overview]
Message-ID: <20180208214910.10699-1-simon@invisiblethingslab.com> (raw)
Hi,
this series cleans up the error reporting in case a invalid kernel image
is supplied. For example if the user tries to boot a pre 4.11 Linux in
PVH mode.
Commit 96edb111dd ("libxc: panic when trying to create a PVH guest
without kernel support") already improved the situation:
xc: error: panic: xc_dom_elfloader.c:66: xc_dom_guest_type: image not capable of booting inside a HVM container: Invalid kernel
xc: error: panic: xc_dom_core.c:734: xc_dom_set_arch_hooks: not found (type xen-3.0-unknown): Invalid kernel
xc: error: panic: xc_dom_core.c:936: xc_dom_mem_init: arch hooks not set: Internal error
libxl: error: libxl_dom.c:729:libxl__build_dom: xc_dom_mem_init failed: No such file or directory
libxl: error: libxl_create.c:1246:domcreate_rebuild_done: Domain 3:cannot (re-)build domain: -3
But you still see that the domain build don't fails immediately in
xc_dom_parse_elf_kernel() but only later in xc_dom_set_arch_hooks().
After fixing this there was still an unrelated errno string logged.
With this series the error reporting is cleaned up:
xc: error: panic: xc_dom_elfloader.c:66: xc_dom_guest_type: image not capable of booting inside a HVM container: Invalid kernel
libxl: error: libxl_dom.c:718:libxl__build_dom: xc_dom_parse_image failed
libxl: error: libxl_create.c:1246:domcreate_rebuild_done: Domain 4:cannot (re-)build domain: -3
For some previous discussion see [1].
Simon
[1]: https://lists.xenproject.org/archives/html/xen-devel/2018-01/msg01675.html
Simon Gaiser (3):
libxc: Cleanup xc_dom_parse_elf_kernel()'s return value
libxl: Improve logging in libxl__build_dom()
libxc: xc_dom_parse_elf_kernel: Return error for invalid kernel images
tools/libxc/xc_dom_elfloader.c | 24 +++++++++++++-----------
tools/libxl/libxl_dom.c | 2 +-
2 files changed, 14 insertions(+), 12 deletions(-)
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next reply other threads:[~2018-02-08 21:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-08 21:49 Simon Gaiser [this message]
2018-02-08 21:49 ` [PATCH 1/3] libxc: Cleanup xc_dom_parse_elf_kernel()'s return value Simon Gaiser
2018-02-09 12:00 ` Roger Pau Monné
2018-02-08 21:49 ` [PATCH 2/3] libxl: Improve logging in libxl__build_dom() Simon Gaiser
2018-02-09 12:08 ` Roger Pau Monné
2018-02-08 21:49 ` [PATCH 3/3] libxc: xc_dom_parse_elf_kernel: Return error for invalid kernel images Simon Gaiser
2018-02-09 12:19 ` Roger Pau Monné
2018-02-12 14:51 ` libx[lc]: Improve error reporting " Wei Liu
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=20180208214910.10699-1-simon@invisiblethingslab.com \
--to=simon@invisiblethingslab.com \
--cc=ian.jackson@eu.citrix.com \
--cc=roger.pau@citrix.com \
--cc=wei.liu2@citrix.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).