[Xen-devel] [PATCH] tools/build: remove usage of sed -i

2016-03-24 Thread Roger Pau Monne
The "-i" sed option is not POSIX compatible [0], remove it's usage and instead create yet another temporary intermediate file. [0] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html Signed-off-by: Roger Pau Monné Cc: Ian Jackson Cc: Wei Liu --- tools/include/xen-foreign/Makefi

[Xen-devel] [PATCH] libxl: fix POLLHUP handling

2016-03-31 Thread Roger Pau Monne
The current code in bootloader_copyfail will error out on expected POLLHUPs because of a missing "else" in the if clause. The behaviour that triggers this bug has only been seen on FreeBSD so far. Signed-off-by: Roger Pau Monné Suggested-by: Ian Jackson --- Cc: Ian Jackson Cc: Wei Liu --- to

[Xen-devel] [PATCH v3 6/8] libxl: add a FreeBSD implementation of libxl__devid_to_localdev

2016-03-31 Thread Roger Pau Monne
This code is extracted from the FreeBSD blkfront implementation. Signed-off-by: Roger Pau Monné Acked-by: Wei Liu --- Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/libxl_freebsd.c | 54 +++-- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/

[Xen-devel] [PATCH v3 2/8] hotplug/FreeBSD: add block hotplug script

2016-03-31 Thread Roger Pau Monne
This is the default hotplug script for block devices. Its only job is to copy the "params" blkback xenstore node to "physical-device". Signed-off-by: Roger Pau Monné Acked-by: Wei Liu --- Cc: Ian Jackson Cc: Wei Liu --- tools/hotplug/FreeBSD/Makefile | 2 +- tools/hotplug/FreeBSD/block|

[Xen-devel] [PATCH v3 7/8] libxl: fix error message in local_device_attach_cb

2016-03-31 Thread Roger Pau Monne
The fields that are printed might not be set in the case of a failure, which generates a segmentation fault. Signed-off-by: Roger Pau Monné Acked-by: Wei Liu --- Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/libxl.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/l

[Xen-devel] [PATCH v3 4/8] libxl: add support for disk hotplug scripts on FreeBSD

2016-03-31 Thread Roger Pau Monne
Allow FreeBSD to execute hotplug scripts when attaching disk devices. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu --- Changes since v2: - Split the refactoring in a separate patch. --- tools/libxl/libxl_freebsd.c | 36 1 file changed, 36

[Xen-devel] [PATCH v3 0/8] libxl: add support for FreeBSD block hotplug scripts

