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

2018-02-08 Thread osstest service owner
flight 118713 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/118713/ 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] [linux-3.18 test] 118666: regressions - FAIL

2018-02-08 Thread osstest service owner
flight 118666 linux-3.18 real [real] http://logs.test-lab.xenproject.org/osstest/logs/118666/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-libvirt-raw 9 leak-check/basis(9) fail REGR. vs. 118488 Tests which did not

[Xen-devel] [PATCH 6/7] drivers/passthrough/arm: Refactor code for arm smmu drivers

2018-02-08 Thread Sameer Goel
Pull common defines for SMMU drives in a local header. Signed-off-by: Sameer Goel --- xen/drivers/passthrough/arm/arm_smmu.h | 125 + xen/drivers/passthrough/arm/smmu-v3.c | 96 +

[Xen-devel] [PATCH 2/7] xen/bitops: Rename LOG_2 to ilog2

2018-02-08 Thread Sameer Goel
Changing the name of the macro from LOG_2 to ilog2.This makes the function name similar to its Linux counterpart. Since, this is not used in multiple places, the code churn is minimal. This change helps in porting unchanged code from Linux. Signed-off-by: Sameer Goel ---

[Xen-devel] [PATCH 5/7] xen/iommu: smmu-v3: Add Xen specific code to enable the ported driver

2018-02-08 Thread Sameer Goel
This driver follows an approach similar to smmu driver. The intent here is to reuse as much Linux code as possible. - Glue code has been introduced to bridge the API calls. - Called Linux functions from the Xen IOMMU function calls. - Xen modifications are preceded by /*Xen: comment */ -

[Xen-devel] [PATCH 4/7] Add verbatim copy of arm-smmu-v3.c from Linux

2018-02-08 Thread Sameer Goel
Based on commit 7aa8619a66aea52b145e04cbab4f8d6a4e5f3f3b This is a verbatim snapshot of arm-smmu-v3.c from Linux kernel source code. No Xen code has been added and the file is not built. Signed-off-by: Sameer Goel --- xen/drivers/passthrough/arm/smmu-v3.c | 2885

[Xen-devel] [PATCH 1/7] Port WARN_ON_ONCE() from Linux

2018-02-08 Thread Sameer Goel
Port WARN_ON_ONCE macro from Linux. Signed-off-by: Sameer Goel Acked-by: Julien Grall --- xen/arch/arm/xen.lds.S | 1 + xen/arch/x86/xen.lds.S | 1 + xen/include/xen/lib.h | 13 + 3 files changed, 15 insertions(+) diff --git

[Xen-devel] [PATCH 3/7] passthrough/arm: Modify SMMU driver to use generic device definition

2018-02-08 Thread Sameer Goel
Modify the SMMU code to use generic device instead of dt_device_node for functions that can be used for ACPI based systems too. Signed-off-by: Sameer Goel Acked-by: Julien Grall --- xen/drivers/passthrough/arm/smmu.c | 12 ++-- 1 file

[Xen-devel] [PATCH 0/7] SMMUv3 driver

2018-02-08 Thread Sameer Goel
This patch set adds support for the SMMUv3 driver. This is a continuation on a RFCv4.[1] The IORT support came from [2]. This RFC has some conflicting defines that have to be addressed by introducing the linux_compat.h header in IORT patch set. In any case the SMMU changes apply on top of IORT

[Xen-devel] [xen-4.7-testing test] 118664: regressions - FAIL

2018-02-08 Thread osstest service owner
flight 118664 xen-4.7-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/118664/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-xtf-amd64-amd64-2 49 xtf/test-hvm64-lbr-tsx-vmentry fail REGR. vs. 118337 Tests which

[Xen-devel] libxl - avoid calling block script

2018-02-08 Thread Marek Marczykowski-Górecki
Hi, I'd like to avoid calling block script to speed up domain startup a little (there may be multiple disks, all already being block devices). Right now I have restored setting physical-device xenstore entry in libxl (by reverting [1]), then applying the patch below (it's on 4.8). This works well

Re: [Xen-devel] [PATCH v3 0/3] xen/arm: SMCCC fixes and PSCI clean-up

2018-02-08 Thread Stefano Stabellini
Acked-by and committed with a couple of grammar fixes in the commit message. Thanks, Stefano On Tue, 6 Feb 2018, Julien Grall wrote: > Hi all, > > This small patch series contains SMCCC fixes (see #2) and PSCI clean-up. > > Cheers, > > Julien Grall (3): > xen/arm: vpsci: Removing dummy

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

2018-02-08 Thread osstest service owner
flight 118704 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/118704/ 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] libxl: do not fail device removal if backend domain is gone

2018-02-08 Thread Marek Marczykowski-Górecki
Backend domain may be independently destroyed - there is no synchronization of libxl structures (including /libxl tree) elsewhere. Backend might also remove the device info from its backend xenstore subtree on its own. If such situation is detected, do not fail the removal, but finish the cleanup

[Xen-devel] [PATCH] libxl: allow libxl_domain_suspend to simply suspend a domain, without saving it

2018-02-08 Thread Marek Marczykowski-Górecki
When fd=-1, no savefile will be written, but the domain will still be suspended (but not destroyed). The main reason for this functionality is to suspend the host while some domains are running, potentially holding PCI devices. This will give a chance to a driver in such a domain to properly

