All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
	Xen-devel <xen-devel@lists.xen.org>
Cc: "Wei Liu" <wei.liu2@citrix.com>,
	"Ian Jackson" <Ian.Jackson@eu.citrix.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: [PATCH] tools/libxc: Fix construction of HVM guests with non-default firmware
Date: Thu, 12 Nov 2015 16:09:25 +0000	[thread overview]
Message-ID: <1447344565.18450.77.camel@citrix.com> (raw)
In-Reply-To: <5644B809.4010401@citrix.com>

On Thu, 2015-11-12 at 16:02 +0000, Andrew Cooper wrote:
> On 12/11/15 12:47, Ian Campbell wrote:
> > On Thu, 2015-11-12 at 12:37 +0000, Andrew Cooper wrote:
> > > On 12/11/15 09:41, Ian Campbell wrote:
> > > > On Wed, 2015-11-11 at 20:18 +0000, Andrew Cooper wrote:
> > > > > c/s 1ee15d7 "libxl: switch HVM domain building to use xc_dom_*
> > > > > helpers"
> > > > > introduced a regression building HVM domains in combination with
> > > > > the
> > > > > libxl
> > > > > "firmware_override=" option.
> > > > > 
> > > > > The older HVM building code (now removed) had no 32bit ELF check,
> > > > > so
> > > > > would
> > > > > happily load ELF64 images which contained a stub to switch into
> > > > > long
> > > > > mode.
> > > > IOW a ELF64 with 32-bit code at its entry point? Is that entry
> > > > point
> > > > the
> > > > ELF entry point or the special Xen entry point located via the
> > > > notes?
> > > > 
> > > > I think you likely mean the latter, in which case I'm ok with this
> > > > change
> > > > if that entry point is explicitly documented to be 32-bit
> > > > irrespective
> > > > of
> > > > the containing ELF file (either the commit message should mention
> > > > this
> > > > is 
> > > > already the case or the patch should update the docs to make it
> > > > so).
> > > I mean the former.  This has nothing to do with DMLite guests, so no
> > > elfnotes are involved.
> > > 
> > > I realise that strictly speaking the elf check should
> > > match.  However,
> > > it always used to work, and is sufficiently convenient for
> > > development
> > > purposes that I feel the check is more problematic than helpful. 
> > > (Postprocessing the linked binary from 64bit to 32bit elf is an extra
> > > step which also makes it harder to disassemble.)
> > An ELF file which says it is class ELF32 but has 64bit code at the
> > entry
> > point is IMHO malformed.
> > 
> > I think that the fact this used to work is a misfeature, however
> > convenient
> > you may have found it.
> > 
> > Kernels which wish to do this should IMHO do as Xen does and have a
> > mkelf32.c step. You can still run gdb or whatever using the original
> > ELF
> > file.
> 
> It turns out that
> 
> OUTPUT_FORMAT("elf32-x86-64")
> 
> is a thing for linker scripts.
> 
> I have updated the framework to use that for 64bit hvm tests, and
> everything appears to be working.

Great. I shall consider this patch withdrawn then.

Thanks for letting us know.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

      reply	other threads:[~2015-11-12 16:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-11 20:18 [PATCH] tools/libxc: Fix construction of HVM guests with non-default firmware Andrew Cooper
2015-11-12  8:28 ` Roger Pau Monné
2015-11-12  9:41 ` Ian Campbell
2015-11-12 12:37   ` Andrew Cooper
2015-11-12 12:47     ` Ian Campbell
2015-11-12 16:02       ` Andrew Cooper
2015-11-12 16:09         ` Ian Campbell [this message]

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=1447344565.18450.77.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.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.