[Xen-devel] [PATCH v16 00/18] osstest: initial FreeBSD support

2017-11-10 Thread Roger Pau Monne
Hello, This are again the remaining non-acked patches of the FreeBSD osstest series. The two patches sent with this cover letter fix two issues found on the Mass colo. Patch 17 fixes an issue where the FreeBSD installer bootloader receives random keystrokes on the console, thus aborting the autom

[Xen-devel] [PATCH v16 18/18] osstest: expand the list of tested disk controllers

2017-11-10 Thread Roger Pau Monne
The Mass osstest instance has a more diverse list of hardware disk controllers, so expand the list in order to include all the possible disk drivers. For the record, this list can be found at: usr.sbin/bsdconfig/share/device.subr In the FreeBSD source tree. Signed-off-by: Roger Pau Monné ---

[Xen-devel] [PATCH v16 17/18] osstest: remove the loader timeout from the install image

2017-11-10 Thread Roger Pau Monne
When the FreeBSD installer is booted on the godello{0/1} boxes it receives spurious key strokes. This doesn't happen so far when booted from disk, or with any other boxes. In order to cope with this remove the loader timeout on the install image. Note that failure to boot will still drop the loade

[Xen-devel] [PATCH v2 for-next 6/9] kconfig/gcov: rename to coverage

2017-11-09 Thread Roger Pau Monne
So it can be used by both gcc and clang. Just add the Kconfig option and modify the makefiles so the llvm coverage specific code can be added in a follow up patch. Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk

[Xen-devel] [PATCH v2 for-next 7/9] coverage: introduce support for llvm profiling

2017-11-09 Thread Roger Pau Monne
Introduce the functionality in order to fill the hooks of the cov_sysctl_ops struct. Note that the functionality is still not wired into the build system. Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk Cc: Stef

[Xen-devel] [PATCH v2 for-next 4/9] gcov: introduce hooks for the sysctl

2017-11-09 Thread Roger Pau Monne
So that other implementations of the sysctl can be added. Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan Cc: Wei Liu --- Changes since v1: - Constify cov_ops. - Introd

[Xen-devel] [PATCH v2 for-next 8/9] xsm: add bodge when compiling with llvm coverage support

2017-11-09 Thread Roger Pau Monne
llvm coverage support seems to disable some of the optimizations needed in order to compile xsm, and the end result is that references to __xsm_action_mismatch_detected are left in the object files. Since coverage support cannot be used in production, introduce __xsm_action_mismatch_detected for l

[Xen-devel] [PATCH v2 for-next 3/9] gcov: rename sysctl and functions

2017-11-09 Thread Roger Pau Monne
Change gcov to cov (for internal interfaces) or coverage (for the public ones). Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu Cc: Andrew Cooper Cc: George Dunlap Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan --- Changes since v1: - Use c

[Xen-devel] [PATCH v2 for-next 2/9] gcov: rename folder and header to coverage

2017-11-09 Thread Roger Pau Monne
Preparatory change before adding llvm profiling support. No functional change. Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan Cc: Wei Liu --- Changes since v1: - Rename

[Xen-devel] [PATCH v2 for-next 5/9] coverage: introduce generic file

2017-11-09 Thread Roger Pau Monne
It will contain the generic implementation of sysctl_cov_op, which will be shared between all the coverage implementations. Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan

[Xen-devel] [PATCH v2 for-next 1/9] kconfig/gcov: remove gcc version choice from kconfig

2017-11-09 Thread Roger Pau Monne
Use autodetect only. Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan Cc: Wei Liu --- Changes since v1: - New in this version. --- xen/Kconfig.debug| 46

[Xen-devel] [PATCH v2 for-next 0/9] LLVM coverage support for Xen

2017-11-09 Thread Roger Pau Monne
ing a PVHv2 Dom0 can be found at: http://xenbits.xen.org/people/royger/xen_profile/ Thanks, Roger. Roger Pau Monne (9): kconfig/gcov: remove gcc version choice from kconfig gcov: rename folder and header to coverage gcov: rename sysctl and functions gcov: introduce hooks for the sys

[Xen-devel] [PATCH v2 for-next 9/9] coverage: add documentation for LLVM coverage

2017-11-09 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan Cc: Wei Liu --- Changes since v1: - s/gmake/make/. - Fix gcov section to mention CONFIG_COVERAGE instead of CONFIG_GCOV.

[Xen-devel] [PATCH for-4.10] libevtchn: fix build on non-Linux hosts

2017-11-08 Thread Roger Pau Monne
Non-Linux hosts (where osdep_evtchn_restrict is not yet supported) made use of errno without including errno.h, fix this by including the header. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu Cc: Julien Grall --- Build fix for 4.10: it only affects non-Linux, and without this

