[Xen-devel] [ovmf baseline-only test] 75359: trouble: blocked/broken

2018-10-05 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 75359 ovmf real [real] http://osstest.xensource.com/osstest/logs/75359/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-xsm

[Xen-devel] [ARM] Display passthrough

2018-10-05 Thread Vikram K
Hi, We want to passthrough the display to the guest OS.We are using Xen-4.8 and Hikey960. Is it possible to do pass through of display?If yes please provide reference. -- This message contains confidential information and is intended only for the individual(s) named. If you are not the

[Xen-devel] [linux-linus test] 128407: regressions - FAIL

2018-10-05 Thread osstest service owner
flight 128407 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/128407/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemuu-debianhvm-amd64-xsm 10 debian-hvm-install fail REGR. vs. 125898

[Xen-devel] [ovmf test] 128433: all pass - PUSHED

2018-10-05 Thread osstest service owner
flight 128433 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/128433/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf d20ae95a13e851d56c6618108b18c93526505ca2 baseline version: ovmf

Re: [Xen-devel] [PATCH v2] flask: sort io{port,mem}con entries

2018-10-05 Thread nicolas . poirot
> -Daniel De Graaf wrote: - > To: xen-devel@lists.xenproject.org, Nicolas Poirot > From: Daniel De Graaf > Date: 05/10/2018 18:33 > Cc: George Dunlap , Jan Beulich , > Daniel De Graaf > Subject: [PATCH v2] flask: sort io{port,mem}con entries > > These entries are not always sorted by

Re: [Xen-devel] [PATCH v2] flask: sort io{port,mem}con entries

2018-10-05 Thread nicolas . poirot
> -Daniel De Graaf wrote: - > To: xen-devel@lists.xenproject.org, Nicolas Poirot > From: Daniel De Graaf > Date: 10/05/2018 06:33PM > Cc: George Dunlap , Jan Beulich , > Daniel De Graaf > Subject: [PATCH v2] flask: sort io{port,mem}con entries > > These entries are not always sorted

Re: [Xen-devel] [PATCH v3] xen:arm: Populate arm64 image header

2018-10-05 Thread Stewart Hildebrand
On 11/09/2018 17:48, Amit Singh Tomar wrote: > diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S > index d63734f..ef87b5c 100644 > --- a/xen/arch/arm/arm64/head.S > +++ b/xen/arch/arm/arm64/head.S > @@ -120,8 +127,8 @@ efi_head: > add x13, x18, #0x16 > b

[Xen-devel] [libvirt test] 128402: regressions - FAIL

2018-10-05 Thread osstest service owner
flight 128402 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/128402/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-i386-libvirt6 libvirt-buildfail REGR. vs. 128367 Tests which did not

[Xen-devel] [PATCH v4 20/23] xen: support console_switching between Dom0 and DomUs on ARM

2018-10-05 Thread Stefano Stabellini
Today Ctrl-AAA is used to switch between Xen and Dom0. Extend the mechanism to allow for switching between Xen, Dom0, and any of the initial DomU created from Xen alongside Dom0 out of information provided via device tree. Rename xen_rx to console_rx to match the new behavior. Clarify existing

[Xen-devel] [PATCH v4 23/23] xen/arm: split domain_build.c

2018-10-05 Thread Stefano Stabellini
domain_build.c is too large. Move all the ACPI specific device tree generating functions from domain_build.c to acpi/domain_build.c. Signed-off-by: Stefano Stabellini --- Changes in v4: - rename acpi_dt_build to domain_build.c - add copyright header - remove useless #include - remove

[Xen-devel] [PATCH v4 14/23] xen/arm: generate a simple device tree for domUs

2018-10-05 Thread Stefano Stabellini
Introduce functions to generate a basic domU device tree, similar to the existing functions in tools/libxl/libxl_arm.c. Signed-off-by: Stefano Stabellini --- Changes in v4: - code style - two separate functions for gicv2 and gicv3 - remove useless local variables - fix typos - do not use host

[Xen-devel] [PATCH v4 13/23] xen/arm: implement construct_domU

2018-10-05 Thread Stefano Stabellini
Similar to construct_dom0, construct_domU creates a barebone DomU guest. The device tree node passed as argument is compatible "xen,domain", see docs/misc/arm/device-tree/booting.txt. Add const to kernel_probe dt_device_node parameter. Signed-off-by: Stefano Stabellini --- Changes in v4: -

[Xen-devel] [PATCH v4 02/23] xen/arm: extend device tree based multiboot protocol

2018-10-05 Thread Stefano Stabellini
Extend the existing device tree based multiboot protocol to include information regarding multiple domains to boot. Signed-off-by: Stefano Stabellini --- Changes in v4: - memory is 64bit Changes in v3: - remove "xen,initial-domain" for now - make vpl011 an empty property - memory in KBs

[Xen-devel] [PATCH v4 11/23] xen/arm: refactor construct_dom0

2018-10-05 Thread Stefano Stabellini
Move generic initializations out of construct_dom0 so that they can be reused. Rename prepare_dtb to prepare_dtb_hwdom to avoid confusion. No functional changes in this patch. Signed-off-by: Stefano Stabellini --- Changes in v4: - newline and style changes Changes in v3: - move setting type

[Xen-devel] [PATCH v4 15/23] xen/arm: make set_interrupt_ppi able to handle non-PPI

