Re: [Xen-devel] [libvirt] [PATCH V2] libxl: fix dom0 balloon logic

2015-03-31 Thread Martin Kletzander
On Tue, Mar 24, 2015 at 02:43:42PM -0600, Jim Fehlig wrote: Recent testing on large memory systems revealed a bug in the Xen xl tool's freemem() function. When autoballooning is enabled, freemem() is used to ensure enough memory is available to start a domain, ballooning dom0 if necessary. When

Re: [Xen-devel] [PATCH v3 4/8] x86: add support for COS/CBM manangement

2015-03-31 Thread Chao Peng
On Fri, Mar 27, 2015 at 08:16:10PM +, Andrew Cooper wrote: > On 26/03/15 12:38, Chao Peng wrote: > > @@ -238,6 +450,8 @@ static void cat_cpu_init(unsigned int cpu) > > ASSERT(socket < nr_sockets); > > > > info = cat_socket_info + socket; > > +if ( info->socket_cpu_mask == NULL )

[Xen-devel] [xen-4.5-testing test] 50268: tolerable FAIL - PUSHED

2015-03-31 Thread osstest service user
flight 50268 xen-4.5-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/50268/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd64-i386-freebsd10-i386 14 guest-localmigrate/x10fail pass in 36775 test-amd64-amd64-xl-win7-amd64

Re: [Xen-devel] [PATCH v3 7/8] tools/libxl: introduce libxl_count_physical_sockets

2015-03-31 Thread Chao Peng
On Mon, Mar 30, 2015 at 03:51:01PM +0100, Wei Liu wrote: > On Thu, Mar 26, 2015 at 08:38:24PM +0800, Chao Peng wrote: > > Introduce a util function libxl_count_physical_sockets() to get physical > > socket count. Replaced CMT code with the new function in xl. > > > > Signed-off-by: Chao Peng > >

Re: [Xen-devel] [PATCH] xen-netfront: transmit fully GSO-sized packets

2015-03-31 Thread Jonathan Davies
On 30/03/15 14:46, Wei Liu wrote: On Thu, Mar 26, 2015 at 03:08:58PM +, Jonathan Davies wrote: On 26/03/15 12:05, Eric Dumazet wrote: On Thu, 2015-03-26 at 11:13 +, Jonathan Davies wrote: xen-netfront limits transmitted skbs to be at most 44 segments in size. However, GSO permits up t

Re: [Xen-devel] [PATCH] qemu-trad: fix indentation

2015-03-31 Thread Stefano Stabellini
On Mon, 30 Mar 2015, Wei Liu wrote: > No functional change introduced. > > Signed-off-by: Wei Liu Acked-by: Stefano Stabellini > hw/xen_console.c | 14 +++--- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/hw/xen_console.c b/hw/xen_console.c > index 80beb31..ef6d

Re: [Xen-devel] machine address

2015-03-31 Thread George Dunlap
On Mon, Mar 30, 2015 at 3:00 PM, HANNAS YAYA Issa wrote: > Hi > When there is a page fault the trapper of the page fault in the hypervisor > is do_page_fault in xen/arch/x86/traps.c right? That's for PV guests. For HVM guests, the page fault causes a VMEXIT, which will be handled in xen/arch/x86

Re: [Xen-devel] NULL pointers and PV guests.

2015-03-31 Thread George Dunlap
On Mon, Mar 30, 2015 at 3:31 PM, Konrad Rzeszutek Wilk wrote: > On Thu, Mar 26, 2015 at 04:23:19PM +, Tim Deegan wrote: >> Hi, >> >> After XSA-109 (a null function-pointer dereference) we've been >> thinking about things we can do to make null pointers less dangerous >> in PV guests. This is

Re: [Xen-devel] [PATCH v5 08/15] xen: arm: drop cache maintenance by set/way trap handling

2015-03-31 Thread Ian Campbell
On Mon, 2015-03-30 at 14:59 +0100, Julien Grall wrote: > On 30/03/15 14:15, Ian Campbell wrote: > > On Mon, 2015-03-30 at 13:28 +0100, Julien Grall wrote: > >> Hi Ian, > >> > >> On 30/03/15 12:12, Ian Campbell wrote: > >>> We do not set HCR_EL2.TSW so we will never see these. > >>> > >>> This is un

Re: [Xen-devel] [PATCH] flask: Update XEN_SYSCTL_cputopoinfo name

2015-03-31 Thread Ian Campbell
On Mon, 2015-03-30 at 16:17 -0400, Daniel De Graaf wrote: > On 03/30/2015 04:17 PM, Boris Ostrovsky wrote: > > Commit 2090f14c5cbd ("sysctl: make XEN_SYSCTL_topologyinfo sysctl a > > little more efficient") renamed XEN_SYSCTL_topologyinfo to > > XEN_SYSCTL_cputopoinfo. > > > > It, however, neglecte

Re: [Xen-devel] [PATCH RFC 2/4] build: Download and build extnernal blktap2.5 repo

2015-03-31 Thread George Dunlap
On Mon, Mar 30, 2015 at 4:38 PM, Wei Liu wrote: >> > IMHO we need to support --with-system-blktap= in configure in case >> > distro wants to package blktap separately. Not sure if in practice this >> > makes sense since AIUI blktap is only used by Xen. >> >> I agree that would be ideal; however, i

[Xen-devel] [PATCH v2] xen-netfront: transmit fully GSO-sized packets