[Xen-devel] [PATCH for-4.10] gcov: return EOPNOTSUPP for unimplemented gcov domctl

2017-11-07 Thread Roger Pau Monne
ENOSYS should only be used by unimplemented top-level syscalls. Use EOPNOTSUPP instead. Signed-off-by: Roger Pau Monné Reported-by: Jan Beulich --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan Cc: Wei L

[Xen-devel] [PATCH v2] osstest: fix rm to use '-f' in ts-freebsd-host-install

2017-11-03 Thread Roger Pau Monne
It's perfectly valid for the .tmp file to not exists, and the script shouldn't fail in that case. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson --- Changes since v1: - Use -f instead of removing the 'rm', osstest might want to wipe the file in order to not preserve the permissions. ---

[Xen-devel] [PATCH] osstest: remove unneeded rm in ts-freebsd-host-install

2017-11-03 Thread Roger Pau Monne
The usage of `rm` here is wrong for two reasons: - It will fail if $sharedpath.tmp doesn't exist and report and error (ie: -f should be used). - It's not needed because dd will truncate $sharedpath.tmp. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson --- ts-freebsd-host-install | 1 -

[Xen-devel] [PATCH 14/16] osstest: add support for FreeBSD buildjobs to sg-run-job

2017-10-27 Thread Roger Pau Monne
Add support and introduce a FreeBSD build job to sg-run-job. Signed-off-by: Roger Pau Monné --- Changes since v13: - Run ts-build-prep-freebsd for FreeBSD build host setup. Changes since v5: - Add a '+' to the arguments passed to ts-freebsd-set-hostflags, so they are hidden from testid. Ch

[Xen-devel] [PATCH 04/16] osstest: introduce host_shared_mark_ready

2017-10-27 Thread Roger Pau Monne
That allows marking a host as ready to be shared. Replace the current callers that open-code it. Signed-off-by: Roger Pau Monné --- Changes since v13: - s/resource_shared_mark_ready/host_shared_mark_ready/. - First argument of jobdb_resource_shared_mark_ready must be 'host'. Changes since v4:

[Xen-devel] [PATCH v14 00/16] osstest: initial FreeBSD support

2017-10-27 Thread Roger Pau Monne
Hello, These are the remaining FreeBSD host setup patches. I've only sent the ones that changed or are new in this version. Branch can be found at: git://xenbits.xen.org/people/royger/osstest.git freebsd_v14 Thanks, Roger. ___ Xen-devel mailing list

[Xen-devel] [PATCH 12/16] osstest: add script to install build dependencies on FreeBSD

2017-10-27 Thread Roger Pau Monne
Since at the moment osstest only builds FreeBSD on FreeBSD, there are no dependencies to install. Just mark the host as ready to share. Signed-off-by: Roger Pau Monné --- ts-build-prep-freebsd | 37 + ts-freebsd-host-install | 3 --- 2 files changed, 37 ins

[Xen-devel] [PATCH] osstest: set arch before calling set_freebsd_runvars

2017-10-26 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson --- make-flight | 2 ++ 1 file changed, 2 insertions(+) diff --git a/make-flight b/make-flight index d595101c..76620c18 100755 --- a/make-flight +++ b/make-flight @@ -676,6 +676,8 @@ do_examine_one () { *) return ;; # stuf

[Xen-devel] [PATCH for-next 3/9] gcov: rename sysctl and functions

2017-10-26 Thread Roger Pau Monne
Change gcov to cov. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu Cc: Andrew Cooper Cc: George Dunlap Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan --- tools/misc/xencov.c | 28 ++-- xen/common/coverage/gc

[Xen-devel] [PATCH for-next 8/9] xsm: add bodge when compiling with llvm coverage support

2017-10-26 Thread Roger Pau Monne
llvm coverage support seems to disable some of the optimizations needed in order to compile xsm, and the end result is that references to __xsm_action_mismatch_detected are left in the object files. Since coverage support cannot be used in production, introduce __xsm_action_mismatch_detected for l

[Xen-devel] [PATCH for-next 7/9] coverage: introduce support for llvm profiling

2017-10-26 Thread Roger Pau Monne
Introduce the functionality in order to fill the hooks of the cov_sysctl_ops struct. Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan Cc: Wei Liu Cc: llvm-...@lists.llvm.o

[Xen-devel] [PATCH for-next 0/9] LLVM coverage support for Xen

2017-10-26 Thread Roger Pau Monne
ing a PVHv2 Dom0 can be found at: http://xenbits.xen.org/people/royger/xen_profile/ Thanks, Roger. Roger Pau Monne (9): gcov: return ENOSYS for unimplemented gcov domctl gcov: rename folder and header to coverage gcov: rename sysctl and functions gcov: introduce hooks for the sys