2018-10-05 Thread Stefano Stabellini
also rename it to set_interrupt. Signed-off-by: Stefano Stabellini --- xen/arch/arm/domain_build.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index bf8aeca..760ebf8 100644 ---

[Xen-devel] [PATCH v4 22/23] xen/arm: move kernel.h to asm-arm/

2018-10-05 Thread Stefano Stabellini
It will be #included by a file in a xen/arch/arm subdirectory. Signed-off-by: Stefano Stabellini --- xen/arch/arm/domain_build.c | 2 +- xen/arch/arm/kernel.c| 3 +- xen/arch/arm/kernel.h| 86 xen/include/asm-arm/kernel.h | 86

[Xen-devel] [PATCH v4 03/23] xen/arm: document dom0less

2018-10-05 Thread Stefano Stabellini
Add a new document to provide information on how to use dom0less related features and their current limitations. Signed-off-by: Stefano Stabellini --- Changes in v4: - rename to .txt - improve wording Changes in v3: - add patch --- docs/misc/arm/dom0less.txt | 47

[Xen-devel] [PATCH v4 17/23] xen/arm: introduce a union in vpl011

2018-10-05 Thread Stefano Stabellini
Introduce a union in struct vpl011 to contain the console ring members. A later patch will add another member of the union for the case where the backend is in Xen. Signed-off-by: Stefano Stabellini --- Changes in v4: - name union "backend" Changes in v3: - rename ring field to dom Changes in

[Xen-devel] [PATCH v4 09/23] xen/arm: rename allocate_memory to allocate_memory_11

2018-10-05 Thread Stefano Stabellini
allocate_memory only deals with directly mapped memory. Rename it to allocate_memory_11. Signed-off-by: Stefano Stabellini --- Changes in v3: - add patch --- xen/arch/arm/domain_build.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/domain_build.c

[Xen-devel] [PATCH v4 06/23] xen/arm: don't add duplicate boot modules, introduce domU flag

2018-10-05 Thread Stefano Stabellini
Don't add duplicate boot modules (same kind and same start address), they are freed later, we don't want to introduce double-free errors. Introduce a domU flag in struct bootmodule and struct bootcmdline. Set it for kernels and ramdisks of "xen,domain" nodes to avoid getting confused in

[Xen-devel] [PATCH v4 05/23] xen/arm: introduce bootcmdlines