[Xen-devel] [xen-4.8-testing test] 118663: regressions - FAIL

2018-02-08 Thread osstest service owner
flight 118663 xen-4.8-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/118663/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl-credit2 16 guest-start/debian.repeat fail REGR. vs. 118465

Re: [Xen-devel] [RFC 07/11] Add kernel helper functions

2018-02-08 Thread Sameer Goel
On 1/2/2018 2:28 AM, manish.ja...@linaro.org wrote: > From: Manish Jaggi > > Add kalloc kfree functions from linux kernel. > > Signed-off-by: Manish Jaggi > --- > xen/include/xen/kernel.h | 10 ++ > 1 file changed, 10 insertions(+) > >

Re: [Xen-devel] [RFC 11/11] Add to_pci_dev macro

2018-02-08 Thread Sameer Goel
On 1/2/2018 2:28 AM, manish.ja...@linaro.org wrote: > From: Manish Jaggi > > This patch adds to_pci_dev macro > > Signed-off-by: Manish Jaggi > --- > xen/include/xen/pci.h | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git

[Xen-devel] [PATCH 3/3] libxc: xc_dom_parse_elf_kernel: Return error for invalid kernel images

2018-02-08 Thread Simon Gaiser
Commit 96edb111dd ("libxc: panic when trying to create a PVH guest without kernel support") already improved the handling of non PVH capable kernels. But xc_dom_parse_elf_kernel() still returned success on invalid elf images and the domain build only failed later. Now the build process will fail

[Xen-devel] [PATCH 2/3] libxl: Improve logging in libxl__build_dom()

2018-02-08 Thread Simon Gaiser
xc_dom_parse_image() does not set errno (at least in many code paths). So LOGE() is not useful. Signed-off-by: Simon Gaiser --- tools/libxl/libxl_dom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxl/libxl_dom.c

[Xen-devel] [PATCH 1/3] libxc: Cleanup xc_dom_parse_elf_kernel()'s return value

2018-02-08 Thread Simon Gaiser
xc_dom_loader.parser() should return elf_negerrnoval. Signed-off-by: Simon Gaiser --- tools/libxc/xc_dom_elfloader.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/tools/libxc/xc_dom_elfloader.c b/tools/libxc/xc_dom_elfloader.c

[Xen-devel] libx[lc]: Improve error reporting for invalid kernel images

2018-02-08 Thread Simon Gaiser
Hi, this series cleans up the error reporting in case a invalid kernel image is supplied. For example if the user tries to boot a pre 4.11 Linux in PVH mode. Commit 96edb111dd ("libxc: panic when trying to create a PVH guest without kernel support") already improved the situation: xc: error:

[Xen-devel] [v2, 2/2] arm64: Implement branch predictor hardening for Falkor (fwd)

2018-02-08 Thread Stefano Stabellini
Hi Shanker, it looks like that Xen might also need MIDR_QCOM_FALKOR_V1 and MIDR_QCOM_FALKOR added to xen/arch/arm/cpuerrata.c:arm_errata with the ARM_HARDEN_BRANCH_PREDICTOR capability set? Cheers, Stefano From patchwork Mon Jan 8 21:31:08 2018 Content-Type: text/plain; charset="utf-8"

[Xen-devel] [PATCH v2 10/15] xen/arm: smccc: Implement SMCCC v1.1 inline primitive

2018-02-08 Thread Julien Grall
One of the major improvement of SMCCC v1.1 is that it only clobbers the first 4 registers, both on 32 and 64bit. This means that it becomes very easy to provide an inline version of the SMC call primitive, and avoid performing a function call to stash the registers that woudl otherwise be

[Xen-devel] [PATCH v2 01/15] xen/arm: psci: Rework the PSCI definitions

2018-02-08 Thread Julien Grall
Some PSCI functions are only available in the 32-bit version. After recent changes, Xen always needs to know whether the call was made using 32-bit id or 64-bit id. So we don't emulate reserved one. With the current naming scheme, it is not easy to know which call supports 32-bit and 64-bit id.

[Xen-devel] [PATCH v2 06/15] xen/arm64: Implement a fast path for handling SMCCC_ARCH_WORKAROUND_1

2018-02-08 Thread Julien Grall
The function SMCCC_ARCH_WORKAROUND_1 will be called by the guest for hardening the branch predictor. So we want the handling to be as fast as possible. As the mitigation is applied on every guest exit, we can check for the call before saving all the context and return very early. For now, only

[Xen-devel] [PATCH v2 07/15] xen/arm64: Print a per-CPU message with the BP hardening method used

2018-02-08 Thread Julien Grall
This will make easier to know whether BP hardening has been enabled for a CPU and which method is used. Signed-off-by: Julien Grall --- Changes in v2: - Patch added --- xen/arch/arm/cpuerrata.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-)

[Xen-devel] [PATCH v2 00/15] xen/arm: PSCI 1.1 and SMCCC-1.1 support and XSA-254 variant 2 update

2018-02-08 Thread Julien Grall
Hi all, Arm has recently published a SMC Calling Convention (SMCCC) specification update [1] that provides an optimised calling convention and optional, discoverable support for mitigating CVE-2017-5715 (XSA-254 variant 2). ARM Trusted Firmware (ATF) has already gained such an implementation[2].