2015-03-31 Thread Jonathan Davies
xen-netfront limits transmitted skbs to be at most 44 segments in size. However, GSO permits up to 65536 bytes, which means a maximum of 45 segments of 1448 bytes each. This slight reduction in the size of packets means a slight loss in efficiency. Since c/s 9ecd1a75d, xen-netfront sets gso_max_si

[Xen-devel] [PATCH 01/19] xen: arm: constify union hsr and struct hsr_* where possible.

2015-03-31 Thread Ian Campbell
Signed-off-by: Ian Campbell --- xen/arch/arm/traps.c | 41 + 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index aaa9d93..69b9513 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@

[Xen-devel] [PATCH 08/19] xen: arm: implement handling of ACTLR_EL1 trap

2015-03-31 Thread Ian Campbell
While annotating ACTLR I noticed that we don't appear to handle the 64-bit version of this trap. Do so and annotate everything. Signed-off-by: Ian Campbell --- xen/arch/arm/traps.c | 20 xen/include/asm-arm/sysregs.h |1 + 2 files changed, 21 insertions(+) di

[Xen-devel] [PATCH 07/19] xen: arm: Annotate trap handler for HCR_EL2.{TWI, TWE, TSC}

2015-03-31 Thread Ian Campbell
Reference the bit which enables the trap and the section/page which describes what that bit enables. These ones are pretty trivial, included for completeness. Signed-off-by: Ian Campbell --- xen/arch/arm/traps.c | 17 + 1 file changed, 17 insertions(+) diff --git a/xen/arch/a

[Xen-devel] [PATCH 12/19] xen: arm: Annotate the handlers for HSTR_EL2.Tx