[Xen-devel] [PATCH for-next 5/9] coverage: introduce generic file

2017-10-26 Thread Roger Pau Monne
It will contain the generic implementation of sysctl_cov_op, which will be shared between all the coverage implementations. Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan

[Xen-devel] [PATCH for-next 1/9] gcov: return ENOSYS for unimplemented gcov domctl

2017-10-26 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan Cc: Wei Liu --- xen/common/gcov/gcov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/common/gcov

[Xen-devel] [PATCH for-next 9/9] coverage: add documentation for LLVM coverage

2017-10-26 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan Cc: Wei Liu --- docs/misc/coverage.markdown | 47 + 1 file changed, 47 inserti

[Xen-devel] [PATCH for-next 4/9] gcov: introduce hooks for the sysctl

2017-10-26 Thread Roger Pau Monne
So that other implementations of the sysctl can be added. Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan Cc: Wei Liu --- xen/common/coverage/gcov.c | 13 ++---

[Xen-devel] [PATCH for-next 2/9] gcov: rename folder and header to coverage

2017-10-26 Thread Roger Pau Monne
Preparatory change before adding llvm profiling support. No functional change. Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan Cc: Wei Liu --- xen/common/Makefile

[Xen-devel] [PATCH for-next 6/9] kconfig: add llvm coverage option

2017-10-26 Thread Roger Pau Monne
Just add the Kconfig option and modify the makefiles so the llvm coverage specific code can be added in a follow up patch. Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan

[Xen-devel] [PATCH v2 for-4.10] gcov: fix typos in documentation

2017-10-26 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan Cc: Wei Liu Cc: Julien Grall --- Changes since v1: - s/allow/allows/. --- docs/misc/coverage.markdown | 2 +- 1 file cha

[Xen-devel] [PATCH for-4.10] gcov: fix typo in documentation

2017-10-26 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan Cc: Wei Liu Cc: Julien Grall --- docs/misc/coverage.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[Xen-devel] [PATCH] osstest: fix examine job in generic flight

2017-10-25 Thread Roger Pau Monne
Previous patches only added the FreeBSD runvars to the jobs in the examine flight, but failed to also add them to the examine job in the generic flight. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson --- make-flight | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/make

[Xen-devel] [PATCH for-4.10] xenalyze: fix compilation

2017-10-23 Thread Roger Pau Monne
Recent changes in xenalyze introduced INT_MIN without also adding the required header, fix this by adding the header. Signed-off-by: Roger Pau Monné --- Cc: George Dunlap Cc: Ian Jackson Cc: Wei Liu Cc: Julien Grall --- This should be accepted for 4.10 because it's a build bug fix, with no fu

[Xen-devel] [PATCH v12 31/33] ts-examine-hostprops-save: introduce a script to save properties

2017-10-20 Thread Roger Pau Monne
This script turns the properties stored in the runvars using the format hostprop/$ident/$prop=$val into host properties stored in the database. Signed-off-by: Roger Pau Monné --- Changes since v2: - Call selecthost based on the idents passed in the putative hostprops runvar. - Fix commit mes

[Xen-devel] [PATCH v12 00/33] osstest: FreeBSD host support

2017-10-20 Thread Roger Pau Monne
script anointments: Provide ./mg-anoint list-prepared Roger Pau Monne (31): osstest: make built_stash_file store a path_ runvar for each file osstest: move known_hosts generation to TestSupport osstest: introduce helper to get per-host tftp prefix osstest: introduce a helper to calculate the

[Xen-devel] [PATCH v12 26/33] HostDB: introduce set_property

2017-10-20 Thread Roger Pau Monne
And provide a helper in TestSupport to use it. This allows osstest to set host properties from test script themselves (instead of using the mg-hosts clu). Note that the setting of host properties is limited to flights with intended blessing real, and it will fail for any other blessing. Signed-of

[Xen-devel] [PATCH v12 29/33] ts-freebsd-host-install: add arguments to test memdisk append options

2017-10-20 Thread Roger Pau Monne
This is needed in order to figure out which memdisk options should be used to boot the images on each specific box. Note that when passed the --recordappend argument upon success the script stores the tentative host property in the runvars. Signed-off-by: Roger Pau Monné --- Changes since v2: -

[Xen-devel] [PATCH v12 33/33] sg-run-job: hook the memdisk test into examine

2017-10-20 Thread Roger Pau Monne
Hook the memdisk parameter detection and the saving of the host properties into the examine jobs. Signed-off-by: Roger Pau Monné --- Changes since v2: - Do not pass a host ident to ts-examine-hostprops-save. - Use .- for ts-memdisk-try-append so that the rest of the job will run even if this