[Xen-devel] [PATCH v2 03/15] xen/arm: vsmc: Implement SMCCC 1.1

2018-02-08 Thread Julien Grall
The new SMC Calling Convention (v1.1) allows for a reduced overhead when calling into the firmware, and provides a new feature discovery mechanism. See "Firmware interfaces for mitigating CVE-2017-5715" ARM DEN 00070A. Signed-off-by: Julien Grall --- Changes in v2:

[Xen-devel] [PATCH v2 09/15] xen/arm: psci: Detect SMCCC version

2018-02-08 Thread Julien Grall
PSCI 1.0 and later allows the SMCCC version to be (indirectly) probed via PSCI_FEATURES. If the PSCI_FEATURES does not exist (PSCI 0.2 or earlier) and the function return an error, then we considered SMCCC 1.0 is implemented. Signed-off-by: Julien Grall --- Changes in

[Xen-devel] [PATCH v2 13/15] xen/arm: vpsci: Remove parameter 'ver' from do_common_cpu

2018-02-08 Thread Julien Grall
Currently, the behavior of do_common_cpu will slightly change depending on the PSCI version passed in parameter. Looking at the code, more the specific 0.2 behavior could move out of the function or adapted for 0.1: - x0/r0 can be updated on PSCI 0.1 because general purpose registers are

[Xen-devel] [PATCH v2 14/15] xen/arm: psci: Consolidate PSCI version print

2018-02-08 Thread Julien Grall
Xen is printing the same way the PSCI version for 0.1, 0.2 and later. The only different is the former is hardcoded. Furthermore PSCI is now used for other things than SMP bring up. So only print the PSCI version in psci_init. Signed-off-by: Julien Grall --- Changes

[Xen-devel] [PATCH v2 08/15] xen/arm: smccc: Add macros SMCCC_VERSION, SMCCC_VERSION_{MINOR, MAJOR}

2018-02-08 Thread Julien Grall
Add macros SMCCC_VERSION, SMCCC_VERSION_{MINOR, MAJOR} to easily convert between a 32-bit value and a version number. The encoding is based on 2.2.2 in "Firmware interfaces for mitigation CVE-2017-5715" (ARM DEN 0070A). Also re-use them to define ARM_SMCCC_VERSION_1_0 and ARM_SMCCC_VERSION_1_1.

[Xen-devel] [PATCH v2 12/15] xen/arm64: Kill PSCI_GET_VERSION as a variant-2 workaround

2018-02-08 Thread Julien Grall
Now that we've standardised on SMCCC v1.1 to perform the branch prediction invalidation, let's drop the previous band-aid. If vendors haven't updated their firmware to do SMCCC 1.1, they haven't updated PSCI either, so we don't loose anything. This is aligned with the Linux commit 3a0a397ff5ff.

[Xen-devel] [PATCH v2 11/15] xen/arm64: Add ARM_SMCCC_ARCH_WORKAROUND_1 BP hardening support

2018-02-08 Thread Julien Grall
Add the detection and runtime code for ARM_SMCCC_ARCH_WORKAROUND_1. Signed-off-by: Julien Grall --- Changes in v2: - Patch added --- xen/arch/arm/arm64/bpi.S| 12 xen/arch/arm/cpuerrata.c| 32 +++-

[Xen-devel] [PATCH v2 15/15] xen/arm: psci: Prefix with static any functions not exported

2018-02-08 Thread Julien Grall
A bunch of PSCI functions are not prefixed with static despite no one is using them outside the file and the prototype is not available in psci.h. Signed-off-by: Julien Grall --- Changes in v2: - Patch added --- xen/arch/arm/psci.c | 6 +++--- 1 file changed,

[Xen-devel] [PATCH v2 02/15] xen/arm: vpsci: Add support for PSCI 1.1

2018-02-08 Thread Julien Grall
At the moment, Xen provides virtual PSCI interface compliant with 0.1 and 0.2. Since them, the specification has been updated and the latest version is 1.1 (see ARM DEN 0022D). From an implementation point of view, only PSCI_FEATURES is mandatory. The rest is optional and can be left

[Xen-devel] [PATCH v2 04/15] xen/arm: vsmc: Implement SMCCC_ARCH_WORKAROUND_1 BP hardening support

2018-02-08 Thread Julien Grall
SMCCC 1.1 offers firmware-based CPU workarounds. In particular, SMCCC_ARCH_WORKAROUND_1 provides BP hardening for variant 2 of XSA-254 (CVE-2017-5715). If the hypervisor has some mitigation for this issue, report that we deal with it using SMCCC_ARCH_WORKAROUND_1, as we apply the hypervisor

[Xen-devel] [PATCH v2 05/15] xen/arm: Adapt smccc.h to be able to use it in assembly code

2018-02-08 Thread Julien Grall
Signed-off-by: Julien Grall Reviewed-by: Volodymyr Babchuk --- Changes in v2: - Add Volodymyr's reviewed-by --- xen/include/asm-arm/smccc.h | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git

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

2018-02-08 Thread osstest service owner
flight 118690 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/118690/ 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] [PULL 14/26] pci: removed the is_express field since a uniform interface was inserted

2018-02-08 Thread Michael S. Tsirkin
From: Yoni Bettan according to Eduardo Habkost's commit fd3b02c889 all PCIEs now implement INTERFACE_PCIE_DEVICE so we don't need is_express field anymore. Devices that implements only INTERFACE_PCIE_DEVICE (is_express == 1) or devices that implements only

