remove ia64

It retains IA64-specific bits in code imported from elsewhere (e.g.
ACPI, EFI) as well as in the public headers.

It also doesn't touch the tools, mini-os, and unmodified_drivers
sub-trees.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
autoconf: fix python-dev detection on old python versions

Replaced the use of python-config (that is only present in Python >= 2.5.x)
with the distutils python module.

Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>
Cc: Zhang, Yang Z <yang.z.zhang@intel.com>
Tested-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
docs: clarify documentation for the the dom0_mem command line option

This addresses Ian C's comments on v1 of a previous patch (which
was applied instead of v2).

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/vtpm: use LDLIBS to pass -lgmp

Linking tpmd will fail with recent toolchains because -lgmp is passed
via LDFLAGS instead of LDLIBS. With this change -lgpm is placed at the
end of the gcc cmdline and linking tpmd succeeds again.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools: specify datadir for qemu-xen build to fix firmware loading

qemu-xen does currently not find the firmware files, such as
vgabios-cirrus.bin. The reason is that qemu-xen uses the default prefix
/usr/local. Use SHAREDIR/qemu-xen as directory so that it can coexist
with qemu-traditional which is installed in SHAREDIR/xen/qemu.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
libxl: log device model arguments to aid debugging

At the moment the only easy way to get at these is to strace xl.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
libxl: Document API and ABI compatibility guarantees.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
config/Tools.mk: remove unused IP

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Roger Pau Monne <roger.pau@entel.upc.edu>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
autoconf: change AX_ARG_{DISABLE/ENABLE}_AND_EXPORT to make more sense

Change disable/enable feature macros to have a more significative name
of what they actually do, to avoid confusions.

New macros have the following names:

AX_ARG_DEFAULT_ENABLE: feature is enabled by default, provides the
--disable-{feature} option to disable it.

AX_ARG_DEFAULT_DISABLE: feature is disabled by default, provides the
--enable-{feature] option to enable it.

Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
libxl: Pass actual RAM amount to qemu-xen

QEMU upstream need to kown the amount of RAM given to a guest. This patch give
the correct value.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/blktap: reorder MEMSHR_DIR to fix CFLAGS

In blktap2 MEMSHR_DIR is used before it is set. This removes the
required -D_GNU_SOURCE from CFLAGS, its used as option for -I
Fix this by moving memshr related flags to the place where its actually
used.
The failure is a missing O_DIRECT define.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
tools/libfsimage: include Rules.mk first

Move the inclusion of Rules.mk up so that things like CFLAGS get initialized
properly. Currently only zfs appends CFLAGS. If CFLAGS get reset by Rules.mk
the private settings are lost and compilation of zfs support fails.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
QEMU_TAG update
PV-GRUB: Check for errors when applying patches to GRUB

We want to ensure that patches apply cleanly without rejects. Bail if
patch returns a non-zero exit code.

Signed-off-by: Matt Wilson <msw@amazon.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
PV-GRUB: add support for ext4

This patch adds support for ext4 to the GRUB tree used to build PV-GRUB.
The original patch is taken from the Fedora GRUB package in this commit:
http://pkgs.fedoraproject.org/gitweb/?p=grub.git;a=commitdiff;h=32bf414af04d377055957167aac7dedec691ef57

Signed-off-by: Matt Wilson <msw@amazon.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
PV-GRUB: add support for btrfs

This patch adds btrfs support to the GRUB tree used to build PV-GRUB.
The original patch is from Gentoo:
https://bugs.gentoo.org/show_bug.cgi?id=283637

Signed-off-by: Matt Wilson <msw@amazon.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
libxl: Move bdf parsing into libxlu

Config parsing functions do not properly belong in libxl.  Move them into
libxlu so that others can use them or not as they see fit.

No functional changes.  One side-effect was making public a private libxl
utility function which just set the elements of a structure from the  function
arguments passed in.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
xl, libxl: Add per-device and global permissive config options for pci passthrough

By default pciback only allows PV guests to write "known safe" values into
PCI config space.  But many devices require writes to other areas of config
space in order to operate properly.  One way to do that is with the "quirks"
interface, which specifies areas known safe to a particular device; the
other way is to mark a device as "permissive", which tells pciback to allow
all config space writes for that domain and device.

This adds a "permissive" flag to the libxl_pci struct and teaches libxl how
to write the appropriate value into sysfs to enable the permissive feature for
devices being passed through.  It also adds the permissive config options either
on a per-device basis, or as a global option in the xl command-line.

Because of the potential stability and security implications of enabling
permissive, the flag is left off by default.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
libxl: fixup error handling in libxl_send_trigger

xc_domain_send_trigger returns -1 and sets errno on failure so use
LIBXL__LOG_ERRNO not LIBXL__LOG_ERRNOVAL(rc).

Change the default case of the switch to set rc=-1,errno=EINVAL too.

Also we weren't actually returning the error code we'd decided on.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
autoconf: check for as86, ld86, bcc and iasl

Check for this tools, and set the proper paths on config/Tool.mk.

Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>