2016-03-31 Thread Roger Pau Monne
This series enables using hotplug scripts with the FreeBSD blkback implementation. Since FreeBSD blkback can use both block devices and regular RAW files as disks, the physical-device-path xenstore backend node is used in order to store the absolute path to the virtual disk image (either a block

[Xen-devel] [PATCH v3 1/8] blkif: document how FreeBSD uses the physical-device backend node

2016-03-31 Thread Roger Pau Monne
FreeBSD blkback uses the physical-device-path xenstore node in order to fetch the path to the underlying backing storage (either a block device or raw image). This node is set by the hotplug scripts. Also clarify the usage of the physical-device node. Signed-off-by: Roger Pau Monné --- Cc: Ian Ja

[Xen-devel] [PATCH v3 5/8] libxl: properly use vdev vs local device

2016-03-31 Thread Roger Pau Monne
The current code in libxl assumed that vdev is equal to local device, but this is only true for Linux systems. In other OSes the local device can use a nomenclature completely different from the virtual device one. Move the current libxl__devid_to_localdev Linux implementation out of the OS-specif

[Xen-devel] [PATCH v3 3/8] libxl: refactor the FreeBSD hotplug script code

2016-03-31 Thread Roger Pau Monne
This factors out the nic hotplug specific code from the common code path in order to make it easier to add support for disk hotplug scripts. It shouldn't include any functional change. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu --- Changes since v2: - Split the refactoring

[Xen-devel] [PATCH v3 8/8] hotplug/FreeBSD: document disk hotplug interface

2016-03-31 Thread Roger Pau Monne
Add the FreeBSD disk hotplug interface details to the block-scripts.txt document. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: George Dunlap Cc: Wei Liu --- docs/misc/block-scripts.txt | 13 + 1 file changed, 13 insertions(+) diff --git a/docs/misc/block-scripts.txt b/d

[Xen-devel] [PATCH v6] libelf: rewrite symtab/strtab loading

2016-03-31 Thread Roger Pau Monne
Current implementation of elf_load_bsdsyms is broken when loading inside of a HVM guest, because it assumes elf_memcpy_safe is able to write into guest memory space, which it is not. Take the oportunity to do some cleanup and properly document how elf_{parse/load}_bsdsyms works. The new implementa

[Xen-devel] [PATCH] libxl: replace the usage of uuid_t with a char array

2016-04-06 Thread Roger Pau Monne
The internals of the uuid_t struct don't match a big endian octet stream on *BSD systems, which means that it cannot be directly casted to a uint8_t[16]. In order to solve that change the type to be an unsigned char[16], which doesn't imply any other change on Linux. On *BSDs change the helpers so

[Xen-devel] [PATCH v2] libxl: replace the usage of uuid_t with a char array

2016-04-06 Thread Roger Pau Monne
The internals of the uuid_t struct don't match a big endian octet stream on *BSD systems, which means that it cannot be directly casted to a uint8_t[16]. In order to solve that change the type to be an unsigned char[16], which doesn't imply any other change on Linux. On *BSDs change the helpers so

[Xen-devel] [PATCH 1/4] libxl: set the device model version earlier in xenstore

2016-04-07 Thread Roger Pau Monne
So libxl doesn't have to pass the build info around just to get the device model used by the guest. This allows to simplify libxl__device_nic_setdefault. Signed-off-by: Roger Pau Monné Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/libxl.c | 24 +++- tools/libxl/libxl

[Xen-devel] [PATCH 3/4] libxl: only allow guests with a device model to use cd-{eject/insert}

2016-04-07 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/libxl.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 9d785a4..232e2c1 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -2909,6 +2909,12 @@ int lib

[Xen-devel] [PATCH 4/4] libxl: remove code added to use the 'phy' backend with CDROM devices

2016-04-07 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/libxl_device.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/tools/libxl/libxl_device.c b/tools/libxl/libxl_device.c index ce53520..82405a7 100644 --- a/tools/libxl/libxl_device.c +++ b/tool

[Xen-devel] [PATCH 2/4] libxl: set the backend type to Qdisk for CDROM devices on DM HVM guests

2016-04-07 Thread Roger Pau Monne
This is needed because the cd-{insert/eject} functions are not prepared to deal with blkback, which would be used by default if no backend was specified. Signed-off-by: Roger Pau Monné Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/libxl.c | 24 +++- tools/libxl/libxl

[Xen-devel] [PATCH 0/4] libxl: fix CDROM issues

2016-04-07 Thread Roger Pau Monne
Due to recent changes (and intended fixes) CDROM has become quite unstable recently. This series aims to fix the issues reported with having empty CDROM devices in the HVM guest configuration files. It also contains some cleanups of more generic code in order to ease the implementation. After s

[Xen-devel] [PATCH v3] libxl: replace the usage of uuid_t with a char array

2016-04-08 Thread Roger Pau Monne
The internals of the uuid_t struct don't match a big endian octet stream on *BSD systems, which means that it cannot be directly casted to a uint8_t[16]. In order to solve that change the type to be an unsigned char[16], which doesn't imply any other change on Linux. On *BSDs change the helpers so

[Xen-devel] [PATCH] xen: change the sizes of fields in the HVM start info layout to be 64bits

2016-04-08 Thread Roger Pau Monne
At the moment the only consumer of this structure is x86, but other arches might also use it, so make all the fields 64bits. On x86 Xen will still try to place everything below the 4GiB boundary, but that might not be feasible in other arches. Signed-off-by: Roger Pau Monné Requested-by: Jan Beul

[Xen-devel] [PATCH v2 3/4] libxl: only allow guests with a device model to use cd-{eject/insert}

2016-04-08 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné Acked-by: Wei Liu --- Cc: Ian Jackson Cc: Wei Liu --- Changes since v1: - Remove HVM from the error message. --- tools/libxl/libxl.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 9d785a4..e6c3d11 100644

[Xen-devel] [PATCH v2 1/4] libxl: set the device model version earlier in xenstore

2016-04-08 Thread Roger Pau Monne
So libxl doesn't have to pass the build info around just to get the device model used by the guest. This allows to simplify libxl__device_nic_setdefault. Signed-off-by: Roger Pau Monné Acked-by: Wei Liu --- Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/libxl.c | 24 +++-

[Xen-devel] [PATCH v2 0/4] libxl: fix CDROM issues

2016-04-08 Thread Roger Pau Monne
Due to recent changes (and intended fixes) CDROM has become quite unstable recently. This series aims to fix the issues reported with having empty CDROM devices in the HVM guest configuration files. It also contains some cleanups of more generic code in order to ease the implementation. After some

[Xen-devel] [PATCH v2 2/4] libxl: set the backend type to Qdisk for CDROM devices on DM HVM guests

2016-04-08 Thread Roger Pau Monne
This is needed because the cd-{insert/eject} functions are not prepared to deal with blkback, which would be used by default if no backend was specified. Signed-off-by: Roger Pau Monné Acked-by: Wei Liu --- Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/libxl.c | 24 +++-

[Xen-devel] [PATCH v2 4/4] libxl: remove code added to use the 'phy' backend with CDROM devices

2016-04-08 Thread Roger Pau Monne
This is a partial revert of 612f15, that allowed CDROM devices to use the 'phy' PV backend. Due to limitations in the current implementation of the libxl_cdrom_insert function, the PV backend used in conjunction with an emulated CDROM device must always be Qdisk at the moment. This is due to libxl_

[Xen-devel] [PATCH v2] xen: change the sizes of memory fields in the HVM start info to be 64bits

2016-04-12 Thread Roger Pau Monne
At the moment the only consumer of this structure is x86, but other arches might also use it, so make all the fields 64bits. On x86 Xen will still try to place everything below the 4GiB boundary, but that might not be feasible in other arches. Signed-off-by: Roger Pau Monné Requested-by: Jan Beul

[Xen-devel] [PATCH for-4.7 2/5] build: set HOSTCXX based on clang value for Kconfig xconfig target

2016-04-15 Thread Roger Pau Monne
The xconfig Kconfig target requires a C++ compiler because it uses Qt. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Jan Beulich Cc: Keir Fraser Cc: Tim Deegan --- Config.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Config.mk b/Config.mk index deaa768..5a31e2e 100644 ---

[Xen-devel] [PATCH for-4.7 1/5] build: make HOSTCC conditional on the value of clang

2016-04-15 Thread Roger Pau Monne
Previously HOSTCC was always hardcoded to gcc Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Jan Beulich Cc: Keir Fraser Cc: Tim Deegan --- Config.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Config.mk b/Config.mk index bfab893..deaa768 100644 --- a/Config

[Xen-devel] [PATCH for-4.7 3/5] build: pass HOST{CC/CXX} value down to Kconfig

2016-04-15 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Jan Beulich Cc: Keir Fraser Cc: Tim Deegan --- xen/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index c908544..b483823 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -242,

[Xen-devel] [PATCH for-4.7 4/5] build: remove Kconfig forced gcc selection

2016-04-15 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné --- Cc: Doug Goldstein --- xen/tools/kconfig/Makefile.kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/tools/kconfig/Makefile.kconfig b/xen/tools/kconfig/Makefile.kconfig index 815f306..dbd8912 100644 --- a/xen/tools/kconfig/Make

[Xen-devel] [PATCH for-4.7 0/5] build: fixes for building Xen with clang

2016-04-15 Thread Roger Pau Monne
This series contain small bug-fixes for building the Xen microkernel with clang. I think they are suitable for 4.7, but that's just my opinion. I've also noticed that Xen always sets "-no-integrated-as" when using clang, because previous versions (<3.8.0) didn't support .code16/.code32/.code64 in

[Xen-devel] [PATCH for-4.7 5/5] travis: add an alias for gcc when using clang

2016-04-15 Thread Roger Pau Monne
In order to prevent it's usage. Since the tests are run on a Linux system gcc is always present, so it's hard to detect if gcc is used in the clang build. Signed-off-by: Roger Pau Monné --- Cc: Doug Goldstein --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.tra

Re: [Xen-devel] [OSSTEST PATCH] crontab: Drop linux-mingo-tip-master linux-next linux-linus

2016-04-22 Thread Roger Pau Monne
: Konrad Rzeszutek Wilk > CC: Boris Ostrovsky > CC: David Vrabel > CC: Stefano Stabellini > CC: Wei Liu > CC: Roger Pau Monne > CC: Juergen Gross > CC: Anshul Makkar This looks fine to me, but I think I needs to be Acked by the Linux maintainers. FWIW: Acked-by: R

[Xen-devel] [PATCH v2 for-4.7 08/14] libxl: fix shutdown_reason type in list_domains

2016-04-26 Thread Roger Pau Monne
It should be an enum, not an unsigned. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/xl_cmdimpl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 6346017..8ff54e1 100644 --- a/tools/l

[Xen-devel] [PATCH v2 for-4.7 03/14] build: pass HOST{CC/CXX} value down to Kconfig

2016-04-26 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné Acked-by: Ian Jackson --- Cc: Ian Jackson Cc: Jan Beulich Cc: Keir Fraser Cc: Tim Deegan --- xen/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index c908544..b483823 100644 --- a/xen/Makefile +++

[Xen-devel] [PATCH v2 for-4.7 06/14] xen/tools: fix substitution of __align8__ uint64_t inside of headers

2016-04-26 Thread Roger Pau Monne
The current seedery doesn't work with BSD sed, so remove the try to match int64_t also (since there's none at the moment). Also, apply the same treatment to all arch headers, currently this is only done to x86_64 headers. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu --- tools