2015-03-31 Thread Ian Campbell
Signed-off-by: Ian Campbell --- xen/arch/arm/traps.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index ba120e5..21bef01 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -1709,6 +1709,11 @@ static void do_cp15_32(stru

[Xen-devel] [PATCH 00/19] xen: arm: cleanup traps.c

2015-03-31 Thread Ian Campbell
While working on reenabling 32-bit user space on arm63 I concluded that the trap handling in traps.c had grown into a twisty confusing mess. Lets try and sort that out. This series contains to halves (after a couple of preparatory cleanups). First clean up the goto maze which we've found ourselve

[Xen-devel] [PATCH 02/19] xen: arm: add missing break

2015-03-31 Thread Ian Campbell
Signed-off-by: Ian Campbell xen: arm: Fix handling of ICC_{SGI1R,SGI0R,ASGI1R}_EL1 Having injected an undefined instruction we don't want to also advance pc. So return. THe ICC_{SGI0R,ASGI1R}_EL1 case was previously missing a break, so would have fallen through to the default case and injected

[Xen-devel] [PATCH 14/19] xen: arm: Annotate registers trapped by MDCR_EL2.TDOSA

2015-03-31 Thread Ian Campbell
Gather the affected handlers in a single place per trap type. Add some HSR_SYSREG and AArch32 defines for those registers (because I'd already typed them in when I realised I didn't need them). Signed-off-by: Ian Campbell --- xen/arch/arm/traps.c | 37 +---

[Xen-devel] [PATCH 09/19] xen: arm: Annotate registers trapped by HSR_EL1.TIDCP

2015-03-31 Thread Ian Campbell
This traps variety of implementation defined registers, so add a note to the default case of the respective handler. Signed-off-by: Ian Campbell --- xen/arch/arm/traps.c | 16 1 file changed, 16 insertions(+) diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index ca43

[Xen-devel] [PATCH 17/19] xen: arm: Remove CNTPCT_EL0 trap handling.

2015-03-31 Thread Ian Campbell
We set CNTHCTL_EL2.EL1PCTEN and therefore according to ARMv8 (DDI 0487A.d) D1-1510 Table D1-60 we are not trapping this. Signed-off-by: Ian Campbell --- xen/arch/arm/traps.c |1 - xen/arch/arm/vtimer.c | 30 -- 2 files changed, 31 deletions(-) diff --git a/xen

[Xen-devel] [PATCH 10/19] xen: arm: Annotate registers trapped by CPTR_EL2.TTA

2015-03-31 Thread Ian Campbell
Add explicit handler for 64-bit CP14 accesses, with more relevant debug message (as per other handlers) and to provide a place for the comment. Signed-off-by: Ian Campbell --- xen/arch/arm/traps.c | 43 +- xen/include/asm-arm/perfc_defn.h |1

[Xen-devel] [PATCH 18/19] xen: arm: Annotate registers trapped when CNTHCTL_EL2.EL1PCEN == 0

2015-03-31 Thread Ian Campbell
Signed-off-by: Ian Campbell --- xen/arch/arm/traps.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index 1c9cf21..cc5b8dd 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -1642,6 +1642,12 @@ s

[Xen-devel] [PATCH 03/19] xen: arm: call inject_undef_exception directly

2015-03-31 Thread Ian Campbell
Reducing the amount of goto maze considerably. Signed-off-by: Ian Campbell --- xen/arch/arm/traps.c | 56 +++--- 1 file changed, 26 insertions(+), 30 deletions(-) diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index 99ceaea..7270116 100644

[Xen-devel] [PATCH 16/19] xen: arm: Annotate registers trapped by MDCR_EL2.TPM and TPMCR

2015-03-31 Thread Ian Campbell
Signed-off-by: Ian Campbell --- xen/arch/arm/traps.c | 39 ++- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index 0ab5e56..64d55dc 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -1

[Xen-devel] [PATCH 11/19] xen: arm: Annotate handlers for PCTR_EL2.Tx

2015-03-31 Thread Ian Campbell
Signed-off-by: Ian Campbell --- xen/arch/arm/traps.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index 9cdbda8..ba120e5 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -1704,6 +1704,11 @@ static void do_cp15_32(

[Xen-devel] [PATCH 06/19] xen: arm: add minimum exception level argument to trap handler helpers

2015-03-31 Thread Ian Campbell
Removes a load of boiler plate. Signed-off-by: Ian Campbell --- xen/arch/arm/traps.c | 65 +- 1 file changed, 32 insertions(+), 33 deletions(-) diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index ebc09f9..c9c98d3 100644 --- a/xen/arch

[Xen-devel] [PATCH 04/19] xen: arm: provide and use a handle_raz_wi helper

2015-03-31 Thread Ian Campbell
Reduces the use of goto in the trap handlers to none. Some explcitily 32-bit types become register_t here, but that's OK, on 32-bit they are 32-bit already and on 64-bit it is fine/harmless to set the larger register, a 32-bit guest won't see the top half in any case. Unlike the previous code the

[Xen-devel] [PATCH 15/19] xen: arm: Annotate registers trapped by MDCR_EL2.TDA

2015-03-31 Thread Ian Campbell
Gather the affected handlers in a single place per trap type. Signed-off-by: Ian Campbell --- xen/arch/arm/traps.c | 71 ++ 1 file changed, 60 insertions(+), 11 deletions(-) diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index 518f047.

[Xen-devel] [PATCH 05/19] xen: arm: Add and use r/o+raz and w/o+wi helpers

2015-03-31 Thread Ian Campbell
Signed-off-by: Ian Campbell --- xen/arch/arm/traps.c | 52 -- 1 file changed, 33 insertions(+), 19 deletions(-) diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index 8b1846a..ebc09f9 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/t

[Xen-devel] [PATCH 19/19] xen: arm: Annotate source of ICC SGI register trapping

2015-03-31 Thread Ian Campbell
I was unable to find an ARMv8 ARM reference to this, so refer to the GIC Architecture Specification instead. ARMv8 ARM does cover other ways of trapping these accesses via ICH_HCR_EL2 but we don't use those and they trap additional registers as well. Signed-off-by: Ian Campbell --- xen/arch/arm

[Xen-devel] [PATCH 13/19] xen: arm: Annotate registers trapped by MDCR_EL2.TDRA

2015-03-31 Thread Ian Campbell
Signed-off-by: Ian Campbell --- xen/arch/arm/traps.c | 32 xen/include/asm-arm/cpregs.h |4 xen/include/asm-arm/sysregs.h |1 + 3 files changed, 37 insertions(+) diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index 21bef01..7c37

Re: [Xen-devel] [PATCH v4 06/33] xen/arm: Introduce xen, passthrough property

2015-03-31 Thread Ian Campbell
On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: > When a device is marked for passthrough (via the new property > "xen,passthrough"), dom0 must not access to the device (i.e not > loading a driver), but should be able to manage the MMIO/interrupt > of the passthrough device. > > The latter

Re: [Xen-devel] [PATCH v4 08/33] MAINTAINERS: move drivers/passthrough/device_tree.c in "DEVICE TREE"

2015-03-31 Thread Ian Campbell
On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: > Suggested-by: Jan Beulich > Signed-off-by: Julien Grall > Cc: Ian Jackson > Cc: Keir Fraser Acked-by: Ian Campbell ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xe

[Xen-devel] [ANNOUNCE] Project Raisin

2015-03-31 Thread Stefano Stabellini
Hi all, A few weeks ago I started hacking on a new project, consisting in a set of bash scripts to build xen-unstable and a few other useful elements. It is still in very early stages. The name of the new project is "Raisin", from Raise Xen, pun intended ;-) It is a bit like DevStack[1] for Xen:

[Xen-devel] [PATCH] xenstore: document xs_set_permissions

2015-03-31 Thread Wei Liu
Signed-off-by: Wei Liu Cc: Ian Campbell Cc: Ian Jackson --- tools/xenstore/include/xenstore.h | 26 -- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/tools/xenstore/include/xenstore.h b/tools/xenstore/include/xenstore.h index b4b113e..6af5978 100644 ---

Re: [Xen-devel] [PATCH v3 2/3] libxc/xentrace: Replace xc_tbuf_set_cpu_mask with CPU mask with xc_cpumap_t instead of uint32_t

2015-03-31 Thread George Dunlap
On 03/30/2015 07:04 PM, Konrad Rzeszutek Wilk wrote: > > Sorry, not '&&'. Phew. :-) > It was the '(i * 8)' vs '(i*8)' Yeah, as you can probably tell style isn't one of the things I'm very particular about (at least compared with a lot of other developers). I think what you had originally was pr

Re: [Xen-devel] [PATCH v4 15/33] xen/arm: gic: GICv2 & GICv3 only supports 1020 physical interrupts

2015-03-31 Thread Ian Campbell
On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: > GICD_TYPER.ITLinesNumber can encode up to 1024 interrupts. Although, > IRQ 1020-1023 are reserved for special purpose. > > The result is used by the callers of gic_number_lines in order to check > the validity of an IRQ. > > Signed-off-by:

