Re: [Xen-devel] [PATCH V3 16/29] x86/vvtd: decode interrupt attribute from IRTE

2017-10-19 Thread Roger Pau Monné
On Thu, Sep 21, 2017 at 11:01:57PM -0400, Lan Tianyu wrote: > From: Chao Gao > > Without interrupt remapping, interrupt attributes can be extracted from > msi message or IOAPIC RTE. However, with interrupt remapping enabled, > the attributes are enclosed in the associated

Re: [Xen-devel] 4.9.52: INFO: task X blocked for more than 300 seconds.

2017-10-19 Thread Philipp Hahn
Hello Ankur, Am 05.10.2017 um 19:59 schrieb Ankur Arora: > On 2017-10-05 06:20 AM, Konrad Rzeszutek Wilk wrote: >> On Wed, Oct 04, 2017 at 08:26:27PM +0200, Philipp Hahn wrote: ... >> Adding Ankur to this as I think he saw something similar. >> >> But in the meantime - do you see this with the

Re: [Xen-devel] Block device hang after migration

2017-10-19 Thread Roger Pau Monné
On Thu, Oct 19, 2017 at 11:53:11AM +0100, Wei Liu wrote: > Hi > > In the process of upgrading osstest to Stretch, I discovered an issue > with the block device. This happens after a local migration. > > [ 127.216232] Freezing user space processes ... (elapsed 0.005 seconds) done. > [

[Xen-devel] [PATCH] tools/Makefile: unset MAKELEVEL before building QEMU

2017-10-19 Thread Anthony PERARD
Since QEMU commits aef45d51d1204f3335fb99de6658e0c5612c2b67 "build: automatically handle GIT submodule checkout for dtc" the QEMU makefiles rely on the variable MAKELEVEL to make a decision on whether to update some git submodules or not. Since we call QEMU build from within the Xen one, MAKELEVEL

Re: [Xen-devel] [PATCH V3 15/29] x86/vvtd: Process interrupt remapping request

2017-10-19 Thread Roger Pau Monné
On Thu, Sep 21, 2017 at 11:01:56PM -0400, Lan Tianyu wrote: > From: Chao Gao > > When a remapping interrupt request arrives, remapping hardware computes the > interrupt_index per the algorithm described in VTD spec > "Interrupt Remapping Table", interprets the IRTE and

Re: [Xen-devel] [PATCH v12 05/11] x86/mm: add HYPERVISOR_memory_op to acquire guest resources

2017-10-19 Thread Julien Grall
Hi, On 19/10/17 14:35, Paul Durrant wrote: -Original Message- From: Julien Grall [mailto:julien.gr...@linaro.org] Sent: 19 October 2017 14:29 To: Paul Durrant ; xen-de...@lists.xenproject.org Cc: Stefano Stabellini ; Wei Liu

Re: [Xen-devel] [RFC 4/4] arm: tee: add basic OP-TEE mediator

2017-10-19 Thread Julien Grall
Hi Volodymyr, On 17/10/17 19:57, Volodymyr Babchuk wrote: On Tue, Oct 17, 2017 at 06:30:13PM +0100, Julien Grall wrote: On 11/10/17 20:01, Volodymyr Babchuk wrote: Add basic OP-TEE mediator as an example how TEE mediator framework works. Currently it support only calls from Dom0. Calls from

Re: [Xen-devel] [PATCH V3 14/29] x86/vvtd: Enable Interrupt Remapping through GCMD

2017-10-19 Thread Roger Pau Monné
On Thu, Sep 21, 2017 at 11:01:55PM -0400, Lan Tianyu wrote: > From: Chao Gao > > Software writes this field to enable/disable interrupt reampping. This patch > emulate IRES field of GCMD. > > Signed-off-by: Chao Gao > Signed-off-by: Lan Tianyu

Re: [Xen-devel] [PATCH v6 1/4] x86/pvclock: add setter for pvclock_pvti_cpu0_va

2017-10-19 Thread Joao Martins
On 10/17/2017 04:34 PM, Joao Martins wrote: > On 10/03/2017 12:55 PM, Joao Martins wrote: >> Right now there is only a pvclock_pvti_cpu0_va() which is defined >> on kvmclock since: >> >> commit dac16fba6fc5 >> ("x86/vdso: Get pvclock data from the vvar VMA instead of the fixmap") >> >> The only

[Xen-devel] [PATCH v7 4/5] x86/xen/time: setup vcpu 0 time info page

2017-10-19 Thread Joao Martins
In order to support pvclock vdso on xen we need to setup the time info page for vcpu 0 and register the page with Xen using the VCPUOP_register_vcpu_time_memory_area hypercall. This hypercall will also forcefully update the pvti which will set some of the necessary flags for vdso. Afterwards we

[Xen-devel] [PATCH v7 2/5] x86/pvclock: add setter for pvclock_pvti_cpu0_va

2017-10-19 Thread Joao Martins
Right now there is only a pvclock_pvti_cpu0_va() which is defined on kvmclock since: commit dac16fba6fc5 ("x86/vdso: Get pvclock data from the vvar VMA instead of the fixmap") The only user of this interface so far is kvm. This commit adds a setter function for the pvti page and moves

[Xen-devel] [PATCH v7 0/5] x86/xen: pvclock vdso support

2017-10-19 Thread Joao Martins
Hey, [ I found an issue with ptp_kvm modinit with my series, so resending with that fixed. ] This is take 7 for vdso for Xen. PVCLOCK_TSC_STABLE_BIT can be set starting Xen 4.8 which is required for vdso time related calls. In order to have it on, you need to have the hypervisor clocksource

[Xen-devel] [PATCH v7 3/5] x86/xen/time: set pvclock flags on xen_time_init()

2017-10-19 Thread Joao Martins
Specifically check for PVCLOCK_TSC_STABLE_BIT and if this bit is set, then set it too on pvclock flags. This allows Xen clocksource to use it and thus speeding up xen_clocksource_read() callers (i.e. sched_clock()) Signed-off-by: Joao Martins Reviewed-by: Boris

[Xen-devel] [PATCH v7 5/5] MAINTAINERS: xen, kvm: track pvclock-abi.h changes

2017-10-19 Thread Joao Martins
This file defines an ABI shared between guest and hypervisor(s) (KVM, Xen) and as such there should be an correspondent entry in MAINTAINERS file. Notice that there's already a text notice at the top of the header file, hence this commit simply enforces it more explicitly and have both peers

[Xen-devel] [PATCH v7 1/5] ptp_kvm: probe for kvm guest availability

2017-10-19 Thread Joao Martins
In the event of moving pvclock_pvti_cpu0_va() definition to common pvclock code, this function could return a value on non KVM guests. If user tried to load the module (or have it builtin) it would fail with a GPF on ptp_kvm_init when running on a Xen guest. Therefore, ptp_kvm_init() should check

Re: [Xen-devel] [PATCH v12 05/11] x86/mm: add HYPERVISOR_memory_op to acquire guest resources

2017-10-19 Thread Paul Durrant
> -Original Message- > From: Julien Grall [mailto:julien.gr...@linaro.org] > Sent: 19 October 2017 14:29 > To: Paul Durrant ; xen-de...@lists.xenproject.org > Cc: Stefano Stabellini ; Wei Liu > ; Konrad Rzeszutek Wilk

Re: [Xen-devel] [PATCH for-4.10] passthrough/vtd: Don't DMA to the stack in queue_invalidate_wait()

2017-10-19 Thread Andrew Cooper
On 19/10/17 14:25, Jan Beulich wrote: On 19.10.17 at 14:54, wrote: >> On 19/10/17 13:11, Jan Beulich wrote: >> On 19.10.17 at 13:26, wrote: --- a/xen/drivers/passthrough/vtd/qinval.c +++

[Xen-devel] [linux-4.1 baseline-only test] 72330: regressions - trouble: blocked/broken/fail/pass

2017-10-19 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 72330 linux-4.1 real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/72330/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-qemuu-nested-intel 10

Re: [Xen-devel] [PATCH v12 05/11] x86/mm: add HYPERVISOR_memory_op to acquire guest resources

2017-10-19 Thread Julien Grall
Hi, On 10/19/2017 01:57 PM, Paul Durrant wrote: -Original Message- From: Julien Grall [mailto:julien.gr...@linaro.org] Sent: 19 October 2017 13:23 To: Paul Durrant ; xen-de...@lists.xenproject.org Cc: Stefano Stabellini ; Wei Liu

Re: [Xen-devel] [PATCH for-4.10] passthrough/vtd: Don't DMA to the stack in queue_invalidate_wait()

2017-10-19 Thread Jan Beulich
>>> On 19.10.17 at 14:54, wrote: > On 19/10/17 13:11, Jan Beulich wrote: > On 19.10.17 at 13:26, wrote: >>> --- a/xen/drivers/passthrough/vtd/qinval.c >>> +++ b/xen/drivers/passthrough/vtd/qinval.c >>> @@ -147,7 +147,8 @@ static int

Re: [Xen-devel] [PATCH v12 06/11] x86/hvm/ioreq: add a new mappable resource type...

2017-10-19 Thread Paul Durrant
> -Original Message- > From: Julien Grall [mailto:julien.gr...@linaro.org] > Sent: 19 October 2017 14:08 > To: Paul Durrant ; xen-de...@lists.xenproject.org > Cc: Stefano Stabellini ; Wei Liu > ; Konrad Rzeszutek Wilk

Re: [Xen-devel] [PATCH v12 06/11] x86/hvm/ioreq: add a new mappable resource type...

2017-10-19 Thread Julien Grall
Hi Paul, On 10/19/2017 01:58 PM, Paul Durrant wrote: -Original Message- From: Julien Grall [mailto:julien.gr...@linaro.org] Sent: 19 October 2017 13:31 To: Paul Durrant ; xen-de...@lists.xenproject.org Cc: Stefano Stabellini ; Wei Liu

[Xen-devel] [OSSTEST PATCH] mg-repro-setup: Correct usage message re host idents

2017-10-19 Thread Ian Jackson
`[host=]' was misleading - it suggests you have to type literally `host=', or nothing. But actually `host' here is any host ident. Signed-off-by: Ian Jackson CC: Wei Liu --- mg-repro-setup | 7 --- 1 file changed, 4 insertions(+), 3

Re: [Xen-devel] [PATCH v12 06/11] x86/hvm/ioreq: add a new mappable resource type...

2017-10-19 Thread Paul Durrant
> -Original Message- > From: Julien Grall [mailto:julien.gr...@linaro.org] > Sent: 19 October 2017 13:31 > To: Paul Durrant ; xen-de...@lists.xenproject.org > Cc: Stefano Stabellini ; Wei Liu > ; Konrad Rzeszutek Wilk

Re: [Xen-devel] [PATCH v12 05/11] x86/mm: add HYPERVISOR_memory_op to acquire guest resources

2017-10-19 Thread Paul Durrant
> -Original Message- > From: Julien Grall [mailto:julien.gr...@linaro.org] > Sent: 19 October 2017 13:23 > To: Paul Durrant ; xen-de...@lists.xenproject.org > Cc: Stefano Stabellini ; Wei Liu > ; Konrad Rzeszutek Wilk

Re: [Xen-devel] [PATCH for-4.10] passthrough/vtd: Don't DMA to the stack in queue_invalidate_wait()

2017-10-19 Thread Andrew Cooper
On 19/10/17 13:11, Jan Beulich wrote: On 19.10.17 at 13:26, wrote: >> --- a/xen/drivers/passthrough/vtd/qinval.c >> +++ b/xen/drivers/passthrough/vtd/qinval.c >> @@ -147,7 +147,8 @@ static int __must_check queue_invalidate_wait(struct >> iommu *iommu, >>

[Xen-devel] [PATCH 07/12] ARM: VGIC: split gic.c to observe hardware/virtual GIC separation

2017-10-19 Thread Andre Przywara
Currently gic.c holds code to handle hardware IRQs as well as code to bridge VGIC requests to the GIC virtualization hardware. Despite being named gic.c, this file reaches into the VGIC and uses data structures describing virtual IRQs. To improve abstraction, move the VGIC functions into a

[Xen-devel] [PATCH 10/12] ARM: VGIC: factor out vgic_connect_hw_irq()

2017-10-19 Thread Andre Przywara
At the moment we happily access VGIC internal data structures like the rank and struct pending_irq in gic.c, which should be VGIC agnostic. Factor out a new function vgic_connect_hw_irq(), which allows a virtual IRQ to be connected to a hardware IRQ (using the hw bit in the LR). This removes

[Xen-devel] [PATCH 04/12] ARM: VGIC: move gic_remove_irq_from_queues()

2017-10-19 Thread Andre Przywara
gic_remove_irq_from_queues() was not only misnamed, it also has the wrong abstraction, as it should not live in gic.c. Move it into vgic.c and vgic.h, where it belongs to, and rename it on the way. Signed-off-by: Andre Przywara --- xen/arch/arm/gic.c | 9

[Xen-devel] [PATCH 01/12] ARM: remove unneeded gic.h inclusions

2017-10-19 Thread Andre Przywara
gic.h is supposed to hold defines and prototypes for the hardware side of the GIC interrupt controller. A lot of parts in Xen should not be bothered with that, as they either only care about the VGIC or use more generic interfaces. Remove unneeded inclusions of gic.h from files where they are

[Xen-devel] [PATCH 02/12] ARM: vGIC: fix nr_irq definition

2017-10-19 Thread Andre Przywara
The global variable "nr_irqs" is used for x86 and some common Xen code. To make the latter work easily for ARM, it was #defined to NR_IRQS. This not only violated the common habit of capitalizing macros, but also caused issues if one wanted to use a rather innocent "nr_irqs" as a local variable

[Xen-devel] [PATCH 08/12] ARM: VGIC: split up gic_dump_info() to cover virtual part separately

2017-10-19 Thread Andre Przywara
Currently gic_dump_info() not only dumps the hardware state of the GIC, but also the VGIC internal virtual IRQ lists. Split the latter off and move it into vgic.c to observe the abstraction. Signed-off-by: Andre Przywara --- xen/arch/arm/domain.c | 1 +

[Xen-devel] [PATCH 05/12] ARM: VGIC: move gic_remove_from_lr_pending()

2017-10-19 Thread Andre Przywara
gic_remove_from_lr_pending() was not only misnamed, it also had the wrong abstraction, as it should not live in gic.c. Move it into vgic.c and vgic.h, where it belongs, and rename it on the way. Signed-off-by: Andre Przywara --- xen/arch/arm/gic.c | 7 ---

[Xen-devel] [PATCH 11/12] ARM: VGIC: factor out vgic_get_hw_irq_desc()

2017-10-19 Thread Andre Przywara
At the moment we happily access the VGIC internal struct pending_irq (which describes a virtual IRQ) in irq.c. Factor out the actually needed functionality to learn the associated hardware IRQ and move that into gic-vgic.c to improve abstraction. Signed-off-by: Andre Przywara

[Xen-devel] [PATCH 06/12] ARM: VGIC: streamline gic_restore_pending_irqs()

2017-10-19 Thread Andre Przywara
In gic_restore_pending_irqs() we push our pending virtual IRQs into the list registers. This function is called once from a GIC context and once from a VGIC context. Refactor the calls so that we have only one callsite from the VGIC context. This will help separating the two worlds later.

[Xen-devel] [PATCH 12/12] ARM: VGIC: rework gicv[23]_update_lr to not use pending_irq

2017-10-19 Thread Andre Przywara
The functions to actually populate a list register were accessing the VGIC internal pending_irq struct, although they should be abstracting from that. Break the needed information down to remove the reference to pending_irq from gic-v[23].c. Signed-off-by: Andre Przywara

[Xen-devel] [PATCH 00/12] ARM: VGIC/GIC separation cleanups

2017-10-19 Thread Andre Przywara
By the original VGIC design, Xen differentiates between the actual VGIC emulation on one hand and the GIC hardware accesses on the other. It seems there were some deviations from that scheme (over time?), so at the moment we end up happily accessing VGIC specific data structures like struct

[Xen-devel] [PATCH 09/12] ARM: VGIC: rework events_need_delivery()

2017-10-19 Thread Andre Przywara
In event.h we very deeply dive into the VGIC to learn if an event for a guest is pending. Rework that function to abstract the VGIC specific part out. Also reorder the queries there, as we only actually need to check for the event channel if there are no other pending IRQs. Signed-off-by: Andre

[Xen-devel] [PATCH 03/12] ARM: VGIC: remove gic_clear_pending_irqs()

2017-10-19 Thread Andre Przywara
gic_clear_pending_irqs() was not only misnamed, but also misplaced, as a function solely dealing with the GIC emulation should not live in gic.c. Move the functionality of this function into its only caller in vgic.c Signed-off-by: Andre Przywara --- xen/arch/arm/gic.c

Re: [Xen-devel] [PATCH v12 06/11] x86/hvm/ioreq: add a new mappable resource type...

2017-10-19 Thread Julien Grall
Hi, On 17/10/17 14:24, Paul Durrant wrote: diff --git a/xen/common/memory.c b/xen/common/memory.c index cdd2e030cf..b27a71c4f1 100644 --- a/xen/common/memory.c +++ b/xen/common/memory.c @@ -1011,6 +1011,11 @@ static int acquire_resource( switch ( xmar.type ) { +case

Re: [Xen-devel] [PATCH v12 05/11] x86/mm: add HYPERVISOR_memory_op to acquire guest resources

2017-10-19 Thread Julien Grall
Hi, On 17/10/17 14:24, Paul Durrant wrote: Certain memory resources associated with a guest are not necessarily present in the guest P2M. This patch adds the boilerplate for new memory op to allow such a resource to be priv-mapped directly, by either a PV or HVM tools domain. NOTE: Whilst the

Re: [Xen-devel] [PATCH for-4.10] passthrough/vtd: Don't DMA to the stack in queue_invalidate_wait()

2017-10-19 Thread Jan Beulich
>>> On 19.10.17 at 13:26, wrote: > --- a/xen/drivers/passthrough/vtd/qinval.c > +++ b/xen/drivers/passthrough/vtd/qinval.c > @@ -147,7 +147,8 @@ static int __must_check queue_invalidate_wait(struct > iommu *iommu, >u8

Re: [Xen-devel] [PATCH for-4.10 1/2] tools/libxc: Fix precopy_policy() to not pass a structure by value

2017-10-19 Thread Andrew Cooper
On 16/10/17 16:07, Ian Jackson wrote: > Wei Liu writes ("Re: [PATCH for-4.10 1/2] tools/libxc: Fix precopy_policy() > to not pass a structure by value"): >> On Mon, Oct 16, 2017 at 02:51:54PM +0100, Andrew Cooper wrote: > ... >>> With Joshua's patch in place, the implementer of this callback is

Re: [Xen-devel] [PATCH v9 02/16] Rename PSR sysctl/domctl interfaces and xsm policy to make them be general

2017-10-19 Thread Yi Sun
On 17-10-19 05:36:37, Jan Beulich wrote: > >>> On 19.10.17 at 03:22, wrote: > > v9: > > - bump domctl/sysctl version number as this patch missed 4.10. > > And add info in commit message. > > (suggested by Jan Beulich) > > I don't understand this - I've

Re: [Xen-devel] [PATCH v3 2/7] xsm: flask: change the dummy xsm policy and flask hook for map_gmfn_foregin

2017-10-19 Thread Jan Beulich
>>> On 19.10.17 at 04:36, wrote: > --- a/xen/include/xsm/dummy.h > +++ b/xen/include/xsm/dummy.h > @@ -516,7 +516,8 @@ static XSM_INLINE int > xsm_remove_from_physmap(XSM_DEFAULT_ARG struct domain *d1, > static XSM_INLINE int xsm_map_gmfn_foreign(XSM_DEFAULT_ARG struct

Re: [Xen-devel] [PATCH V3 13/29] x86/vvtd: Set Interrupt Remapping Table Pointer through GCMD

2017-10-19 Thread Roger Pau Monné
On Thu, Sep 21, 2017 at 11:01:54PM -0400, Lan Tianyu wrote: > From: Chao Gao > > Software sets this field to set/update the interrupt remapping table pointer > used by hardware. The interrupt remapping table pointer is specified through > the Interrupt Remapping Table Address

Re: [Xen-devel] [xen-unstable test] 114670: regressions - FAIL

2017-10-19 Thread Wei Liu
On Thu, Oct 19, 2017 at 11:36:46AM +, osstest service owner wrote: > flight 114670 xen-unstable real [real] > http://logs.test-lab.xenproject.org/osstest/logs/114670/ > > Regressions :-( > > Tests which did not succeed and are blocking, > including tests which could not be run: >

Re: [Xen-devel] [PATCH v2 2/2] x86: convert x86_platform_ops to timespec64

2017-10-19 Thread Paolo Bonzini
On 19/10/2017 12:57, Arnd Bergmann wrote: > The x86 platform operations are fairly isolated, so we can > change them from using timespec to timespec64. I checked that > All the users and callers are safe, and there is only one > critical function that is broken beyond 2106: > >

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

2017-10-19 Thread osstest service owner
flight 114670 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/114670/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemuu-debianhvm-amd64 7 xen-bootfail REGR. vs. 114644

Re: [Xen-devel] [PATCH v9 02/16] Rename PSR sysctl/domctl interfaces and xsm policy to make them be general

2017-10-19 Thread Jan Beulich
>>> On 19.10.17 at 03:22, wrote: > v9: > - bump domctl/sysctl version number as this patch missed 4.10. > And add info in commit message. > (suggested by Jan Beulich) I don't understand this - I've specifically given reason why you _don't_ need to

Re: [Xen-devel] [PATCH V3 12/29] x86/vvtd: Add MMIO handler for VVTD

2017-10-19 Thread Roger Pau Monné
On Thu, Sep 21, 2017 at 11:01:53PM -0400, Lan Tianyu wrote: > From: Chao Gao > > This patch adds VVTD MMIO handler to deal with MMIO access. > > Signed-off-by: Chao Gao > Signed-off-by: Lan Tianyu > --- >

Re: [Xen-devel] [PATCH V3 5/29] tools/libacpi: Add new fields in acpi_config for DMAR table

2017-10-19 Thread Jan Beulich
>>> On 19.10.17 at 10:09, wrote: > On 2017年10月18日 23:12, Roger Pau Monné wrote: >> On Thu, Sep 21, 2017 at 11:01:46PM -0400, Lan Tianyu wrote: >>> --- a/tools/libacpi/libacpi.h >>> +++ b/tools/libacpi/libacpi.h >>> @@ -20,6 +20,8 @@ >>> #ifndef __LIBACPI_H__ >>> #define

Re: [Xen-devel] [PATCH V3 1/29] Xen/doc: Add Xen virtual IOMMU doc

2017-10-19 Thread Jan Beulich
>>> On 19.10.17 at 10:49, wrote: > On Thu, Oct 19, 2017 at 10:26:36AM +0800, Lan Tianyu wrote: >> Hi Roger: >> Thanks for review. >> >> On 2017年10月18日 21:26, Roger Pau Monné wrote: >> > On Thu, Sep 21, 2017 at 11:01:42PM -0400, Lan Tianyu wrote: >> >> +Xen hypervisor

[Xen-devel] [PATCH for-4.10] passthrough/vtd: Don't DMA to the stack in queue_invalidate_wait()

2017-10-19 Thread Andrew Cooper
DMA-ing to the stack is generally considered bad practice. In this case, if a timeout occurs because of a sluggish device which is processing the request, the completion notification will corrupt the stack of a subsequent deeper call tree. Place the poll_slot in a percpu area and DMA to that

Re: [Xen-devel] [PATCH V3 11/29] x86/hvm: Introduce a emulated VTD for HVM

2017-10-19 Thread Roger Pau Monné
On Thu, Sep 21, 2017 at 11:01:52PM -0400, Lan Tianyu wrote: > From: Chao Gao > > This patch adds create/destroy function for the emulated VTD > and adapts it to the common VIOMMU abstraction. > > Signed-off-by: Chao Gao > Signed-off-by: Lan Tianyu

Re: [Xen-devel] [PATCH v2 for-4.10] x86/mm: Make PV linear pagetables optional

2017-10-19 Thread Julien Grall
Hi George, On 18/10/17 11:51, George Dunlap wrote: Allowing pagetables to point to other pagetables of the same level (often called 'linear pagetables') has been included in Xen since its inception; but recently it has been the source of a number of subtle reference-counting bugs. It is not

Re: [Xen-devel] [PATCH] gcov: support gcc 7.x

2017-10-19 Thread Julien Grall
Hi Jan, On 18/10/17 14:45, Jan Beulich wrote: Taking Linux commit 0538421343 ("gcov: support GCC 7.1") as reference, enable gcc 7 support requiring __gcov_exit() and having 9 counters. Signed-off-by: Jan Beulich --- Considering that gcc 7 has been out for a while, I think

Re: [Xen-devel] [PATCH] xen/public: Correct the definition of GNTTAB_CACHE_SOURCE_GREF

2017-10-19 Thread Julien Grall
Hi Andrew, On 17/10/17 15:11, Andrew Cooper wrote: Discovered when running the XSA-232 PoC on a UBSAN-enabled hypervisor. (d79) XSA-232 PoC (XEN) (XEN) UBSAN: Undefined behaviour in grant_table.c:3217:25

Re: [Xen-devel] [PATCH v2] arm: configure interrupts to be in non-secure group1

2017-10-19 Thread Julien Grall
Hi Stefano, On 18/10/17 22:29, Stefano Stabellini wrote: Xen uses non-secure group1 interrupts, however it doesn't configure the GICv3 accordingly. Xen needs to set GICD_IGROUPR for SPIs and GICR_IGROUPR0 for local interrupt to "1" to specify that interrupts belong to group1. This is

[Xen-devel] [PATCH v2 2/2] x86: convert x86_platform_ops to timespec64

2017-10-19 Thread Arnd Bergmann
The x86 platform operations are fairly isolated, so we can change them from using timespec to timespec64. I checked that All the users and callers are safe, and there is only one critical function that is broken beyond 2106: pvclock_read_wallclock() uses a 32-bit number of seconds since the epoch

[Xen-devel] Block device hang after migration

2017-10-19 Thread Wei Liu
Hi In the process of upgrading osstest to Stretch, I discovered an issue with the block device. This happens after a local migration. [ 127.216232] Freezing user space processes ... (elapsed 0.005 seconds) done. [ 127.222143] Freezing remaining freezable tasks ... [ 147.228913] Freezing of

[Xen-devel] [xen-4.9-testing test] 114673: trouble: broken/fail/pass

2017-10-19 Thread osstest service owner
flight 114673 xen-4.9-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/114673/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-libvirt-raw broken Tests which are

[Xen-devel] [OSSTEST PATCH] mg-repro-setup: --autoalloc-nofree option

2017-10-19 Thread Ian Jackson
This lets you run the automatic allocator within your own task, so you get to keep whatever it found. Signed-off-by: Ian Jackson CC: Wei Liu --- v2: Some docs, and a warning message. --- mg-repro-setup | 14 -- 1 file changed, 12

Re: [Xen-devel] [PATCH V3 10/29] vtd: add and align register definitions

2017-10-19 Thread Roger Pau Monné
On Thu, Sep 21, 2017 at 11:01:51PM -0400, Lan Tianyu wrote: > From: Chao Gao > > No functional changes. > > Signed-off-by: Chao Gao > Signed-off-by: Lan Tianyu Reviewed-by: Roger Pau Monné Would have been

Re: [Xen-devel] [PATCH V3 9/29] tools/libxc: Add viommu operations in libxc

2017-10-19 Thread Roger Pau Monné
On Thu, Sep 21, 2017 at 11:01:50PM -0400, Lan Tianyu wrote: > From: Chao Gao > > This patch adds XEN_DOMCTL_viommu_op hypercall. This hypercall > comprises two sub-commands: Patch description doesn't match actual code. This patch doesn't add any new hypercalls, it just adds

[Xen-devel] [OSSTEST PATCH] mg-repro-setup: --autoalloc-nofree option

2017-10-19 Thread Ian Jackson
This lets you run the automatic allocator within your own task, so you get to keep whatever it found. Signed-off-by: Ian Jackson CC: Wei Liu --- mg-repro-setup | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git

Re: [Xen-devel] [PATCH V3 8/29] tools/libxl: create vIOMMU during domain construction

2017-10-19 Thread Roger Pau Monné
On Thu, Sep 21, 2017 at 11:01:49PM -0400, Lan Tianyu wrote: > From: Chao Gao > > If guest is configured to have a vIOMMU, create it during domain construction. > > Signed-off-by: Chao Gao > Signed-off-by: Lan Tianyu > > --- > v3:

Re: [Xen-devel] [PATCH V3 7/29] tools/libxl: build DMAR table for a guest with one virtual VTD

2017-10-19 Thread Roger Pau Monné
On Thu, Sep 21, 2017 at 11:01:48PM -0400, Lan Tianyu wrote: > From: Chao Gao > > A new logic is added to build ACPI DMAR table in tool stack for a guest > with one virtual VTD and pass through it to guest via existing mechanism. If > there already are ACPI tables needed to

Re: [Xen-devel] [PATCH V3 6/29] tools/libxl: Add a user configurable parameter to control vIOMMU attributes

2017-10-19 Thread Roger Pau Monné
On Thu, Sep 21, 2017 at 11:01:47PM -0400, Lan Tianyu wrote: > From: Chao Gao > > A field, viommu_info, is added to struct libxl_domain_build_info. Several > attributes can be specified by guest config file for virtual IOMMU. These > attributes are used for DMAR construction

[Xen-devel] [PATCH RFC 10/14] xen: vmx: Implement the Hypercall p2m_set_subpage

2017-10-19 Thread Zhang Yi
From: Zhang Yi Z To utilize SPP feature, system admin should Set a Sub-page access write via SPP Hypercall `HVMOP_set_subpage`, which will prepared the flowing things. (1.Got the corresponding EPT leaf entry via the guest physical address. (2.If it is a 4K page

[Xen-devel] [PATCH RFC 12/14] xen: vmx: Support for clear EPT SPP write Protect bit

2017-10-19 Thread Zhang Yi
From: Zhang Yi Z This is a implement of clear the Write protect bit. EPT SPP Write Protect bit will remove when we set all the 32 sub-pages is writeable. We should also update the EPT page frame w bit as the whole page is writeable. Signed-off-by: Zhang Yi Z

[Xen-devel] [PATCH RFC 02/14] xen: vmx: Added VMX SPP feature flags and VM-Execution Controls.

2017-10-19 Thread Zhang Yi
From: Zhang Yi Z Add new secondary processor-based VM-execution control bit which defined as "sub-page write permission", VMX Procbased MSR - MSR_IA32_VMX_EXIT_CTLS bit 23 is the capability bit of SPP. And VMX_SECONDARY_EXEC_CONTROL bit 23 is the enable bit of SPP.

[Xen-devel] [PATCH RFC 05/14] xen: vmx: Disable the 2M/1G superpage when SPP enabled

2017-10-19 Thread Zhang Yi
From: Zhang Yi Z Current we only support Sub-page Protection on the 4k page table. Signed-off-by: Zhang Yi Z --- xen/arch/x86/hvm/vmx/vmx.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/xen/arch/x86/hvm/vmx/vmx.c

[Xen-devel] [PATCH RFC 11/14] xen: vmx: Added handle of SPP write protection fault

2017-10-19 Thread Zhang Yi
From: Zhang Yi Z While hardware walking the SPP page table, If the sub-page region write permission bit is set, the write is allowed, else the write is disallowed and results in an EPT violation. we need peek this case in EPT violation handler. Signed-off-by: Zhang

[Xen-devel] [PATCH RFC 00/14] Intel EPT-Based Sub-page Write Protection Support.

2017-10-19 Thread Zhang Yi
From: Zhang Yi Z Hi All, Here is a patch-series which adding EPT-Based Sub-page Write Protection Support. You can get It's software developer manuals from:

[Xen-devel] [PATCH RFC 14/14] xen: tools: Added xen-subpage tool.

2017-10-19 Thread Zhang Yi
From: Zhang Yi Z It is a tool could set a 4K page corresponding a 32 bit bitmap: xen-subpage -m [domid] set [gfn] [bitmap] Signed-off-by: Zhang Yi Z --- tools/tests/xen-subpage/Makefile | 30

[Xen-devel] [PATCH RFC 01/14] xen: vmx: Added EPT based Subpage Write Protection Doc.

2017-10-19 Thread Zhang Yi
From: Zhang Yi Z Signed-off-by: Zhang Yi Z --- docs/txt/misc/spp_xen.txt | 259 ++ 1 file changed, 259 insertions(+) create mode 100644 docs/txt/misc/spp_xen.txt diff --git

[Xen-devel] [PATCH RFC 03/14] xen: vmx: Introduce the SPPTP and SPP page table.

2017-10-19 Thread Zhang Yi
From: Zhang Yi Z SPPT has 4-level paging structure that is similar to EPT except L1E. The sub-page permission table is referenced via a 64-bit control field called Sub-Page Permission Table Pointer (SPPTP) which contains a 4K-aligned physical address, the index and

[Xen-devel] [PATCH RFC 06/14] xen: vmx: Added SPP flags in EPT leaf entry.

2017-10-19 Thread Zhang Yi
From: Zhang Yi Z This change also modified the p2m_type width to 5, bits 52:56; the p2m_access_t bits 60:57, as the bit 61 is hardware using for EPT leaf entry SPP flags. Signed-off-by: Zhang Yi Z --- xen/include/asm-x86/hvm/vmx/vmx.h |

[Xen-devel] [PATCH RFC 04/14] xen: vmx: Introduce SPP-Induced vm exit and it's handle.

2017-10-19 Thread Zhang Yi
From: Zhang Yi Z Accesses using guest-physical addresses may cause SPP-induced VM exits due to an SPPT misconfiguration or an SPPT miss. The basic VM exit reason code reported for SPP-induced VM exits is 66. An SPPT misconfiguration VM exit occurs when, in the course

[Xen-devel] [PATCH RFC 08/14] xen: vmx: Added setup spp page structure.

2017-10-19 Thread Zhang Yi
From: Zhang Yi Z The hardware uses the guest-physical address and bits 11:7 of the address accessed to lookup the SPPT to fetch a write permission bit for the 128 byte wide sub-page region being accessed within the 4K guest-physical page. If the sub-page region write

[Xen-devel] [PATCH RFC 07/14] xen: vmx: Update the EPT leaf entry indicated with the SPP enable bit.

2017-10-19 Thread Zhang Yi
From: Zhang Yi Z If the sub-page write permission VM-execution control is set, treatment of write accesses to guest-physical accesses depends on the state of the accumulated write-access bit (position 1) and sub-page permission bit (position 61) in the EPT leaf

[Xen-devel] [PATCH RFC 13/14] xen: tools: Introduce the set-subpage into xenctrl

2017-10-19 Thread Zhang Yi
From: Zhang Yi Z Introduce the Xen Hypercall HVMOP_set_subpage into Xenctl. The API is defined as flowing. int xc_mem_set_subpage(xc_interface *handle, domid_t domid, xen_pfn_t gfn, uint32_t access); Signed-off-by: Zhang, Yi Z

[Xen-devel] [PATCH RFC 09/14] xen: vmx: Introduce a Hyper call to set subpage

2017-10-19 Thread Zhang Yi
From: Zhang Yi Z The Hypercall is defined as HVMOP_set_subpage And the Interface's parameters is defined as struct xen_hvm_subpage { domid_t domid; uint32_t access_map; uint64_t gfn; } The user application: xl, or some other security control daemon.

Re: [Xen-devel] [PATCH RFC 00/14] Intel EPT-Based Sub-page Write Protection Support.

2017-10-19 Thread Razvan Cojocaru
On 19.10.2017 11:04, Zhang Yi wrote: > From: Zhang Yi Z > > Hi All, > > Here is a patch-series which adding EPT-Based Sub-page Write Protection > Support. You can get It's software developer manuals from: > >

Re: [Xen-devel] [PATCH 3/3 v4] xenfb: Add [feature|request]-raw-pointer

2017-10-19 Thread Owen Smith
> -Original Message- > From: Stefano Stabellini [mailto:sstabell...@kernel.org] > Sent: 12 October 2017 18:27 > To: Paul Durrant > Cc: 'Gerd Hoffmann' ; 'Stefano Stabellini' > ; Anthony Perard ;

Re: [Xen-devel] [PATCH V3 1/29] Xen/doc: Add Xen virtual IOMMU doc

2017-10-19 Thread Roger Pau Monné
On Thu, Oct 19, 2017 at 10:26:36AM +0800, Lan Tianyu wrote: > Hi Roger: > Thanks for review. > > On 2017年10月18日 21:26, Roger Pau Monné wrote: > > On Thu, Sep 21, 2017 at 11:01:42PM -0400, Lan Tianyu wrote: > >> +Xen hypervisor vIOMMU command > >> += > >>

Re: [Xen-devel] [PATCH V3 2/29] VIOMMU: Add vIOMMU helper functions to create, destroy vIOMMU instance

2017-10-19 Thread Roger Pau Monné
On Thu, Oct 19, 2017 at 02:31:22PM +0800, Lan Tianyu wrote: > On 2017年10月18日 22:05, Roger Pau Monné wrote: > > On Thu, Sep 21, 2017 at 11:01:43PM -0400, Lan Tianyu wrote: > >> +static int viommu_create(struct domain *d, uint64_t type, > >> + uint64_t base_address, uint64_t

Re: [Xen-devel] [PATCH RFC 14/14] xen: tools: Added xen-subpage tool.

2017-10-19 Thread Razvan Cojocaru
> +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > + > +#define DPRINTF(a, b...) fprintf(stderr, a, ## b) > +#define ERROR(a, b...) fprintf(stderr, a "\n", ## b) > +#define PERROR(a,

Re: [Xen-devel] [PATCH V3 5/29] tools/libacpi: Add new fields in acpi_config for DMAR table

2017-10-19 Thread Roger Pau Monné
On Thu, Oct 19, 2017 at 04:09:02PM +0800, Lan Tianyu wrote: > On 2017年10月18日 23:12, Roger Pau Monné wrote: > >> diff --git a/tools/libacpi/libacpi.h b/tools/libacpi/libacpi.h > >> index a2efd23..fdd6a78 100644 > >> --- a/tools/libacpi/libacpi.h > >> +++ b/tools/libacpi/libacpi.h > >> @@ -20,6

[Xen-devel] [distros-debian-wheezy test] 72331: regressions - trouble: broken/fail/pass

2017-10-19 Thread Platform Team regression test user
flight 72331 distros-debian-wheezy real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/72331/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-armhf-pvops 6 kernel-build fail REGR. vs. 72230 Tests

Re: [Xen-devel] [PATCH RFC 13/14] xen: tools: Introduce the set-subpage into xenctrl

2017-10-19 Thread Razvan Cojocaru
On 19.10.2017 11:15, Zhang Yi wrote: > From: Zhang Yi Z > > Introduce the Xen Hypercall HVMOP_set_subpage into Xenctl. > The API is defined as flowing. > > int xc_mem_set_subpage(xc_interface *handle, domid_t domid, >xen_pfn_t gfn, uint32_t

Re: [Xen-devel] [PATCH V3 5/29] tools/libacpi: Add new fields in acpi_config for DMAR table

2017-10-19 Thread Lan Tianyu
On 2017年10月18日 23:12, Roger Pau Monné wrote: > On Thu, Sep 21, 2017 at 11:01:46PM -0400, Lan Tianyu wrote: >> From: Chao Gao >> >> The BIOS reports the remapping hardware units in a platform to system >> software >> through the DMA Remapping Reporting (DMAR) ACPI table. >>

[Xen-devel] [PATCH 1/1] xen/time: do not decrease steal time after live migration on xen

2017-10-19 Thread Dongli Zhang
After guest live migration on xen, steal time in /proc/stat (cpustat[CPUTIME_STEAL]) might decrease because steal returned by xen_steal_lock() might be less than this_rq()->prev_steal_time which is derived from previous return value of xen_steal_clock(). For instance, steal time of each vcpu is

[Xen-devel] [linux-4.1 test] 114665: tolerable FAIL - PUSHED

2017-10-19 Thread osstest service owner
flight 114665 linux-4.1 real [real] http://logs.test-lab.xenproject.org/osstest/logs/114665/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-armhf-armhf-xl-rtds 7 xen-boot fail in 114646 pass in 114665 test-armhf-armhf-xl-vhd 6

Re: [Xen-devel] [PATCH V3 4/29] tools/libacpi: Add DMA remapping reporting (DMAR) ACPI table structures

2017-10-19 Thread Lan Tianyu
On 2017年10月18日 22:36, Roger Pau Monné wrote: > On Thu, Sep 21, 2017 at 11:01:45PM -0400, Lan Tianyu wrote: >> From: Chao Gao >> >> Add dmar table structure according Chapter 8 "BIOS Considerations" of >> VTd spec Rev. 2.4. >> >> VTd >>

Re: [Xen-devel] [PATCH V3 3/29] DOMCTL: Introduce new DOMCTL commands for vIOMMU support

2017-10-19 Thread Lan Tianyu
On 2017年10月18日 22:18, Roger Pau Monné wrote: > On Thu, Sep 21, 2017 at 11:01:44PM -0400, Lan Tianyu wrote: >> This patch is to introduce create, destroy and query capabilities >> command for vIOMMU. vIOMMU layer will deal with requests and call >> arch vIOMMU ops. >> >> Signed-off-by: Lan Tianyu

Re: [Xen-devel] [PATCH V3 2/29] VIOMMU: Add vIOMMU helper functions to create, destroy vIOMMU instance

2017-10-19 Thread Lan Tianyu
On 2017年10月18日 22:05, Roger Pau Monné wrote: > On Thu, Sep 21, 2017 at 11:01:43PM -0400, Lan Tianyu wrote: >> +int viommu_destroy_domain(struct domain *d) >> +{ >> +int ret; >> + >> +if ( !d->viommu ) >> +return -EINVAL; > > ENODEV would be better. OK. Will update. > >> + >> +

<    1   2