]> xenbits.xensource.com Git - xen.git/log
xen.git
10 years agoxen/arm: dump guest stack even if not the current VCPU
Frediano Ziglio [Thu, 23 Oct 2014 16:18:52 +0000 (17:18 +0100)]
xen/arm: dump guest stack even if not the current VCPU

If show_guest_stack was called from Xen context (for instance hitting
'0' key on Xen console) get_page_from_gva was not able to get the
page returning NULL.
Detecting different domain and changing VTTBR register make
get_page_from_gva works for different domains.

Signed-off-by: Frediano Ziglio <frediano.ziglio@huawei.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agoAdd INSTALL file
Olaf Hering [Thu, 23 Oct 2014 13:37:59 +0000 (15:37 +0200)]
Add INSTALL file

Document how to use configure and what to pass to make(1).

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- fix a few typos ]

10 years agotools/hotplug: add helper script to visualize systemd dependencies
Olaf Hering [Fri, 24 Oct 2014 14:17:10 +0000 (16:17 +0200)]
tools/hotplug: add helper script to visualize systemd dependencies

A small helper to draw a graph with dot(1) and show it with display(1):
bash tools/hotplug/Linux/systemd/show_service_dependencies.sh \
tools/hotplug/Linux/systemd/*.in

A red line means Requires= aka "enable it"
A blue line means After=
A green line means Before=

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Wei Liu <wei.liu2@citrix.com>
10 years agotools/hotplug: every systemd service depends on proc-xen.mount
Olaf Hering [Fri, 24 Oct 2014 14:17:09 +0000 (16:17 +0200)]
tools/hotplug: every systemd service depends on proc-xen.mount

Every systemd service file uses /proc/xen/capabilites to check if it
runs in a dom0. Update every service file to enable proc-xen.mount with
the Requires= statement and schedule its startup with the After=
statement.
In some places var-lib-xenstored.mount is removed. This is ok because
its optional and this unit is enabled by xenstored itself. After all its
a private directory for xenstored.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
10 years agotools/hotplug: systemd xenstored dependencies
Olaf Hering [Fri, 24 Oct 2014 14:17:08 +0000 (16:17 +0200)]
tools/hotplug: systemd xenstored dependencies

Everything which uses xenstored does this via the socket. Update the
existing service files to enable the xenstored.socket with the Requires=
statement. And schedule startup of the given service files after the
socket is enabled with the After= statement.
Once something tries to access the socket systemd will launch xenstored.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
10 years agotools/hotplug: xendomains now depends on xen-init-dom0
Wei Liu [Fri, 24 Oct 2014 14:17:07 +0000 (16:17 +0200)]
tools/hotplug: xendomains now depends on xen-init-dom0

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@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: Wei Liu <wei.liu2@citrix.com>
10 years agotools/hotplug: add systemd xen-init-dom0 service
Wei Liu [Fri, 24 Oct 2014 14:17:06 +0000 (16:17 +0200)]
tools/hotplug: add systemd xen-init-dom0 service

Also prevent xenstored.service from writing Dom0 nodes. The
initialisation is now done with xen-init-dom0.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@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: Wei Liu <wei.liu2@citrix.com>
[ ijc -- ran autogen.sh as requested ]

10 years agotools/hotplug: fix clean target in systemd Makefile
Wei Liu [Fri, 24 Oct 2014 14:17:05 +0000 (16:17 +0200)]
tools/hotplug: fix clean target in systemd Makefile

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@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: Wei Liu <wei.liu2@citrix.com>
10 years agotools/hotplug: fix conditions in systemd service files for dom0
Olaf Hering [Fri, 24 Oct 2014 14:17:04 +0000 (16:17 +0200)]
tools/hotplug: fix conditions in systemd service files for dom0

ConditionVirtualization= checks if systemd runs in some sort of guest.
It is not supposed to detect host capabilities. The current
implementation happens to work because systemd-detect-virt from v208
returns also 'xen' in a dom0. In v210 and later 'none' is returned and
no service files will be started.

Adjust the checks to detect a dom0 vs. native boot. Mounting xenfs
depends on /proc/xen, but should only be done for pvops because xenfs
exists only there. All other service files should not be started in
domU. The file /proc/xen/capabilities exists in both dom0 and domU in a
pvops kernel, but only in dom0 it contains 'control_d'. The existing
ExecStartPre= check will prevent starting in a domU.

ConditionVirtualization=!xen is true in a dom0. But this check is broken
in systemd v208, so its not used.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
10 years agotools/libxl: Fix building against libxl for LIBXL_API_VERSION < 0x040500
Andrew Cooper [Fri, 17 Oct 2014 08:56:19 +0000 (09:56 +0100)]
tools/libxl: Fix building against libxl for LIBXL_API_VERSION < 0x040500

c/s 6276f66ebe "libxl: libxl_uuid_copy now takes a ctx argument" introduces
API compatibiltiy for libxl_uuid_copy() which sadly is not valid C.  Fix it.

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>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agostubdom/Makefile: use QEMU_TRADITIONAL_LOC
M A Young [Thu, 23 Oct 2014 17:37:43 +0000 (18:37 +0100)]
stubdom/Makefile: use QEMU_TRADITIONAL_LOC

In commit 8962a8f951ea83e8d10ee23aeb20266e4795b06e CONFIG_QEMU was
replaced by QEMU_TRADITIONAL_LOC. However stubdom/Makefile still uses
CONFIG_QEMU so building stubdom is likely to fail.  This patch
replaces CONFIG_QEMU with QEMU_TRADITIONAL_LOC in stubdom/Makefile as
well.

Signed-off-by: Michael Young <m.a.young@durham.ac.uk>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Release-Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
10 years agoMerge branch 'release-4.5.0-rc1' into staging
Ian Jackson [Fri, 24 Oct 2014 15:13:11 +0000 (16:13 +0100)]
Merge branch 'release-4.5.0-rc1' into staging

10 years agoxen/Makefile: Update version to 4.5.0-rc
Ian Jackson [Fri, 24 Oct 2014 15:00:00 +0000 (16:00 +0100)]
xen/Makefile: Update version to 4.5.0-rc

* Remove the rc number as this makes rc releases more convenient.
* Add the .0, since we conventionally call our actual releases things
  like `4.4.0'.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Release-Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
10 years agoXen 4.5.0-rc1: Update tag for both QEMU trees. 4.5.0-rc1
Konrad Rzeszutek Wilk [Fri, 24 Oct 2014 14:22:40 +0000 (10:22 -0400)]
Xen 4.5.0-rc1: Update tag for both QEMU trees.

And change 'unstable' to 'rc1'.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
10 years agotools/libxl: Fix libxl_list_vcpu() following c/s 93e52d52
Andrew Cooper [Thu, 23 Oct 2014 11:01:15 +0000 (12:01 +0100)]
tools/libxl: Fix libxl_list_vcpu() following c/s 93e52d52

My reasoning regarding nr_cpus_out was wrong, as I had confused nr_cpus_out
with nr_vcpus_out.

Dario pointed this out, but the patch (having gained appropriate acks) got
committed before I could post a correction.

Noticed-by: Dario Faggioli <dario.faggioli@citrix.com>
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>
Reviewed-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agoREADME: mention git repos at xen.org
Olaf Hering [Tue, 21 Oct 2014 13:31:26 +0000 (15:31 +0200)]
README: mention git repos at xen.org

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agoREADME: remove requirement for udev
Olaf Hering [Tue, 21 Oct 2014 13:30:44 +0000 (15:30 +0200)]
README: remove requirement for udev

There is no requirement for udev during package build. It may be
required at runtime even with libxl with run_hotplug_scripts=yes
in xl.conf.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agox86: hvm: Allow configuration of the size of the mmio_hole.
Don Slutz [Tue, 21 Oct 2014 12:42:26 +0000 (08:42 -0400)]
x86: hvm: Allow configuration of the size of the mmio_hole.

If you add enough PCI devices then all mmio may not fit below 4G
which may not be the layout the user wanted. This allows you to
increase the below 4G address space that PCI devices can use and
therefore in more cases not have any mmio that is above 4G.

There are real PCI cards that do not support mmio over 4G, so if you
want to emulate them precisely, you may also need to increase the
space below 4G for them. There are drivers for these cards that also
do not work if they have their mmio space mapped above 4G.

This allows growing the MMIO hole to the size needed.

This may help with using pci passthru and HVM.

In the tools this is named mmio_hole_memkb.

Signed-off-by: Don Slutz <dslutz@verizon.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- fixed build error in xl_cmdimpl.c with s/%PRIu64/%ld/.
         Reworded title ]

10 years agoRevert "xen: introduce arch_grant_(un)map_page_identity"
Stefano Stabellini [Thu, 23 Oct 2014 10:08:52 +0000 (12:08 +0200)]
Revert "xen: introduce arch_grant_(un)map_page_identity"

This reverts commit e25a5f4d8cf3b55718048abdd21c7d0de64ae54c.

With the removal of XENFEAT_grant_map_identity, this commit is not
needed anymore.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Reviewed-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agoRevert "xen/arm: introduce XENFEAT_grant_map_identity"
Stefano Stabellini [Thu, 23 Oct 2014 10:07:35 +0000 (12:07 +0200)]
Revert "xen/arm: introduce XENFEAT_grant_map_identity"

Revert commit id 8d09ef6906ca0a9957e21334ad2c3eed626abe63.
Just keep the definition of XENFEAT_grant_map_identity.

XENFEAT_grant_map_identity is superseeded by GNTTABOP_cache_flush.  As
XENFEAT_grant_map_identity causes additional tlb flushes, it is best to
remove the feature entirely now.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Reviewed-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agointroduce GNTTABOP_cache_flush
Stefano Stabellini [Thu, 23 Oct 2014 10:06:11 +0000 (12:06 +0200)]
introduce GNTTABOP_cache_flush

Introduce a new hypercall to perform cache maintenance operation on
behalf of the guest. The argument is a machine address and a size. The
implementation checks that the memory range is owned by the guest or the
guest has been granted access to it by another domain.

Introduce grant_map_exists: an internal grant table function to check
whether an mfn has been granted to a given domain on a target grant
table. Check hypercall_preempt_check() every 4096 iterations in the
implementation of grant_map_exists.
Use the top 20 bits of the GNTTABOP cmd encoding to save the last ref
across the hypercall continuation.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
10 years agox86: introduce more cache maintenance operations
Stefano Stabellini [Thu, 23 Oct 2014 10:04:54 +0000 (12:04 +0200)]
x86: introduce more cache maintenance operations

Move the existing flush_page_to_ram flushtlb.h.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
10 years agoarm: introduce invalidate_dcache_va_range
Stefano Stabellini [Thu, 23 Oct 2014 10:04:19 +0000 (12:04 +0200)]
arm: introduce invalidate_dcache_va_range

Take care of handling non-cacheline aligned addresses and sizes.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Reviewed-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agoarm: return int from *_dcache_va_range
Stefano Stabellini [Thu, 23 Oct 2014 10:03:47 +0000 (12:03 +0200)]
arm: return int from *_dcache_va_range

These functions cannot really fail on ARM, but their x86 equivalents can
(-EOPNOTSUPP). Change the prototype to return int.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Reviewed-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agoarm: rename *_xen_dcache_* operations to *_dcache_*
Stefano Stabellini [Thu, 23 Oct 2014 10:03:09 +0000 (12:03 +0200)]
arm: rename *_xen_dcache_* operations to *_dcache_*

Given that we are in Xen, it is obvious that these are Xen flushes.
Also the correspondent x86 functions are going to be named without
_xen_, so remove it here for consistency.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Reviewed-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agointroduce gnttab_max_frames and gnttab_max_maptrack_frames command line options
Stefano Stabellini [Thu, 23 Oct 2014 09:59:46 +0000 (11:59 +0200)]
introduce gnttab_max_frames and gnttab_max_maptrack_frames command line options

Introduce gnttab_max_maptrack_frames: a new Xen command line option to
specify the max number of maptrack frames per domain.
Deprecate the old gnttab_max_nr_frames and introduce gnttab_max_frames
instead, that doesn't affect the maptrack. Keep gnttab_max_nr_frames for
compatibility.

Rename internally max_nr_grant_frames to max_grant_frames to avoid
confusions.

Introduce DEFAULT_MAX_MAPTRACK_FRAMES, that is completely independent
from max_nr_grant_frames.

Remove MAX_MAPTRACK_TO_GRANTS_RATIO that is now only used in one place
for compatibility.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
10 years agodocs: EFI configuration file must be ASCII type
Konrad Rzeszutek Wilk [Thu, 23 Oct 2014 08:24:19 +0000 (10:24 +0200)]
docs: EFI configuration file must be ASCII type

Currently Xen can only read the configuration file if it is in ASCII
format. If it is in CHAR16 or CHAR8 it will choke. One way to verify
this is to use 'file':

xen.cfg:        ASCII text
xen-char16.cfg: Little-endian UTF-16 Unicode text, with CRLF, CR line terminators

The latter is no good.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
10 years agoEFI: fix efi_arch_allocate_mmap_buffer() to return new size
Roy Franz [Thu, 23 Oct 2014 08:23:43 +0000 (10:23 +0200)]
EFI: fix efi_arch_allocate_mmap_buffer() to return new size

efi_arch_allocate_mmap_buffer() allocates a buffer for the EFI memory map, and
for ARM it allocates a larger buffer than requested. This is done to account
for the increase in the map size that may occur when the allocation is made.
The previous code allocated a larger buffer, but did not adjust the size to
match.  This caused the later call to GetMemoryMap() to fail with a
BUFFER_TOO_SMALL error, since the original, smaller size was used.  This patch
changes the argument to efi_arch_allocate_mmap_buffer() to be a pointer to
UINTN, and the ARM version updates the size on a successful allocation.
The x86 version uses a different allocation method, so only the function
argument type is changed.
Also add decode of the BUFFER_TOO_SMALL error code to PrintErrMesg().

Signed-off-by: Roy Franz <roy.franz@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com> [ARM]
Acked-by: Jan Beulich <jbeulich@suse.com> [non-ARM]
10 years agox86/boot: add memory to clobber list in reloc_mbi_struct()
Daniel Kiper [Thu, 23 Oct 2014 08:22:52 +0000 (10:22 +0200)]
x86/boot: add memory to clobber list in reloc_mbi_struct()

Assembly inline in reloc_mbi_struct() clobbers
memory so tell compiler about that.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
10 years agox86/boot: use constant in head.S instead of hardcoded value
Daniel Kiper [Thu, 23 Oct 2014 08:22:01 +0000 (10:22 +0200)]
x86/boot: use constant in head.S instead of hardcoded value

..to access multiboot.mem_lower data.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
10 years agox86/boot: fix reloc.S build dependencies
Daniel Kiper [Thu, 23 Oct 2014 08:21:13 +0000 (10:21 +0200)]
x86/boot: fix reloc.S build dependencies

reloc.S is not rebuild if header included
in reloc.c is updated. Fix this issue.

Additionally, remove reloc.S build dependency
on head.S because anything from reloc.S does
not depend on head.S.

Add reloc.c dependency to reloc.o build rule for consistency.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
10 years agocorrect the documentation of where the Xen cpuid leaves can be found
Andrew Cooper [Thu, 23 Oct 2014 08:20:40 +0000 (10:20 +0200)]
correct the documentation of where the Xen cpuid leaves can be found

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
10 years agofix listing of vcpus when domains lacking any vcpus exist
Andrew Cooper [Thu, 23 Oct 2014 08:19:53 +0000 (10:19 +0200)]
fix listing of vcpus when domains lacking any vcpus exist

On a system which looks like this:

[root@st04 ~]# xl list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0   752     4     r-----   46699.3
(null)                                       1     0     0     --p---       0.0
(null)                                       2     0     0     --p---       0.0
(null)                                       3     0     0     --p---       0.0
badger                                      25     0     1     --p---       0.0

`xl vcpu-list` failes as so:

[root@st04 ~]# xl vcpu-list
Name                                ID  VCPU   CPU State   Time(s) CPU Affinity
Domain-0                             0     0    0   -b-   12171.0  all
Domain-0                             0     1    1   -b-   11779.6  all
Domain-0                             0     2    2   -b-   11599.0  all
Domain-0                             0     3    3   r--   11007.0  all
libxl: critical: libxl__calloc: libxl: FATAL ERROR: memory allocation failure (libxl__calloc, 4294935299 x 40)
: Cannot allocate memory
libxl: FATAL ERROR: memory allocation failure (libxl__calloc, 4294935299 x 40)

The root cause of this is in Xen.  getdomaininfo() has no way of expressing
"this domain has no vcpus".  Previously, info->max_vcpu_id would be returned
uninitialised in such a case.

Unfortunately, setting it to 0 as a default is not appropriate.  A max_vcpu_id
of 0 and nr_online_cpus of 0 is the valid state for a single vcpu domain which
is in the process of being destroyed.

As all components are required to add 1 to max_vcpu_id to get the number of
vcpus, an id of ~0U is not valid to be used.  Explicitly define this as an
invalid max vcpu value, and use it to express "no vcpus" in getdomaininfo()

In libxl, the issue is seen as libxl_list_vcpu() attempts to use the
uninitialised domaininfo.max_vcpu_id for memory allocation.

Check domaininfo.max_vcpu_id against the new sentinel value
XEN_INVALID_MAX_VCPU_ID, and return early.  This means that it is now valid
for libxl_list_vcpu() to return NULL for a domain which lacks any vcpus.

As part of this change, remove the pointless call to libxl_get_max_cpus(),
whose returned value is unconditionally clobbered in the for() loop.

Reported-by: Euan Harris <euan.harris@citrix.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Don Slutz <dslutz@verizon.com>
Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
10 years agox86/setup: correct register clobbers for the asm statement when resyncing the stack
Andrew Cooper [Thu, 23 Oct 2014 08:18:29 +0000 (10:18 +0200)]
x86/setup: correct register clobbers for the asm statement when resyncing the stack

When resyncing the stack, the asm statement does not identify %rsi, %rdi and
%rcx as clobbered by the 'rep movsq'.

Luckily, there are no functional problems in the generated code.  GCC decides
not to save any of them before calling boostrap_map(), which clobbers them.

Correct the clobbers, by listing them as earlyclobber discarded outputs.

Reported-by: Daniel Kiper <daniel.kiper@oracle.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Tested-by: Daniel Kiper <daniel.kiper@oracle.com>
10 years agox86/hvm: further restrict access to x2apic MSRs
Andrew Cooper [Tue, 21 Oct 2014 15:34:20 +0000 (17:34 +0200)]
x86/hvm: further restrict access to x2apic MSRs

The x2apic specification reserves the entire MSR range 0x800-0xbff, while only
the first 0x3f MSRs have defined purposes.  All reserved MSRs in this region
are architecturally required to raise #GP faults upon access.

Xen used to pass this entire range to hvm_x2apic_msr_{read,write}(), but the
range was restricted somewhat by XSA-108 (c/s 61fdda7ac) to prevent guests
being able to read pages adjacent to the domheap page backing the vlapic->regs
array.

While removing the vulnerability, a side effect of XSA-108 was that the MSR
range 0x900-0xbff fell through the switch statement and ends up reading the
hosts x2apic range. This behaviour is a problem in general, but specifically
it turns out that MSRs 0xa00-0xa02 are implemented (but undocumented) on
certain SandyBridge and IvyBridge systems.

Experimentally, no operating system in XenServer's test suite (including all
versions of Windows currently supported by Microsoft) ever peek at these MSRs,
even on hosts where some of them are implemented.

This patch undoes the fix for XSA-108 (c/s 61fdda7ac), returning the primary
bounds check to the entire specified range.  hvm_x2apic_msr_write() was always
safe, as it is whitelist based.  hvm_x2apic_msr_read() changes to a whitelist
approach, which avoids the vulnerability, and provides a more architecturally
accurate emulation of the reserved MSRs (which would previously read as 0
rather than fault).

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Jun Nakajima <jun.nakajima@intel.com>
10 years agox86: define cmdline_cook() loader_name argument as a const
Daniel Kiper [Tue, 21 Oct 2014 15:33:13 +0000 (17:33 +0200)]
x86: define cmdline_cook() loader_name argument as a const

cmdline_cook() loader_name argument is not changed so
define it as a const.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
10 years agoclean target should remove xen.efi binary
Daniel Kiper [Tue, 21 Oct 2014 15:32:43 +0000 (17:32 +0200)]
clean target should remove xen.efi binary

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
10 years agox86/viridian: freeze time reference counter when domain is paused
Paul Durrant [Tue, 21 Oct 2014 15:31:31 +0000 (17:31 +0200)]
x86/viridian: freeze time reference counter when domain is paused

In XenServer system test it has become apparent that versions of Windows
that make use of the time reference counter enlightenment cannot cope with
large jumps forward in the value read from the MSR. Specifically,
suspending a very large domain took approx. 45 minutes to complete and
when the domain was resumed it was discovered that the WMI (Windows
Management Instrumentation) service had hung.

The reason a large jump forward is seen by the guest is that, when a guest
is suspended, the guest stops running when the SCHEDOP_suspend hypercall is
made, however the MSR value essentially keeps incrementing until the
tool-stack issues DOMCTL_gethvmcontext.

This patch adds code to freeze the value of the time reference counter
on domain pause and 'thaw' it on domain unpause, but only thaw it if the
domain is not shutting down. The absolute value of the counter is then
saved in the viridian domain context record. This prevents the guest OS
from experiencing large jumps in the value of the MSR and has been shown
to reliably fix the problem with WMI.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agoxen/arm64: Use __flush_dcache_area instead of __flush_dcache_all
Suravee Suthikulpanit [Tue, 21 Oct 2014 03:55:25 +0000 (20:55 -0700)]
xen/arm64: Use __flush_dcache_area instead of __flush_dcache_all

When booting with EFI, __flush_dcache_all does not correctly flush data.
According to Mark Rutland, __flush_dcache_all is not guaranteed to push
data to the PoC if there is a system-level cache as it uses Set/Way
operations.  Therefore, this patch switchs to use the "__flush_dcache_area"
mechanism, which is coppied from Linux.
Add flushing of FDT in addition to Xen text/data.
Remove now unused __flush_dcache_all and related helper functions.
Invalidate the instruction tlb before turning on paging
later on when starting Xen in EL2.

Signed-off-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
Signed-off-by: Roy Franz <roy.franz@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agodocs: Introduce specification for x86 pv bootloader chainloading paths/formats.
Ian Campbell [Fri, 29 Aug 2014 20:14:30 +0000 (21:14 +0100)]
docs: Introduce specification for x86 pv bootloader chainloading paths/formats.

In order to support pvgrub (or other bootloader) from dom0 chainloading a
pvgrub (or other) from within the domU filesystem we need a standard for where
the stage 1 bootloader should look and what it should expect to find there.

Add a document along those lines.

This is currently x86-specific since it is expected that other new architecures
(including ARM) will either not need to implement this due to the existence of
more generic specifications for that arch (e.g. the ARM VM spec) or will update
this document in due course.

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Acked-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Colin Watson <cjwatson@debian.org>
Cc: 759018@bugs.debian.org
10 years agotools/misc: Delete more obsolete utilities
Andrew Cooper [Wed, 15 Oct 2014 17:33:56 +0000 (18:33 +0100)]
tools/misc: Delete more obsolete utilities

* nsplitd has been orphaned from the build since its introduction in c/s
  dc44ed4764 (in 2004), and never been developed since.  While it does appear
  to compile, it is full of pointer width mismatch, pointer sign mismatch, and
  uninitialised variable warnings, which makes it unlikely to function
  correctly when compiled for a 64bit environment.

* xen-python-path was declared obsolete in c/s 11e1149fe (in 2009) and can't
  actually be used correctly by out-of-tree components.  5 years is long enough
  for out-of-tree callers to catch up.

There are no subdirectories any more, so drop the notion from the Makefile.

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: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agotools/build: Fix root build target
Andrew Cooper [Wed, 15 Oct 2014 17:33:55 +0000 (18:33 +0100)]
tools/build: Fix root build target

The root Makefile 'build' rule recurses into the tools directory and invokes
the 'build' rule.  However, the tools Makefile doesn't contain a 'build' rule,
resulting in failure.

Introduce a 'build' rule identical to the existing 'all' rule.

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: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agotools/mceinject: Fix build after 31d2d1e08a
Andrew Cooper [Wed, 15 Oct 2014 17:33:54 +0000 (18:33 +0100)]
tools/mceinject: Fix build after 31d2d1e08a

xen-mceinj is another utility which incorrectly makes use of xg_private.h  Fix
up its include path.

While fixing this Makefile, remove some trailing whitespace.

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: Stefano Stabellini <stefano.stabellini@citrix.com>
CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agoxl: add support for 'channels'
David Scott [Thu, 9 Oct 2014 09:17:32 +0000 (10:17 +0100)]
xl: add support for 'channels'

This adds support for channel declarations of the form:

 channel = [ "name=...,connection=...[,path=...][,backend=...]" ]

where 'name' is a label to identify the channel to the frontend.

If 'connection = pty' then the channel is connected to a pty in the
 backend domain
If 'connection = socket' then the channel is connected to a Unix domain
 socket given by 'path = ...' in the backend domain.

This patch also adds the command:

 xl channel-list <domain>

which allows the state of channels to be queried. In particular if
'connection=pty' this will show the path of the pty slave device.

Signed-off-by: David Scott <dave.scott@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agoxl: add 'trim' and 'split_string_into_pair' functions
David Scott [Thu, 9 Oct 2014 09:17:31 +0000 (10:17 +0100)]
xl: add 'trim' and 'split_string_into_pair' functions

Signed-off-by: David Scott <dave.scott@citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
10 years agoxl: 'replace_string' now uses xstrdup
David Scott [Thu, 9 Oct 2014 09:17:30 +0000 (10:17 +0100)]
xl: 'replace_string' now uses xstrdup

This catches the out-of-memory exception and exits the program.

Signed-off-by: David Scott <dave.scott@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
10 years agoxl: move 'replace_string' further up the file
David Scott [Thu, 9 Oct 2014 09:17:29 +0000 (10:17 +0100)]
xl: move 'replace_string' further up the file

This allows the function to be reused more easily.

Signed-off-by: David Scott <dave.scott@citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
10 years agoxl: add 'xstrdup' next to 'xrealloc'
David Scott [Thu, 9 Oct 2014 09:17:28 +0000 (10:17 +0100)]
xl: add 'xstrdup' next to 'xrealloc'

Signed-off-by: David Scott <dave.scott@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
10 years agolibxl: add support for 'channels'
David Scott [Thu, 9 Oct 2014 09:17:27 +0000 (10:17 +0100)]
libxl: add support for 'channels'

A 'channel':
  - is a low-bandwidth private communication channel that resembles
    a physical serial port.
  - is implemented as a PV console with a well-known string name
    which is used to hook the channel to the appropriate software
    in the guest (i.e. some kind of guest agent).
  - has a backend 'connection' which describes what should happen
    to the data.

The following 'connection' types are defined:

 * PTY: the I/O surfaces as a pty in the backend domain
 * SOCKET: a listening Unix domain socket accepts a connection in
   the backend domain and proxies

Channels may be listed but don't currently support hotplug/unplug.

Signed-off-by: David Scott <dave.scott@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
10 years agolibxl: replace memset() with libxl__device_console_init
David Scott [Thu, 9 Oct 2014 09:17:26 +0000 (10:17 +0100)]
libxl: replace memset() with libxl__device_console_init

The current implementation of libxl__device_console_init does the same
memset() so this is identical for now.

If libxl__device_console_init changes in future (e.g. to prefer a non-zero
default value for some field) then this will continue to work.

Signed-off-by: David Scott <dave.scott@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
10 years agoREADME: remove references to unneeded python helpers
Olaf Hering [Thu, 16 Oct 2014 12:48:00 +0000 (14:48 +0200)]
README: remove references to unneeded python helpers

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agolibxl: Avoid fd leak of qemu state fd during migration
Ian Jackson [Thu, 16 Oct 2014 17:44:13 +0000 (18:44 +0100)]
libxl: Avoid fd leak of qemu state fd during migration

In a long-running process (such as virt-manager) this might eventually
run the process out of fds.

That qemu argument construction might generate an fd that needs to be
fed to qemu is a bit odd, but we just run with it and provide a
parameter to the qemu argument construction code for this purpose.

There is no need to use the carefd machinery, because leaking the odd
copy of this descriptor into a child unexpectedly forked out of
another thread, is fine.  We just don't want to leak it back to the
main process.

Reported-by: ustermann.max@web.de
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agolibxl: Fix a couple of log messages to print correct errnos
Ian Jackson [Thu, 16 Oct 2014 17:44:12 +0000 (18:44 +0100)]
libxl: Fix a couple of log messages to print correct errnos

xc_domain_create and xc_cpupool_movedomain do not return errno values;
they return -1 and set errno.  Fix the logging accordingly.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Reviewed-by: Don Slutz <dslutz@verizon.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agoxen/arm: flush_tlb_domain: Disable IRQ when flushing TLB of another domain
Julien Grall [Fri, 17 Oct 2014 16:14:44 +0000 (17:14 +0100)]
xen/arm: flush_tlb_domain: Disable IRQ when flushing TLB of another domain

When Xen is flushing the TLB for another domain than current, it has to
switch temporarily to the P2M of this domain. If IRQs are enabled, it may
be possible to receive an interrupt that requires the use the P2M of the current
domain, or even temporarily switch to another P2M.
For the former case, the translation would be wrong. For the latter one,
as the handler would restore the current P2M, Xen would flush the wrong domain
TLB.

Thankfully we don't have such interrupt handler, but it may be necessary
in the future to do that during when the user asks to dump domain stack via
a keystroke.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- spelling in the commit log ]

10 years agoxen/arm: p2m: Fix crash when p2m_lookup is used with an invalid IPA
Julien Grall [Sat, 18 Oct 2014 19:25:21 +0000 (20:25 +0100)]
xen/arm: p2m: Fix crash when p2m_lookup is used with an invalid IPA

Since the commit 58f0fd8 "xen: arm: handle variable p2m levels in p2m_lookup",
Xen checks that the root_table offset is valid. If not, its unlock the p2m
spinlock before returning an error. But, at this time, the lock has not been
taken.

On Xen built with debug=y, we can get the following stack trace if the guest
use an invalid IPA in hypercall or mess-up the grant-table:

(XEN) Assertion '_raw_spin_is_locked(lock)' failed at xen/include/asm/arm32/spinlock.h:22
...
(XEN)    [<0022d1bc>] _spin_unlock+0x2c/0x50 (PC)
(XEN)    [<00253264>] p2m_lookup+0x20c/0x230 (LR)
(XEN)    [<7ffdfd54>] 7ffdfd54
(XEN)    [<002539f4>] gmfn_to_mfn+0x24/0x3c
(XEN)    [<0020e4d4>] __get_paged_frame+0x30/0x12c
(XEN)    [<00210680>] __acquire_grant_for_copy+0x4e0/0x768
(XEN)    [<00212030>] do_grant_table_op+0x13a0/0x2534
(XEN)    [<00257b10>] do_trap_hypervisor+0xe10/0x1148
(XEN)    [<0025b330>] return_from_trap+0/0x4

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agodocs/man: xl.pod.1: Fix build issue after commit 7471879
Julien Grall [Sat, 18 Oct 2014 20:22:01 +0000 (21:22 +0100)]
docs/man: xl.pod.1: Fix build issue after commit 7471879

The commit 7471879 "tools: CMDs and APIs for Cache Monitoring Technology"
has introduced a new section but forgot to add '=back'. This will result
a build issue with newer podman:

man/xl.pod.1 around line 1443: You forgot a '=back' before '=head1'

or creating a section "POD ERRORS" with older one.

At the same time, capitalize the title of the section to match the coding
style used within the files.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agoREADME: point to correct location of README.remus
Wei Liu [Sun, 19 Oct 2014 17:48:30 +0000 (18:48 +0100)]
README: point to correct location of README.remus

The said file was moved in 20857ac ("remus: move remus README to docs
directory").

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: Yang Hongyang <yanghy@cn.fujitsu.com>
Cc: Shriram Rajagopalan <rshriram@cs.ubc.ca>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Yang Hongyang <yanghy@cn.fujitsu.com>
10 years agoxen: arm: introduce assembly helper to call smc
Julien Grall [Thu, 16 Oct 2014 12:34:18 +0000 (13:34 +0100)]
xen: arm: introduce assembly helper to call smc

Commit 063188f4b3 "xen: arm: Add support for the Exynos secure firmware"
introduced code assuming that exynos_smc() would get called with arguments in
certain registers. While the "noinline" attribute guarantees the function to
not get inlined, it does not guarantee that all arguments arrive in the assumed
registers: gcc's interprocedural analysis can result in clone functions to be
created where some of the incoming arguments (commonly when they have constant
values) get replaced by putting in place the respective values inside the
clone.

Xen contains in multiple place of this SMC function: consolidate the function
in a single place and write it in assembly.

Reported-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- reworded commit message as discussed ]

10 years agomove XENMEM_get_vnumainfo out of tools-only section of public/memory.h
Jan Beulich [Thu, 16 Oct 2014 08:08:39 +0000 (10:08 +0200)]
move XENMEM_get_vnumainfo out of tools-only section of public/memory.h

After all this interface specifically exists for guest kernels to learn
about their (virtual) topology. I'm sure I made a comment to this
effect during review, but apparently I then didn't notice that this
never got carried out.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
10 years agodocs, amd_ucode: condense amd_ucode notes
Aravind Gopalakrishnan [Thu, 16 Oct 2014 08:07:56 +0000 (10:07 +0200)]
docs, amd_ucode: condense amd_ucode notes

Some cleanups to the documentation-
 - Remove unnecessary steps listed to apply ucode using initrd.
 - Condense 'Misc notes' section as well

Suggested-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Aravind Gopalakrishnan <aravind.gopalakrishnan@amd.com>
10 years agotools: CMDs and APIs for Cache Monitoring Technology
Chao Peng [Thu, 9 Oct 2014 04:02:04 +0000 (12:02 +0800)]
tools: CMDs and APIs for Cache Monitoring Technology

Introduced some new xl commands to enable/disable Cache Monitoring
Technology(CMT) feature.

The following two commands is to attach/detach the CMT feature
to/from a certain domain.

$ xl psr-cmt-attach domid
$ xl psr-cmt-detach domid

This command is to display the CMT information, such as L3 cache
occupancy.

$ xl psr-cmt-show cache_occupancy <domid>

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Chao Peng <chao.p.peng@linux.intel.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
10 years agoxen: arm64: Handle memory banks which are not 1GB aligned
Ian Campbell [Fri, 10 Oct 2014 14:43:14 +0000 (15:43 +0100)]
xen: arm64: Handle memory banks which are not 1GB aligned

The code in the arm64 version of setup_xenheap_mappings was making
some very confused attempts to handle this but was bogus.

As well as adjusting the mapping to start on a 1GB boundary we also
need to account for the offset between the start of the mapping and
the actual start of the heap when converting between page pointers,
virtual addresses and machine addresses.

I preferred to do this by explicitly accounting for the offset rather
than adding an offset to the frametable because that approach could
potentially waste a large amount of frametable (up to just less than
1GB worth) but also because of issues with converting mfns from
outside the regions considered for pdx initialisation (which are not
1GB aligned) back and forth.

We already have an idea of the distinction between the start of the
direct map and the start of the xenheap in the difference between
DIRECTMAP_VIRT_START and XENHEAP_VIRT_START. Until now these were the
same thing, but now we change XENHEAP_VIRT_START to point to the
actual start of heap not the mapping. Surprisingly there was only one
place which was using the conceptually wrong value.

Also change xenheap_virt_end to a vaddr_t for consistency.

We've been lucky so far that most hardware happens to locate memory
on a 1GB boundary (we did have reports of a system with memory at a
half gig boundary which exhibited failures which I didn't manage to
follow up on successfully). The EFI support has exposed this
shortcoming by the way it handles reserved memory, which has a
similar effect to having memory non-1GB aligned.

arm32 does things differently here due to using a small Xen heap and
a demand mapped domain heap, so isn't affected.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Suravee Suthikulanit <suravee.suthikulpanit@amd.com>
Cc: Roy Franz <roy.franz@linaro.org>
Cc: Vijay Kilari <vijay.kilari@gmail.com>
Reviewed-by: Julien Grall <julien.grall@linaro.org>
Tested-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Roy Franz <roy.franz@linaro.org>

10 years agoEFI: update MAINTAINERS after moving of files
Jan Beulich [Tue, 14 Oct 2014 10:39:04 +0000 (12:39 +0200)]
EFI: update MAINTAINERS after moving of files

I forgot to request this to be done along with the files being moved.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agoMerge branch 'staging' of ssh://xenbits.xen.org/home/xen/git/xen into staging
Ian Campbell [Tue, 14 Oct 2014 09:57:47 +0000 (10:57 +0100)]
Merge branch 'staging' of ssh://xenbits.xen.org/home/xen/git/xen into staging

10 years agoFix configure --with-systemd-modules-load=DIR
Olaf Hering [Fri, 10 Oct 2014 15:32:42 +0000 (17:32 +0200)]
Fix configure --with-systemd-modules-load=DIR

Currently --with-systemd=DIR1 --with-systemd-modules-load=DIR2 will set
both XEN_SYSTEMD_DIR and XEN_SYSTEMD_MODULES_LOAD to DIR1. The reason is
that both AC_ARG_WITH() use 'systemd' as the name for the internal
variable. As a result the value of the first option is also use as the
value for the second option. Fix this by using another variable name.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ijc -- ran autogen.sh as requested]

10 years agolibxl: include sys/ioctl.h
Roger Pau Monne [Fri, 10 Oct 2014 14:34:37 +0000 (16:34 +0200)]
libxl: include sys/ioctl.h

This is a requirement for the code in libxl_remus_disk_drbd.c that uses the
ioctl syscall. Fixes the following error when building on FreeBSD:

libxl_remus_disk_drbd.c: In function 'drbd_postsuspend':
libxl_remus_disk_drbd.c:197:9: error: implicit declaration of function 'ioctl' [-Werror=implicit-function-declaration]

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Wen Congyang <wency@cn.fujitsu.com>
Cc: Yang Hongyang <yanghy@cn.fujitsu.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agoRemove obsolete dev-docs target from toplevel Makefile
Olaf Hering [Fri, 10 Oct 2014 09:53:29 +0000 (11:53 +0200)]
Remove obsolete dev-docs target from toplevel Makefile

The actual target was removed with commit
5806093a20e20209d4b88ab866ae1e6017c95de7 ("docs: drop doxygen stuff")

Signed-off-by: Olaf Hering <olaf@aepfle.de>
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>
10 years agoRemove dead qemu variables from toplevel Makefile
Olaf Hering [Fri, 10 Oct 2014 09:23:25 +0000 (11:23 +0200)]
Remove dead qemu variables from toplevel Makefile

The variables should have been removed already in
7ed06911dc596d23f21dee209b7f2db294e34b56 ("Remove dead qemu code from
toplevel Makefile"), but I did not spot it at this time.
Now it looks like the intention initially was to let the install-tools
depend on tools/qemu-xen-traditional-dir. But that did not work because
there was the typo in the variables (TGT vs. TARGET), and
CONFIG_QEMU_TRAD was not defined anyway.

So remove QEMU_TRAD_DIR_TARGET and QEMU_XEN_DIR_TARGET because they are
not defined at all.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
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>
10 years agoUse C xenstored with --disable-ocamltools
Olaf Hering [Fri, 10 Oct 2014 08:32:24 +0000 (10:32 +0200)]
Use C xenstored with --disable-ocamltools

When xen is configured with --disable-ocamltools then oxenstored will
still be the default if all required ocaml devel packages are installed.
The reason is that xenstored.m4 is included before the ocamltools check.
And xenstored.m4 does not use the result of --disable-ocamltools.

Rearrange the code to check first for the presence of ocaml, then check
--disable-ocamltools and finally decide what sort of xenstored should be
the default.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- ran autogen.sh as requested]

10 years agoAdjust helptext in m4/systemd.m4
Olaf Hering [Fri, 10 Oct 2014 07:19:48 +0000 (09:19 +0200)]
Adjust helptext in m4/systemd.m4

Use AS_HELP_STRING for proper formating, mention both options take a
directory, mention the default value, quote the arguments in brackets.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
[ijc -- ran autogen.sh as requested]
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agoFix typo in m4/xenstored.m4
Olaf Hering [Thu, 9 Oct 2014 16:44:43 +0000 (18:44 +0200)]
Fix typo in m4/xenstored.m4

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ijc -- ran autogen.sh as requested]

10 years agostubdom: provide install-c target
Olaf Hering [Wed, 8 Oct 2014 13:57:42 +0000 (15:57 +0200)]
stubdom: provide install-c target

configure --enable-c-stubdom fails to build with 'make rpmball' because
no install target exists for it. Just provide it to fix build.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
10 years agoxen/arm: Use PSCI-0.2 for machine_halt/restart by default
Suravee Suthikulpanit [Fri, 3 Oct 2014 14:31:11 +0000 (09:31 -0500)]
xen/arm: Use PSCI-0.2 for machine_halt/restart by default

"machine_halt()" and "machine_restart()" are modified to use PSCI interface
by default if PSCI-0.2 is supported. The "raw_machine_reset()" is also removed
since this is unnecessary.

Also, machine_halt() is modified to add 10ms delay to make sure all auxiliary CPUs
are offlined before calling the shutdown.

For non-PSCI, platform_poweroff() and platform_reset() are used instead.

Signed-off-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agoxen/arm: Initial support for PSCI-0.2
Suravee Suthikulpanit [Fri, 3 Oct 2014 14:31:10 +0000 (09:31 -0500)]
xen/arm: Initial support for PSCI-0.2

This patch adds SMC calls to suport a subset of PSCI-0.2 functions
(PSCI_VERSION, CPU_ON, SYSTEM_OFF, SYSTEM_RESET).

By default, the psci_init() will use PSCI-0.2. Otherwise, it will
use PSCI-0.1 if PSCI-0.2 fails or un-supported.

To add support for PSCI_VERSION, this patch replaces the "bool_t psci_available"
variable with "int psci_ver", which contains the PSCI_VERSION as described in the
PSCI-0.2 spec.

Signed-off-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agoxen: arm: Do not enable EFI in dom0 since it is not yet supported.
Suravee Suthikulpanit [Mon, 13 Oct 2014 16:17:10 +0000 (11:17 -0500)]
xen: arm: Do not enable EFI in dom0 since it is not yet supported.

Since EFI is not yet supported in dom0, we need to remove the following
properties from the chosen node:

  * linux,uefi-mmap-start
  * linux,uefi-mmap-size
  * linux,uefi-mmap-desc-size
  * linux,uefi-mmap-desc-ver

These are added by "arch/arm/efi/efi-boot.h: fdt_add_uefi_nodes()",
and used by dom0 kernel to enable EFI.

Cc: Julien Grall <julien.grall@linaro.org>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Roy Franz <roy.franz@linaro.org>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Reviewed-by: Julien Grall <julien.grall@linaro.org>
Reviewed-by: Roy Franz <roy.franz@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agoRemove stray blexit()
Roy Franz [Mon, 13 Oct 2014 19:56:29 +0000 (12:56 -0700)]
Remove stray blexit()

A stray call to blexit() was in the normal processing path for handling
FDTs specified in the config file, causing the EFI boot code to
unconditionally exit.  Remove the blexit() call as it should never
have been here.

Signed-off-by: Roy Franz <roy.franz@linaro.org>
Tested-by: Vijaya Kumar K<Vijaya.Kumar@caviumnetworks.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agotools/hotplug: Removing of "all" dependency from "install" rule.
Anthony PERARD [Mon, 13 Oct 2014 14:31:36 +0000 (15:31 +0100)]
tools/hotplug: Removing of "all" dependency from "install" rule.

The "install" rules depends on both "all" and "subdirs-install" and
"all" depends on "subdirs-all". This leads the "install" rules to call
both "subdirs-all" and "subdirs-install" which create a race with two
concurrent `make` within the same directory (systemd) trying to make the
same things (xen.conf) and failing.

Ultimatly, "install" should only depend on the things it needs to
install, and not on "all".

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Tested-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agox86/boot/reloc: remove redundant blank characters and reformat comments a bit
Daniel Kiper [Fri, 10 Oct 2014 08:55:03 +0000 (10:55 +0200)]
x86/boot/reloc: remove redundant blank characters and reformat comments a bit

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
10 years agoVT-d: fix RMRR related error handling
Jan Beulich [Fri, 10 Oct 2014 08:54:21 +0000 (10:54 +0200)]
VT-d: fix RMRR related error handling

- reassign_device_ownership() now tears down RMRR mappings (for other
  than Dom0)
- to facilitate that, rmrr_identity_mapping() now deals with both
  establishing and tearing down of these mappings (the open coded
  equivalent in intel_iommu_remove_device() is being replaced at once)
- intel_iommu_assign_device() now unrolls the assignment upon RMRR
  mapping errors
- intel_iommu_add_device() now returns consistent values upon RMRR
  mapping failures (was: failure when last iteration ran into a
  problem, success otherwise)
- intel_iommu_remove_device() no longer special cases Dom0 (it only
  ever gets called for devices removed from the _system_, not a domain)
- rmrr_identity_mapping() now returns a proper error indicator instead
  of -1 when intel_iommu_map_page() failed

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
10 years agox86/vlapic: don't silently accept bad vectors
Jan Beulich [Fri, 10 Oct 2014 08:53:01 +0000 (10:53 +0200)]
x86/vlapic: don't silently accept bad vectors

Vectors 0-15 are reserved, and a physical LAPIC - upon sending or
receiving one - would generate an APIC error instead of doing the
requested action. Make our emulation behave similarly.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
10 years agoRevert "tools/hotplug: fix race during xen.conf creation"
Ian Campbell [Fri, 10 Oct 2014 08:35:34 +0000 (09:35 +0100)]
Revert "tools/hotplug: fix race during xen.conf creation"

This reverts commit eac3f5122fd4769b2885d8ad78bcbcf5df2472c1.

The "all" target should never depend on "install", it is supposed to only build
not install.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
10 years agoxenstore: extend the xenstore ring with a 'closing' signal
David Scott [Thu, 25 Sep 2014 14:58:41 +0000 (15:58 +0100)]
xenstore: extend the xenstore ring with a 'closing' signal

Hvmloader uses the xenstore ring and then tries to reset it back
to its initial state before booting the guest. Occasionally xenstored
will read the ring while it is being zeroed and conclude it has
been corrupted. This prevents PV drivers from loading in the guest.

This patch updates the xenstore ring protocol definition, enabling
a server to advertise additional features to the guest. One such feature
is defined: the ability to cleanly reset the ring including the
higher-level protocol, like an enhanced RESET_WATCHES for rings.

This patch implements the ring reconnection features in oxenstored
and hvmloader, fixing the bug.

This patch also defines an 'invalid' xenstore packet type and uses this
to poison the ring over a reconnect. This will make diagnosing this
bug much easier in future.

Signed-off-by: David Scott <dave.scott@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Reviewed-by: Jon Ludlam <jonathan.ludlam@citrix.com>
10 years agooxenstored: reduce syslog call overhead
Zheng Li [Thu, 25 Sep 2014 17:35:02 +0000 (18:35 +0100)]
oxenstored: reduce syslog call overhead

We noticed that, if configured to use syslog as the logging backend, every
single line of access logging (via the syslog C binding) will call stat on
/etc/localtime for 3 times. The rational behind this is probably to detect any
timezone changes over time.

This is a considerable cost we'd like to avoid, given the intensiveness of our
access logging --- we log almost every xenstore status change (for good
reason). Also a running Xen host is rarely a mobile environment, so the little
benefit can hardly justify the cost.

Setting up the TZ environment varialbe can avoid stat calls.

Signed-off-by: Zheng Li <dev@zheng.li>
Reviewed-by: David Scott <dave.scott@citrix.com>
10 years agooxenstored: add a safe net mechanism for existing ill-behaved clients
Zheng Li [Thu, 25 Sep 2014 17:35:01 +0000 (18:35 +0100)]
oxenstored: add a safe net mechanism for existing ill-behaved clients

In previous commit, we moved from exhaustively scanning all domain connections
to only processing those have correctly notified us by events. The benefits are
not only efficiency but also correctness, because it could potentially block an
ill-behaved client and have it waiting on its own mistake. If someone makes a
mistake on this when developing a piece of code, he/she would immediately
notice the problem (as the process being blocked), so that he/she could fix it
rightaway before anything else. Note that the chances of making such mistakes
are rare in reality, because most client code would use the libxenstore library
(which has all the notification logic built in correctly) instead of having to
implement raw accessing from scratch.

On the other hand, we did notice that there were some legacy code that didn't do
the notification correctly. As some code might be still running in wild, it
would be bad if they break by this change (e.g. after an upgrade). This patch
introduces a safe net mechanism to ensure ill-behaved clients continue to work,
but still retain most of the performance benefits here.

  * We add a checker to still scan all the rings periodically, so that we can
    still pick up these messages at an acceptable frequency.

  * Internally, we introduce an io_credit concept for domain connections. It
    represents the rounds of ring scan we are going to perform on a domain
    connection. For well-behaved connections, this value is changing between 0
    and 1; but for connections detected as ill-behaved, we'll bump its credit
    to a high value so that we'll unconditionally scan its ring for the next
    $n$ rounds. This way, the client won't hiccupped by the interval between
    checker's running (especially during periods when it continously interacts
    with oxenstored); and oxenstored doesn't have to keep scanning these
    rings indefinitely (with the credit running out), as they are usually quite
    most of the time.

  * We log an message when a domain connection is suspected as ill-behaved.
    Enable [info] level logging if you want/need to see it in action. Note that
    this information won't be accurate, as false positives are possible due to
    time window (e.g. we detect a client has written to the ring and we get no
    notificiation from it for the time being, but still the notification could
    potentially arrive at some time later). It's no harm to give a domain
    connection extra credit though.

Signed-off-by: Zheng Li <dev@zheng.li>
Reviewed-by: David Scott <dave.scott@citrix.com>
10 years agooxenstored: only process domain connections that notify us by events
Zheng Li [Thu, 25 Sep 2014 17:35:00 +0000 (18:35 +0100)]
oxenstored: only process domain connections that notify us by events

Currently, upon receiving an event, oxenstored will always scan/process all
the domain connections (xs rings), disregarding which domain sent that event.
This is rather costy and inefficient. It also shadows and indulges client
for not correctly communicating with us on message/space availability.

With this patch, oxenstore will only scan/process the domain connections
that have correctly notified us by events or have IO actions leftover from
previous communication.

Signed-off-by: Zheng Li <dev@zheng.li>
Reviewed-by: David Scott <dave.scott@citrix.com>
10 years agooxenstored: enable domain connection indexing based on eventchn port
Zheng Li [Thu, 25 Sep 2014 17:34:59 +0000 (18:34 +0100)]
oxenstored: enable domain connection indexing based on eventchn port

Currently in xenstore connection database,  we use a hash table of
(domid -> connection) to store domain connections. This allows fast indexing
based on dom ids.

This patch adds another dimention of fast indexing that is based on eventchn
port number. This is useful when doing selective connection processing
based on the port numbers of incoming events.

Signed-off-by: Zheng Li <dev@zheng.li>
Reviewed-by: David Scott <dave.scott@citrix.com>
10 years agooxenstored: use hash table to store socket connections
Zheng Li [Thu, 25 Sep 2014 17:34:58 +0000 (18:34 +0100)]
oxenstored: use hash table to store socket connections

Currently we use list to store socket connections. This is fine for smaller
number of connections. But when we scale up, traveling through a list of
hundreds or thousands of connections just to find a single one of them is very
low efficient.

This patch replaces the list with a (Unix.file_descr -> Connection.t) hash table.

Signed-off-by: Zheng Li <dev@zheng.li>
Reviewed-by: David Scott <dave.scott@citrix.com>
10 years agooxenstored: catch the error when a connection is already deleted
Zheng Li [Thu, 25 Sep 2014 17:34:57 +0000 (18:34 +0100)]
oxenstored: catch the error when a connection is already deleted

The function process_fdset_with is called on the read set connections first.
During the process, it might destroy a connection and remove it from the
connections database if some errors occur. However, a reference to the same
connection might still exist in the write set, which is awaiting to be
processed next. In this case, a Not_found error will be raised and the process
is aborted.

This patch changes the logic to ignore connections just missing from the
connection database and continue the rest part of the work.

Signed-off-by: Zheng Li <dev@zheng.li>
Reviewed-by: David Scott <dave.scott@citrix.com>
10 years agooxenstored: add a --use-select command line flag
Zheng Li [Thu, 25 Sep 2014 17:34:56 +0000 (18:34 +0100)]
oxenstored: add a --use-select command line flag

This allows to fall back to the original Unix.select if preferred. It could be
useful for debugging purposes too.

Signed-off-by: Zheng Li <dev@zheng.li>
Reviewed-by: David Scott <dave.scott@citrix.com>
10 years agooxenstored: add facilities to raise the max open fds uplimit
Zheng Li [Thu, 25 Sep 2014 17:34:55 +0000 (18:34 +0100)]
oxenstored: add facilities to raise the max open fds uplimit

To go beyond 1024 fds, we also need to raise the process limitation on max
open fds (usually defaults to 1024).

We need to know the system level max open fds so that we won't go above that.
Simply setting the limit to RLIM_INFINITY doesn't work on Linux 3.x (EPERM), a
patch on this went into the 2.x branch but not 3.x for some reason.

Signed-off-by: Zheng Li <dev@zheng.li>
Reviewed-by: David Scott <dave.scott@citrix.com>
10 years agooxenstored: add a poll-based select mechanism
Zheng Li [Thu, 25 Sep 2014 17:34:54 +0000 (18:34 +0100)]
oxenstored: add a poll-based select mechanism

Currently, oxenstored uses Unix.select underneath, so it doesn't work properly
if given a FD number >= 1024. This is a scalability bottleneck for hosts
running large number of VMs.

To remove this limitation, we implemented a poll-based mechanism but with the
same type signature as the Unix.select currently in use. So these two functions
can be interchangeable at any stage.

Signed-off-by: Zheng Li <dev@zheng.li>
Reviewed-by: David Scott <dave.scott@citrix.com>
10 years agotools/ocaml: Gate building tests on CONFIG_TESTS
Andrew Cooper [Tue, 7 Oct 2014 11:02:10 +0000 (12:02 +0100)]
tools/ocaml: Gate building tests on CONFIG_TESTS

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CC: David Scott <dave.scott@eu.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: Ian Campbell <ian.campbell@citrix.com>
Acked-by: David Scott <dave.scott@citrix.com>
10 years agotools/xenstore: Only create SBINDIR if it is to be used
Andrew Cooper [Tue, 7 Oct 2014 11:02:09 +0000 (12:02 +0100)]
tools/xenstore: Only create SBINDIR if it is to be used

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: Ian Campbell <ian.campbell@citrix.com>
10 years agotools/xenstore: Introduce clients-install target
Andrew Cooper [Tue, 7 Oct 2014 11:02:08 +0000 (12:02 +0100)]
tools/xenstore: Introduce clients-install target

...to match the existing 'clients' built target.  This is particularly useful
when rebuilding the xenstore clients separately for a non-dom0 environment.

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: Ian Campbell <ian.campbell@citrix.com>
10 years agogitignore: Cleanup
Andrew Cooper [Tue, 7 Oct 2014 11:02:07 +0000 (12:02 +0100)]
gitignore: Cleanup

This is a rough pruning based mainly on directories which no longer exist.
Some of this was code deleted in 2007.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Keir Fraser <keir@xen.org>
CC: Jan Beulich <JBeulich@suse.com>
CC: Tim Deegan <tim@xen.org>
CC: Ian Campbell <Ian.Campbell@citrix.com>
CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agoRemove dead qemu code from toplevel Makefile
Olaf Hering [Wed, 8 Oct 2014 07:41:27 +0000 (09:41 +0200)]
Remove dead qemu code from toplevel Makefile

After commit b0f69ec5c71de1248d915c193b57c43e786857dd ("tools: Make
qemu-xen-traditional build optional.") the existing make targets are
wrapped in ifeq ($(CONF),y), but CONF is never set because
config/Tools.mk is not included.

Drop the dead code. The same effect can be achieved by calling the make
commands directly, after calling configure.

A better approach would be a simple, single 'make $something' which
should be a wrapper around a targets in tools/Makefile that clones,
updates and cleans the subprojects. That has to be worked out in a
different patch.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
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>
10 years agostubdom: another for fix for lwip compile
Olaf Hering [Tue, 7 Oct 2014 14:15:46 +0000 (16:15 +0200)]
stubdom: another for fix for lwip compile

stubdom/lwip-x86_64/src/core/dhcp.c: In function 'dhcp_create_request':
stubdom/lwip-x86_64/src/core/dhcp.c:1361:64: error: array subscript is above array bounds

The previous attempt to fix the failure above worked fine in SLE11,
openSUSE 13.1 and newer. But gcc-4.5 as included in openSUSE 11.4 still
failed to compile. To fix compilation also with this version of gcc move
the range check right into the code instead of assigning it to a
temporary variable.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agotools/ocaml: use APPEND_CFLAGS and APPEND_LDFLAGS
Olaf Hering [Mon, 6 Oct 2014 13:22:40 +0000 (15:22 +0200)]
tools/ocaml: use APPEND_CFLAGS and APPEND_LDFLAGS

While implementing the --enable-rpath change I noticed that a ocaml
build does not use APPEND_LDFLAGS. Make use of APPEND_CFLAGS and
APPEND_LDFLAGS as it is done already in other places.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Cc: David Scott <dave.scott@eu.citrix.com>
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: David Scott <dave.scott@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agoconfig: remove unused MSGFMT and MSGMERGE
Olaf Hering [Tue, 7 Oct 2014 14:04:06 +0000 (16:04 +0200)]
config: remove unused MSGFMT and MSGMERGE

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
10 years agoFix comment typo in m4/paths.m4
Olaf Hering [Tue, 7 Oct 2014 08:51:31 +0000 (10:51 +0200)]
Fix comment typo in m4/paths.m4

Please rerun autogen.sh after applying this patch.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>