Re: [Xen-devel] [PATCH v4 12/33] xen/arm: gic: Add sanity checks gic_route_irq_to_guest

2015-03-31 Thread Ian Campbell
On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: > With the addition of interrupt assignment to guest, we need to make sure > the guest can't blow up the interrupt management in Xen. > > Before associating the IRQ to a vIRQ we need to make sure: > - the vIRQ is not already associated to

Re: [Xen-devel] [PATCH RFC 2/4] build: Download and build extnernal blktap2.5 repo

2015-03-31 Thread Stefano Stabellini
On Tue, 31 Mar 2015, George Dunlap wrote: > On Mon, Mar 30, 2015 at 4:38 PM, Wei Liu wrote: > >> > IMHO we need to support --with-system-blktap= in configure in case > >> > distro wants to package blktap separately. Not sure if in practice this > >> > makes sense since AIUI blktap is only used by

Re: [Xen-devel] [PATCH v4 09/33] xen: Extend DOMCTL createdomain to support arch configuration

2015-03-31 Thread Ian Campbell
On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: > On ARM the virtual GIC may differ between each guest (emulated GIC version, > number of SPIs...). This information is already known at the domain creation > and can never change. > > For now only the gic_version is set. In the long run, ther

Re: [Xen-devel] [PATCH v4 11/33] xen/arm: route_irq_to_guest: Check validity of the IRQ

2015-03-31 Thread Ian Campbell
On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: > Currently Xen only supports SPIs routing for guest, add a function > is_assignable_irq to check if we can assign a given IRQ to the guest. > > Secondly, make sure the vIRQ is not the greater that the number of IRQs s/that/than/ > configure

Re: [Xen-devel] [PATCH v4 13/33] xen/arm: gic_route_irq_to_guest: Honor the priority given in parameter

2015-03-31 Thread Ian Campbell
On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: > The priority is already hardcoded in route_irq_to_guest and therefore > can't be controlled by the guest. > > Signed-off-by: Julien Grall Acked-by: Ian Campbell ___ Xen-devel mailing list Xen

Re: [Xen-devel] [PATCH v4 14/33] xen/arm: vgic: Correctly calculate GICD_TYPER.ITLinesNumber

2015-03-31 Thread Ian Campbell
On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: > The formula of GICD_TYPER.ITLinesNumber is 32(N + 1). > > As the number of SPIs suppported by the domain may not be a multiple of > 32, we have to round up the number before using it. > > At the same time remove the mask GICD_TYPE_LINES whi

Re: [Xen-devel] [PATCH v4 10/33] xen/arm: Allow virq != irq

2015-03-31 Thread Ian Campbell
On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: > Currently, Xen is assuming that the virtual IRQ will always be the same > as IRQ. > > Modify route_guest_irq to take the virtual IRQ in parameter which allow > Xen to assign a different IRQ number. Also store the vIRQ in the desc > action to

Re: [Xen-devel] [PATCH v4 16/33] xen/arm: Let the toolstack configure the number of SPIs