[Xen-devel] [PATCH v2 for-4.7 01/14] build: make HOSTCC conditional on the value of clang

2016-04-26 Thread Roger Pau Monne
Previously HOSTCC was always hardcoded to gcc Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Jan Beulich Cc: Keir Fraser Cc: Tim Deegan --- Changes since v1: - Use ?= instead of = --- Config.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Config.mk b/Config.

[Xen-devel] [PATCH v2 for-4.7 12/14] libxl: fix passing the type argument to xc_psr_*

2016-04-26 Thread Roger Pau Monne
The xc_psr_* functions expect the type to be xc_psr_cat_type instead of libxl_psr_cbm_type, so do the conversion. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/libxl_psr.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/libxl/li

[Xen-devel] [PATCH v2 for-4.7 05/14] tools/headers: prevent adding two __align8__ to uint64_t in ARM headers

2016-04-26 Thread Roger Pau Monne
Due to the fact that on ARM headers types are substituted to uint64_t and then uint64_t is also substituted to contain the aligment, this would lead to some types containing two __align8__ directives. Fix this by first expanding Xen specific types to uint64_t only, and then replacing all the uint64

[Xen-devel] [PATCH v2 for-4.7 07/14] libxc: fix uninitialized variable

2016-04-26 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu --- tools/libxc/xc_dom_bzimageloader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxc/xc_dom_bzimageloader.c b/tools/libxc/xc_dom_bzimageloader.c index 7fde42a..0a4041c 100644 --- a/tools/libxc/xc_d

[Xen-devel] [PATCH v2 for-4.7 04/14] build: remove Kconfig forced gcc selection

2016-04-26 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné --- Cc: Doug Goldstein --- xen/tools/kconfig/Makefile.kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/tools/kconfig/Makefile.kconfig b/xen/tools/kconfig/Makefile.kconfig index 815f306..dbd8912 100644 --- a/xen/tools/kconfig/Make

