aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xc_dom_elfloader.c
Commit message (Collapse)AuthorAgeFilesLines
* libelf-loader: introduce elf_load_imageStefano Stabellini2012-01-231-1/+7
| | | | | | | | | | | | | | Implement a new function, called elf_load_image, to perform the actually copy of the elf image and clearing the padding. The function is implemented as memcpy and memset when the library is built as part of the tools, but it is implemented as raw_copy_to_guest and raw_clear_guest when built as part of Xen, so that it can be safely called with an HVM style dom0. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* elf: Fix Elf64 types and structs to match the specification.Keir Fraser2011-11-161-1/+1
| | | | | | | | The layouts were actually correct, but the type names were a bit messed up. Original patch by Volker Eckert <volker.eckert@citrix.com> Signed-off-by: Keir Fraser <keir@xen.org>
* add privileged (dom0) kernel feature indicationJan Beulich2011-07-231-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | With our switching away from supporting 32-bit Dom0 operation, users complained that attempts (perhaps due to lack of knowledge of that change) to boot the no longer privileged kernel in Dom0 resulted in apparently silent failure. To make the mismatch explicit and visible, add dom0 feature flag that the kernel can set to indicate operation as dom0 is supported. Due to the way elf_xen_parse_features() worked up to now (getting fixed here), adding features indications to the old, string based ELF note would make the respective kernel unusable on older hypervisors. For that reason, a new ELF Note is being introduced that allows specifying supported features as a bit array instead (with features unknown to the hypervisor simply ignored, as now also done by elf_xen_parse_features(), whereas here unknown kernel-required features still keep the kernel [and hence VM] from booting). Introduce and use elf_note_numeric_array() to be forward compatible (or else an old hypervisor wouldn't be able to parse kernel specified features occupying more than 64 bits - thanks, Ian!). Signed-off-by: Jan Beulich <jbeulich@novell.com>
* Revert 23664:3e3c0a8be9f9Keir Fraser2011-07-081-9/+0
|
* add privileged/unprivileged kernel feature indicationJan Beulich2011-07-081-0/+9
| | | | | | | | | | | | | With our switching away from supporting 32-bit Dom0 operation, users complained that attempts (perhaps due to lack of knowledge of that change) to boot the no longer privileged kernel in Dom0 resulted in apparently silent failure. To make the mismatch explicit and visible, add feature flags that the kernel can set to indicate operation in what modes it supports. For backward compatibility, absence of both feature flags is taken to indicate a kernel that may be capable of operating in both modes. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* libxc: convert evtchn interfaces to use an opaque handle typeIan Campbell2010-12-231-2/+2
| | | | | | | | | | | | This makes the interface consistent with the changes made to the main interface in 21483:779c0ef9682c. Also fix some references to "struct xc_interface" which should have been simply "xc_interface" in tools/xenpaging, and update QEMU_TAG to pull in the corresponding qemu change. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* # HG changeset patchIan Campbell2010-08-241-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | # User Ian Campbell <ian.campbell@citrix.com> # Date 1282671421 -3600 # Node ID d1dd29a470ef1b9d2c77478a123326036dfe90bb # Parent d7a4adad9c328decbd384d87b23001aea8951b86 tools/libxc, tools/libelf: Relicense under LGPL v2.1 Relicense these two libraries under LGPL v2.1 only except where individual files already included the "or later" provision. Copyright holders have been contacted by Stephen Spector and have all agreed this change. Removed tools/libxc/ia64/aclinux.h since it appeared to be unused. There is a separate, more up to date, copy in xen/include/acpi/platform/aclinux.h which does appear to be used. Clarify the license of MiniOS privcmd.h under the same terms as other tools/include/xen-sys headers. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Stephen Spector <stephen.spector@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: eliminate static variables, use xentoollog; API changeKeir Fraser2010-05-281-27/+34
| | | | | | | | | | | | | | | | | | | | This patch eliminate the global variables in libxenctrl (used for logging and error reporting). Instead the information which was in the global variables is now in a new xc_interface* opaque structure, which xc_interface open returns instead of the raw file descriptor; furthermore, logging is done via xentoollog. There are three new parameters to xc_interface_open to control the logging, but existing callers can just pass "0" for all three to get the old behaviour. All libxc callers have been adjusted accordingly. Also update QEMU_TAG for corresponding qemu change. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libelf: Tidy up logging and remove dependency on stdio.Keir Fraser2010-05-281-2/+15
| | | | | | | | | | | libelf now permits callers to specify logging callback functions, rather than a FILE*. libelf's non-Xen callers are all libxc users, so the stdio dependency and the default logging callback function (which calls vfprintf) is now in libxc. Xen's use of libxc is unaffected in this patch. Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* Remove defunct powerpc port.Keir Fraser2008-05-081-2/+0
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86: Support loading Linux bzImage v2.08 and up.Keir Fraser2008-04-011-1/+1
| | | | | | | | | | The latest -mm kernel (2.6.25-rc3-mm1) contains v2.08 of the Linux bzImage format which embeds an ELF file in place of the raw payload allowing it to be extracted and used by the Xen domain builder. It is expected that this functionality will be put forward for 2.6.26. Signed-off-by : Ian Campbell <ijc@hellion.org.uk>
* libxc: Code format cleanups.Keir Fraser2007-02-241-150/+171
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* libxc domain builder rewrite, core bits.Emmanuel Ackaouy2007-01-251-0/+283
Signed-off-by: Gerd Hoffmann <kraxel@suse.de> --- tools/libxc/Makefile | 14 tools/libxc/xc_dom.h | 261 +++++++++++++ tools/libxc/xc_dom_binloader.c | 294 +++++++++++++++ tools/libxc/xc_dom_boot.c | 515 +++++++++++++++++++++++++++ tools/libxc/xc_dom_core.c | 773 +++++++++++++++++++++++++++++++++++++++++ tools/libxc/xc_dom_elfloader.c | 283 +++++++++++++++ tools/libxc/xc_dom_ia64.c | 118 ++++++ tools/libxc/xc_dom_powerpc64.c | 100 +++++ tools/libxc/xc_dom_x86.c | 559 +++++++++++++++++++++++++++++ 9 files changed, 2917 insertions(+)