Commit Graph
30171 Commits
Author SHA1 Message Date
Jan Beulich ae1edef1ae x86: correctly check for sub-leaf zero of leaf 7 in pv_cpuid()
Only the low 32 bits are relevant.

For consistency also change a cast on regs->eax to regs->_eax.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
2015-01-22 12:48:40 +01:00
Jan Beulich 8d050ed109 x86: don't expose XSAVES capability to PV guests
As done by the recent Linux commit b65d6e17fe ("kvm: x86: mask out
XSAVES") for KVM, we should also mask out XSAVES from what PV guests
get to see as long as we don't emulate accesses to MSR_IA32_XSS.

Actually, go beyond that: Just like for leaf 7, switch from
blacklisting to whitelisting, i.e. only allow XSAVEOPT and XSAVEC for
the time being. And do these overrides consistently for both Dom0 and
DomU-s.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
2015-01-22 12:47:56 +01:00
Andrew Cooper d9e66702fd drop redundant MAX_VIRT_CPUS bounds checks
In all 4 cases, visible in the context are bounds check against d->max_vcpus.
Domain building will ensure that d->max_vcpus never exceeds an appropriate
bound.  In the x86 case, different types of domains have different maxima for
vcpus, making the checks wrong as opposed to simply redundant.

For vpsci in ARM, 'vcpuid' is an unsigned type so could never be less than 0.

For the common changes to do_{,compat}_vcpu_op(), these changes do result in a
guest visible change, but only in so far as certain invalid vcpu ids will now
fail with -ENOENT rather than -EINVAL.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2015-01-22 12:46:43 +01:00
Andrew Cooper 84f5ec57ae sched/arinc653: remove MAX_VIRT_CPUS bounds check
The arinc653 interface is capable of specifying a domain in the schedule (from
the toolstack) before the domain itself exists, or is present in the cpupool
(The domain is identified by UUID rather than domid). As a result, the
schedule can't be validated at this point.

The vcpu_id from userspace is only ever used to compare against a list of real
vcpus available to the scheduler, which prevents ill-specified vcpus from
actually being scheduled.

Remove the MAX_VIRT_CPUS test, as it is not an appropriate bound for vcpu_id.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by Robert VanVossen <robert.vanvossen@dornerworks.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
2015-01-22 12:46:10 +01:00
Andrew Cooper b525126349 evtchn: reduce the size of the poll_mask where possible
Use domain_max_vcpus(d) in preference to MAX_VIRT_CPUS when allocating the
poll mask.  This allows x86 HVM guests to have a poll mask of 128 bits rather
than 8k bits.

While changing this, use xzalloc_array() in preference to xmalloc_array() to
avoid needing the subsequent call to bitmap_zero().

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
2015-01-22 12:45:13 +01:00
Andrew Cooper 2f3dd9c8c6 introduce domain_max_vcpus() helper and implement per arch
This allows the common XEN_DOMCTL_max_vcpus handler to lose some x86-specific
architecture knowledge.

It turns out that Xen had the same magic number twice in-tree with different
names (HVM_MAX_VCPUS and MAX_HVM_VCPUS).  This removes all use of
MAX_HVM_VCPUS, and x86 uses HVM_MAX_VCPUS from the public headers.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
2015-01-22 12:44:03 +01:00
Jan Beulich 81f559e979 make error codes a formal part of the ABI
Now that we have two cases where patches against hvmloader got
submitted needing to include the hypervisor's errno.h (for the host's
system header not necessarily reflecting the correct numbers), take
this as a strong sign that we need to make the error return values part
of the hypervisor ABI (which de-fact they've always been).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2015-01-22 12:41:50 +01:00
Jan Beulich 7106c691a6 re-order struct domain fields
... to reduce padding holes.

I also wonder whether having independent spin locks side by side is
really a good thing cache-line-bouncing-wise.

Also change suspend_evtchn's type to evtchn_port_t.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Tim Deegan <tim@xen.org>
2015-01-20 10:47:21 +01:00
Jan Beulich 209dd7e944 x86: latch current->domain in do_physdev_op()
... and drop global latching of current, as being needed more than once
only in PHYSDEVOP_set_iopl and PHYSDEVOP_set_iobitmap, and not at all
in all other cases.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
2015-01-20 10:46:19 +01:00
Jan Beulich 0e5e324db9 x86: slightly simplify PHYSDEVOP_pirq_eoi_gmfn_v* handling
We don't really need the MFN in more than one place (after dropping
mfn_to_page() translations where we know the result already), so no
need to have a local variable for it.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
2015-01-20 10:45:01 +01:00
Jan Beulich 7991cca9b3 physdev: hide compatibility definitions for new enough interface version
There's no point in continuing to expose those.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2015-01-20 10:43:52 +01:00
Andrew Cooper 09aa4759fa xsm/evtchn: never pretend to have successfully created a Xen event channel
Xen event channels are not internal resources.  They still have one end in a
domain, and are created at the request of privileged domains.  This logic
which "successfully" creates a Xen event channel opens up undesirable failure
cases with ill-specified XSM policies.