[Xen-devel] [PATCH v2 for-4.7 14/14] tools/python: corrently use LDFLAGS and CFLAGS

2016-04-26 Thread Roger Pau Monne
It is incorrect to add the LDFLAGS to the CFLAGS, and some compilers will error out if linker flags are passed when creating object files. Fix this by properly passing CFLAGS and LDFLAGS, instead of putting everything in CFLAGS. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu ---

[Xen-devel] [PATCH v2 for-4.7 00/14] Fixes for compiling with clang

2016-04-26 Thread Roger Pau Monne
Hello, This is a set of bug fixes for compiling both the hypervisor and the toolstack with clang. I've only tested it with clang 3.8.0 from base FreeBSD, so I'm not sure if it's going to work with _all_ clang versions, but should be better than nothing. AFAICT, most of the issues that clang fo

[Xen-devel] [PATCH v2 for-4.7 10/14] libxl: add the printf-like attributes to a couple of functions

2016-04-26 Thread Roger Pau Monne
Or else clang complains with: error: format string is not a string literal This looks quite pedantic, but I don't know of any other way to get rid of those errors. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/libxl_internal.c| 16 tools/

[Xen-devel] [PATCH v2 for-4.7 13/14] oxenstored: fix error when shifting negative value

2016-04-26 Thread Roger Pau Monne
By explicitly casting it to unsigned. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu --- tools/ocaml/xenstored/systemd_stubs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/ocaml/xenstored/systemd_stubs.c b/tools/ocaml/xenstored/systemd_stubs.c

[Xen-devel] [PATCH v2 for-4.7 02/14] build: set HOSTCXX based on clang value for Kconfig xconfig target

2016-04-26 Thread Roger Pau Monne
The xconfig Kconfig target requires a C++ compiler because it uses Qt. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Jan Beulich Cc: Keir Fraser Cc: Tim Deegan --- Config.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Config.mk b/Config.mk index fd8371a..4a5ebed 100644 ---

[Xen-devel] [PATCH v2 for-4.7 09/14] xl: fix usage of libxl_get_scheduler

2016-04-26 Thread Roger Pau Monne
It returns an int, not a libxl_scheduler. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/xl_cmdimpl.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 8ff54e1..2ebca0a 100644

[Xen-devel] [PATCH v2 for-4.7 11/14] libxl: add explicit casts from yajl_gen_status to yajl_status

2016-04-26 Thread Roger Pau Monne
Or else clang complains with: implicit conversion from enumeration type 'yajl_gen_status' to different enumeration type 'yajl_status' [-Werror,-Wenum-conversion] Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/libxl_json.c | 29 ++--- 1 f

Re: [Xen-devel] [PATCH v2 for-4.7 07/14] libxc: fix uninitialized variable

2016-04-27 Thread Roger Pau Monne
On Tue, Apr 26, 2016 at 04:16:51PM +0100, Wei Liu wrote: > On Tue, Apr 26, 2016 at 04:52:16PM +0200, Roger Pau Monne wrote: > > Signed-off-by: Roger Pau Monné > > --- > > Cc: Ian Jackson > > Cc: Wei Liu > > --- > > tools/libxc/xc_dom_bzimageloader.c

[Xen-devel] [PATCH v3 for-4.7 01/16] build: make HOSTCC conditional on the value of clang

2016-04-27 Thread Roger Pau Monne
Previously HOSTCC was always hardcoded to gcc Signed-off-by: Roger Pau Monné Reviewed-by: Andrew Cooper Reviewed-by: Doug Goldstein --- Cc: Ian Jackson Cc: Jan Beulich Cc: Keir Fraser Cc: Tim Deegan --- Changes since v1: - Use ?= instead of = --- Config.mk | 3 ++- 1 file changed, 2 inser

[Xen-devel] [PATCH v3 for-4.7 03/16] build: pass HOST{CC/CXX} value down to Kconfig

2016-04-27 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné Acked-by: Ian Jackson Reviewed-by: Andrew Cooper Reviewed-by: Doug Goldstein --- Cc: Ian Jackson Cc: Jan Beulich Cc: Keir Fraser Cc: Tim Deegan --- xen/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/Makefile b/xen/Makef

[Xen-devel] [PATCH v3 for-4.7 02/16] build: set HOSTCXX based on clang value for Kconfig xconfig target

2016-04-27 Thread Roger Pau Monne
The xconfig Kconfig target requires a C++ compiler because it uses Qt. Signed-off-by: Roger Pau Monné Reviewed-by: Andrew Cooper Reviewed-by: Doug Goldstein --- Cc: Ian Jackson Cc: Jan Beulich Cc: Keir Fraser Cc: Tim Deegan --- Config.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git

[Xen-devel] [PATCH v3 for-4.7 12/16] libxl: add explicit casts from yajl_gen_status to yajl_status

2016-04-27 Thread Roger Pau Monne
Or else clang complains with: implicit conversion from enumeration type 'yajl_gen_status' to different enumeration type 'yajl_status' [-Werror,-Wenum-conversion] Signed-off-by: Roger Pau Monné Acked-by: Wei Liu --- Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/libxl_json.c | 29 +++

[Xen-devel] [PATCH v3 for-4.7 04/16] build: remove Kconfig forced gcc selection