[Xen-devel] [PATCH v7 for-next 11/12] vpci: add a priority parameter to the vPCI register initializer

2017-10-18 Thread Roger Pau Monne
This is needed for MSI-X, since MSI-X will need to be initialized before parsing the BARs, so that the header BAR handlers are aware of the MSI-X related holes and make sure they are not mapped in order for the trap handlers to work properly. Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulic

[Xen-devel] [PATCH v7 for-next 08/12] xen: introduce rangeset_consume_ranges

2017-10-18 Thread Roger Pau Monne
This function allows to iterate over a rangeset while removing the processed regions. This will be used in order to split processing of large memory areas when mapping them into the guest p2m. Signed-off-by: Roger Pau Monné --- Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Konrad Rzes

[Xen-devel] [PATCH v7 for-next 09/12] vpci/bars: add handlers to map the BARs

2017-10-18 Thread Roger Pau Monne
Introduce a set of handlers that trap accesses to the PCI BARs and the command register, in order to snoop BAR sizing and BAR relocation. The command handler is used to detect changes to bit 2 (response to memory space accesses), and maps/unmaps the BARs of the device into the guest p2m. A rangese

[Xen-devel] [PATCH v7 for-next 00/12] vpci: PCI config space emulation

2017-10-18 Thread Roger Pau Monne
aining the patches can be found at: git://xenbits.xen.org/people/royger/xen.git vpci_v7 Note that this is only safe to use for the hardware domain (that's trusted), any non-trusted domain will need a lot more of traps before it can freely access the PCI configuration space. Thanks, Roger. R

[Xen-devel] [PATCH v7 for-next 05/12] x86/physdev: enable PHYSDEVOP_pci_mmcfg_reserved for PVH Dom0

2017-10-18 Thread Roger Pau Monne
So that MMCFG regions not present in the MCFG ACPI table can be added at run time by the hardware domain. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper --- Changes since v6: - Do not return EEXIST if the same exact region is already tracked by Xen. Changes since v5:

[Xen-devel] [PATCH v7 for-next 10/12] vpci/msi: add MSI handlers

2017-10-18 Thread Roger Pau Monne
Add handlers for the MSI control, address, data and mask fields in order to detect accesses to them and setup the interrupts as requested by the guest. Note that the pending register is not trapped, and the guest can freely read/write to it. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc

[Xen-devel] [PATCH v7 for-next 12/12] vpci/msix: add MSI-X handlers

2017-10-18 Thread Roger Pau Monne
Add handlers for accesses to the MSI-X message control field on the PCI configuration space, and traps for accesses to the memory region that contains the MSI-X table and PBA. This traps detect attempts from the guest to configure MSI-X interrupts and properly sets them up. Note that accesses to t

[Xen-devel] [PATCH v7 for-next 03/12] vpci: introduce basic handlers to trap accesses to the PCI config space

2017-10-18 Thread Roger Pau Monne
This functionality is going to reside in vpci.c (and the corresponding vpci.h header), and should be arch-agnostic. The handlers introduced in this patch setup the basic functionality required in order to trap accesses to the PCI config space, and allow decoding the address and finding the correspo

[Xen-devel] [PATCH v7 for-next 01/12] x86/pio: allow internal PIO handlers to return RETRY

2017-10-18 Thread Roger Pau Monne
Fix handle_pio so internal PIO handlers can return X86EMUL_RETRY and it is properly handled by not advancing the IP. Signed-off-by: Roger Pau Monné --- Cc: Paul Durrant Cc: Jan Beulich Cc: Andrew Cooper --- Note this is not an issue currently because no internal handlers return RETRY. --- xen

[Xen-devel] [PATCH v7 for-next 06/12] pci: split code to size BARs from pci_add_device

2017-10-18 Thread Roger Pau Monne
So that it can be called from outside in order to get the size of regular PCI BARs. This will be required in order to map the BARs from PCI devices into PVH Dom0 p2m. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich --- Changes since v6: - Remove the vf and addr local variables. - Change the

[Xen-devel] [PATCH v7 for-next 07/12] pci: add support to size ROM BARs to pci_size_mem_bar

2017-10-18 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulich --- Cc: Jan Beulich --- Changes since v6: - Remove the rom local variable. Changes since v5: - Use the flags field. - Introduce a mask local variable. - Simplify return. Changes since v4: - New in this version. --- xen/drivers/passt

[Xen-devel] [PATCH v7 for-next 02/12] pci: introduce a type to store a SBDF