If a domain is permitted to create ioreq servers or memevent listeners, but
not to create event channels, the ioreq/memevent creation will succeed but
attempting to bind the returned event channel will fail without any indication
of a permission error.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
2015-01-20 10:42:26 +01:00
Andrew Cooper edfd64ea79 x86/cpuid: correct parameter types for cpuid_count()
About half of the cpuid space has the top bit of op set, and op it always
specified with unsigned integers.  There are no problematic uses in tree at
the moment.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
2015-01-20 10:41:18 +01:00
Andrew Cooper a19ffcaf9e xfree() can tolerate NULL pointers
Replace instances of "if ( p ) xfree(p)" with just "xfree(p)"

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2015-01-20 10:40:32 +01:00
Anthony PERARD 260dfd3968 libxl: Avoid returning empty path from libxl_console_get_tty
This could happen if xenconsoled have not populate the xenstore key yet.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2015-01-19 17:21:31 +00:00
Wei Liu 0e560dfc48 libxl: check HVM direct boot parameters
We should honour -initrd and -append iff -kernel is specified, because
that's how QEMU works.

Check direct boot parameters in libxl__domain_build_info_setdefault.
Return failure if kernel is missing while ramdisk (-initrd) and / or
cmdline (-append) is present.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Chunyan Liu <cyliu@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2015-01-19 17:21:27 +00:00
Julien Grall be03989599 tools/configure: Check if pixman is present on the system when building QEMU
QEMU upstream requires the use of pixman. When pixman is not present the
system, the configure of QEMU will fail with:

ERROR: pixman not present. Your options:
         (1) Preferred: Install the pixman devel package (any recent
             distro should have packages as Xorg needs pixman too).
         (2) Fetch the pixman submodule, using:
             git submodule update --init pixman

I think we can use by default the version on the system. So check it
a Xen configuration time to avoid a build issue later.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
[ ijc -- reran autogen.sh, adjusted comment ]
2015-01-19 16:09:57 +00:00
Julien Grall 499cb19b12 tools/configure: Check if Glib is present only when building QEMU
Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
[ ijc -- reran autogen.sh ]
2015-01-19 16:07:41 +00:00
Julien Grall 96fcbd0599 xen/arm: vgic: Rename nr_lines into nr_spis
The field nr_lines in the arch_domain vgic structure contains the number of
SPIs for the emulated GIC. Using the nr_lines make confusion with the GIC
code, where it means the number of IRQs. This can lead to coding error.

Also introduce vgic_num_irqs to get the number of IRQ handled by the emulated
GIC.

Finally drop the initialization of nr_spis in both gicv2v_init and gicv3_init
as it's already initialized in vgic common code.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2015-01-19 15:41:23 +00:00
Wei Liu babeca3284 libxl: provide xenlight.pc
A pkg-config file for libxl. It also contains two variables
(xenfirmwaredir and libexec_bin) so that tools that are very keen on
knowing the locations of Xen binaries (say, libvirt) can use them to
determine the location of the binaries.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- ran autogen.sh ]
2015-01-19 15:32:17 +00:00
Jim Fehlig 8ff0798036 Install libxlutil.h
libxlutil.{a,so} are installed, but not the corresponding header
file.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Reviewed-by: Dario Faggioli <dario.faggioli@citrix.com>
2015-01-19 15:26:49 +00:00
Jan Beulich cc46f2a679 correct hypervisor version
-unstable doesn't use the .0 part added by commit 0082626f35.
2015-01-19 16:08:41 +01:00
Andrew Cooper 1d4290342f hypercall: update vcpu_op to take an unsigned vcpuid
This has no guest-visible change, but makes the Hypervisor side bounds
checking more simple.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2015-01-19 12:19:11 +01:00
Paul Durrant 04447f4453 x86/hvm: add per-vcpu evtchn upcalls
HVM guests have always been confined to using the domain callback
via (see HVM_PARAM_CALLBACK_IRQ) to receive event notifications.
This is usually an IOAPIC vector and is only used if the event
channel is bound to vcpu 0.