2015-03-31 Thread Ian Campbell
On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: > @@ -68,16 +68,17 @@ static void vgic_init_pending_irq(struct pending_irq *p, > unsigned int virq) > p->irq = virq; > } > > -int domain_vgic_init(struct domain *d) > +int domain_vgic_init(struct domain *d, unsigned int nr_spis) > { >

Re: [Xen-devel] [PATCH v4 17/33] xen/arm: vgic: Add spi_to_pending

2015-03-31 Thread Ian Campbell
On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: > Introduce spi_to_pending in order retrieve the irq_pending structure for > a specific SPI. > > It's not possible to re-use irq_to_pending because it's required a VCPU "it requires" > and some call of the new function may during domain dest

Re: [Xen-devel] domU jiffies not incrementing - timer issue? - Kernel 3.18.10 on Xen 4.5.0

2015-03-31 Thread Mark Chambers
On 31 March 2015 at 07:40, Meng Xu wrote: > > ​Did you try to run Xen on native machine instead of using the nested > virtualization? ​ > Unfortunately we cannot try this as the machine is in use for other things and I don't have access to an identical piece of hardware to try this out. > >> W

Re: [Xen-devel] [PATCH v4 18/33] xen/arm: Release IRQ routed to a domain when it's destroying

2015-03-31 Thread Ian Campbell
On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: > Xen has to release IRQ routed to a domain in order to reuse later. > Currently only SPIs can be routed to the guest so we only need to > browse SPIs for a specific domain. > > Furthermore, a guest can crash and let the IRQ in an incorrect st

Re: [Xen-devel] [PATCH RFC 2/4] build: Download and build extnernal blktap2.5 repo

2015-03-31 Thread George Dunlap
On 03/31/2015 11:40 AM, Stefano Stabellini wrote: > On Tue, 31 Mar 2015, George Dunlap wrote: >> On Mon, Mar 30, 2015 at 4:38 PM, Wei Liu wrote: > IMHO we need to support --with-system-blktap= in configure in case > distro wants to package blktap separately. Not sure if in practice this >>

Re: [Xen-devel] [PATCH v4 19/33] xen/arm: Implement hypercall DOMCTL_{, un}bind_pt_pirq

2015-03-31 Thread Ian Campbell
On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: > On x86, an IRQ is assigned in 2 steps to an HVM guest: > - The toolstack is calling PHYSDEVOP_map_pirq in order to create a > guest PIRQ (IRQ bound to an event channel) > - The emulator (QEMU) is calling DOMCTL_bind_pt_irq in orde

Re: [Xen-devel] [PATCH v4 20/33] xen/dts: Provide an helper to get a DT node from a path provided by a guest

2015-03-31 Thread Ian Campbell
On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: > The maximum size of the copied string has been chosen based on the value > use by XSM in similar case. > > Furthermore, Linux seems to allow path up to 4096 characters. Though > this could vary from one OS to another. > > Signed-off-by: Jul

Re: [Xen-devel] [PATCH v4 21/33] xen/passthrough: Introduce iommu_construct

2015-03-31 Thread Ian Campbell
On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: > This new function will correctly initialize the IOMMU page table for the > current domain. > > Also use it in iommu_assign_dt_device even though the current IOMMU > implementation on ARM shares P2M with the processor. > > Signed-off-by: Jul

Re: [Xen-devel] [PATCH v4] xen/passthrough: Support a single iommu_domain per xen domain per SMMU

2015-03-31 Thread Ian Campbell
On Tue, 2015-03-24 at 16:48 -0400, Robbie VanVossen wrote: > If multiple devices are being passed through to the same domain and they > share a single SMMU, then they only require a single iommu_domain. > > In arm_smmu_assign_dev, before a new iommu_domain is created, the > xen_domain->contexts is

Re: [Xen-devel] [PATCH v4 22/33] xen/passthrough: arm: release the DT devices assigned to a guest earlier

2015-03-31 Thread Ian Campbell
On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: > The toolstack may not have deassigned every device used by a guest. > Therefore we have to go through the device list and remove them before > asking the IOMMU drivers to release memory for this domain. > > This can be done by moving the cal

Re: [Xen-devel] [PATCH v4 23/33] xen/passthrough: iommu_deassign_device_dt: By default reassign device to nobody

2015-03-31 Thread Ian Campbell
On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: > Currently, when the device is deassigned from a domain, we directly reassign > to DOM0. > > As the device may not have been correctly reset, this may lead to corruption > or > expose some part of DOM0 memory. Also, we may have no way to res

Re: [Xen-devel] [PATCH v4 25/33] xen/xsm: Add helpers to check permission for device tree passthrough

2015-03-31 Thread Ian Campbell
On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: > This is a follow-up of commit 525ee49 "xsm: add device tree labeling > support" which add support for device tree labelling in flask. > > Those helpers will be use latter when non-pci passthrough (i.e device > tree) will be added. > > Signe

Re: [Xen-devel] [PATCH v4 26/33] xen/passthrough: Extend XEN_DOMCTL_*assign_device to support DT device

2015-03-31 Thread Ian Campbell
On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: > +int iommu_do_dt_domctl(struct xen_domctl *domctl, struct domain *d, > + XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl) > +{ > +int ret; > +struct dt_device_node *dev; > + > +/* TODO: How to deal with XSM? */

Re: [Xen-devel] [PATCH v4 27/33] tools/libxl: Create a per-arch function to map IRQ to a domain

2015-03-31 Thread Ian Campbell
On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: > ARM and x86 use a different hypercall to map an IRQ to a domain. > > The hypercall to give IRQ permission to the domain as also been moved "has also been". > on the x86 specific function as ARM guest won't be able to manage the IRQ. s/on

Re: [Xen-devel] [PATCH v4 14/33] xen/arm: vgic: Correctly calculate GICD_TYPER.ITLinesNumber

2015-03-31 Thread Julien Grall
On 31/03/15 11:46, Ian Campbell wrote: > On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: >> The formula of GICD_TYPER.ITLinesNumber is 32(N + 1). >> >> As the number of SPIs suppported by the domain may not be a multiple of >> 32, we have to round up the number before using it. >> >> At the

Re: [Xen-devel] [PATCH v3 3/3] xentrace: Implement cpu mask range parsing of human values (-c).

2015-03-31 Thread George Dunlap
On 03/24/2015 03:39 PM, Konrad Rzeszutek Wilk wrote: > Instead of just using -c 0x we can > also use -c - or -c , > or a combination of them. Also it can include just > singular CPUs: -c , or ranges without an > start or end (and xentrace will figure out the values), such > as: -c - (which will inc

Re: [Xen-devel] [PATCH v4 28/33] tools/libxl: Check if fdt_{first, next}_subnode are present in libfdt

2015-03-31 Thread Ian Campbell
On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: > The functions fdt_{fisrt,next}_subnode may not be available because: "first" > diff --git a/tools/libxl/libxl_fdt.c b/tools/libxl/libxl_fdt.c > new file mode 100644 > index 000..f88e9f1 > --- /dev/null > +++ b/tools/libxl/libxl_fdt.c

Re: [Xen-devel] [PATCH v4 29/33] tools/(lib)xl: Add partial device tree support for ARM

2015-03-31 Thread Ian Campbell
On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: > Let the user to pass additional nodes to the guest device tree. For > this purpose, everything in the node /passthrough from the partial > device tree will be copied into the guest device tree. > > The node /aliases will be also copied to al

Re: [Xen-devel] [PATCH v4 30/33] tools/libxl: arm: Use an higher value for the GIC phandle

2015-03-31 Thread Ian Campbell
On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: > The partial device tree may contains phandle. The Device Tree Compiler > tends to allocate the phandle from 1. > > Reserve the ID 65000 for the GIC phandle. I think we can safely assume > that the partial device tree will never contain a suc

Re: [Xen-devel] [PATCH v4 16/33] xen/arm: Let the toolstack configure the number of SPIs

2015-03-31 Thread Julien Grall
Hi Ian, On 31/03/15 11:54, Ian Campbell wrote: > On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: >> @@ -68,16 +68,17 @@ static void vgic_init_pending_irq(struct pending_irq *p, >> unsigned int virq) >> p->irq = virq; >> } >> >> -int domain_vgic_init(struct domain *d) >> +int domain

Re: [Xen-devel] [PATCH v4 01/33] xen/arm: Divide GIC initialization in 2 parts

2015-03-31 Thread Ian Campbell
Frediano, Zoltan, On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: > Note that the HIP04 GIC driver has not been modified because I don't > have a platform where I can test my changes. Although, the code is > still building. > > I let the Hisilicon guys (Frediano and Zoltan)

Re: [Xen-devel] [PATCH v4 31/33] libxl: Add support for non-PCI passthrough

2015-03-31 Thread Ian Campbell
On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: > On ARM, every non-PCI device are described in the device tree. Each of > them can be found via a path. > > This patch introduces a very basic support, only the IOMMU will be set > up correctly. The user will have to: > - Describe the dev

Re: [Xen-devel] [PATCH v4 32/33] xl: Add new option dtdev

2015-03-31 Thread Ian Campbell
On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: > The option "dtdev" will be used to passthrough a non-PCI device described s/non-PCI/device tree/ or just drop it. > in the device tree to a guest. > > Signed-off-by: Julien Grall > Cc: Ian Jackson > Cc: Wei Liu Acked-by: Ian Campbell

Re: [Xen-devel] [PATCH v4 33/33] docs/misc: arm: Add documentation about non-PCI passthrough

2015-03-31 Thread Ian Campbell
On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: > Note that the example is done on Midway whose SMMU driver is not > supported on Xen upstream. > > Currently, I don't have other platform where I can test non-PCI > passthrough. Please drop references to non-PCI in favour of talking about de

Re: [Xen-devel] [PATCH v4 00/33] xen/arm: Add support for non-PCI passthrough

2015-03-31 Thread Ian Campbell
On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: I think there is a healthy chunk at the start which is all acked and could be applied, could you let me know how far through the acked bit of the series you think it would be sensible to apply now? If there are any acked bits which follow una

Re: [Xen-devel] [PATCH v4 17/33] xen/arm: vgic: Add spi_to_pending

2015-03-31 Thread Julien Grall
Hi Ian, On 31/03/15 11:55, Ian Campbell wrote: > On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: >> Introduce spi_to_pending in order retrieve the irq_pending structure for >> a specific SPI. >> >> It's not possible to re-use irq_to_pending because it's required a VCPU > > "it requires" >

Re: [Xen-devel] [PATCH v4 16/33] xen/arm: Let the toolstack configure the number of SPIs

2015-03-31 Thread Ian Campbell
On Tue, 2015-03-31 at 12:44 +0100, Julien Grall wrote: > Hi Ian, > > On 31/03/15 11:54, Ian Campbell wrote: > > On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: > >> @@ -68,16 +68,17 @@ static void vgic_init_pending_irq(struct pending_irq > >> *p, unsigned int virq) > >> p->irq = virq;

Re: [Xen-devel] [PATCH RFC 2/4] build: Download and build extnernal blktap2.5 repo

2015-03-31 Thread Ian Campbell
On Tue, 2015-03-31 at 12:10 +0100, George Dunlap wrote: > > However we could make it easier to built libxl and blktap together, we > > could also add blktap to OSSTest and Raisin > > (http://marc.info/?l=xen-devel&m=142779794216955). > > I wouldn't mind moving all external repos (qemu-*, seabios,

Re: [Xen-devel] [PATCH RFC 2/4] build: Download and build extnernal blktap2.5 repo

2015-03-31 Thread Ian Campbell
On Tue, 2015-03-31 at 12:10 +0100, George Dunlap wrote: > On 03/31/2015 11:40 AM, Stefano Stabellini wrote: > > On Tue, 31 Mar 2015, George Dunlap wrote: > >> On Mon, Mar 30, 2015 at 4:38 PM, Wei Liu wrote: > > IMHO we need to support --with-system-blktap= in configure in case > > distro w

Re: [Xen-devel] [PATCH v4 16/33] xen/arm: Let the toolstack configure the number of SPIs

2015-03-31 Thread Julien Grall
On 31/03/15 12:59, Ian Campbell wrote: >>> If not then I think we should just check against the architectural 1020 >>> limit and leave it at that. >> >> I would have to check on 988 (1020 - 32) which I find less readable. > > I'd test nr_spis+32 < 1020, which I think is clear enough. I will do th

Re: [Xen-devel] [PATCH] xenstore: document xs_set_permissions

2015-03-31 Thread Ian Campbell
On Tue, 2015-03-31 at 11:24 +0100, Wei Liu wrote: > Signed-off-by: Wei Liu > Cc: Ian Campbell > Cc: Ian Jackson Acked-by: Ian Campbell One comment/suggestion: > --- > tools/xenstore/include/xenstore.h | 26 -- > 1 file changed, 24 insertions(+), 2 deletions(-) > > di

[Xen-devel] Xen Security Advisory 125 (CVE-2015-2752) - Long latency MMIO mapping operations are not preemptible

2015-03-31 Thread Xen . org security team
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Xen Security Advisory CVE-2015-2752 / XSA-125 version 3 Long latency MMIO mapping operations are not preemptible UPDATES IN VERSION 3 CVE assigned. Public release. ISSUE DESCRIP

[Xen-devel] Xen Security Advisory 127 (CVE-2015-2751) - Certain domctl operations may be abused to lock up the host

2015-03-31 Thread Xen . org security team
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Xen Security Advisory CVE-2015-2751 / XSA-127 version 2 Certain domctl operations may be abused to lock up the host UPDATES IN VERSION 2 CVE assigned. Public release. ISSUE DESCRI

[Xen-devel] Xen Security Advisory 126 (CVE-2015-2756) - Unmediated PCI command register access in qemu

2015-03-31 Thread Xen . org security team
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Xen Security Advisory CVE-2015-2756 / XSA-126 version 3 Unmediated PCI command register access in qemu UPDATES IN VERSION 3 Public release. ISSUE DESCRIPTION ==

Re: [Xen-devel] [PATCH] xenstore: document xs_set_permissions

2015-03-31 Thread Wei Liu
On Tue, Mar 31, 2015 at 01:08:32PM +0100, Ian Campbell wrote: > On Tue, 2015-03-31 at 11:24 +0100, Wei Liu wrote: > > Signed-off-by: Wei Liu > > Cc: Ian Campbell > > Cc: Ian Jackson > > Acked-by: Ian Campbell > > One comment/suggestion: > > --- > > tools/xenstore/include/xenstore.h | 26

[Xen-devel] [PATCH RESEND 1/2] xenbus_client: Extend interface to support multi-page ring

2015-03-31 Thread Bob Liu
From: Wei Liu Originally Xen PV drivers only use single-page ring to pass along information. This might limit the throughput between frontend and backend. The patch extends Xenbus driver to support multi-page ring, which in general should improve throughput if ring is the bottleneck. Changes to

[Xen-devel] [PATCH v2 2/2] xen/block: add multi-page ring support

2015-03-31 Thread Bob Liu
Extend xen/block to support multi-page ring, so that more requests can be issued by using more than one pages as the request ring between blkfront and backend. As a result, the performance can get improved significantly. We got some impressive improvements on our highend iscsi storage cluster bac

Re: [Xen-devel] [PATCH v4 19/33] xen/arm: Implement hypercall DOMCTL_{, un}bind_pt_pirq

2015-03-31 Thread Julien Grall
Hi Ian, On 31/03/15 12:11, Ian Campbell wrote: > On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: >> On x86, an IRQ is assigned in 2 steps to an HVM guest: >> - The toolstack is calling PHYSDEVOP_map_pirq in order to create a >> guest PIRQ (IRQ bound to an event channel) >> - The

[Xen-devel] [PATCH v2] xenstore: document xs_set_permissions

2015-03-31 Thread Wei Liu
Signed-off-by: Wei Liu Cc: Ian Campbell Cc: Ian Jackson Acked-by: Ian Campbell --- Change in v2: say explicitly owner has read and write permission --- tools/xenstore/include/xenstore.h | 27 +-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/tools/xenst

Re: [Xen-devel] [PATCH OSSTEST v2 1/2] uboot: do not use readlink on xsm policy

2015-03-31 Thread Ian Jackson
Ian Campbell writes ("[PATCH OSSTEST v2 1/2] uboot: do not use readlink on xsm policy"): > The policy is not a symlink, so readlink will return nothing. > > We cannot use readlink -f because that will return an absolute path > and we need a path relative to the filesystem root (in this case > /bo

Re: [Xen-devel] [PATCH v4 26/33] xen/passthrough: Extend XEN_DOMCTL_*assign_device to support DT device

2015-03-31 Thread Julien Grall
Hi Ian, On 31/03/15 12:24, Ian Campbell wrote: > On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: >> +int iommu_do_dt_domctl(struct xen_domctl *domctl, struct domain *d, >> + XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl) >> +{ >> +int ret; >> +struct dt_device_

Re: [Xen-devel] [PATCH v4 27/33] tools/libxl: Create a per-arch function to map IRQ to a domain

2015-03-31 Thread Julien Grall
Hi Ian, On 31/03/15 12:26, Ian Campbell wrote: > On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: >> ARM and x86 use a different hypercall to map an IRQ to a domain. >> >> The hypercall to give IRQ permission to the domain as also been moved > > "has also been". > >> on the x86 specific fu

Re: [Xen-devel] [PATCH RESEND 1/2] xenbus_client: Extend interface to support multi-page ring

2015-03-31 Thread Juergen Gross
On 03/31/2015 02:15 PM, Bob Liu wrote: From: Wei Liu Originally Xen PV drivers only use single-page ring to pass along information. This might limit the throughput between frontend and backend. The patch extends Xenbus driver to support multi-page ring, which in general should improve throughp

Re: [Xen-devel] [PATCH v4 28/33] tools/libxl: Check if fdt_{first, next}_subnode are present in libfdt

2015-03-31 Thread Julien Grall
Hi Ian, On 31/03/15 12:35, Ian Campbell wrote: > On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: > >> The functions fdt_{fisrt,next}_subnode may not be available because: > > "first" > >> diff --git a/tools/libxl/libxl_fdt.c b/tools/libxl/libxl_fdt.c >> new file mode 100644 >> index

Re: [Xen-devel] [PATCH v4 19/33] xen/arm: Implement hypercall DOMCTL_{, un}bind_pt_pirq

2015-03-31 Thread Ian Campbell
On Tue, 2015-03-31 at 13:23 +0100, Julien Grall wrote: > Hi Ian, > > On 31/03/15 12:11, Ian Campbell wrote: > > On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: > >> On x86, an IRQ is assigned in 2 steps to an HVM guest: > >> - The toolstack is calling PHYSDEVOP_map_pirq in order to crea

Re: [Xen-devel] [PATCH v4 29/33] tools/(lib)xl: Add partial device tree support for ARM

2015-03-31 Thread Julien Grall
Hi Ian, On 31/03/15 12:41, Ian Campbell wrote: > On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: >> Let the user to pass additional nodes to the guest device tree. For >> this purpose, everything in the node /passthrough from the partial >> device tree will be copied into the guest device t

Re: [Xen-devel] [PATCH v4 31/33] libxl: Add support for non-PCI passthrough

2015-03-31 Thread Julien Grall
Hi Ian, On 31/03/15 12:49, Ian Campbell wrote: > On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: >> On ARM, every non-PCI device are described in the device tree. Each of >> them can be found via a path. >> >> This patch introduces a very basic support, only the IOMMU will be set >> up corr

Re: [Xen-devel] [PATCH v4 33/33] docs/misc: arm: Add documentation about non-PCI passthrough

2015-03-31 Thread Julien Grall
Hi Ian, On 31/03/15 12:55, Ian Campbell wrote: > On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: >> Note that the example is done on Midway whose SMMU driver is not >> supported on Xen upstream. >> >> Currently, I don't have other platform where I can test non-PCI >> passthrough. > > Pleas

Re: [Xen-devel] [PATCH v4 00/33] xen/arm: Add support for non-PCI passthrough

2015-03-31 Thread Julien Grall
Hi Ian, On 31/03/15 12:57, Ian Campbell wrote: > On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: > > I think there is a healthy chunk at the start which is all acked and > could be applied, could you let me know how far through the acked bit of > the series you think it would be sensible t

Re: [Xen-devel] [PATCH RESEND 1/2] xenbus_client: Extend interface to support multi-page ring

2015-03-31 Thread Wei Liu
On Tue, Mar 31, 2015 at 02:36:43PM +0200, Juergen Gross wrote: > On 03/31/2015 02:15 PM, Bob Liu wrote: > >From: Wei Liu > > > >Originally Xen PV drivers only use single-page ring to pass along > >information. This might limit the throughput between frontend and > >backend. > > > >The patch extend

[Xen-devel] [PATCH] docs: efi: given some hint about the dom0 command line

2015-03-31 Thread Ian Campbell
Suggested-by: Carlos Gustavo Ramirez Rodriguez Signed-off-by: Ian Campbell --- docs/misc/efi.markdown |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/misc/efi.markdown b/docs/misc/efi.markdown index f435ec7..5b54314 100644 --- a/docs/misc/efi.markdown +++ b/doc

Re: [Xen-devel] [PATCH RESEND 1/2] xenbus_client: Extend interface to support multi-page ring

2015-03-31 Thread Juergen Gross
On 03/31/2015 03:13 PM, Wei Liu wrote: On Tue, Mar 31, 2015 at 02:36:43PM +0200, Juergen Gross wrote: On 03/31/2015 02:15 PM, Bob Liu wrote: From: Wei Liu Originally Xen PV drivers only use single-page ring to pass along information. This might limit the throughput between frontend and backen

Re: [Xen-devel] [PATCH v4 26/33] xen/passthrough: Extend XEN_DOMCTL_*assign_device to support DT device

2015-03-31 Thread Ian Campbell
On Tue, 2015-03-31 at 13:30 +0100, Julien Grall wrote: > >> +/* TODO: Do we need to check is_dying? Mostly to protect against > >> + * hypercall trying to passthrough a device while we are > >> + * dying. > > > > iommu_do_pci_domctl does in specific casses (i.e. assign device). I > > g

[Xen-devel] [PATCH] xen-blkback: define pr_fmt macro to avoid the duplication of DRV_PFX

2015-03-31 Thread Tao Chen
Define pr_fmt macro with {xen-blkback: } prefix, then remove all use of DRV_PFX in the pr and DPRINTK sentences. It will simplify the code. And if the pr sentences miss a \n, add it in the end. If the DPRINTK sentences have redundant \n, remove it. It will format the code. These all make the read

Re: [Xen-devel] [PATCH v4 28/33] tools/libxl: Check if fdt_{first, next}_subnode are present in libfdt

2015-03-31 Thread Ian Campbell
On Tue, 2015-03-31 at 13:46 +0100, Julien Grall wrote: > Hi Ian, > > On 31/03/15 12:35, Ian Campbell wrote: > > On Thu, 2015-03-19 at 19:29 +, Julien Grall wrote: > > > >> The functions fdt_{fisrt,next}_subnode may not be available because: > > > > "first" > > > >> diff --git a/tools/libxl/

  1   2   3   >