[Xen-devel] [xen-unstable test] 118661: regressions - FAIL

2018-02-08 Thread osstest service owner
flight 118661 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/118661/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-libvirt-xsm 7 xen-boot fail REGR. vs. 118607 Regressions which

Re: [Xen-devel] [PATCH 1/2] make xen ocaml safe-strings compliant

2018-02-08 Thread Wei Liu
On Thu, Feb 08, 2018 at 06:03:48PM +, Wei Liu wrote: > On Thu, Feb 08, 2018 at 06:49:58PM +0100, Dario Faggioli wrote: > > On Tue, 2018-01-30 at 22:55 +, Michael Young wrote: > > > Xen built with ocaml 4.06 gives errors such as > > > Error: This expression has type bytes but an expression

Re: [Xen-devel] [PATCH 1/7] xen/arm: vpsci: Remove parameter 'ver' from do_common_cpu

2018-02-08 Thread Julien Grall
On 06/02/18 15:42, Volodymyr Babchuk wrote: Hi Julien, Hi Volodymyr, On 5 February 2018 at 15:20, Julien Grall wrote: Currently, the behavior of do_common_cpu will slightly change depending on the PSCI version passed in parameter. Looking at the code, more the

Re: [Xen-devel] [PATCH v2 4/4] hvm/svm: Enable CR events

2018-02-08 Thread Tamas K Lengyel
On Thu, Feb 8, 2018 at 8:25 AM, Alexandru Isaila wrote: > This commit enables controlregister events for svm. So this patch enables the event to trigger but where is it being handled and forwarded to the monitor ring? > > Signed-off-by: Alexandru Isaila

Re: [Xen-devel] [PATCH v2 3/4] hvm/svm: Enable MSR events

2018-02-08 Thread Tamas K Lengyel
On Thu, Feb 8, 2018 at 8:25 AM, Alexandru Isaila wrote: > This commit enables MSR events for svm. > > Signed-off-by: Alexandru Isaila Acked-by: Tamas K Lengyel > --- > xen/arch/x86/hvm/svm/svm.c| 9 + >

Re: [Xen-devel] [PATCH v2 2/4] hvm/svm: Enable Breakpoint events

2018-02-08 Thread Tamas K Lengyel
On Thu, Feb 8, 2018 at 8:25 AM, Alexandru Isaila wrote: > This commit enables the breakpoint events for svm. > > Signed-off-by: Alexandru Isaila > > --- > Changes since V1: > - Clean up bool_t > - Removed event.insn_len = 0 >

Re: [Xen-devel] [PATCH 1/2] make xen ocaml safe-strings compliant

2018-02-08 Thread Wei Liu
On Thu, Feb 08, 2018 at 06:49:58PM +0100, Dario Faggioli wrote: > On Tue, 2018-01-30 at 22:55 +, Michael Young wrote: > > Xen built with ocaml 4.06 gives errors such as > > Error: This expression has type bytes but an expression was > > expected of type string > > as Byte and safe-strings

Re: [Xen-devel] [PATCH 1/2] make xen ocaml safe-strings compliant

2018-02-08 Thread Dario Faggioli
On Tue, 2018-01-30 at 22:55 +, Michael Young wrote: > Xen built with ocaml 4.06 gives errors such as > Error: This expression has type bytes but an expression was > expected of type string > as Byte and safe-strings which were introduced in 4.02 are the > default in 4.06. > This patch

Re: [Xen-devel] Slow HVM boot time, was "HVM boot time optimization"

2018-02-08 Thread Wei Liu
On Thu, Feb 08, 2018 at 04:56:00PM +, Anthony PERARD wrote: > On Thu, Feb 08, 2018 at 04:48:10PM +, Wei Liu wrote: > > On Thu, Feb 08, 2018 at 08:31:40AM -0800, Stefano Stabellini wrote: > > > CC'ing xen-devel and a few relevant people > > > > > > On Thu, 8 Feb 2018, Yessine Daoud wrote:

[Xen-devel] [PATCH v3 2/3] x86/svm: add EFER SVME support for VGIF/VLOAD

2018-02-08 Thread Brian Woods
Only enable virtual VMLOAD/SAVE and VGIF if the guest EFER.SVME is set. Reported-by: Andrew Cooper Signed-off-by: Brian Woods --- xen/arch/x86/hvm/svm/nestedsvm.c| 66 + xen/arch/x86/hvm/svm/svm.c

Re: [Xen-devel] Slow HVM boot time, was "HVM boot time optimization"

2018-02-08 Thread Anthony PERARD
On Thu, Feb 08, 2018 at 04:48:10PM +, Wei Liu wrote: > On Thu, Feb 08, 2018 at 08:31:40AM -0800, Stefano Stabellini wrote: > > CC'ing xen-devel and a few relevant people > > > > On Thu, 8 Feb 2018, Yessine Daoud wrote: > > > Dear Sir, > > > I need your help please. > > > > > > I am using a

Re: [Xen-devel] Slow HVM boot time, was "HVM boot time optimization"