PVHVM Linux uses a pre-defined interrupt vector for the event
channel upcall, set using HVM_PARAM_CALLBACK_IRQ by ORing in a
special bit (bit 57) into the value (see params.h). However, it
does not assert the interrupt via the emulated local APIC.

This mechanism is not suitable in the general case since Windows
(and potentially other OSes) because they:

- cannot guarantee the same vector for all VCPUs
- do require the upcall to be asserted via the local APIC

This patch adds a new HVM op allowing a guest to specify a local
APIC vector to use as an upcall notification for a specific vcpu
therefore coping with the case of differing vector numbers.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
2015-01-19 12:18:03 +01:00
Andrew Cooper 2eddc5d2dc x86/minios: remove more vestigial remnants of SUPERVISOR_MODE_KERNEL
MiniOS has never advertised support for supervisor_mode_kernel, and the
feature was only ever implemented for 32bit Xen.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2015-01-19 12:17:24 +01:00
Andrew Cooper 433468d3b0 hvm/hpet: correctly gate the virtual HPET on HVM_PARAM_HPET_ENABLE
c/s 3f8e22de7 "x86 hvm: Allow HPET to be configured as a per-domain config
option" introduced the parameter to conditionally enable the HPET.

However, having the check in hpet_range() does not have the intended effect.
As currently implemented, when the HPET is disabled, the range is not claimed
and an ioreq is forwarded to qemu, which implements an HPET itself.

Properly disable the HPET by always claiming the range, dropping writes and
reading ~0.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
2015-01-19 12:16:44 +01:00
Jan Beulich 66500abc8d kexec: fix some types
crashinfo_maxaddr can/will be a 64-bit type, hence passing it to fls()
is wrong.

crashinfo_maxaddr_bits, otoh, doesn't need to be a paddr_t, and can
additionally be __initdata.

struct xen_kexec_reserve's start field - representing a physical
address - ought to have respective type.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: David Vrabel <david.vrabel@citrix.com>
2015-01-19 12:01:18 +01:00
Jan Beulich ad34d0656f evtchn: simplify sending of notifications
The trivial wrapper evtchn_set_pending() is pretty pointless, as it
only serves to invoke another wrapper evtchn_port_set_pending(). In
turn, the latter is kind of inconsistent with its siblings in that is
takes a struct vcpu * rather than a struct domain * - adjusting this
allows for more efficient code in the majority of cases.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: David Vrabel <david.vrabel@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
2015-01-19 12:00:08 +01:00
Jan Beulich 76d4ff26d9 common/memory: fix an XSM error path
XENMEM_{in,de}crease_reservation as well as XENMEM_populate_physmap
return the extent at which failure was detected, not error indicators.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Acked-by: Tim Deegan <tim@xen.org>
2015-01-19 11:59:05 +01:00
Tim Deegan 0d28790620 x86/mm: reunite nestedp2m_lock with its comment.
Signed-off-by: Tim Deegan <tim@xen.org>
2015-01-15 17:51:21 +00:00
Andrew Cooper 8fabafd6de x86/viridian: do not leak page refs and mappings if the host tsc is unstable
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Coverity-ID: 1264360
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
2015-01-15 17:56:25 +01:00
Julien Grall 868586fd12 xen/arm: Update documentation in the public header arch-arm.h
Minor updates to the documentation in xen/include/public/arch-arm.h:
    - Comments coding style fix
    - Typoes
    - Update the list of supported hypercalls by ARM
    - Remove unnecessary comment about 64bit.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Keir Fraser <keir@xen.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- fixed spelling of unnecessary, corrected aarch into aarch32 ]