2016-04-27 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné Acked-by: Doug Goldstein Reviewed-by: Andrew Cooper --- Cc: Doug Goldstein --- xen/tools/kconfig/Makefile.kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/tools/kconfig/Makefile.kconfig b/xen/tools/kconfig/Makefile.kconfig inde

[Xen-devel] [PATCH v3 for-4.7 05/16] tools/headers: prevent adding two __align8__ to uint64_t in ARM headers

2016-04-27 Thread Roger Pau Monne
Due to the fact that on ARM headers types are substituted to uint64_t and then uint64_t is also substituted to contain the aligment, this would lead to some types containing two __align8__ directives. Fix this by first expanding Xen specific types to uint64_t only, and then replacing all the uint64

[Xen-devel] [PATCH v3 for-4.7 11/16] libxl: convert libxl__device_model_xs_path to a macro

2016-04-27 Thread Roger Pau Monne
Since it's unsafe to code it as a function because it would end up passing a non literal string to a printf like function. Signed-off-by: Roger Pau Monné --- Cc: Wei Liu Cc: Ian Jackson --- Changes since v2: - Split the libxl__device_model_xs_path convert to a separate patch. - s/libxl__devic

[Xen-devel] [PATCH v3 for-4.7 00/16] Fixes for compiling with clang

2016-04-27 Thread Roger Pau Monne
Hello, This is a set of bug fixes for compiling both the hypervisor and the toolstack with clang. I've only tested it with clang 3.8.0 from base FreeBSD, so I'm not sure if it's going to work with _all_ clang versions, but should be better than nothing. AFAICT, most of the issues that clang fo

[Xen-devel] [PATCH v3 for-4.7 15/16] tools/python: corrently use LDFLAGS and CFLAGS

2016-04-27 Thread Roger Pau Monne
It is incorrect to add the LDFLAGS to the CFLAGS, and some compilers will error out if linker flags are passed when creating object files. Fix this by properly passing CFLAGS and LDFLAGS, instead of putting everything in CFLAGS. Signed-off-by: Roger Pau Monné Reviewed-by: Doug Goldstein Acked-by

[Xen-devel] [PATCH v3 for-4.7 16/16] tools/pygrub: fix usage of LDFLAGS

2016-04-27 Thread Roger Pau Monne
LDFLAGS cannot be appended to CFLAGS, instead pass them down as env variables. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu --- tools/pygrub/Makefile | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/pygrub/Makefile b/tools/pygrub/Makefile index

[Xen-devel] [PATCH v3 for-4.7 07/16] libxc: fix usage of uninitialized variable

2016-04-27 Thread Roger Pau Monne
*size should be used instead, because it contains the size of the buffer in out_buf. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu --- Changes since v2: - Use *size instead of 0, because it will contain the actual size of the out_buf buffer. --- tools/libxc/xc_dom_bzimagel

[Xen-devel] [PATCH v3 for-4.7 13/16] libxl: fix passing the type argument to xc_psr_*

2016-04-27 Thread Roger Pau Monne
The xc_psr_* functions expect the type to be xc_psr_cat_type instead of libxl_psr_cbm_type, so do the conversion. Signed-off-by: Roger Pau Monné Acked-by: Wei Liu --- Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/libxl_psr.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --g

[Xen-devel] [PATCH v3 for-4.7 08/16] libxl: fix shutdown_reason type in list_domains

2016-04-27 Thread Roger Pau Monne
It should be an enum, not an unsigned. Signed-off-by: Roger Pau Monné Acked-by: Wei Liu Reviewed-by: Doug Goldstein --- Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/xl_cmdimpl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdim

[Xen-devel] [PATCH v3 for-4.7 14/16] oxenstored: fix error when shifting negative value

2016-04-27 Thread Roger Pau Monne
By explicitly casting it to unsigned. Reasoning on why this is needed, provided by Andrew Cooper: "Ocaml stores integers shifted left by one, and with the bottom bit set. Values with the bottom bit clear are pointers into the GC'd heap. Values with the bottom bit set are integers, and need to be

[Xen-devel] [PATCH v3 for-4.7 10/16] libxl: add the printf-like attributes to a couple of functions

2016-04-27 Thread Roger Pau Monne
Or else clang complains with: error: format string is not a string literal Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/libxl_internal.h| 4 ++-- tools/libxl/libxl_save_helper.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/l

[Xen-devel] [PATCH v3 for-4.7 09/16] xl: fix usage of libxl_get_scheduler

2016-04-27 Thread Roger Pau Monne
It returns an int, not a libxl_scheduler. Signed-off-by: Roger Pau Monné Reviewed-by: Doug Goldstein --- Cc: Ian Jackson Cc: Wei Liu --- Changes since v2: - s/sched_rc/rc/ --- tools/libxl/xl_cmdimpl.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/libxl/xl

[Xen-devel] [PATCH v3 for-4.7 06/16] xen/tools: fix substitution of __align8__ uint64_t inside of headers

2016-04-27 Thread Roger Pau Monne
The current seedery doesn't work with BSD sed, so remove the try to match int64_t also (since there's none at the moment). Also, apply the same treatment to all arch headers, currently this is only done to x86_64 headers. Signed-off-by: Roger Pau Monné Reviewed-by: Andrew Cooper Acked-by: Wei Li

[Xen-devel] [PATCH for-4.7] build/xen: fix assembler instruction tests