2018-10-05 Thread Stefano Stabellini
Introduce a new array to store the cmdline of each boot module. It is separate from struct bootmodules. Remove the cmdline field from struct boot_module. This way, kernels and initrds with the same address in memory can share struct bootmodule (important because we want them to be free'd only

[Xen-devel] [PATCH v4 07/23] xen/arm: probe domU kernels and initrds

2018-10-05 Thread Stefano Stabellini
Find addresses, sizes on device tree from kernel_probe. Find the cmdline from the bootcmdlines array. Introduce a new boot_module_find_by_addr_and_kind function to match not just on boot module kind, but also by address so that we can support multiple domains. Introduce a

[Xen-devel] [PATCH v4 04/23] xen/arm: increase MAX_MODULES

2018-10-05 Thread Stefano Stabellini
Xen boot modules need to account not just for Dom0 but also for a few potential DomUs, each of them coming with their own kernel and initrd. Increase MAX_MODULES to 32 to allow for more DomUs. Signed-off-by: Stefano Stabellini Reviewed-by: Doug Goldstein --- xen/include/asm-arm/setup.h | 2 +-

[Xen-devel] [PATCH v4 19/23] xen/arm: Allow vpl011 to be used by DomU

2018-10-05 Thread Stefano Stabellini
Make vpl011 being able to be used without a userspace component in Dom0. In that case, output is printed to the Xen serial and input is received from the Xen serial one character at a time. Call domain_vpl011_init during construct_domU if vpl011 is enabled. Introduce a new ring struct with only

[Xen-devel] [PATCH v4 18/23] xen/arm: refactor vpl011_data_avail

2018-10-05 Thread Stefano Stabellini
Move the code to calculate in_fifo_level and out_fifo_level out of vpl011_data_avail, to the caller. This change will make it possible to reuse vpl011_data_avail with different ring structures in a later patch. Signed-off-by: Stefano Stabellini Acked-by: Julien Grall --- Changes in v3: -

[Xen-devel] [PATCH v4 10/23] xen/arm: introduce allocate_memory

2018-10-05 Thread Stefano Stabellini
Introduce an allocate_memory function able to allocate memory for DomUs and map it at the right guest addresses, according to the guest memory map: GUEST_RAM0_BASE and GUEST_RAM1_BASE. Signed-off-by: Stefano Stabellini --- Changes in v4: - move earlier, add #if 0 - introduce

[Xen-devel] [PATCH v4 21/23] xen/vpl011: buffer out chars when the backend is xen

2018-10-05 Thread Stefano Stabellini
To avoid mixing the output of different domains on the console, buffer the output chars and print line by line. Unless the domain has input from the serial, in which case we want to print char by char for a smooth user experience. The size of SBSA_UART_OUT_BUF_SIZE is arbitrary, choose the same

[Xen-devel] [PATCH v4 12/23] xen/arm: introduce create_domUs

2018-10-05 Thread Stefano Stabellini
Call a new function, "create_domUs", from setup_xen to start DomU VMs. Introduce support for the "xen,domU" compatible node on device tree. Create new DomU VMs based on the information found on device tree under "xen,domU". Calls construct_domU for each domain. Introduce a simple global variable

[Xen-devel] [PATCH v4 16/23] xen/arm: generate vpl011 node on device tree for domU

2018-10-05 Thread Stefano Stabellini
Introduce vpl011 support to guests started from Xen: it provides a simple way to print output from a guest, as most guests come with a pl011 driver. It is also able to provide a working console with interrupt support. The UART exposed to the guest is a SBSA compatible UART and not a PL011. SBSA

[Xen-devel] [PATCH v4 08/23] xen/arm: rename get_11_allocation_size to get_allocation_size

2018-10-05 Thread Stefano Stabellini
No functional changes. Signed-off-by: Stefano Stabellini --- Changes in v3: - no change in print messages - do not remove BUG_ON Changes in v2: - new patch --- xen/arch/arm/domain_build.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git

[Xen-devel] [PATCH v4 01/23] xen: allow console_io hypercalls from certain DomUs

2018-10-05 Thread Stefano Stabellini
Introduce an is_console option to allow certain classes of domUs to use the Xen console. Specifically, it will be used to give console access to all domUs started from Xen from information on device tree. Signed-off-by: Stefano Stabellini Acked-by: Daniel De Graaf CC: andrew.coop...@citrix.com

[Xen-devel] [PATCH v4 00/23] dom0less step1: boot multiple domains from device tree

2018-10-05 Thread Stefano Stabellini
Hi all, This is first step toward "dom0less" as discussed in the various certifications related threads and discussions. The goal of this series is to enable Xen to boot multiple domains in parallel, in addition to dom0, out of information found on device tree. The device tree based boot

Re: [Xen-devel] [PATCH v3 23/25] xen: support console_switching between Dom0 and DomUs on ARM

2018-10-05 Thread Stefano Stabellini
On Fri, 5 Oct 2018, Julien Grall wrote: > Hi Stefano, > > On 10/04/2018 10:52 PM, Stefano Stabellini wrote: > > On Wed, 1 Aug 2018, Jan Beulich wrote: > > > > > > On 01.08.18 at 01:28, wrote: > > > > Today Ctrl-AAA is used to switch between Xen and Dom0. Extend the > > > > mechanism to allow for

Re: [Xen-devel] [PATCH v3 23/25] xen: support console_switching between Dom0 and DomUs on ARM

2018-10-05 Thread Stefano Stabellini
On Fri, 5 Oct 2018, Julien Grall wrote: > On 10/05/2018 10:25 AM, Julien Grall wrote: > > On 10/04/2018 10:52 PM, Stefano Stabellini wrote: > > > On Wed, 1 Aug 2018, Jan Beulich wrote: > > > > > > > On 01.08.18 at 01:28, wrote: > > > > > Today Ctrl-AAA is used to switch between Xen and Dom0.

[Xen-devel] [xen-unstable-smoke test] 128426: tolerable all pass - PUSHED

2018-10-05 Thread osstest service owner
flight 128426 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/128426/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 13 migrate-support-checkfail never pass test-arm64-arm64-xl-xsm

[Xen-devel] [PATCH 17/18] xenmon: Install as xenmon, not xenmon.py

2018-10-05 Thread Ian Jackson
Adding the implementation language as a suffix to a program name is poor practice. Signed-off-by: Ian Jackson --- tools/xenmon/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/xenmon/Makefile b/tools/xenmon/Makefile index e45c5b8c14..e1712304d0 100644 ---

[Xen-devel] [PATCH 14/18] gdbsx: Honour LDFLAGS when linking

2018-10-05 Thread Ian Jackson
This command does the link, so it needs LDFLAGS. Signed-off-by: Ian Jackson --- tools/debugger/gdbsx/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/debugger/gdbsx/Makefile b/tools/debugger/gdbsx/Makefile index 723a2743cc..8d7cd94a31 100644 ---

[Xen-devel] [PATCH 13/18] tools/xenstat: Fix shared library version

2018-10-05 Thread Ian Jackson
From: Bastian Blank libxenstat does not have a stable ABI. Set its version to the current Xen release version. Signed-off-by: Ian Jackson --- tools/xenstat/libxenstat/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/xenstat/libxenstat/Makefile

[Xen-devel] [PATCH 18/18] tools/debugger/kdd: Install as `xen-kdd', not just `kdd'

2018-10-05 Thread Ian Jackson
`kdd' is an unfortunate namespace landgrab. Signed-off-by: Ian Jackson --- tools/debugger/kdd/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/debugger/kdd/Makefile b/tools/debugger/kdd/Makefile index 5509eee68c..26116949d4 100644 ---

[Xen-devel] [PATCH 16/18] pygrub fsimage.so: Honour LDFLAGS when building

2018-10-05 Thread Ian Jackson
This seems to have been simply omitted. Obviously this is needed when building and not just when installing. Passing only when installing is ineffective. Signed-off-by: Ian Jackson --- tools/pygrub/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Xen-devel] [PATCH 10/18] INSTALL: Mention kconfig

2018-10-05 Thread Ian Jackson
Firstly, add a reference to the documentation for the kconfig system. Secondly, warn the user about the XEN_CONFIG_EXPERT problem. CC: Doug Goldstein CC: Wei Liu CC: Jan Beulich CC: Andrew Cooper Signed-off-by: Ian Jackson --- INSTALL | 20 1 file changed, 20

[Xen-devel] [PATCH 15/18] libfsimage: Honour general LDFLAGS

2018-10-05 Thread Ian Jackson
Do not reset LDFLAGS to empty. Instead, append the fsimage-special LDFLAGS. Signed-off-by: Ian Jackson --- tools/libfsimage/common/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libfsimage/common/Makefile b/tools/libfsimage/common/Makefile index

[Xen-devel] [PATCH 12/18] docs/man/xen-pv-channel.pod.7: Remove a spurious blank line

2018-10-05 Thread Ian Jackson
No functional change. Signed-off-by: Ian Jackson --- docs/man/xen-pv-channel.pod.7 | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/man/xen-pv-channel.pod.7 b/docs/man/xen-pv-channel.pod.7 index f9f0108488..07898f6dde 100644 --- a/docs/man/xen-pv-channel.pod.7 +++

[Xen-devel] [PATCH 11/18] docs/man: Provide properly-formatted NAME sections

2018-10-05 Thread Ian Jackson
A manpage `foo.7.pod' must start with =head NAME foo - some summary of what foo is or what this manpage is because otherwise manpage catalogue systems cannot generate a proper `whatis' entry. Signed-off-by: Ian Jackson --- docs/man/xen-pci-device-reservations.pod.7 | 4

[Xen-devel] [PATCH 05/18] Various: Fix typo `reseting'

2018-10-05 Thread Ian Jackson
Signed-off-by: Ian Jackson --- tools/misc/xenlockprof.c | 2 +- tools/misc/xenperf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/misc/xenlockprof.c b/tools/misc/xenlockprof.c index df23c82912..11f43a35e3 100644 --- a/tools/misc/xenlockprof.c +++

[Xen-devel] [PATCH 01/18] docs/man: Fix two typos detected by the Debian lintian tool

2018-10-05 Thread Ian Jackson
Signed-off-by: Ian Jackson --- docs/man/xenstore.pod.1 | 2 +- docs/man/xl.pod.1.in| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/man/xenstore.pod.1 b/docs/man/xenstore.pod.1 index 74172891e2..dd8f80647d 100644 --- a/docs/man/xenstore.pod.1 +++

[Xen-devel] [PATCH 09/18] tools/Rules.mk: Honour PREPEND_LDFLAGS_XEN_TOOLS

2018-10-05 Thread Ian Jackson
This allows the caller to provide some LDFLAGS to the Xen build system. Signed-off-by: Ian Jackson --- tools/Rules.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/Rules.mk b/tools/Rules.mk index 296b722372..68f2ed7ce1 100644 --- a/tools/Rules.mk +++ b/tools/Rules.mk @@ -9,6 +9,8

[Xen-devel] [PATCH 07/18] Various: Fix typo `infomation'

2018-10-05 Thread Ian Jackson
Signed-off-by: Ian Jackson --- tools/libxl/libxl_internal.h | 2 +- tools/python/xen/lowlevel/xc/xc.c | 2 +- tools/xenstat/libxenstat/src/xenstat_qmp.c | 2 +- xen/common/sched_rt.c | 2 +- xen/drivers/acpi/apei/erst.c | 2 +-

[Xen-devel] [PATCH 03/18] Various: Fix typos `unkown', `retreive' (detected by lintian)

2018-10-05 Thread Ian Jackson
Signed-off-by: Ian Jackson --- tools/hotplug/Linux/block-drbd-probe | 2 +- tools/libxc/xc_dom_elfloader.c | 2 +- tools/libxl/libxl_dm.c | 2 +- tools/libxl/libxl_event.h| 2 +- tools/libxl/libxl_qmp.c | 2 +- xen/include/xen/libfdt/libfdt.h | 2

[Xen-devel] [PATCH 04/18] Various: Fix typo `occured'

2018-10-05 Thread Ian Jackson
Signed-off-by: Ian Jackson --- tools/xl/xl_flask.c| 2 +- xen/arch/arm/arm64/lib/memcmp.S| 2 +- xen/arch/x86/hvm/hvm.c | 2 +- xen/arch/x86/hvm/svm/intr.c| 2 +- xen/drivers/passthrough/arm/smmu.c | 2 +- xen/include/efi/efiprot.h | 2 +-

[Xen-devel] [PATCH 08/18] Various: Fix typo `mappping'

2018-10-05 Thread Ian Jackson
Signed-off-by: Ian Jackson --- tools/python/xen/lowlevel/xc/xc.c | 2 +- xen/drivers/passthrough/vtd/iommu.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/python/xen/lowlevel/xc/xc.c b/tools/python/xen/lowlevel/xc/xc.c index ebef92cd50..484b790c75 100644 ---

[Xen-devel] [PATCH 02/18] tools/xentrace/xenalyze: Fix typos detected by lintian

2018-10-05 Thread Ian Jackson
Signed-off-by: Ian Jackson --- tools/xentrace/xenalyze.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c index 5ed0a12327..aa894673ad 100644 --- a/tools/xentrace/xenalyze.c +++ b/tools/xentrace/xenalyze.c @@

[Xen-devel] [PATCH 00/18] Miscellaneous build and docs, fixes from Debian

2018-10-05 Thread Ian Jackson
Bastian Blank (1): tools/xenstat: Fix shared library version Ian Jackson (17): docs/man: Fix two typos detected by the Debian lintian tool tools/xentrace/xenalyze: Fix typos detected by lintian Various: Fix typos `unkown', `retreive' (detected by lintian) Various: Fix typo `occured'

[Xen-devel] [PATCH 06/18] tools/python/xen/lowlevel: Fix typo `sucess'

2018-10-05 Thread Ian Jackson
Signed-off-by: Ian Jackson --- tools/python/xen/lowlevel/xc/xc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/python/xen/lowlevel/xc/xc.c b/tools/python/xen/lowlevel/xc/xc.c index b137d5a839..6f5b8a6fa8 100644 --- a/tools/python/xen/lowlevel/xc/xc.c +++

[Xen-devel] [PATCH] x86/svm: Fix svm_update_guest_efer() for domains using shadow paging

2018-10-05 Thread Andrew Cooper
When using shadow paging, EFER.NX is a Xen controlled bit, and is required by the shadow pagefault handler to distinguish instruction fetches from data accesses. This can be observed by a guest which has NX and SMEP clear but SMAP active by attempting to execute code on a user mapping. The first

[Xen-devel] [PATCH 2/5] tools/dm_restrict: Ask QEMU to chroot

2018-10-05 Thread George Dunlap
When dm_restrict is enabled, ask QEMU to chroot into an empty directory. * Create /var/run/qemu/root-domid (deleting the old one if it's there) * Pass the -chroot option to QEMU Rather than running `rm -rf` on the directory before creating it (since there is no library function to do this),

[Xen-devel] [PATCH 5/5] RFC: test/depriv: Add a tool to check process-level depriv

2018-10-05 Thread George Dunlap
Add a tool to check whether the various process-level deprivileging operations have actually taken place on the process. The tool takes a domname or domid, and returns success or failure. Signed-off-by: George Dunlap --- Changes since v2: - Make grep for Uid line more strict - Fix Gid grep,

[Xen-devel] [PATCH 3/5] tools/dm_restrict: Unshare mount and IPC namespaces on Linux

2018-10-05 Thread George Dunlap
QEMU running under Xen doesn't need mount or IPC functionality. Create and enter separate namespaces for each of these before executing QEMU, so that in the event that other restrictions fail, the process won't be able to even name system mount points or exsting non-file-based IPC descriptors to

[Xen-devel] [PATCH 4/5] tools/dm_depriv: Add first cut RLIMITs

2018-10-05 Thread George Dunlap
Limit the ability of a potentially compromised QEMU to consume system resources. Key limits: - RLIMIT_FSIZE (file size): 256KiB - RLIMIT_NPROC (after uid changes to a unique uid) Probably unnecessary limits but why not: - RLIMIT_CORE: 0 - RLIMIT_MSGQUEUE: 0 - RLIMIT_LOCKS: 0 -

[Xen-devel] [PATCH 1/5] docs/qemu-deprivilege: Revise and update with status and future plans

2018-10-05 Thread George Dunlap
docs/qemu-deprivilege.txt had some basic instructions for using dm_restrict, but it was incomplete, misleading, and stale. Update the docs in a number of ways. First, separate user-facing documentation and technical description into docs/features and docs/design, respectively. In the feature

[Xen-devel] [PATCH v2] flask: sort io{port,mem}con entries

2018-10-05 Thread Daniel De Graaf
These entries are not always sorted by checkpolicy, so sort them during policy load (as is already done for later ocontext additions). Reported-by: Nicolas Poirot Signed-off-by: Daniel De Graaf --- xen/xsm/flask/ss/policydb.c | 35 +-- 1 file changed, 29

Re: [Xen-devel] [PATCH v14 8/9] mm / iommu: include need_iommu() test in iommu_use_hap_pt()

2018-10-05 Thread Paul Durrant
> -Original Message- > From: Wei Liu [mailto:wei.l...@citrix.com] > Sent: 05 October 2018 17:04 > To: Paul Durrant > Cc: xen-devel@lists.xenproject.org; Stefano Stabellini > ; Jun Nakajima ; George > Dunlap ; Andrew Cooper > ; Jan Beulich ; Wei Liu > > Subject: Re: [Xen-devel] [PATCH v14

Re: [Xen-devel] [PATCH v14 8/9] mm / iommu: include need_iommu() test in iommu_use_hap_pt()

2018-10-05 Thread Wei Liu
This patch has broken my PVH Dom0 setup. [2.515159] igb :02:00.1: added PHC on eth1 [2.519539] igb :02:00.1: Intel(R) Gigabit Ethernet Network Connection [2.526469] igb :02:00.1: eth1: (PCIe:5.0Gb/s:Width x4) 0c:c4:7a:e7:b6:53 [2.533733] igb :02:00.1: eth1: PBA No:

[Xen-devel] [xen-unstable-smoke test] 128422: tolerable all pass - PUSHED

2018-10-05 Thread osstest service owner
flight 128422 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/128422/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 13 migrate-support-checkfail never pass test-arm64-arm64-xl-xsm

Re: [Xen-devel] [PATCH v14 9/9] mm / iommu: split need_iommu() into has_iommu_pt() and need_iommu_pt_sync()

2018-10-05 Thread Paul Durrant
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: 05 October 2018 15:51 > To: Paul Durrant > Cc: Brian Woods ; Suravee Suthikulpanit > ; Julien Grall ; > Andrew Cooper ; Wei Liu ; > George Dunlap ; Ian Jackson > ; Jun Nakajima ; Kevin > Tian ; Stefano Stabellini

Re: [Xen-devel] [PATCH v2 5/6] tools/dm_depriv: Add first cut RLIMITs

2018-10-05 Thread George Dunlap
[resending] On Fri, Oct 5, 2018 at 4:17 PM George Dunlap wrote: > > On Mon, Sep 24, 2018 at 9:35 AM Paul Durrant wrote: > > > +{ > > > +.resource = -1 > > > > Is -1 guaranteed not to clash with any defined resource type? > > Hmm... well at the moment /usr/include/bits/resource.h

Re: [Xen-devel] [PATCH v4 01/12] x86: infrastructure to allow converting certain indirect calls to direct ones

2018-10-05 Thread Jan Beulich
>>> On 05.10.18 at 16:49, wrote: > On 05/10/18 14:43, Jan Beulich wrote: > On 05.10.18 at 14:39, wrote: >>> On 03/10/18 19:38, Andrew Cooper wrote: Makefile:136: recipe for target '/local/xen.git/xen/xen' failed make[1]: *** [/local/xen.git/xen/xen] Error 2 Makefile:45: recipe

[Xen-devel] [PATCH 2/5] xen/domain: Introduce a new arch_check_domain_config() helper

2018-10-05 Thread Andrew Cooper
On the ARM side, lift the code to select the appropriate GIC version when NATIVE is requested. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Stefano Stabellini CC: Julien Grall --- xen/arch/arm/domain.c | 44

[Xen-devel] [PATCH 1/5] xen/domain: Introduce a new check_domain_config() helper

2018-10-05 Thread Andrew Cooper
Call it from the head of domain_create() (before doing any memory allocations), which will apply the checks to dom0 as well as domU's. For now, just subsume the XEN_DOMCTL_CDF_* check from XEN_DOMCTL_createdomain. This means that the corner case of the toolstack providing bad configuration will

[Xen-devel] [PATCH 3/5] xen/domain: Audit config->max_vcpus during {, arch_}check_domain_config()

2018-10-05 Thread Andrew Cooper
The purpose of this is to move the auduting to be earlier than arch_domain_create(). Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Stefano Stabellini CC: Julien Grall The max_vcpus setting for GIC_V3 is somewhat confusing. The current GIC_V3 driver claims to support 4096

[Xen-devel] [PATCH 5/5] Revert "xen/arm: vgic-v3: Delay the initialization of the domain information"

2018-10-05 Thread Andrew Cooper
This reverts commit 703d9d5ec13a0f487e7415174ba54e0e3ca158db. The domain creation logic has been adjusted to set up d->max_vcpus early enough to be usable in vgic_v3_domain_init(). Signed-off-by: Andrew Cooper --- CC: Stefano Stabellini CC: Julien Grall --- xen/arch/arm/vgic-v3.c | 29

[Xen-devel] [PATCH 4/5] xen/domain: Allocate d->vcpu[] earlier during domain_create()

2018-10-05 Thread Andrew Cooper
With config->max_vcpus now being audited by the check_domain_config() path, we can alloate d->vcpu[] before calling arch_domain_create(). Doing do allows for the removal of domain_max_vcpus(), which on the ARM side removes vgic_max_vcpus() and the .max_vcpus field from vgic_ops. Signed-off-by:

[Xen-devel] [PATCH RFC 0/5] xen/domain: Allocate d->vcpu[] earlier during domain construction

2018-10-05 Thread Andrew Cooper
To fix an order-of-construction issue with gic-v3 on ARM, arrange for d->max_vcpus to be auditied and set up prior to arch_domain_create() This is RFC because all of the interesting changes are in ARM, and therefore only compile tested by me at this point. This can be found in git tree from

Re: [Xen-devel] [PATCH v4 01/12] x86: infrastructure to allow converting certain indirect calls to direct ones

2018-10-05 Thread Andrew Cooper
On 05/10/18 14:43, Jan Beulich wrote: On 05.10.18 at 14:39, wrote: >> On 03/10/18 19:38, Andrew Cooper wrote: >>> Finally, this series doesn't link with the default Debian toolchain. >>> >>> andrewcoop@andrewcoop:/local/xen.git/xen$ ld --version >>> GNU ld (GNU Binutils for Debian) 2.25 >>>

Re: [Xen-devel] [PATCH v14 9/9] mm / iommu: split need_iommu() into has_iommu_pt() and need_iommu_pt_sync()

2018-10-05 Thread Jan Beulich
>>> On 04.10.18 at 12:45, wrote: > The name 'need_iommu()' is a little confusing as it suggests a domain needs > to use the IOMMU but something might not be set up yet, when in fact it > represents a tri-state value (not a boolean as might be expected) where > -1 means 'IOMMU mappings being set

[Xen-devel] [linux-4.9 test] 128388: tolerable FAIL - PUSHED

2018-10-05 Thread osstest service owner
flight 128388 linux-4.9 real [real] http://logs.test-lab.xenproject.org/osstest/logs/128388/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd64-amd64-xl-qemut-debianhvm-amd64-xsm 16 guest-localmigrate/x10 fail in 128363 pass in 128388

Re: [Xen-devel] [PATCH v5 0/2][XTF] FPU test improvements

2018-10-05 Thread Jan Beulich
>>> On 05.10.18 at 15:39, wrote: > On 05/10/18 14:28, Jan Beulich wrote: >> 1: add FPU/SIMD register state test >> 2: extend FPU exception tests >> >> Signed-off-by: Jan Beulich > > Thanks. However, I need to get the incremental test version logic > working first, or OSSTest will block this on

Re: [Xen-devel] [PATCH v4 01/12] x86: infrastructure to allow converting certain indirect calls to direct ones

2018-10-05 Thread Jan Beulich
>>> On 05.10.18 at 14:39, wrote: > On 03/10/18 19:38, Andrew Cooper wrote: >> Finally, this series doesn't link with the default Debian toolchain. >> >> andrewcoop@andrewcoop:/local/xen.git/xen$ ld --version >> GNU ld (GNU Binutils for Debian) 2.25 >> >> andrewcoop@andrewcoop:/local/xen.git/xen$

[Xen-devel] [PATCH 1/2] x86/hvm: make sure HVM_PARAM_[BUF]IOREQ_PFN can only be set once

2018-10-05 Thread Paul Durrant
These parameters should have always been in the 'set once' category but this has, so far, not been enforced. Signed-off-by: Paul Durrant --- Cc: Jan Beulich Cc: Andrew Cooper Cc: Wei Liu --- xen/arch/x86/hvm/hvm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/arch/x86/hvm/hvm.c

[Xen-devel] [PATCH 0/2] ioreq: make use of 'legacy' GFNs

2018-10-05 Thread Paul Durrant
Paul Durrant (2): x86/hvm: make sure HVM_PARAM_[BUF]IOREQ_PFN can only be set once x86/hvm/ioreq: allow ioreq servers to use HVM_PARAM_[BUF]IOREQ_PFN xen/arch/x86/hvm/hvm.c | 2 ++ xen/arch/x86/hvm/ioreq.c | 50 ++--

[Xen-devel] [PATCH 2/2] x86/hvm/ioreq: allow ioreq servers to use HVM_PARAM_[BUF]IOREQ_PFN

2018-10-05 Thread Paul Durrant
Since commit 2c257bd6 "x86/hvm: remove default ioreq server (again)" the GFNs allocated by the toolstack and set in HVM_PARAM_IOREQ_PFN and HVM_PARAM_BUFIOREQ_PFN have been unused. This patch allows them to be used by (non-default) ioreq servers. NOTE: This fixes a compatibility issue. A guest

Re: [Xen-devel] [PATCH v5 0/2][XTF] FPU test improvements

2018-10-05 Thread Andrew Cooper
On 05/10/18 14:28, Jan Beulich wrote: > 1: add FPU/SIMD register state test > 2: extend FPU exception tests > > Signed-off-by: Jan Beulich Thanks.  However, I need to get the incremental test version logic working first, or OSSTest will block this on older versions of Xen, due to (falsely)

[Xen-devel] [freebsd-master test] 128413: all pass - PUSHED

2018-10-05 Thread osstest service owner
flight 128413 freebsd-master real [real] http://logs.test-lab.xenproject.org/osstest/logs/128413/ Perfect :-) All tests in this flight passed as required version targeted for testing: freebsd 8f45b071b58d4a00be551ddcc52e78a06ed6fbc7 baseline version: freebsd

[Xen-devel] [PATCH v5 2/2][XTF] x86: extend FPU exception tests

2018-10-05 Thread Jan Beulich
Also test #MF and #XM handling. Signed-off-by: Jan Beulich --- v4: Re-base. v3: New. --- /dev/null +++ b/arch/x86/include/arch/simd.h @@ -0,0 +1,32 @@ +#ifndef XTF_X86_SIMD_H +#define XTF_X86_SIMD_H + +#define X86_MXCSR_IE 0x0001 +#define X86_MXCSR_DE 0x0002 +#define

[Xen-devel] [PATCH v5 1/2][XTF] add FPU/SIMD register state test

2018-10-05 Thread Jan Beulich
Add tests to verify that - FPU insns leave correct (guest) values in FIP/FDP/FOP/FCS/FDS (at the example for FSTPS), - FPU insns writing memory don't update FPU register state when the write faults (at the example of FISTPS), - VCVTPS2PH doesn't update MXCSR if its write faults (VCVTPS2PH is

Re: [Xen-devel] [PATCH] x86/HVM: move vendor independent CPU save/restore logic to shared code

2018-10-05 Thread Jan Beulich
>>> On 05.10.18 at 14:18, wrote: > On 05/10/18 12:31, Jan Beulich wrote: >> A few pieces of the handling here are (no longer?) vendor specific, and >> hence there's no point in replicating the code. > > EFER probably was vendor specific originally. The control registers > really shouldn't have

[Xen-devel] [PATCH v5 0/2][XTF] FPU test improvements

2018-10-05 Thread Jan Beulich
1: add FPU/SIMD register state test 2: extend FPU exception tests Signed-off-by: Jan Beulich ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] ARM64: PCIe in DOM0

2018-10-05 Thread Julien Grall
Hi, On 05/10/2018 12:06, Bharat Bhushan wrote: Further update: If I change Kconfig to enable this default CONFIG_HAS_ITS is in tech preview. For having access to it, you need to pass XEN_CONFIG_EXPERT on *all* the make command line. Then DOM0 Linux Boots but MSIs are not still working,

Re: [Xen-devel] [PATCH] x86/HVM: move vendor independent CPU save/restore logic to shared code

2018-10-05 Thread Boris Ostrovsky
On 10/5/18 7:31 AM, Jan Beulich wrote: > A few pieces of the handling here are (no longer?) vendor specific, and > hence there's no point in replicating the code. Make sure not otherwise > pre-filled fields of struct hvm_hw_cpu instances are zero filled before > calling the vendor "save" hook,

[Xen-devel] [xen-unstable-smoke test] 128415: tolerable all pass - PUSHED

2018-10-05 Thread osstest service owner
flight 128415 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/128415/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 13 migrate-support-checkfail never pass test-arm64-arm64-xl-xsm

Re: [Xen-devel] [PATCH v4 01/12] x86: infrastructure to allow converting certain indirect calls to direct ones

2018-10-05 Thread Andrew Cooper
On 03/10/18 19:38, Andrew Cooper wrote: > Finally, this series doesn't link with the default Debian toolchain. > > andrewcoop@andrewcoop:/local/xen.git/xen$ ld --version > GNU ld (GNU Binutils for Debian) 2.25 > > andrewcoop@andrewcoop:/local/xen.git/xen$ make -s build -j8 >

Re: [Xen-devel] [PATCH] x86/HVM: move vendor independent CPU save/restore logic to shared code

2018-10-05 Thread Andrew Cooper
On 05/10/18 12:31, Jan Beulich wrote: > A few pieces of the handling here are (no longer?) vendor specific, and > hence there's no point in replicating the code. EFER probably was vendor specific originally.  The control registers really shouldn't have been... > Make sure not otherwise >

Re: [Xen-devel] [PATCH] x86: restrict HVMOP_pagetable_dying to current

2018-10-05 Thread Jan Beulich
>>> On 05.10.18 at 13:58, wrote: > On 05/10/18 12:29, Jan Beulich wrote: >> This is not used (and probably was never meant to be) by the tool stack. >> Limiting it to the current domain in particular allows to eliminate a >> bogus use of vCPU 0 in pagetable_dying(). >> >> Remove the now

Re: [Xen-devel] [PATCH] pass-through: provide two !HVM stubs

2018-10-05 Thread Andrew Cooper
On 05/10/18 12:26, Jan Beulich wrote: On 05.10.18 at 13:14, wrote: >> On Fri, Oct 05, 2018 at 05:11:55AM -0600, Jan Beulich wrote: >>> Older gcc, despite eliminating pci_clean_dpci_irqs() when !HVM, does >>> not manage to also eliminate pci_clean_dpci_irq(). Cope with this. >> Would be

Re: [Xen-devel] [PATCH] x86/HVM: move vendor independent CPU save/restore logic to shared code

2018-10-05 Thread Razvan Cojocaru
On 10/5/18 2:31 PM, Jan Beulich wrote: > A few pieces of the handling here are (no longer?) vendor specific, and > hence there's no point in replicating the code. Make sure not otherwise > pre-filled fields of struct hvm_hw_cpu instances are zero filled before > calling the vendor "save" hook,

Re: [Xen-devel] [PATCH] x86: restrict HVMOP_pagetable_dying to current

2018-10-05 Thread Andrew Cooper
On 05/10/18 12:29, Jan Beulich wrote: > This is not used (and probably was never meant to be) by the tool stack. > Limiting it to the current domain in particular allows to eliminate a > bogus use of vCPU 0 in pagetable_dying(). > > Remove the now unnecessary domain/vCPU parameters from the

Re: [Xen-devel] [PATCH] fix uninitialized variable error in do_poll()

2018-10-05 Thread Jan Beulich
>>> On 05.10.18 at 13:43, wrote: > On 05/10/18 12:25, Wei Liu wrote: >> On Fri, Oct 05, 2018 at 05:22:29AM -0600, Jan Beulich wrote: >> On 05.10.18 at 12:28, wrote: On Fri, Oct 05, 2018 at 04:12:10AM -0600, Jan Beulich wrote: > Now that CONFIG_HVM can (and should) be turned off for

Re: [Xen-devel] [PATCH v14 4/9] iommu: don't domain_crash() inside iommu_map/unmap_page()

2018-10-05 Thread Paul Durrant
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: 05 October 2018 12:18 > To: George Dunlap ; Paul Durrant > > Cc: Andrew Cooper ; Ian Jackson > ; Wei Liu ; Stefano > Stabellini ; xen-devel de...@lists.xenproject.org>; Konrad Rzeszutek Wilk > ; Tim (Xen.org) >

Re: [Xen-devel] [PATCH] fix uninitialized variable error in do_poll()

2018-10-05 Thread Andrew Cooper
On 05/10/18 12:25, Wei Liu wrote: > On Fri, Oct 05, 2018 at 05:22:29AM -0600, Jan Beulich wrote: > On 05.10.18 at 12:28, wrote: >>> On Fri, Oct 05, 2018 at 04:12:10AM -0600, Jan Beulich wrote: Now that CONFIG_HVM can (and should) be turned off for the shim, gcc 8.2 apparently is no

Re: [Xen-devel] One-off crash on staging d36b770458

2018-10-05 Thread Wei Liu
On Fri, Oct 05, 2018 at 05:35:13AM -0600, Jan Beulich wrote: > >>> On 05.10.18 at 12:48, wrote: > > Let me know what else is needed. > > The simple addition on top of what Andrew has said: A reliable > repro ;-) If I had managed to find one I would have debugged this myself. :-) Wei. > > Jan

  1   2   >