2017-10-18 Thread Roger Pau Monne
That provides direct access to all the members that constitute a SBDF. The only function switched to use it is hvm_pci_decode_addr, because it makes following patches simpler. Suggested-by: Andrew Cooper Signed-off-by: Roger Pau Monné Reviewed-by: Paul Durrant --- Cc: Paul Durrant Cc: Jan Beul

[Xen-devel] [PATCH v7 for-next 04/12] x86/mmcfg: add handlers for the PVH Dom0 MMCFG areas

2017-10-18 Thread Roger Pau Monne
Introduce a set of handlers for the accesses to the MMCFG areas. Those areas are setup based on the contents of the hardware MMCFG tables, and the list of handled MMCFG areas is stored inside of the hvm_domain struct. The read/writes are forwarded to the generic vpci handlers once the address is d

[Xen-devel] [PATCH v2 for-4.10] ubsan: add clang 5.0 support

2017-10-18 Thread Roger Pau Monne
clang 5.0 changed the layout of the type_mismatch_data structure and introduced __ubsan_handle_type_mismatch_v1 and __ubsan_handle_pointer_overflow. This commit adds support for the new structure layout, adds the missing handlers and the new types for type_check_kinds. Signed-off-by: Roger Pau Mo

[Xen-devel] [PATCH for-4.10] string: fix memmove when size is 0

2017-10-17 Thread Roger Pau Monne
ubsan in clang 5.0 complains with: (XEN) UBSAN: Undefined behaviour in string.c:50:28 (XEN) pointer overflow: (XEN) addition of unsigned offset to 8310 overflowed to 830f [...] (XEN) Xen call trace: (XEN)[] ubsan.c#ubsan_epilogue+0xd/0xc0 (XEN)[] __ubsan_handle_poi

[Xen-devel] [PATCH for-4.10 1/2] ubsan: add clang 5.0 support

2017-10-17 Thread Roger Pau Monne
clang 5.0 changed the layout of the type_mismatch_data structure and introduced __ubsan_handle_type_mismatch_v1 and __ubsan_handle_pointer_overflow. This commit adds support for the new structure layout, adds the missing handlers and the new types for type_check_kinds. Signed-off-by: Roger Pau Mo

[Xen-devel] [PATCH for-4.10 2/2] ubsan: disable unaligned access checks

2017-10-17 Thread Roger Pau Monne
Currently there are many offenders of the unaligned access checks, which makes booting with the unaligned check a PVH Dom0 impossible. The main offenders seem to be the ACPI code, the VMX code and specially the intremap code (set_ire_sid). Signed-off-by: Roger Pau Monné --- Cc: Andrew Cooper Cc

[Xen-devel] [PATCH] mm/shadow: fix declaration of fetch_type_names

2017-10-17 Thread Roger Pau Monne
fetch_type_names usage is guarded by SHADOW_DEBUG_PROPAGATE in SHADOW_DEBUG, fix the declaration so it's also guarded by SHADOW_DEBUG_PROPAGATE instead of DEBUG_TRACE_DUMP. Signed-off-by: Roger Pau Monné --- Cc: Tim Deegan Cc: George Dunlap Cc: Jan Beulich Cc: Andrew Cooper Cc: Julien Grall

[Xen-devel] [PATCH RFC] osstest: rename pvh tests to pvhv2

2017-10-11 Thread Roger Pau Monne
Due to the recent changes to the PVH tests, all of them are now failing because the current Linux kernel used by osstest doesn't support PVHv2, and osstest treats the failures as regressions because previously the PVH tests where actually testing classic PV. Rename the tests to 'pvhv2' in order to

[Xen-devel] [PATCH 2/2] xl: set default maptrack frames to 1024

2017-10-09 Thread Roger Pau Monne
This is in line with the previous behavior, setting the number of maptrack frames to 0 will prevent driver domains from working correctly. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu Cc: Juergen Gross --- docs/man/xl.conf.pod.5 | 2 +- tools/xl/xl.c | 2 +- tools/x

[Xen-devel] [PATCH 0/2] xl/libxl: fixes for the grant-table changes