2015-01-15 14:00:56 +00:00
Ian Campbell f6bcc03508 tools: remove blktap1
Now that it is unhooked we can just remove it.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2015-01-15 13:54:10 +00:00
Ian Campbell d97402376e tools: unhook blktap1 from the build and remove all references to it
This was disabled by default in Xen 4.4. Since xend has now been
removed from the tree I don't believe anything is using it.

We need to pass an explicit CONFIG_BLKTAP1=n to qemu-xen-traditional
otherwise it defaults to y and doesn't build.

This patch does all the ground work, the tools/blktap directory will
be removed in the next (*huge*) patch.

Note that this has no impact on blktap2, which is what libxl supports.
blktap1 was only usable via xend which has already been removed.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2015-01-15 13:53:55 +00:00
Ian Campbell 908e12099a xen: arm: wait 1000ms for a CPU to come up, instead of forever
Otherwise continue without it, which is preferable to the current
infinite hang.

Slightly tweak the grammar of a comment in the same function.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Reviewed-by: Julien Grall <julien.grall@linaro.org>
2015-01-15 13:52:40 +00:00
Ian Campbell f62b0ef8fe xen: arm: enable perf counters
As well as the existing common perf counters add a bunch of ARM
specifics, including the various trap types, vuart/vgic/vtimer
accesses and different types of interrupt.

Adjust the common code so that the columns line up again, not sure
when/where this went wrong.

This is mostly the set of stuff I happened to be interested in, it can
be made more (or less) fine grained as the need arises.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Reviewed-by: Julien Grall <julien.grall@linaro.org>
2015-01-15 13:51:57 +00:00
Julien Grall 770ca104b5 xen/arm: Blacklist the memory mapped timer (armv7-timer-mem)
Some platform (such as the VFP Base AEMv8 model) has a memory mapped
timer. We don't want DOM0 use this timer rather than the generic ARM
timer. So blacklist it for all platforms.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2015-01-15 13:49:17 +00:00
Julien Grall ee0941e83c xen/arm: grant-table: Increased the initial number of grant frame to 4
When a domain is created on ARM, the grant table code initialized one
grant frame. With a basic load (i.e disk usage), Xen is quickly trying
to expand the number of frames:

(XEN) grant_table.c:1305:d2v0 Expanding dom (2) grant table from (1) to (2) frames.
(XEN) grant_table.c:1305:d2v0 Expanding dom (2) grant table from (2) to (3) frames.
(XEN) grant_table.c:311:d0v0 Increased maptrack size to 2 frames
(XEN) grant_table.c:311:d0v0 Increased maptrack size to 3 frames