2018-02-08 Thread Wei Liu
On Thu, Feb 08, 2018 at 08:31:40AM -0800, Stefano Stabellini wrote: > CC'ing xen-devel and a few relevant people > > On Thu, 8 Feb 2018, Yessine Daoud wrote: > > Dear Sir, > > I need your help please. > > > > I am using a direct kernel boot (HVM guest) with kernel + ramdisk. > > At boot, seabios

Re: [Xen-devel] Slow HVM boot time, was "HVM boot time optimization"

2018-02-08 Thread George Dunlap
On Thu, Feb 8, 2018 at 4:31 PM, Stefano Stabellini wrote: > CC'ing xen-devel and a few relevant people > > On Thu, 8 Feb 2018, Yessine Daoud wrote: >> Dear Sir, >> I need your help please. >> >> I am using a direct kernel boot (HVM guest) with kernel + ramdisk. >> At boot,

[Xen-devel] Slow HVM boot time, was "HVM boot time optimization"

2018-02-08 Thread Stefano Stabellini
CC'ing xen-devel and a few relevant people On Thu, 8 Feb 2018, Yessine Daoud wrote: > Dear Sir, > I need your help please. > > I am using a direct kernel boot (HVM guest) with kernel + ramdisk. > At boot, seabios is bloqued about 20 seconds (or more) at the following state: > > (d4)

Re: [Xen-devel] [PATCH 0/7] xen/arm: PSCI 1.1 and SMCCC-1.1 support and XSA-254 variant 2 update

2018-02-08 Thread Julien Grall
On 08/02/18 16:26, Manish Jaggi wrote: On 02/05/2018 06:50 PM, Julien Grall wrote: Hi all, Arm has recently published a SMC Calling Convention (SMCCC) specification update [1] that provides an optimised calling convention and optional, discoverable support for mitigating CVE-2017-5715

Re: [Xen-devel] [PATCH 0/7] xen/arm: PSCI 1.1 and SMCCC-1.1 support and XSA-254 variant 2 update

2018-02-08 Thread Manish Jaggi
Hi Julien, On 02/05/2018 06:50 PM, Julien Grall wrote: Hi all, Arm has recently published a SMC Calling Convention (SMCCC) specification update [1] that provides an optimised calling convention and optional, discoverable support for mitigating CVE-2017-5715 (XSA-254 variant 2). ARM Trusted

Re: [Xen-devel] [GSOC] Xen on ARM: create multiple guests from device tree

2018-02-08 Thread Stefano Stabellini
On Thu, 8 Feb 2018, Denis Obrezkov wrote: > > Good! Please compile Xen for ARM64 and try to boot Xen and Dom0 with it. > > Once you have Xen and Dom0 up and running, you can try to create a small > > guest and start that as well. It will help you setup your build and test > > environments. > > > >

Re: [Xen-devel] [PATCH v2 2/3] x86/svm: add EFER SVME support for VGIF/VLOAD

2018-02-08 Thread Brian Woods
On Thu, Feb 08, 2018 at 02:45:31AM -0700, Jan Beulich wrote: > I'm afraid I continue to be confused: A function with this name should > imo, as said earlier, live in nestedsvm.c. However ... I'll move it to nestedsvm.c then. > ... this indicates that the function does something even for the >

Re: [Xen-devel] [PATCH] x86/nmi: lower initial watchdog frequency to avoid boot hangs

2018-02-08 Thread Alexey G
On Thu, 8 Feb 2018 15:00:33 + Andrew Cooper wrote: >On 08/02/18 14:37, Alexey G wrote: >> On Thu, 8 Feb 2018 12:40:41 + >> Andrew Cooper wrote: >>> - Perf/Oprofile.  This is currently mutually exclusive with Xen >>> using the

[Xen-devel] [PATCH v2 1/4] asm-x86/monitor: Enable svm monitor events

2018-02-08 Thread Alexandru Isaila
This commit separates the svm caps from the vmx caps. Signed-off-by: Alexandru Isaila --- Changes since V1: - Removed the if ( cpu_has_svm ) --- xen/include/asm-x86/monitor.h | 34 +++--- 1 file changed, 19 insertions(+), 15

[Xen-devel] [PATCH v2 4/4] hvm/svm: Enable CR events

2018-02-08 Thread Alexandru Isaila
This commit enables controlregister events for svm. Signed-off-by: Alexandru Isaila --- xen/arch/x86/hvm/svm/svm.c| 11 +++ xen/include/asm-x86/monitor.h | 6 +++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/hvm/svm/svm.c

[Xen-devel] [PATCH v2 2/4] hvm/svm: Enable Breakpoint events

2018-02-08 Thread Alexandru Isaila
This commit enables the breakpoint events for svm. Signed-off-by: Alexandru Isaila --- Changes since V1: - Clean up bool_t - Removed event.insn_len = 0 - Switched the v->domain->debugger_attached if - Add a extra pair of brachets for the

[Xen-devel] [PATCH v2 0/4] hvm/svm: Enable vm events for SVM

2018-02-08 Thread Alexandru Isaila
Hi all, This series provides a skeleton for enabling vm_events on SVM. For the first step, the MSR, CR, Breakpoint and GuestRequest have been tested and added to the capabilities list. Cheers, Alexandru Isaila ___ Xen-devel mailing list

[Xen-devel] [PATCH v2 3/4] hvm/svm: Enable MSR events