2016-04-27 Thread Roger Pau Monne
The current test performed in order to check if the assembler supports certain instructions doesn't take into account the value of AFLAGS, which when using clang contains the option that disables the integrated assembler due to the lack of features. As a result of this, the current instruction tes

[Xen-devel] [PATCH for-4.7] build: use C{C/XX} as HOSTC{C/XX} if we are not cross-compiling

2016-04-28 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné --- Config.mk | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Config.mk b/Config.mk index 9b097c9..67b26dd 100644 --- a/Config.mk +++ b/Config.mk @@ -45,6 +45,12 @@ DESTDIR ?= / # Allow phony attribute to be listed as dependency rather than fake targe

Re: [Xen-devel] [PATCH for-4.7] build: use C{C/XX} as HOSTC{C/XX} if we are not cross-compiling

2016-04-28 Thread Roger Pau Monne
On Thu, Apr 28, 2016 at 04:09:46AM -0600, Jan Beulich wrote: > >>> On 28.04.16 at 11:48, wrote: > > Signed-off-by: Roger Pau Monné > > --- > > Config.mk | 6 ++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/Config.mk b/Config.mk > > index 9b097c9..67b26dd 100644 > > --- a/Config.

Re: [Xen-devel] [PATCH v2 for-4.7 12/14] libxl: fix passing the type argument to xc_psr_*

2016-04-29 Thread Roger Pau Monne
On Thu, Apr 28, 2016 at 09:49:11PM +0100, Wei Liu wrote: > On Thu, Apr 28, 2016 at 06:29:03PM +0100, Ian Jackson wrote: > > Wei Liu writes ("Re: [PATCH v2 for-4.7 12/14] libxl: fix passing the type > > argument to xc_psr_*"): > > > On Tue, Apr 26, 2016 at 04:52

[Xen-devel] [PATCH for-4.7 2/4] tools/xsplice: corrently use errno

2016-04-29 Thread Roger Pau Monne
Some error paths incorrectly used rc instead of errno. Signed-off-by: Roger Pau Monné --- Cc: Konrad Rzeszutek Wilk Cc: Ross Lagerwall Cc: Ian Jackson Cc: Wei Liu --- tools/misc/xen-xsplice.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/misc/xen-xsplice.c b/

[Xen-devel] [PATCH for-4.7 1/4] xen: remove usage of ENODATA error code

2016-04-29 Thread Roger Pau Monne
According to the POSIX standard for error codes [0], ENODATA is both obsolescent (so it may be removed in the future) and optional. Replace it's usage with ENOENT, which seems like the closest match. Both FreeBSD and OpenBSD don't have this error code in the native errno.h headers. [0] http://pubs

[Xen-devel] [PATCH for-4.7 4/4] xen/xsplice: remove OSABI check when loading a payload

2016-04-29 Thread Roger Pau Monne
FreeBSD linker sets the OS ABI to ELFOSABI_FREEBSD, but the payload can still be loaded without issues. All the ELF OS ABIs follow the System V calling convention, and the OS ABI doesn't really matter because Xen is a standalone kernel. Signed-off-by: Roger Pau Monné --- Cc: Konrad Rzeszutek Wil

[Xen-devel] [PATCH for-4.7 3/4] tools/xsplice: fix mixing system errno values with Xen ones.

2016-04-29 Thread Roger Pau Monne
Avoid using system errno values when comparing with Xen errno values. Signed-off-by: Roger Pau Monné --- Cc: Konrad Rzeszutek Wilk Cc: Ross Lagerwall Cc: Ian Jackson Cc: Wei Liu --- Using errno values inside of hypercall structs is not right IMHO, but there are already several occurrences of

[Xen-devel] [PATCH for-4.7 0/4] xsplice fixes

2016-04-29 Thread Roger Pau Monne
Hello, This series contains bugfixes for xSplice, that popped up when testing it on OSes != Linux. Roger. ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH for-4.7 1/4] xen: remove usage of ENODATA error code

2016-04-29 Thread Roger Pau Monne
On Fri, Apr 29, 2016 at 08:44:48AM -0600, Jan Beulich wrote: > >>> On 29.04.16 at 16:21, wrote: > > According to the POSIX standard for error codes [0], ENODATA is both > > obsolescent (so it may be removed in the future) and optional. > > It being optional still doesn't preclude us using it. >

Re: [Xen-devel] [PATCH for-4.7 2/4] tools/xsplice: corrently use errno

2016-04-29 Thread Roger Pau Monne
On Fri, Apr 29, 2016 at 03:57:23PM +0100, Wei Liu wrote: > On Fri, Apr 29, 2016 at 04:21:18PM +0200, Roger Pau Monne wrote: > > Some error paths incorrectly used rc instead of errno. > > > > Signed-off-by: Roger Pau Monné > > --- > > Cc: Konrad Rzeszutek Wilk &g

Re: [Xen-devel] [PATCH for-4.7 3/4] tools/xsplice: fix mixing system errno values with Xen ones.

2016-04-29 Thread Roger Pau Monne
On Fri, Apr 29, 2016 at 04:02:33PM +0100, Wei Liu wrote: > On Fri, Apr 29, 2016 at 04:21:19PM +0200, Roger Pau Monne wrote: > > Avoid using system errno values when comparing with Xen errno values. > > > > Signed-off-by: Roger Pau Monné > > --- > > Cc: Ko