2017-10-09 Thread Roger Pau Monne
needed in order to fix the libvirt tests, and thus unblock the push gate. The second patch should fix driver domains (although there's no tests for them ATM in osstest). Thanks, Roger. Roger Pau Monne (2): libxl: set the default grant/maptrack frames at structure init xl: set default map

[Xen-devel] [PATCH 1/2] libxl: set the default grant/maptrack frames at structure init

2017-10-09 Thread Roger Pau Monne
libxl_domain_build_info had both the maptrack and grant frames set to 0 by default, forcing the client of libxl to set a sane default. This is not backwards compatible, so instead initialize both max_grant_frames and max_maptrack_frames to a sane default (ie: like previous behavior). This fixes t

[Xen-devel] [PATCH for-4.10 3/3] examples: add a PVH guest config file template

2017-10-06 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu --- tools/examples/xlexample.pvhlinux | 42 +++ 1 file changed, 42 insertions(+) create mode 100644 tools/examples/xlexample.pvhlinux diff --git a/tools/examples/xlexample.pvhlinux b/tools/exam

[Xen-devel] [PATCH for-4.10 1/3] libxc: panic when trying to create a PVH guest without kernel support

2017-10-06 Thread Roger Pau Monne
Previously when trying to boot a PV capable but not PVH capable kernel inside of a PVH container xc_dom_guest_type would succeed and return a PV guest type, which would lead to failures later on in the build process. Instead provide a clear error message when trying to create a PVH guest using a k

[Xen-devel] [PATCH for-4.10 2/3] examples: fix HVM config file example

2017-10-06 Thread Roger Pau Monne
To use the new 'type' option. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu --- tools/examples/xlexample.hvm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/examples/xlexample.hvm b/tools/examples/xlexample.hvm index 4b1ea629fb..df9fe07653 100644 ---

[Xen-devel] [PATCH for-4.10 0/3] PVHv2 toolstack leftovers

2017-10-06 Thread Roger Pau Monne
hanks, Roger. Roger Pau Monne (3): libxc: panic when trying to create a PVH guest without kernel support examples: fix HVM config file example examples: add a PVH guest config file template tools/examples/xlexample.hvm | 2 +- tools/examples/xlexample.pvhlinux

[Xen-devel] [PATCH v2 2/3] osstest: use type='hvm' for HVM guests

2017-10-03 Thread Roger Pau Monne
The previous builder='hvm' is also kept for compatibility with older Xen releases. Note that the type option is ignored in previous Xen versions. Signed-off-by: Roger Pau Monné Acked-by: Ian Jackson --- Cc: ian.jack...@eu.citrix.com --- Osstest/TestSupport.pm | 1 + 1 file changed, 1 insertion(

[Xen-devel] [PATCH v2 3/3] osstest: limit PVH tests to Xen >= 4.10

2017-10-03 Thread Roger Pau Monne
Older Xen versions don't support the 'type' xl option used to create a PVHv2 guest. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson --- Changes since v1: - New in this version. --- make-flight | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/make-flight b/make-fli

[Xen-devel] [PATCH v2 0/3] osstest: followup from the PVH toolstack series

2017-10-03 Thread Roger Pau Monne
Hello, The patches in this series modify osstest in order to fix the PVH tests, switch HVM guests to use the 'type' option (note that the builder option is kept for compatibility reasons) and remove the PVH tests from branches older than Xen 4.10. Thanks, Roger. Roger Pau Monne (3):

[Xen-devel] [PATCH v2 1/3] osstest: fix PVH DomU tests

2017-10-03 Thread Roger Pau Monne
The pvh=1 xl option was removed, so switch the PVH tests to use type='pvh' instead. On older branches still supporting PVHv1 (and the 'pvh' xl option), this change will turn the PVH tests into PV tests). A followup change will remove the PVH tests from those branches, since PVHv1 has already been

[Xen-devel] [PATCH 2/2] osstest: use type='hvm' for HVM guests

2017-09-29 Thread Roger Pau Monne
The previous builder='hvm' is also kept for compatibility with older Xen releases. Note that the type option is ignored in previous Xen versions. Signed-off-by: Roger Pau Monné --- Cc: ian.jack...@eu.citrix.com --- Osstest/TestSupport.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/Osstes

[Xen-devel] [PATCH 1/2] osstest: fix PVH DomU tests

2017-09-29 Thread Roger Pau Monne
The pvh=1 xl option was removed, so switch the PVH tests to use type='pvh' instead. Signed-off-by: Roger Pau Monné --- Cc: ian.jack...@eu.citrix.com --- ts-debian-fixup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ts-debian-fixup b/ts-debian-fixup index 571b2509..80c35

[Xen-devel] [PATCH 0/2] osstest: followup from the PVH toolstack series

2017-09-29 Thread Roger Pau Monne
Hello, The two patches in this series modify osstest in order to fix the PVH tests, and also switch HVM guests to use the 'type' option (note that the builder option is kept for compatibility reasons). Thanks, Roger. ___ Xen-devel mailing list Xen-deve

[Xen-devel] [PATCH 2/3] x86/pvh: use max_pdx to calculate the paging memory usage

2017-09-29 Thread Roger Pau Monne
nr_pages doesn't take into account holes or MMIO regions, and underestimates the amount of memory needed for paging. Be on the safe side and use max_pdx instead. Note that both cases are just approximations, but using max_pdx yields a number of free pages after Dom0 build always greater than the m

[Xen-devel] [PATCH 3/3] x86/dom0: simplify dom0_compute_nr_pages

2017-09-29 Thread Roger Pau Monne
Remove the loop in dom0_compute_nr_pages. This is a non-functional change for PV domains, that would always have need_paging set to false, and thus only did a single loop iteration. For a PVH Dom0 the loop is not needed anymore, since the amount of memory needed for paging no longer depends on th

[Xen-devel] [PATCH 1/3] x86/pvh: fix Dom0 memory accounting

2017-09-29 Thread Roger Pau Monne
Hello, The following three patches try to fix memory accounting when building a PVH Dom0. Patch 1 and 2 are the more relevant ones, since they fix the actual issues. Patch 3 is a cleanup of the code path in order to make it simpler. I consider those bug fixes for PVH Dom0, but since it's still no

[Xen-devel] [PATCH 1/3] x86/dom0: use dom0_paging_pages to account for the memory used by IOMMU pt

2017-09-29 Thread Roger Pau Monne
Instead of open coding a calculation for it. Signed-off-by: Roger PAu Monné --- Cc: Jan Beulich Cc: Andrew Cooper --- xen/arch/x86/dom0_build.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/xen/arch/x86/dom0_build.c b/xen/arch/x86/dom0_build.c index f616b99ddc..c

[Xen-devel] [PATCH] libxl: remove dead code in libxl__domain_build_info_setdefault

2017-09-29 Thread Roger Pau Monne
Spotted by Coverity. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/libxl_create.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c index c4b7d08532..fa3c668a56 100644 --- a/tools/libxl/libxl_create.c +

[Xen-devel] [PATCH v4 05/22] xl: introduce a domain type option

2017-09-28 Thread Roger Pau Monne
Introduce a new type option to xl configuration files in order to specify the domain type. This supersedes the current builder option. The new option is documented in the xl.cfg man page, and the previous builder option is marked as deprecated. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson

[Xen-devel] [PATCH v4 00/22] libxl/xl: add PVH guest type

2017-09-28 Thread Roger Pau Monne
Hello, This series adds a new PVH guest type to libxl/xl. This supersedes the current PVHv2 implementation that relies on using the "none" device model version. As part of this series a new xl option is also implemented, called "type" that supersedes the current "builder" option. A "firmware" opt

[Xen-devel] [PATCH] x86/pvh: fix memory accounting for Dom0

2017-09-28 Thread Roger Pau Monne
Make sure that the memory for the paging structures in case of a HVM Dom0 is subtracted from the total amount of memory available for Dom0 to use. Also take into account whether the IOMMU is sharing the page tables with HAP, or else also reserve some memory for the IOMMU page tables. While there r

[Xen-devel] [PATCH] x86/pvh: fix PVHv2 Dom0 memory calculation

2017-09-27 Thread Roger Pau Monne
PVHv2 is always going to require the usage of memory in order to store the p2m page tables, either when using hap or shadow. Fix the condition so memory is reserved unconditionally when trying to build a PVHv2 Dom0. Reported-by: Boris Ostrovsky Signed-off-by: Roger Pau Monné --- Cc: Boris Ostro

[Xen-devel] [PATCH v3 21/22] xl: add PVH as a guest type

2017-09-25 Thread Roger Pau Monne
And remove device model "none". Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu --- tools/xl/xl_parse.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/xl/xl_parse.c b/tools/xl/xl_parse.c index 9f9e810c64..fb26db2e1c 100644 --- a/tools/xl/xl_parse.

[Xen-devel] [PATCH v3 22/22] libxl: remove device model "none" from IDL

2017-09-25 Thread Roger Pau Monne
And the xl.cfg man page documentation. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu --- docs/man/xl.cfg.pod.5.in| 5 - tools/libxl/libxl.h | 8 tools/libxl/libxl_types.idl | 1 - 3 files changed, 14 deletions(-) diff --git a/docs/man/xl.cfg.pod.5.in

[Xen-devel] [PATCH v3 19/22] libxl: add PVH support to USB

2017-09-25 Thread Roger Pau Monne
Add PVH support to usb related functions. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/libxl_usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/libxl/libxl_usb.c b/tools/libxl/libxl_usb.c index 1d5a2432ba..cb0e792724 100644 ---

[Xen-devel] [PATCH v3 18/22] libxl: remove device model "none" support from stream functions

2017-09-25 Thread Roger Pau Monne
Remove the usage of device model "none" in the migration stream related functions. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/libxl_stream_read.c | 6 ++ tools/libxl/libxl_stream_write.c | 11 ++- 2 files changed, 4 insertions(+), 13 deletions(

[Xen-devel] [PATCH v3 16/22] libxl: add PVH support to memory functions

2017-09-25 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/libxl_mem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/libxl/libxl_mem.c b/tools/libxl/libxl_mem.c index f5d2530d8c..e551e09fed 100644 --- a/tools/libxl/libxl_mem.c +++ b/tools/libxl/libxl_mem.c @@ -46

[Xen-devel] [PATCH v3 20/22] libxl: add PVH support to x86 functions

2017-09-25 Thread Roger Pau Monne
This also includes the x86 ACPI related functions. Remove support for device model "none" Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/libxl_x86.c | 33 + tools/libxl/libxl_x86_acpi.c | 3 +-- 2 files changed, 18 insertion

[Xen-devel] [PATCH v3 11/22] libxl: remove device model "none" support from disk related functions

2017-09-25 Thread Roger Pau Monne
CD-ROM backend selection was partially based on the device model, this is no longer needed since the device model "none" is now removed, so HVM guests always have a device model. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/libxl_disk.c | 10 +- 1 file

[Xen-devel] [PATCH v3 13/22] libxl: add PVH support to domain building

2017-09-25 Thread Roger Pau Monne
And remove device model "none" support. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/libxl_dom.c | 149 ++-- 1 file changed, 95 insertions(+), 54 deletions(-) diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl

[Xen-devel] [PATCH v3 17/22] libxl: PVH guests use PV nics

2017-09-25 Thread Roger Pau Monne
Remove device model "none" support from the nic functions. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/libxl_nic.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/libxl/libxl_nic.c b/tools/libxl/libxl_nic.c index cf8fd5c237..2

[Xen-devel] [PATCH v3 15/22] libxl: add PVH support to vpcu hotplug, domain destruction/pause and domain configuration

2017-09-25 Thread Roger Pau Monne
And remove support for device model "none". Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/libxl_domain.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/tools/libxl/libxl_domain.c b/tools/libxl/libxl_domain.c index 08eccd

[Xen-devel] [PATCH v3 14/22] libxl: add PVH support to domain save/suspend

2017-09-25 Thread Roger Pau Monne
And remove the device model "none" support. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/libxl_dom_save.c| 9 ++--- tools/libxl/libxl_dom_suspend.c | 8 +++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/tools/libxl/libxl_dom_save.

[Xen-devel] [PATCH v3 09/22] libxl: set PVH guests to use the PV console

2017-09-25 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/libxl_console.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/libxl/libxl_console.c b/tools/libxl/libxl_console.c index 624bd016c6..32c3ec7d7b 100644 --- a/tools/libxl/libxl_console.c +++ b/tools/libxl/li

[Xen-devel] [PATCH v3 12/22] libxl: set device model for PVH guests

2017-09-25 Thread Roger Pau Monne
PVH guests use the same device model selection as PV guests, because PVH guests only use the device model for the PV backends. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/libxl_dm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/libxl/libxl_dm.c

[Xen-devel] [PATCH v3 10/22] libxl: add PVH support to domain creation

2017-09-25 Thread Roger Pau Monne
Remove the device model "none" support from domain creation and introduce support for PVH. This requires changing some of the HVM checks to be applied for both HVM and PVH. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/libxl_create.c | 71 +

[Xen-devel] [PATCH v3 01/22] libxl: add is_default checkers for string and timer_mode types

2017-09-25 Thread Roger Pau Monne
Those types are missing a helper to check whether a definition of the type holds the default value. This will be required by a later patch that will implement deprecation of fields inside of a libxl type. Signed-off-by: Roger Pau Monné Acked-by: Ian Jackson Acked-by: Wei Liu --- Cc: Ian Jackson

[Xen-devel] [PATCH v3 08/22] libxl: allow PVH guests to use a bootloader

2017-09-25 Thread Roger Pau Monne
Allow PVH guests to boot using a bootloader. Signed-off-by: Roger Pau Monné --- Cc: Ian Jackson Cc: Wei Liu --- tools/libxl/libxl_bootloader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/libxl/libxl_bootloader.c b/tools/libxl/libxl_bootloader.c index a47bd8c25

[Xen-devel] [PATCH v3 06/22] xl: introduce a firmware option

2017-09-25 Thread Roger Pau Monne
The new firmware option aims to provide a coherent way to set the firmware for the different kind of guests Xen supports. For PV guests the available firmwares are pvgrub{32|64}, and for HVM the following are supported: bios, uefi, seabios, rombios and ovmf. Note that uefi maps to ovmf, and bios m

  1   2   3   4   5   6   7   8   9   10   >