2018-02-08 Thread Alexandru Isaila
This commit enables MSR events for svm. Signed-off-by: Alexandru Isaila --- xen/arch/x86/hvm/svm/svm.c| 9 + xen/include/asm-x86/monitor.h | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/hvm/svm/svm.c

Re: [Xen-devel] [PATCH] x86/nmi: lower initial watchdog frequency to avoid boot hangs

2018-02-08 Thread Andrew Cooper
On 08/02/18 14:37, Alexey G wrote: > On Thu, 8 Feb 2018 12:40:41 + > Andrew Cooper wrote: >> - Perf/Oprofile.  This is currently mutually exclusive with Xen using >> the watchdog, but needn't be and hopefully won't be in the future. >> >>> Most of the time we deal

Re: [Xen-devel] [PATCH v1 2/5] libxl: add vsnd list and info

2018-02-08 Thread Wei Liu
On Thu, Feb 08, 2018 at 04:40:31PM +0200, Oleksandr Grytsov wrote: > freed with appropriate API. Using libxl__realloc will cause double free > issue. Use libxl__realloc(NOGC, ...) to avoid that issue. Wei. ___ Xen-devel mailing list

Re: [Xen-devel] [PATCH v1 2/5] libxl: add vsnd list and info

2018-02-08 Thread Oleksandr Grytsov
On Tue, Feb 6, 2018 at 4:43 PM, Wei Liu wrote: > On Wed, Nov 01, 2017 at 05:04:44PM +0200, Oleksandr Grytsov wrote: > > From: Oleksandr Grytsov > > > > Add getting vsnd list amd info API > > > > Signed-off-by: Oleksandr Grytsov

Re: [Xen-devel] [PATCH] x86/nmi: lower initial watchdog frequency to avoid boot hangs

2018-02-08 Thread Alexey G
On Thu, 8 Feb 2018 12:40:41 + Andrew Cooper wrote: >- Perf/Oprofile.  This is currently mutually exclusive with Xen using >the watchdog, but needn't be and hopefully won't be in the future. > >> >> Most of the time we deal with watchdog NMIs, while all others should

Re: [Xen-devel] [PATCH RFC 2/8] public/io/netif: add directory for backend parameters

2018-02-08 Thread Joao Martins
On 02/08/2018 11:13 AM, Wei Liu wrote: > On Wed, Feb 07, 2018 at 12:10:37PM +, Joao Martins wrote: >> On 02/06/2018 05:12 PM, Wei Liu wrote: >>> (Three months after you sent this, sorry...) >>> >>> On Mon, Nov 06, 2017 at 12:33:06PM +, Joao Martins wrote: On Mon, Nov 06, 2017 at

[Xen-devel] [PATCH v3] xenbus: track caller request id

2018-02-08 Thread Joao Martins
Commit fd8aa9095a95 ("xen: optimize xenbus driver for multiple concurrent xenstore accesses") optimized xenbus concurrent accesses but in doing so broke UABI of /dev/xen/xenbus. Through /dev/xen/xenbus applications are in charge of xenbus message exchange with the correct header and body. Now,

[Xen-devel] [xen-4.9-testing test] 118658: regressions - FAIL

2018-02-08 Thread osstest service owner
flight 118658 xen-4.9-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/118658/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemut-win7-amd64 16 guest-localmigrate/x10 fail REGR. vs. 118524

Re: [Xen-devel] [PATCH v3 2/2] x86/setup: remap Xen image up to PFN_DOWN(__pa(_end))

2018-02-08 Thread Daniel Kiper
Sorry for late reply but I was busy with other stuff. On Fri, Jan 19, 2018 at 08:27:46AM -0700, Jan Beulich wrote: > >>> On 10.01.18 at 14:05, wrote: > > Current limit, PFN_DOWN(xen_phys_start), introduced by commit b280442 > > (x86: make Xen early boot code relocatable)

Re: [Xen-devel] [PATCH] x86/nmi: lower initial watchdog frequency to avoid boot hangs

2018-02-08 Thread Andrew Cooper
On 08/02/18 12:32, Alexey G wrote: > On Thu, 8 Feb 2018 10:47:45 + > Igor Druzhinin wrote: >> I've done this measurement before. So what we are seeing exactly is >> that the time we are spending in SMI is spiking (sometimes up to >> 200ms) at the moment we go

Re: [Xen-devel] Ping: [PATCH v2 0/3] XSA-248...251 follow-up

2018-02-08 Thread George Dunlap
On 02/07/2018 03:27 PM, Jan Beulich wrote: On 20.12.17 at 10:37, wrote: >> The parts of this series aren't really dependent upon one another, >> they belong together solely because of their origin. >> >> 1: x86/shadow: widen reference count >> 2: x86/mm: clean up SHARED_M2P{,_ENTRY} uses >>

Re: [Xen-devel] [PATCH v2 3/3] x86: use paging_mark_pfn_dirty()

2018-02-08 Thread George Dunlap
On Wed, Dec 20, 2017 at 9:42 AM, Jan Beulich wrote: > ... in preference over paging_mark_dirty(), when the PFN is known > anyway. > > Signed-off-by: Jan Beulich > Acked-by: Tim Deegan Acked-by: George Dunlap

Re: [Xen-devel] [PATCH] x86/nmi: lower initial watchdog frequency to avoid boot hangs