Re: [Xen-devel] [PATCH for-4.7 4/4] xen/xsplice: remove OSABI check when loading a payload

2016-04-29 Thread Roger Pau Monne
On Fri, Apr 29, 2016 at 08:48:39AM -0600, Jan Beulich wrote: > >>> On 29.04.16 at 16:21, wrote: > > FreeBSD linker sets the OS ABI to ELFOSABI_FREEBSD, but the payload can > > still be loaded without issues. > > > > All the ELF OS ABIs follow the System V calling convention, and the OS ABI > > do

[Xen-devel] Returning errno values inside of hypercall structs (was: Re: [PATCH for-4.7 3/4] tools/xsplice: fix mixing system)

2016-04-29 Thread Roger Pau Monne
On Fri, Apr 29, 2016 at 04:30:16PM +0100, Wei Liu wrote: > On Fri, Apr 29, 2016 at 05:12:51PM +0200, Roger Pau Monne wrote: > > On Fri, Apr 29, 2016 at 04:02:33PM +0100, Wei Liu wrote: > > > I have a gut feeling that returning XEN_ errno to userspace program is > > &g

Re: [Xen-devel] Returning errno values inside of hypercall structs (was: Re: [PATCH for-4.7 3/4] tools/xsplice: fix mixing system)

2016-04-29 Thread Roger Pau Monne
On Fri, Apr 29, 2016 at 12:22:32PM -0400, Konrad Rzeszutek Wilk wrote: > On Fri, Apr 29, 2016 at 06:16:19PM +0200, Roger Pau Monne wrote: > > On Fri, Apr 29, 2016 at 04:30:16PM +0100, Wei Liu wrote: > > > On Fri, Apr 29, 2016 at 05:12:51PM +0200, Roger Pau Monne wrote: > >

Re: [Xen-devel] [PATCH for-4.7 1/4] xen: remove usage of ENODATA error code

