All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tools/libxc: Fix construction of HVM guests with non-default firmware
@ 2015-11-11 20:18 Andrew Cooper
  2015-11-12  8:28 ` Roger Pau Monné
  2015-11-12  9:41 ` Ian Campbell
  0 siblings, 2 replies; 7+ messages in thread
From: Andrew Cooper @ 2015-11-11 20:18 UTC (permalink / raw)
  To: Xen-devel
  Cc: Andrew Cooper, Roger Pau Monné, Ian Jackson, Ian Campbell, Wei Liu

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.

It is convenient for the ELF file to match the intended runmode rather
than the starting runmode.  As such, don't make an arbitrary restriction.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Ian Campbell <Ian.Campbell@citrix.com>
CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
CC: Roger Pau Monné <roger.pau@citrix.com>

My Xen Test Framework (which is almost ready to be formally presented on
xen-devel) uses ELF32/ELF64 for the intended runmode to make
compiling/disassembling easier.

At the point that the developer is specifying firmware_override, they are into
"just do what I tell you" territory, and can keep both pieces if they have
actually passed a broken firmware.

This change has actually regressed XenServers automated testing against
xen-upstream, which does make use of the Test Framework.
---
 tools/libxc/xc_dom_hvmloader.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/tools/libxc/xc_dom_hvmloader.c b/tools/libxc/xc_dom_hvmloader.c
index 79a3b99..0cf9887 100644
--- a/tools/libxc/xc_dom_hvmloader.c
+++ b/tools/libxc/xc_dom_hvmloader.c
@@ -107,13 +107,6 @@ static elf_errorstatus xc_dom_parse_hvm_kernel(struct xc_dom_image *dom)
         return rc;
     }
 
-    if ( !elf_32bit(elf) )
-    {
-        xc_dom_panic(dom->xch, XC_INVALID_KERNEL, "%s: ELF image is not 32bit",
-                     __func__);
-        return -EINVAL;
-    }
-
     /* parse binary and get xen meta info */
     elf_parse_binary(elf);
 
-- 
2.1.4


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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-11-12 16:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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.