The x86 code is initialied 4 frames (I didn't find the exact reason). I
think we could use the same default value.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2015-01-15 13:44:41 +00:00
Julien Grall f23952fbe4 xen/arm: Remove the define INVALID_GFN from arch-arm/grant_table.h
The define INVALID_GFN is misplaced in arch-arm/grant_table.h and is
never used in neither in ARM nor in the common code.

Therefore we can safely remove it.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2015-01-15 13:44:41 +00:00
Jan Beulich d6af4e1db6 Revert "x86/HVM: make hvm_efer_valid() honor guest features"
This reverts commit 07a6aa869b. Some HVM
guests don't survive the new checking (EFER=0x901 reported invalid).
2015-01-14 11:53:28 +01:00
Martin Lucina eed8d774ce Mini-OS: netfront: Fix rx ring starvation in network_rx
In network_rx() we must push the same amount of requests back onto the
ring in the second loop that we consumed in the first loop. Otherwise
the ring will eventually starve itself of free request slots and no
packets will be delivered.

Further, we make the HAVE_LIBC codepath clearer to follow by removing
the "some" variable from the for loop initialisation and conditions.

Signed-off-by: Martin Lucina <martin@lucina.net>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2015-01-13 10:40:28 +00:00
Alexandra Sandulescu 762c08496e tools: xl: refactor code to parse network device options
This patch removes duplicate code in /tools/libxl/xl_cmdimpl.c by
adding parse_nic_config function. This function parses configuration
data and adds the information into libxl_device_nic struct. It is
called in both main_networkattach and parse_config_data functions
to replace duplicate code.

Signed-off-by: Alexandra Sandulescu <alecsandra.sandulescu@gmail.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
2015-01-12 17:37:28 +00:00
Uma Sharma c3d8888dac tools/xl: Call init function for libxl_bitmap
This patch calls init function for libxl_bitmap in
main_cpupoolnumasplit() and vcpuset()
tools/libxl/xl_cmdimpl.c
IDL generated libxl types should be used only after calling the init
function even if the variable is simply being passed by reference as
an output parameter to a libxl function

Signed-off-by: Uma Sharma <uma.sharma523@gmail.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
--
2015-01-12 17:35:56 +00:00
Uma Sharma 06a4ef1a4d tools/xl: Call init function for libxl_domain_sched_params
This patch calls init function for libxl_domain_sched_params before
passing it as reference to sched_domain_get() function in
tools/libxl/xl_cmdimpl.c
IDL generated libxl types should be used only after calling the init
function even if the variable is simply being passed by reference as
an output parameter to a libxl function

Signed-off-by: Uma Sharma <uma.sharma523@gmail.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
--
2015-01-12 17:35:44 +00:00
Wei Liu cb3cd62589 libxl: add emacs local variables in libxl_{x86, arm}.c
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Dario Faggioli <dario.faggioli@citrix.com>
Cc: Elena Ufimtseva <ufimtseva@gmail.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2015-01-12 17:11:20 +00:00
Andrew Cooper 9a7078623d tools/misc: Cleanup makefile
The existing makefile was awkward with needing to express conditional
inclusion for both the build and install rules, and contained both split and
unsplit long lines.

The INSTALL_* rules now contain the conditional inclusion information, while
the TARGET_* rules generate the build list from the complete install list,
less the minority of scripts which simply need copying into place.  Comments
are introduces to aid clarity.

In addition, collect the CFLAGS expressions, remove the unreferenced and empty
HDRS list, and restrict the libxc internals build fix to the offending
binaries.

No functional change as a result of this patch, but it is rather more simple
to add or remove utilities.

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>
Acked-by: Wei Liu <wei.liu2@citrix.com>
2015-01-12 16:12:51 +00:00
Euan Harris 1166ecf781 tools/Rules.mk: Don't optimize debug builds; add macro debugging information
Tools debug builds are built with optimization level -O1, inherited from
the CFLAGS definition in StdGNU.mk.   Optimizations confuse the debugger,
and the comment justifying -O1 in StdGNU.mk should not apply for a
userspace library.   Disable optimization by appending -O0 to CFLAGS,
which overrides the -O1 flag specified earlier.

Also specify -g3, to add macro debugging information which allows
gdb to expand macro invocations.   This is useful as libxl uses many
non-trivial macros.

Signed-off-by: Euan Harris <euan.harris@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- inserted a clarifying "enable" into comment ]
2015-01-12 16:10:51 +00:00
Julien Grall 7070eec417 libxl: Don't ignore error when we fail to give access to ioport/irq/iomem
If we fail to give the access, the domain will unlikely work correctly.
So we should bail out at the first error.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
2015-01-12 16:08:58 +00:00
Julien Grall 2dabd88b12 libxl/arm: Correctly spelled FDT_ERR_* in a comment
Signed-off-by: Julien Grall <julien.grall@linaro.org>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2015-01-12 16:08:36 +00:00
Wei Liu a0a2dc45f1 libxl, hotplug/Linux: default to phy backend for raw format file, take 2
This patch resurrects 11a63a166. The previous patch had a bug that
wrong "physical-device" was written to xenstore causing block script
execution fail. This patch fixes that problem.

Following configurations have been tested:

1. Raw file and PV
2. Raw file and HVM
3. Block device and PV
4. Block device and HVM

Creation / destruction / local migration all worked.

Original commit message from 11a63a166:

Modify libxl and hotplug script to allow raw format file to use phy
backend.

The block script now tests the path and determine the actual type of
file (block device or regular file) then use the actual type to
determine which branch to run.

With these changes, plus the current ordering of backend preference (phy
> qdisk > tap), we will use phy backend for raw format file by default.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2015-01-12 16:07:35 +00:00