2018-02-08 Thread Alexey G
On Thu, 8 Feb 2018 10:47:45 + Igor Druzhinin wrote: >I've done this measurement before. So what we are seeing exactly is >that the time we are spending in SMI is spiking (sometimes up to >200ms) at the moment we go through INIT-SIPI-SIPI sequence. Looks like >this

Re: [Xen-devel] [PATCH v2 2/3] x86/mm: clean up SHARED_M2P{, _ENTRY} uses

2018-02-08 Thread George Dunlap
On Wed, Dec 20, 2017 at 9:41 AM, Jan Beulich wrote: > Stop open-coding SHARED_M2P() and drop a pointless use of it from > paging_mfn_is_dirty() (!VALID_M2P() is a superset of SHARED_M2P()) and > another one from free_page_type() (prior assertions render this > redundant). > >

[Xen-devel] [PATCH 3/3] pvh/dom0: whitelist PVH Dom0 ACPI tables

2018-02-08 Thread Roger Pau Monne
Signed-off-by: Roger Pau Monné --- xen/arch/x86/hvm/dom0_build.c | 31 ++- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/xen/arch/x86/hvm/dom0_build.c b/xen/arch/x86/hvm/dom0_build.c index 830b4345cc..82ee3fe237 100644 ---

[Xen-devel] [PATCH 2/3] pvh/dom0: pass address/length to pvh_acpi_table_allowed

2018-02-08 Thread Roger Pau Monne
The current usage of acpi_gbl_root_table_list inside the function is wrong. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper --- xen/arch/x86/hvm/dom0_build.c | 29 +++-- 1 file

[Xen-devel] [PATCH 1/3] pvh/dom0: init variables at declaration time

2018-02-08 Thread Roger Pau Monne
Also remove a couple of newlines at the start of function declarations. No functional change. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper --- xen/arch/x86/hvm/dom0_build.c | 17 + 1

[Xen-devel] [PATCH 0/3] pvh/dom0: switch to ACPI whitelisting

2018-02-08 Thread Roger Pau Monne
Hello, The following small series contain one cleanup, one bugfix and finally switches PVH Dom0 from whitelisting ACPI tables instead of blacklisting them. The number of allowed tables ATM is fairly limited, many more could be added if the resources described in them are properly mapped to Dom0

Re: [Xen-devel] [PATCH] x86/nmi: lower initial watchdog frequency to avoid boot hangs

2018-02-08 Thread Andrew Cooper
On 08/02/18 09:12, Jan Beulich wrote: On 07.02.18 at 18:08, wrote: >> On 07/02/18 15:06, Jan Beulich wrote: >>> Also you completely ignore my argument against the seemingly >>> random division by 10, including the resulting question of what you >>> mean to do once

Re: [Xen-devel] [PATCH 1/4] firmware/shim: correctly handle errors during Xen tree setup

2018-02-08 Thread Wei Liu
On Wed, Feb 07, 2018 at 08:07:01AM -0700, Jan Beulich wrote: > "set -e" on a separate Makefile line is meaningless. Glue together all > the lines that this is supposed to cover. > > Signed-off-by: Jan Beulich Reviewed-by: Wei Liu

Re: [Xen-devel] update on the status of SP2 mitigations for Xen on Arm

2018-02-08 Thread Julien Grall
On 07/02/18 20:14, Stefano Stabellini wrote: Hi all, Hi, I'd like to make some clarifications on what has been merged in Xen so far and the state of SP2. This is the latest status of the SP2 mitigations for Xen on Arm. Please note that arm32 and arm64 require different mitigations. I

Re: [Xen-devel] [PATCH 4/4] firmware/shim: avoid mkdir error during Xen tree setup

2018-02-08 Thread Wei Liu
On Wed, Feb 07, 2018 at 08:08:47AM -0700, Jan Beulich wrote: > "mkdir -p" reports a missing operand, as config/ has no subdirs. Oddly > enough this doesn't cause the whole command (and hence the build to > fail), despite the "set -e" now covering the entire set of commands - > perhaps a quirk of

Re: [Xen-devel] [PATCH 3/4] firmware/shim: better filtering of intermediate files during Xen tree setup

2018-02-08 Thread Wei Liu
On Wed, Feb 07, 2018 at 08:08:15AM -0700, Jan Beulich wrote: > I have no idea what *.1 is meant to cover. Instead also exclude > preprocessed and non-source assembly files. > > Signed-off-by: Jan Beulich Reviewed-by: Wei Liu

Re: [Xen-devel] [PATCH 2/4] firmware/shim: better filtering of dependency files during Xen tree setup