2016-04-29 Thread Roger Pau Monne
On Fri, Apr 29, 2016 at 10:19:41AM -0600, Jan Beulich wrote: > >>> On 29.04.16 at 17:06, wrote: > > On Fri, Apr 29, 2016 at 08:44:48AM -0600, Jan Beulich wrote: > >> >>> On 29.04.16 at 16:21, wrote: > >> > According to the POSIX standard for error codes [0], ENODATA is both > >> > obsolescent (so

Re: [Xen-devel] [PATCH for-4.7 1/4] xen: remove usage of ENODATA error code

2016-04-29 Thread Roger Pau Monne
On Fri, Apr 29, 2016 at 10:42:06AM -0600, Jan Beulich wrote: > >>> On 29.04.16 at 18:34, wrote: > > On Fri, Apr 29, 2016 at 10:19:41AM -0600, Jan Beulich wrote: > >> >>> On 29.04.16 at 17:06, wrote: > >> > On Fri, Apr 29, 2016 at 08:44:48AM -0600, Jan Beulich wrote: > >> >> >>> On 29.04.16 at 16:

Re: [Xen-devel] Returning errno values inside of hypercall structs (was: Re: [PATCH for-4.7 3/4] tools/xsplice: fix mixing system)

2016-04-29 Thread Roger Pau Monne
On Fri, Apr 29, 2016 at 12:59:30PM -0400, Konrad Rzeszutek Wilk wrote: > > > > IMHO, the best way to solve this is to define a set of XSPLICE_ERROR_* > > > > that > > > > covers the error codes returned by xsplice, and use that instead of > > > > XEN_* > > > > errno values. This would make it m

Re: [Xen-devel] [PATCH for-4.7 1/4] xen: remove usage of ENODATA error code

2016-05-02 Thread Roger Pau Monne
On Mon, May 02, 2016 at 12:22:35AM -0600, Jan Beulich wrote: > >>> On 29.04.16 at 18:52, wrote: > > On Fri, Apr 29, 2016 at 10:42:06AM -0600, Jan Beulich wrote: > >> >>> On 29.04.16 at 18:34, wrote: > >> > On Fri, Apr 29, 2016 at 10:19:41AM -0600, Jan Beulich wrote: > >> >> >>> On 29.04.16 at 17:

Re: [Xen-devel] [PATCH for-4.7 1/4] xen: remove usage of ENODATA error code

2016-05-02 Thread Roger Pau Monne
On Mon, May 02, 2016 at 03:06:21AM -0600, Jan Beulich wrote: > >>> On 02.05.16 at 10:55, wrote: > > On Mon, May 02, 2016 at 12:22:35AM -0600, Jan Beulich wrote: > >> But how would that help you? Would you mean to monitor future > >> patches for not again introducing some use of ENODATA that the >

[Xen-devel] [PATCH v2 for-4.7 1/6] libxl: add a define for equivalent ENODATA errno on FreeBSD

2016-05-03 Thread Roger Pau Monne
Currently FreeBSD lacks the ENODATA errno value, so the privcmd driver always translates ENODATA to ENOENT, add a define to libxl in order to correctly match ENODATA with ENOENT on FreeBSD. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/libxl_osdeps.h | 7 ++

[Xen-devel] [PATCH v2 for-4.7 6/6] libxl: fix usage of XEN_EOPNOTSUPP

2016-05-03 Thread Roger Pau Monne
The errno values returned by libxc are already translated into the underlying OS error space, so it's wrong to compare them against Xen error codes. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/libxl_dom_save.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[Xen-devel] [PATCH v2 for-4.7 4/6] xen/xsplice: check against ELFOSABI_NONE instead of ELFOSABI_SYSV

2016-05-03 Thread Roger Pau Monne
They are equivalent, but using ELFOSABI_NONE is more correct in this context. Signed-off-by: Roger Pau Monné --- Cc: Konrad Rzeszutek Wilk Cc: Ross Lagerwall --- xen/common/xsplice_elf.c | 2 +- xen/include/xen/elfstructs.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git

[Xen-devel] [PATCH v2 for-4.7 0/6] xSplice fixes (+1)

2016-05-03 Thread Roger Pau Monne
Hello, This series contains bugfixes for xSplice, that popped up when testing it on OSes != Linux. Patch 6/6 is a bugfix for the migration code, that was incorrectly using a XEN_E* value. I think they should all go into 4.7 on the basis that they are bugfixes. Roger. _

[Xen-devel] [PATCH v2 for-4.7 5/6] xen/xsplice: add ELFOSABI_FREEBSD as a supported OSABI for payloads

2016-05-03 Thread Roger Pau Monne
The calling convention used by the FreeBSD ELF OSABI is exactly the same as the the one defined by System V, so payloads with a FreeBSD OSABI should be accepted by the xsplice machinery. Signed-off-by: Roger Pau Monné --- Cc: Konrad Rzeszutek Wilk Cc: Ross Lagerwall --- xen/common/xsplice_elf.

[Xen-devel] [PATCH v2 for-4.7 3/6] tools/xsplice: fix mixing system errno values with Xen ones.

2016-05-03 Thread Roger Pau Monne
Avoid using system errno values when comparing with Xen errno values. Signed-off-by: Roger Pau Monné --- Cc: Konrad Rzeszutek Wilk Cc: Ross Lagerwall Cc: Ian Jackson Cc: Wei Liu --- Using errno values inside of hypercall structs is not right IMHO, but there are already several occurrences of

[Xen-devel] [PATCH v2 for-4.7 2/6] tools/xsplice: corrently use errno

2016-05-03 Thread Roger Pau Monne
Some error paths incorrectly used rc instead of errno. Signed-off-by: Roger Pau Monné --- Cc: Konrad Rzeszutek Wilk Cc: Ross Lagerwall Cc: Ian Jackson Cc: Wei Liu --- Changes since v1: - Fix error message. --- tools/misc/xen-xsplice.c | 7 --- 1 file changed, 4 insertions(+), 3 deletion

Re: [Xen-devel] [PATCH v2 for-4.7 5/6] xen/xsplice: add ELFOSABI_FREEBSD as a supported OSABI for payloads

2016-05-04 Thread Roger Pau Monne
On Tue, May 03, 2016 at 08:17:15AM -0600, Jan Beulich wrote: > >>> On 03.05.16 at 12:55, wrote: > > The calling convention used by the FreeBSD ELF OSABI is exactly the same as > > the the one defined by System V, so payloads with a FreeBSD OSABI should be > > accepted by the xsplice machinery. >

Re: [Xen-devel] [PATCH v2 for-4.7 5/6] xen/xsplice: add ELFOSABI_FREEBSD as a supported OSABI for payloads

2016-05-05 Thread Roger Pau Monne
On Wed, May 04, 2016 at 04:34:26AM -0600, Jan Beulich wrote: > >>> On 04.05.16 at 11:48, wrote: > > On Tue, May 03, 2016 at 08:17:15AM -0600, Jan Beulich wrote: > >> >>> On 03.05.16 at 12:55, wrote: > >> > The calling convention used by the FreeBSD ELF OSABI is exactly the same > >> > as > >> >

Re: [Xen-devel] [PATCH v2 for-4.7 3/6] tools/xsplice: fix mixing system errno values with Xen ones.

2016-05-06 Thread Roger Pau Monne
On Tue, May 03, 2016 at 09:37:01AM -0400, Konrad Rzeszutek Wilk wrote: > On Tue, May 03, 2016 at 02:29:20PM +0100, Wei Liu wrote: > > On Tue, May 03, 2016 at 09:27:23AM -0400, Konrad Rzeszutek Wilk wrote: > > > On Tue, May 03, 2016 at 12:55:07PM +0200, Roger Pau Monne wrote: &

[Xen-devel] [PATCH 3/3] xtf: fix usage of "-executable" with find

2016-05-06 Thread Roger Pau Monne
"-executable" is a GNU only extension to find. Instead replace it with a POSIX compatible one. Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7657e19..fd8c3e0 100644 --- a/Makefile +

[Xen-devel] [PATCH 0/3] XTF: small fixes

2016-05-06 Thread Roger Pau Monne
Hello, This is a series of very small fixes for XTF, the first two are code fixes, while the last one is a build system fix. Thanks, Roger. ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel

[Xen-devel] [PATCH 2/3] xtf: avoid shifting a negative value

2016-05-06 Thread Roger Pau Monne
Because it's undefined behaviour. Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper --- include/arch/x86/processor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/arch/x86/processor.h b/include/arch/x86/processor.h index c9f253f..841953c 100644 --- a/include/arc

  1   2   3   4   5   6   7   8   9   10   >