2018-02-08 Thread Wei Liu
On Wed, Feb 07, 2018 at 09:27:49AM -0700, Jan Beulich wrote: > >>> On 07.02.18 at 17:05, wrote: > > On Wed, Feb 07, 2018 at 08:07:40AM -0700, Jan Beulich wrote: > >> I have no idea what *.d1 is supposed to refer to - we only have .*.d > >> and .*.d2 files (note also the

Re: [Xen-devel] [PATCH v1] x86/msr: add Raw and Host domain policies

2018-02-08 Thread Sergey Dyasli
On Thu, 2018-02-08 at 11:21 +, Roger Pau Monné wrote: > On Thu, Feb 08, 2018 at 10:23:21AM +, Sergey Dyasli wrote: > > +static void __init calculate_host_policy(void) > > +{ > > +struct msr_domain_policy *dp = _msr_domain_policy; > > + > > +*dp = raw_msr_domain_policy; > >

Re: [Xen-devel] [PATCH v1] x86/msr: add Raw and Host domain policies

2018-02-08 Thread Roger Pau Monné
On Thu, Feb 08, 2018 at 10:23:21AM +, Sergey Dyasli wrote: > +static void __init calculate_host_policy(void) > +{ > +struct msr_domain_policy *dp = _msr_domain_policy; > + > +*dp = raw_msr_domain_policy; host_msr_domain_policy = raw_msr_domain_policy; Should work AFAICT. > diff

Re: [Xen-devel] [PATCH RFC 2/8] public/io/netif: add directory for backend parameters

2018-02-08 Thread Wei Liu
On Wed, Feb 07, 2018 at 12:10:37PM +, Joao Martins wrote: > On 02/06/2018 05:12 PM, Wei Liu wrote: > > (Three months after you sent this, sorry...) > > > > On Mon, Nov 06, 2017 at 12:33:06PM +, Joao Martins wrote: > >> On Mon, Nov 06, 2017 at 10:33:59AM +, Paul Durrant wrote: >

Re: [Xen-devel] [PATCH v1] x86/msr: add Raw and Host domain policies

2018-02-08 Thread Andrew Cooper
On 08/02/18 10:23, Sergey Dyasli wrote: > Raw policy contains the actual values from H/W MSRs. Add PLATFORM_INFO > msr to the policy during probe_cpuid_faulting(). > > Host policy might have certain features disabled if Xen decides not > to use them. For now, make Host policy equal to Raw policy.

Re: [Xen-devel] [PATCH] x86/nmi: lower initial watchdog frequency to avoid boot hangs

2018-02-08 Thread Igor Druzhinin
On 08/02/18 06:37, Alexey G wrote: > On Wed, 7 Feb 2018 13:01:08 + > Igor Druzhinin wrote: >> So far the issue confirmed: >> Dell PowerEdge R740, Huawei systems based on Xeon Gold 6152 (the one >> that it was tested on), Intel S2600XX, etc. >> >> Also see: >>

[Xen-devel] [PATCH v1] x86/msr: add Raw and Host domain policies

2018-02-08 Thread Sergey Dyasli
Raw policy contains the actual values from H/W MSRs. Add PLATFORM_INFO msr to the policy during probe_cpuid_faulting(). Host policy might have certain features disabled if Xen decides not to use them. For now, make Host policy equal to Raw policy. Signed-off-by: Sergey Dyasli

[Xen-devel] [xen-4.10-testing test] 118657: trouble: broken/fail/pass

2018-02-08 Thread osstest service owner
flight 118657 xen-4.10-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/118657/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-libvirt-xsm broken

Re: [Xen-devel] [PATCH v2 2/3] x86/svm: add EFER SVME support for VGIF/VLOAD

2018-02-08 Thread Jan Beulich
>>> On 07.02.18 at 22:06, wrote: > --- a/xen/arch/x86/hvm/svm/svm.c > +++ b/xen/arch/x86/hvm/svm/svm.c > @@ -601,6 +601,75 @@ void svm_update_guest_cr(struct vcpu *v, unsigned int cr) > } > } > > +/* > + * This runs on EFER change to see if nested features need to

Re: [Xen-devel] [PATCH] xen: Fix {set, clear}_foreign_p2m_mapping on autotranslating guests

2018-02-08 Thread Juergen Gross
On 07/02/18 21:47, Simon Gaiser wrote: > Commit 82616f9599a7 ("xen: remove tests for pvh mode in pure pv paths") > removed the check for autotranslation from {set,clear}_foreign_p2m_mapping > but those are called by grant-table.c also on PVH/HVM guests. > > Cc: # 4.14 >

Re: [Xen-devel] [PATCH v2 1/7] x86: slightly reduce Meltdown band-aid overhead

2018-02-08 Thread Jan Beulich
>>> On 07.02.18 at 20:35, wrote: > On 07/02/18 16:12, Jan Beulich wrote: >> I'm not sure why I didn't do this right away: By avoiding the use of >> global PTEs in the cloned directmap, there's no need to fiddle with >> CR4.PGE on any of the entry paths. Only the exit

Re: [Xen-devel] [PATCH] x86/nmi: lower initial watchdog frequency to avoid boot hangs

2018-02-08 Thread Jan Beulich
>>> On 07.02.18 at 18:08, wrote: > On 07/02/18 15:06, Jan Beulich wrote: >> Also you completely ignore my argument against the seemingly >> random division by 10, including the resulting question of what you >> mean to do once 10Hz also turns out too high a frequency. >

Re: [Xen-devel] [PATCH V3] x86/hvm: fix domain crash when CR3 has the noflush bit set

2018-02-08 Thread Razvan Cojocaru
On 02/07/2018 07:42 PM, Razvan Cojocaru wrote: > On 02/07/2018 07:01 PM, Jan Beulich wrote: >>> --- a/xen/include/asm-x86/hvm/hvm.h >>> +++ b/xen/include/asm-x86/hvm/hvm.h >>> @@ -34,6 +34,9 @@ extern bool_t opt_hvm_fep; >>> #define opt_hvm_fep 0 >>> #endif >>> >>> +#define X86_CR3_NOFLUSH

  1   2   >