Re: [Xen-devel] [PATCH v4 04/12] x86: maintain COS to CBM mapping for each socket

2015-04-09 Thread Andrew Cooper
On 09/04/2015 10:18, Chao Peng wrote: > For each socket, a COS to CBM mapping structure is maintained for each > COS. The mapping is indexed by COS and the value is the corresponding > CBM. Different VMs may use the same CBM, a reference count is used to > indicate if the CBM is available. > > Sign

Re: [Xen-devel] [PATCH v4 03/12] x86: detect and initialize Intel CAT feature

2015-04-09 Thread Andrew Cooper
On 09/04/2015 10:18, Chao Peng wrote: > Detect Intel Cache Allocation Technology(CAT) feature and store the > cpuid information for later use. Currently only L3 cache allocation is > supported. The L3 CAT features may vary among sockets so per-socket > feature information is stored. The initializat

Re: [Xen-devel] [PATCH v4 02/12] x86: improve psr scheduling code

2015-04-09 Thread Andrew Cooper
On 09/04/2015 10:18, Chao Peng wrote: > Switching RMID from previous vcpu to next vcpu only needs to write > MSR_IA32_PSR_ASSOC once. Write it with the value of next vcpu is enough, > no need to write '0' first. Idle domain has RMID set to 0 and because MSR > is already updated lazily, so just swit

Re: [Xen-devel] [PATCH] x86/Dom0: Don't allow dom0_max_vcpus to be zero

2015-04-09 Thread Andrew Cooper
On 09/04/2015 21:38, Boris Ostrovsky wrote: > In case dom0_max_vcpus is incorrectly specified on boot line make sure > we will still boot. > > Signed-off-by: Boris Ostrovsky Good catch - lets not do that. Reviewed-by: Andrew Cooper > --- > xen/arch/x86/domain_build.c | 2 ++ > 1 file changed,

[Xen-devel] [PATCH] x86/Dom0: Don't allow dom0_max_vcpus to be zero

2015-04-09 Thread Boris Ostrovsky
In case dom0_max_vcpus is incorrectly specified on boot line make sure we will still boot. Signed-off-by: Boris Ostrovsky --- xen/arch/x86/domain_build.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/arch/x86/domain_build.c b/xen/arch/x86/domain_build.c index e5c845c..378e650 100644

Re: [Xen-devel] [PATCH v4 01/12] x86: clean up psr boot parameter parsing

2015-04-09 Thread Andrew Cooper
On 09/04/2015 10:18, Chao Peng wrote: > Change type of opt_psr from bool to int so more psr features can fit. > > Introduce a new routine to parse bool parameter so that both cmt and > future psr features like cat can use it. > > Signed-off-by: Chao Peng Reviewed-by: Andrew Cooper _

Re: [Xen-devel] [PATCH v15 09/15] pvqspinlock: Implement simple paravirt support for the qspinlock

2015-04-09 Thread Waiman Long
On 04/09/2015 02:23 PM, Peter Zijlstra wrote: On Thu, Apr 09, 2015 at 08:13:27PM +0200, Peter Zijlstra wrote: On Mon, Apr 06, 2015 at 10:55:44PM -0400, Waiman Long wrote: +#define PV_HB_PER_LINE (SMP_CACHE_BYTES / sizeof(struct pv_hash_bucket)) +static struct qspinlock **pv_hash(struct qspinloc

Re: [Xen-devel] [PATCH v15 13/15] pvqspinlock: Only kick CPU at unlock time

2015-04-09 Thread Peter Zijlstra
On Thu, Apr 09, 2015 at 09:57:21PM +0200, Peter Zijlstra wrote: > On Mon, Apr 06, 2015 at 10:55:48PM -0400, Waiman Long wrote: > > > @@ -219,24 +236,30 @@ static void pv_wait_node(struct mcs_spinlock *node) > > } > > > > /* > > + * Called after setting next->locked = 1 & lock acquired. > > + *

[Xen-devel] [PATCH 0/3] xen/x86: Improvements to asm assertions

2015-04-09 Thread Andrew Cooper
In XenServer, we have a single server which occasionally finds interrupts unexpectedtly in the wrong state (I suspect the SMM handler). However, asserts from ASSERT_INTERRUPTS_{EN,DIS}ABLED are quite opaque, being an unqualified fatal #UD. Andrew Cooper (3): x86/bug: Infrastructure to create BU

[Xen-devel] [PATCH 3/3] DO NOT APPLY - test code for this series

2015-04-09 Thread Andrew Cooper
--- xen/arch/x86/traps.c| 66 +++ xen/arch/x86/x86_64/entry.S | 26 + 2 files changed, 92 insertions(+) diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c index 22cdfc4..c562842 100644 --- a/xen/arch/x86/traps.c +++ b/xen/a

[Xen-devel] [PATCH 2/3] xen/x86: Use real assert frames for ASSERT_INTERRUPTS_{EN, DIS}ABLED

2015-04-09 Thread Andrew Cooper
Signed-off-by: Andrew Cooper CC: Keir Fraser CC: Jan Beulich --- xen/include/asm-x86/asm_defns.h | 25 - 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/xen/include/asm-x86/asm_defns.h b/xen/include/asm-x86/asm_defns.h index 1674c7c..e8a678e 100644 --- a

[Xen-devel] [PATCH 1/3] xen/x86: Infrastructure to create BUG_FRAMES in asm code

2015-04-09 Thread Andrew Cooper
Signed-off-by: Andrew Cooper CC: Keir Fraser CC: Jan Beulich --- xen/include/asm-x86/bug.h | 48 - 1 file changed, 43 insertions(+), 5 deletions(-) diff --git a/xen/include/asm-x86/bug.h b/xen/include/asm-x86/bug.h index cd862e3..365c6b8 100644 ---

Re: [Xen-devel] [PATCH v15 13/15] pvqspinlock: Only kick CPU at unlock time

2015-04-09 Thread Peter Zijlstra
On Mon, Apr 06, 2015 at 10:55:48PM -0400, Waiman Long wrote: > @@ -219,24 +236,30 @@ static void pv_wait_node(struct mcs_spinlock *node) > } > > /* > + * Called after setting next->locked = 1 & lock acquired. > + * Check if the the CPU has been halted. If so, set the _Q_SLOW_VAL flag > + * and

Re: [Xen-devel] [PATCH 1/8] Add core.sh and wrapper function

2015-04-09 Thread George Dunlap
On Thu, Apr 9, 2015 at 8:29 PM, George Dunlap wrote: > Add core functionality and an executable to run it > > Signed-off-by: George Dunlap > --- > CC: Stefano Stabellini Hmm, not sure where the 0/8 for this patch went... anyway, you can also find this series here: git://xenbits.xenproject.org/

[Xen-devel] [PATCH 8/8] Refactor package dependency checking and installation

2015-04-09 Thread George Dunlap
First, create a new global variable, PKGTYPE. At the moment support "deb" and "rpm". Define _check-package-$PKGTYPE which returns true if the package is installed, false otherwise, and _install-package-$PKGTYPE which will install a list of packages. Define check-package(), which will take a lis

[Xen-devel] [PATCH 1/8] Add core.sh and wrapper function

2015-04-09 Thread George Dunlap
Add core functionality and an executable to run it Signed-off-by: George Dunlap --- CC: Stefano Stabellini --- lib/core.sh | 147 raise | 16 +++ 2 files changed, 163 insertions(+) create mode 100644 lib/core.sh create mo

[Xen-devel] [PATCH 4/8] Import raise.sh and unraise.sh into library

2015-04-09 Thread George Dunlap
Make as few changes as possible to begin with, just to separate code motion from changes. For now, remove raise.sh and unraise.sh from package creation, until we can figure out what to do instead. Signed-off-by: George Dunlap --- CC: Stefano Stabellini --- raise.sh => lib/build.sh | 62 +++

[Xen-devel] raisin: Refactor to be more like a library

2015-04-09 Thread George Dunlap
Update to the core.sh calling convention, which will parse var=value arguments. Also tweak some Fedora dependencies and refactor the build dependency checking / installation code. CC: Stefano Stabellini ___ Xen-devel mailing list Xen-devel@lists.xen.

[Xen-devel] [PATCH 2/8] Remove redundant "source" from component definitions

2015-04-09 Thread George Dunlap
These should be called from other places that have already done the appropriate "source" Signed-off-by: George Dunlap --- CC: Stefano Stabellini --- components/grub| 4 components/libvirt | 4 components/xen | 4 3 files changed, 12 deletions(-) diff --git a/components/g

[Xen-devel] [PATCH 7/8] xen: Require wget

2015-04-09 Thread George Dunlap
The xen build requires eiter wget or ftp. Use wget. Signed-off-by: George Dunlap --- CC: Stefano Stabellini --- components/xen | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/xen b/components/xen index e8cbb2b..7a9f22d 100644 --- a/components/xen +++ b/compon

[Xen-devel] [PATCH 6/8] xen: Replace iasl with acpica-tools

2015-04-09 Thread George Dunlap
acpica-tools is the new package that replaces iasl. Signed-off-by: George Dunlap --- CC: Stefano Stabellini --- components/xen | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/xen b/components/xen index 70b72b0..e8cbb2b 100644 --- a/components/xen +++ b/components/

[Xen-devel] [PATCH 3/8] Move common-functions.sh and git-checkout.sh into lib

2015-04-09 Thread George Dunlap
"script" implies something which is designed to be run standalone. "lib" implies that this is going to be sourced from another bash script. Also change "git-checkout" to be a function rather than a script Signed-off-by: George Dunlap --- CC: Stefano Stabellini --- components/grub

[Xen-devel] [PATCH 5/8] Allow the user's config to live outside of git

2015-04-09 Thread George Dunlap
Move the default config to "defconfig" and add config to .gitignore. If config doesn't exist, then copy defconfig to it in common_init. Signed-off-by: George Dunlap --- CC: Stefano Stabellini --- .gitignore | 1 + config => defconfig | 0 raise | 13 - 3 fil

Re: [Xen-devel] [PATCH v4 2/3] libxl: use new QEMU xenstore protocol

2015-04-09 Thread Ian Jackson
Wei Liu writes ("[PATCH v4 2/3] libxl: use new QEMU xenstore protocol"): > Originally both QEMU traditional and QEMU upstream used hardcoded > /local/domain/0 paths. This patch changes the protocol to use > /local/domain/$dm_domid path. Thanks. I have committed 1/2 and 2/2 (the latter with the ap

[Xen-devel] [PATCH v4 1/3] qemu-trad: xenstore: use relative path for device-model node

2015-04-09 Thread Wei Liu
For QEMU traditional running in Dom0, there is no functional change because it will still write to the same /local/domain/0 path. For QEMU traditional stubdom, this is an incompatible startup protocol change. There is a corresponding libxl changeset "libxl: use new QEMU xenstore protocol", which

[Xen-devel] [PATCH v4 2/3] libxl: use new QEMU xenstore protocol

2015-04-09 Thread Wei Liu
Originally both QEMU traditional and QEMU upstream used hardcoded /local/domain/0 paths. This patch changes the protocol to use /local/domain/$dm_domid path. For QEMU traditional and upstream without stubdom, $dm_domid is 0 so the path is in fact still /local/domain/0. For QEMU traditional stubdo

[Xen-devel] [PATCH v4 0/3] Use new QEMU xenstore protocol

2015-04-09 Thread Wei Liu
This patch sereis contains 1 patch to QEMU traditional tree and 2 patches to Xen tree. Note that QEMU trad patch and libxl patch need to be committed at the same time. And please fold in the change to update Config.mk to libxl patch to avoid regression. The third patch has not been acked, but th

[Xen-devel] [PATCH v4 3/3] Revert "x86/hvm: wait for at least one ioreq server to be enabled"

2015-04-09 Thread Wei Liu
This reverts commit dd748d128d86996592afafea02e578cc7d4e6d42. We don't need this workaround anymore since we have fixed the toolstack interlock problem that affects stubdom. Signed-off-by: Wei Liu Cc: Paul Durrant Cc: Jan Beulich Acked-by: Ian Campbell --- xen/arch/x86/hvm/hvm.c |

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

2015-04-09 Thread Mark Chambers
On 31 March 2015 at 17:31, Mark Chambers wrote: > > On 31 March 2015 at 11:56, Mark Chambers wrote: >> >> >> It's nested under Hyper-V in the same manner as the problematic install. >> I was deliberately trying to replicate the issue, but the problem doesn't >> manifest. >> >> Mark >> >>> >> > H

Re: [Xen-devel] tg3 NIC driver bug in 3.14.x under Xen [and 3 more messages]

2015-04-09 Thread Prashant Sreedharan
On Thu, 2015-04-09 at 18:25 +0100, Ian Jackson wrote: > root@bedbug:~# ethtool -S eth0 | grep -v ': 0$' > NIC statistics: > rx_octets: 8196868 > rx_ucast_packets: 633 > rx_mcast_packets: 1 > rx_bcast_packets: 123789 > tx_octets: 42854 > tx_ucast_packets: 9 > tx_m

Re: [Xen-devel] tg3 NIC driver bug in 3.14.x under Xen [and 3 more messages]

2015-04-09 Thread Michael Chan
On Thu, 2015-04-09 at 18:25 +0100, Ian Jackson wrote: > root@bedbug:~# ethtool -S eth0 | grep -v ': 0$' > NIC statistics: > rx_octets: 8196868 > rx_ucast_packets: 633 > rx_mcast_packets: 1 > rx_bcast_packets: 123789 > tx_octets: 42854 > tx_ucast_packets: 9 > tx_mc

Re: [Xen-devel] [PATCH v15 09/15] pvqspinlock: Implement simple paravirt support for the qspinlock

2015-04-09 Thread Peter Zijlstra
On Thu, Apr 09, 2015 at 08:13:27PM +0200, Peter Zijlstra wrote: > On Mon, Apr 06, 2015 at 10:55:44PM -0400, Waiman Long wrote: > > +#define PV_HB_PER_LINE (SMP_CACHE_BYTES / sizeof(struct > > pv_hash_bucket)) > > +static struct qspinlock **pv_hash(struct qspinlock *lock, struct pv_node > > *

Re: [Xen-devel] [PATCH v15 09/15] pvqspinlock: Implement simple paravirt support for the qspinlock

2015-04-09 Thread Peter Zijlstra
On Mon, Apr 06, 2015 at 10:55:44PM -0400, Waiman Long wrote: > +++ b/kernel/locking/qspinlock_paravirt.h > @@ -0,0 +1,321 @@ > +#ifndef _GEN_PV_LOCK_SLOWPATH > +#error "do not include this file" > +#endif > + > +/* > + * Implement paravirt qspinlocks; the general idea is to halt the vcpus > instea

Re: [Xen-devel] [PATCH] qemu-trad: xenstore: use relative path for device-model node

2015-04-09 Thread Ian Jackson
Wei Liu writes ("Re: [PATCH] qemu-trad: xenstore: use relative path for device-model node"): > On Thu, Apr 09, 2015 at 06:46:31PM +0100, Ian Jackson wrote: > > Right. So that means that this patch needs to go in at the same time > > as the corresponding libxl change. > > I don't follow "go in at

Re: [Xen-devel] [PATCH] qemu-trad: xenstore: use relative path for device-model node

2015-04-09 Thread Wei Liu
On Thu, Apr 09, 2015 at 06:46:31PM +0100, Ian Jackson wrote: > Wei Liu writes ("Re: [PATCH] qemu-trad: xenstore: use relative path for > device-model node"): > > On Thu, Apr 09, 2015 at 05:47:08PM +0100, Ian Jackson wrote: > > > > > > I think you mean: > > > ... > > > > So far so good. > > > >

Re: [Xen-devel] [PATCH] qemu-trad: xenstore: use relative path for device-model node

2015-04-09 Thread Ian Jackson
Wei Liu writes ("Re: [PATCH] qemu-trad: xenstore: use relative path for device-model node"): > On Thu, Apr 09, 2015 at 05:47:08PM +0100, Ian Jackson wrote: > > > > I think you mean: > > ... > > So far so good. > > > QEMU traditional stubdom was broken by and is still broken in > > -uns

Re: [Xen-devel] [PATCH 6/6] x86/boot: Ensure the BSS is aligned on an 8 byte boundary

2015-04-09 Thread Tim Deegan
At 16:34 +0100 on 09 Apr (1428597298), Andrew Cooper wrote: > On 09/04/15 16:15, Tim Deegan wrote: > > At 18:26 +0100 on 07 Apr (1428431180), Andrew Cooper wrote: > >> --- a/xen/arch/x86/boot/head.S > >> +++ b/xen/arch/x86/boot/head.S > >> @@ -127,7 +127,8 @@ __start: > >> mov $sym_phy

Re: [Xen-devel] tg3 NIC driver bug in 3.14.x under Xen [and 3 more messages]

2015-04-09 Thread Ian Jackson
Ian Jackson writes ("Re: tg3 NIC driver bug in 3.14.x under Xen [and 3 more messages]"): > Prashant Sreedharan writes ("Re: tg3 NIC driver bug in 3.14.x under Xen [and > 3 more messages]"): > > yes please do > > I will do so. I did this test: - Linux 3.14.21 - baremetal - `iommu=soft swiotlb

Re: [Xen-devel] [PATCH v5 p2 16/19] tools/libxl: arm: Use an higher value for the GIC phandle

2015-04-09 Thread Ian Jackson
Julien Grall writes ("Re: [Xen-devel] [PATCH v5 p2 16/19] tools/libxl: arm: Use an higher value for the GIC phandle"): > On 09/04/15 17:52, Ian Jackson wrote: > > What would happen if our assumption about the DT compiler were > > violated ? > > The phandle would be present in 2 different nodes of

Re: [Xen-devel] [PATCH] qemu-trad: xenstore: use relative path for device-model node

2015-04-09 Thread Wei Liu
On Thu, Apr 09, 2015 at 05:47:08PM +0100, Ian Jackson wrote: > Wei Liu writes ("[PATCH] qemu-trad: xenstore: use relative path for > device-model node"): > > For QEMU traditional stubdom, this is incompatible startup protocol > > change. This change needs to work with corresponding libxl changese

Re: [Xen-devel] "tcp: refine TSO autosizing" causes performance regression on Xen

2015-04-09 Thread Eric Dumazet
On Thu, 2015-04-09 at 17:36 +0100, Stefano Stabellini wrote: > A very big difference: > > echo 262144 > /proc/sys/net/ipv4/tcp_limit_output_bytes > brings us much closer to the original performance, the slowdown is just > 8% Cool. > > echo 1048576 > /proc/sys/net/ipv4/tcp_limit_output_bytes >

Re: [Xen-devel] tg3 NIC driver bug in 3.14.x under Xen [and 3 more messages]

2015-04-09 Thread Ian Jackson
Prashant Sreedharan writes ("Re: tg3 NIC driver bug in 3.14.x under Xen [and 3 more messages]"): > On Thu, 2015-04-09 at 12:11 +0100, Ian Jackson wrote: > > No. I can try to repro the problem without the bridge, if it would > > help. > yes please do I will do so. FYI, when I came back to this t

Re: [Xen-devel] [PATCH v5 p2 16/19] tools/libxl: arm: Use an higher value for the GIC phandle

2015-04-09 Thread Julien Grall
On 09/04/15 18:00, Julien Grall wrote: > On 09/04/15 17:52, Ian Jackson wrote: >> Julien Grall writes ("Re: [Xen-devel] [PATCH v5 p2 16/19] tools/libxl: arm: >> Use an higher value for the GIC phandle"): >>> On 09/04/15 17:17, Ian Jackson wrote: >>> I only expect people using the partial device tr

Re: [Xen-devel] [PATCH v5 p2 16/19] tools/libxl: arm: Use an higher value for the GIC phandle

2015-04-09 Thread Julien Grall
On 09/04/15 17:52, Ian Jackson wrote: > Julien Grall writes ("Re: [Xen-devel] [PATCH v5 p2 16/19] tools/libxl: arm: > Use an higher value for the GIC phandle"): >> On 09/04/15 17:17, Ian Jackson wrote: >> I only expect people using the partial device tree in very specific use >> case. Generic use

Re: [Xen-devel] [PATCH v5 p2 16/19] tools/libxl: arm: Use an higher value for the GIC phandle

2015-04-09 Thread Ian Jackson
Julien Grall writes ("Re: [Xen-devel] [PATCH v5 p2 16/19] tools/libxl: arm: Use an higher value for the GIC phandle"): > On 09/04/15 17:17, Ian Jackson wrote: > > I have to say I have no idea what a phandle is... > > A phandle is a way to reference another node in the device tree. > Any node that

Re: [Xen-devel] [RFC PATCH v2 00/29] libxl: Cancelling asynchronous operations

2015-04-09 Thread Ian Jackson
Euan Harris writes ("Re: [RFC PATCH v2 00/29] libxl: Cancelling asynchronous operations"): > Yes, that would work, but an open loop approach like that can lead to > frustratingly unreliable tests. I think it would be best to make > the test aware of the state of the helper - or even in control o

[Xen-devel] [PATCH] qemu-trad: xenstore: use relative path for device-model node

2015-04-09 Thread Ian Jackson
Wei Liu writes ("[PATCH] qemu-trad: xenstore: use relative path for device-model node"): > For QEMU traditional stubdom, this is incompatible startup protocol > change. This change needs to work with corresponding libxl changeset. > QEMU traditional is shipped with Xen so we are allowed to do suc

Re: [Xen-devel] [RFC PATCH v2 00/29] libxl: Cancelling asynchronous operations

2015-04-09 Thread Euan Harris
On Tue, Apr 07, 2015 at 06:19:52PM +0100, Ian Jackson wrote: > On the contrary, I think many long-running operations, such as suspend > and migrations, involve multiple iterations of the libxl event loop. > Actual suspend/migrate is done in a helper process; the main process > is responsible for pr

Re: [Xen-devel] "tcp: refine TSO autosizing" causes performance regression on Xen

2015-04-09 Thread Stefano Stabellini
On Thu, 9 Apr 2015, Eric Dumazet wrote: > On Thu, 2015-04-09 at 16:46 +0100, Stefano Stabellini wrote: > > Hi all, > > > > I found a performance regression when running netperf -t TCP_MAERTS from > > an external host to a Xen VM on ARM64: v3.19 and v4.0-rc4 running in the > > virtual machine are 3

Re: [Xen-devel] tg3 NIC driver bug in 3.14.x under Xen [and 3 more messages]

2015-04-09 Thread Prashant Sreedharan
On Thu, 2015-04-09 at 12:11 +0100, Ian Jackson wrote: > Prashant Sreedharan writes ("Re: tg3 NIC driver bug in 3.14.x under Xen [and > 3 more messages]"): > > On Wed, 2015-04-08 at 14:59 +0100, Ian Jackson wrote: > > > Ian Jackson writes ("Re: tg3 NIC driver bug in 3.14.x under Xen"): > > > > The

Re: [Xen-devel] [PATCH v5 p2 16/19] tools/libxl: arm: Use an higher value for the GIC phandle

2015-04-09 Thread Julien Grall
Hi Ian, On 09/04/15 17:17, Ian Jackson wrote: > Julien Grall writes ("[PATCH v5 p2 16/19] tools/libxl: arm: Use an higher > value for the GIC phandle"): >> The partial device tree may contains phandle. The Device Tree Compiler >> tends to allocate the phandle from 1. > > I have to say I have no

Re: [Xen-devel] [PATCH v5 p2 17/19] libxl: Add support for Device Tree passthrough

2015-04-09 Thread Ian Jackson
Julien Grall writes ("[PATCH v5 p2 17/19] libxl: Add support for Device Tree passthrough"): > From: Julien Grall > > 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

Re: [Xen-devel] [PATCH v5 p2 15/19] tools/(lib)xl: Add partial device tree support for ARM

2015-04-09 Thread Ian Jackson
Julien Grall writes ("[PATCH v5 p2 15/19] tools/(lib)xl: Add partial device tree support for ARM"): > 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. T

Re: [Xen-devel] [PATCH v5 p2 16/19] tools/libxl: arm: Use an higher value for the GIC phandle

2015-04-09 Thread Ian Jackson
Julien Grall writes ("[PATCH v5 p2 16/19] tools/libxl: arm: Use an higher value for the GIC phandle"): > The partial device tree may contains phandle. The Device Tree Compiler > tends to allocate the phandle from 1. I have to say I have no idea what a phandle is... > Reserve the ID 65000 for the

Re: [Xen-devel] "tcp: refine TSO autosizing" causes performance regression on Xen

2015-04-09 Thread Eric Dumazet
On Thu, 2015-04-09 at 16:46 +0100, Stefano Stabellini wrote: > Hi all, > > I found a performance regression when running netperf -t TCP_MAERTS from > an external host to a Xen VM on ARM64: v3.19 and v4.0-rc4 running in the > virtual machine are 30% slower than v3.18. > > Through bisection I found

[Xen-devel] [PATCH v20 00/13] x86/PMU: Xen PMU PV(H) support

2015-04-09 Thread Boris Ostrovsky
Changes in v20: * Made xen_pmu_data's domain_id a domid_t type, resulting in layout/padding changes (patches 2 and 10) * Added compat checks for xen_pmu_data (patch 2) * Clarified how vpmu_count is used in a comment (patch 6) * Moved page management from under vpmu_lock (patch 6) * Other (mostly

[Xen-devel] [PATCH v20 11/13] x86/VPMU: Merge vpmu_rdmsr and vpmu_wrmsr

2015-04-09 Thread Boris Ostrovsky
The two routines share most of their logic. Signed-off-by: Boris Ostrovsky Reviewed-by: Dietmar Hahn --- Changes in v20: * Initialize curr in vpmu_do_msr() at definition time and add 'likely' qualifier to first 'if' statement. xen/arch/x86/hvm/vpmu.c| 75 -

[Xen-devel] [PATCH v20 13/13] x86/VPMU: Move VPMU files up from hvm/ directory

2015-04-09 Thread Boris Ostrovsky
Since PMU is now not HVM specific we can move VPMU-related files up from arch/x86/hvm/ directory. Specifically: arch/x86/hvm/vpmu.c -> arch/x86/cpu/vpmu.c arch/x86/hvm/svm/vpmu.c -> arch/x86/cpu/vpmu_amd.c arch/x86/hvm/vmx/vpmu_core2.c -> arch/x86/cpu/vpmu_intel.c include/asm-x86/h

[Xen-devel] [PATCH v20 01/13] common/symbols: Export hypervisor symbols to privileged guest

2015-04-09 Thread Boris Ostrovsky
Export Xen's symbols as {} triplet via new XENPF_get_symbol hypercall Signed-off-by: Boris Ostrovsky Acked-by: Daniel De Graaf Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Dietmar Hahn Tested-by: Dietmar Hahn --- xen/arch/x86/platform_hypercall.c | 28 +++ xen/common/sym

[Xen-devel] [PATCH v20 07/13] x86/VPMU: Save VPMU state for PV guests during context switch

2015-04-09 Thread Boris Ostrovsky
Save VPMU state during context switch for both HVM and PV(H) guests. A subsequent patch ("x86/VPMU: NMI-based VPMU support") will make it possible for vpmu_switch_to() to call vmx_vmcs_try_enter()->vcpu_pause() which needs is_running to be correctly set/cleared. To prepare for that, call context_

[Xen-devel] [PATCH v20 12/13] x86/VPMU: Add privileged PMU mode

2015-04-09 Thread Boris Ostrovsky
Add support for privileged PMU mode (XENPMU_MODE_ALL) which allows privileged domain (dom0) profile both itself (and the hypervisor) and the guests. While this mode is on profiling in guests is disabled. Signed-off-by: Boris Ostrovsky Acked-by: Jan Beulich --- xen/arch/x86/hvm/vpmu.c | 40

[Xen-devel] [PATCH v20 05/13] x86/VPMU: Initialize VPMUs with __initcall

2015-04-09 Thread Boris Ostrovsky
Move some VPMU initilization operations into __initcalls to avoid performing same tests and calculations for each vcpu. Signed-off-by: Boris Ostrovsky Acked-by: Jan Beulich --- xen/arch/x86/hvm/svm/vpmu.c | 106 -- xen/arch/x86/hvm/vmx/vpmu_core2.c | 151 ++

[Xen-devel] [PATCH v20 04/13] x86/VPMU: Interface for setting PMU mode and flags

2015-04-09 Thread Boris Ostrovsky
Add runtime interface for setting PMU mode and flags. Three main modes are provided: * XENPMU_MODE_OFF: PMU is not virtualized * XENPMU_MODE_SELF: Guests can access PMU MSRs and receive PMU interrupts. * XENPMU_MODE_HV: Same as XENPMU_MODE_SELF for non-proviledged guests, dom0 can profile itself

[Xen-devel] [PATCH v20 02/13] x86/VPMU: Add public xenpmu.h

2015-04-09 Thread Boris Ostrovsky
Add pmu.h header files, move various macros and structures that will be shared between hypervisor and PV guests to it. Move MSR banks out of architectural PMU structures to allow for larger sizes in the future. The banks are allocated immediately after the context and PMU structures store offsets

[Xen-devel] [PATCH v20 03/13] x86/VPMU: Make vpmu not HVM-specific

2015-04-09 Thread Boris Ostrovsky
vpmu structure will be used for both HVM and PV guests. Move it from hvm_vcpu to arch_vcpu. Signed-off-by: Boris Ostrovsky Acked-by: Jan Beulich Reviewed-by: Kevin Tian Reviewed-by: Dietmar Hahn Tested-by: Dietmar Hahn --- xen/include/asm-x86/domain.h | 2 ++ xen/include/asm-x86/hvm/vcpu.h

[Xen-devel] [PATCH v20 10/13] x86/VPMU: Handle PMU interrupts for PV(H) guests

2015-04-09 Thread Boris Ostrovsky
Add support for handling PMU interrupts for PV(H) guests. VPMU for the interrupted VCPU is unloaded until the guest issues XENPMU_flush hypercall. This allows the guest to access PMU MSR values that are stored in VPMU context which is shared between hypervisor and domain, thus avoiding traps to hy

[Xen-devel] [PATCH v20 08/13] x86/VPMU: When handling MSR accesses, leave fault injection to callers

2015-04-09 Thread Boris Ostrovsky
With this patch return value of 1 of vpmu_do_msr() will now indicate whether an error was encountered during MSR processing (instead of stating that the access was to a VPMU register). As part of this patch we also check for validity of certain MSR accesses right when we determine which register i

[Xen-devel] [PATCH v20 06/13] x86/VPMU: Initialize PMU for PV(H) guests

2015-04-09 Thread Boris Ostrovsky
Code for initializing/tearing down PMU for PV guests Signed-off-by: Boris Ostrovsky Acked-by: Kevin Tian Acked-by: Daniel De Graaf --- Changes in v20: * Moved page freeing/unmapping from under vpmu_lock in pvpmu_init()/pvpmu_finish(): * Using is_hardware_domain() instead of open-coding * Added

[Xen-devel] [PATCH v20 09/13] x86/VPMU: Add support for PMU register handling on PV guests

2015-04-09 Thread Boris Ostrovsky
Intercept accesses to PMU MSRs and process them in VPMU module. If vpmu ops for VCPU are not initialized (which is the case, for example, for PV guests that are not "VPMU-enlightened") access to MSRs will return failure. Dump VPMU state for all domains (HVM and PV) when requested. Signed-off-by:

[Xen-devel] "tcp: refine TSO autosizing" causes performance regression on Xen

2015-04-09 Thread Stefano Stabellini
Hi all, I found a performance regression when running netperf -t TCP_MAERTS from an external host to a Xen VM on ARM64: v3.19 and v4.0-rc4 running in the virtual machine are 30% slower than v3.18. Through bisection I found that the perf regression is caused by the prensence of the following commi

Re: [Xen-devel] [RFC PATCH 0/7] Intel Cache Monitoring: Current Status and Future Opportunities

2015-04-09 Thread Meng Xu
2015-04-07 9:10 GMT-04:00 Dario Faggioli : > On Tue, 2015-04-07 at 11:27 +0100, Andrew Cooper wrote: >> On 04/04/2015 03:14, Dario Faggioli wrote: >> >> > I'm putting here in the cover letter a markdown document I wrote to better >> > describe my findings and ideas (sorry if it's a bit long! :-D).

Re: [Xen-devel] [RFC PATCH 0/7] Intel Cache Monitoring: Current Status and Future Opportunities

2015-04-09 Thread Meng Xu
Hi Dario, 2015-04-03 22:14 GMT-04:00 Dario Faggioli : > Hi Everyone, > > This RFC series is the outcome of an investigation I've been doing about > whether we can take better advantage of features like Intel CMT (and of PSR > features in general). By "take better advantage of" them I mean, for exa

Re: [Xen-devel] [PATCH 6/6] x86/boot: Ensure the BSS is aligned on an 8 byte boundary

2015-04-09 Thread Andrew Cooper
On 09/04/15 16:15, Tim Deegan wrote: > At 18:26 +0100 on 07 Apr (1428431180), Andrew Cooper wrote: >> --- a/xen/arch/x86/boot/head.S >> +++ b/xen/arch/x86/boot/head.S >> @@ -127,7 +127,8 @@ __start: >> mov $sym_phys(__bss_end),%ecx >> sub %edi,%ecx >> xor %eax

[Xen-devel] [PATCH v2 1/2] osstest: update FreeBSD guests to 10.1

2015-04-09 Thread Roger Pau Monne
Update FreeBSD guests in OSSTest to FreeBSD 10.1. The following images should be placed in the osstest images folder: ftp://ftp.freebsd.org/pub/FreeBSD/releases/VM-IMAGES/10.1-RELEASE/amd64/Latest/FreeBSD-10.1-RELEASE-amd64.raw.xz ftp://ftp.freebsd.org/pub/FreeBSD/releases/VM-IMAGES/10.1-RELEASE/i

[Xen-devel] [PATCH v5 p2 16/19] tools/libxl: arm: Use an higher value for the GIC phandle

2015-04-09 Thread Julien Grall
From: Julien Grall 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 such ID. Signed-off-by: Julien Grall Acked-by

[Xen-devel] [PATCH v5 p2 13/19] tools/libxl: Create a per-arch function to map IRQ to a domain

2015-04-09 Thread Julien Grall
From: Julien Grall ARM and x86 use a different hypercall to map an IRQ to a domain. The hypercall to give IRQ permission to the domain has also been moved to be an x86 specific function as ARM guest won't be able to manage the IRQ. We may want to support it later. Signed-off-by: Julien Grall C

[Xen-devel] [PATCH v5 p2 15/19] tools/(lib)xl: Add partial device tree support for ARM

2015-04-09 Thread Julien Grall
From: Julien Grall 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 allow the user to define aliases which can be

[Xen-devel] [PATCH v5 p2 14/19] tools/libxl: Check if fdt_{first, next}_subnode are present in libfdt

2015-04-09 Thread Julien Grall
From: Julien Grall The functions fdt_{fisrt,next}_subnode may not be available because: * It has been introduced in 2013 => Doesn't work on Wheezy * The prototype exists but the functions are not exposed. Don't ask why... The later has been fixed recently in the dtc repo [1] When th

[Xen-devel] [PATCH v5 p2 10/19] xen/iommu: arm: Wire iommu DOMCTL for ARM

2015-04-09 Thread Julien Grall
From: Julien Grall Signed-off-by: Julien Grall Acked-by: Stefano Stabellini Acked-by: Ian Campbell --- Changes in v4: - Add Ian's ack Changes in v3: - Add Stefano's ack Changes in v2: - Don't move the call in common code. --- xen/arch/arm/domctl.c | 11 +

[Xen-devel] [PATCH v5 p2 19/19] docs/misc: arm: Add documentation about Device Tree passthrough

2015-04-09 Thread Julien Grall
From: Julien Grall 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 Device Tree passthrough. Signed-off-by: Julien Grall --- Changes in v5: - Drop references to "non-PCI" in favor of

[Xen-devel] [PATCH v5 p2 18/19] xl: Add new option dtdev

2015-04-09 Thread Julien Grall
From: Julien Grall The option "dtdev" will be used to passthrough a device described in the device tree to a guest. Signed-off-by: Julien Grall Acked-by: Ian Campbell Cc: Ian Jackson Cc: Wei Liu --- Changes in v5: - Drop "non-PCI" in the commit message - Add Ian's ack

[Xen-devel] [PATCH v5 p2 11/19] xen/xsm: Add helpers to check permission for device tree passthrough

2015-04-09 Thread Julien Grall
From: Julien Grall 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. Signed-off-by: Julien Grall Acked-by: Daniel De Graa

[Xen-devel] [PATCH v5 p2 17/19] libxl: Add support for Device Tree passthrough

2015-04-09 Thread Julien Grall
From: Julien Grall 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 device in the partial device tree - Map manua

[Xen-devel] [PATCH v5 p2 12/19] xen/passthrough: Extend XEN_DOMCTL_*assign_device to support DT device

2015-04-09 Thread Julien Grall
From: Julien Grall A device node is described by a path. It will be used to retrieved the node in the device tree and assign the related device to the domain. Only non-PCI protected by an IOMMU can be assigned to a guest. Also document the behavior of XEN_DOMCTL_deassign_device in the public he

Re: [Xen-devel] [PATCH 2/6] x86/numa: Correct the extern of cpu_to_node

2015-04-09 Thread Tim Deegan
At 16:05 +0100 on 09 Apr (1428595536), Andrew Cooper wrote: > On 09/04/15 16:00, Tim Deegan wrote: > > At 18:26 +0100 on 07 Apr (1428431176), Andrew Cooper wrote: > >> --- a/xen/include/asm-x86/numa.h > >> +++ b/xen/include/asm-x86/numa.h > >> @@ -9,7 +9,7 @@ > >> > >> extern int srat_rev; > >>

Re: [Xen-devel] [PATCH v2 1/2] osstest: update FreeBSD guests to 10.1

2015-04-09 Thread Ian Jackson
Roger Pau Monne writes ("[PATCH v2 1/2] osstest: update FreeBSD guests to 10.1"): > Update FreeBSD guests in OSSTest to FreeBSD 10.1. The following images > should be placed in the osstest images folder: Thanks for the quick turnaround. I have pushed this and 2/2 to osstest pretest (with my acks

Re: [Xen-devel] [PATCH 6/6] x86/boot: Ensure the BSS is aligned on an 8 byte boundary

2015-04-09 Thread Tim Deegan
At 18:26 +0100 on 07 Apr (1428431180), Andrew Cooper wrote: > --- a/xen/arch/x86/boot/head.S > +++ b/xen/arch/x86/boot/head.S > @@ -127,7 +127,8 @@ __start: > mov $sym_phys(__bss_end),%ecx > sub %edi,%ecx > xor %eax,%eax > -rep stosb > +shr

[Xen-devel] [PATCH v2 2/2] osstest: clean ts-freebsd-install script

2015-04-09 Thread Roger Pau Monne
Remove some unused variables from ts-freebsd-install script. Also make the third parameter of target_put_guest_image optional and fix both callers of this function. Signed-off-by: Roger Pau Monné Cc: Ian Jackson --- Osstest/TestSupport.pm | 4 ++-- ts-freebsd-install | 21 ++---

[Xen-devel] [PATCH v5 p2 03/19] xen/arm: Release IRQ routed to a domain when it's destroying

2015-04-09 Thread Julien Grall
From: Julien Grall 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 leave the IRQ in an incorrect state (i.e has not been EOIed). Xen will hav

[Xen-devel] [PATCH v2 0/2] osstest: update FreeBSD guests and cleanup

2015-04-09 Thread Roger Pau Monne
The first patch in this series updates FreeBSD guests in OSSTest to use raw images instead of qcow2 (which are no longer provided by upstream). The second patch is a cleanup for ts-freebsd-install which should not change functionality. ___ Xen-devel m

[Xen-devel] [PATCH v5 p2 02/19] xen/arm: vgic: Add spi_to_pending

2015-04-09 Thread Julien Grall
From: Julien Grall 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 and some call of the new function may during domain destruction after the VCPUs are freed. Signed-off-by: Julien Gr

[Xen-devel] [PATCH v5 p2 04/19] xen/arm: Implement hypercall DOMCTL_{, un}bind_pt_pirq

2015-04-09 Thread Julien Grall
From: Julien Grall 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 order to bind the IRQ On ARM, there is no

[Xen-devel] [PATCH v5 p2 01/19] xen/arm: Let the toolstack configure the number of SPIs

2015-04-09 Thread Julien Grall
From: Julien Grall Each domain may have a different number of IRQs depending on the devices assigned to it. Rather re-using the number of IRQs used by the hardwared GIC, let the toolstack specify the number of SPIs when the domain is created. This will avoid to waste memory. To calculate the nu

[Xen-devel] [PATCH v5 p2 07/19] xen/passthrough: Introduce iommu_construct

2015-04-09 Thread Julien Grall
From: Julien Grall 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: Julien Grall Acked-by: Jan Beulich Acked-by: Ian

[Xen-devel] [PATCH v5 p2 05/19] xen: guestcopy: Provide an helper to safely copy string from guest

2015-04-09 Thread Julien Grall
From: Julien Grall Flask code already provides a helper to copy a string from guest. In a later patch, the new DT hypercalls will need a similar function. To avoid code duplication, copy the flask helper (flask_copying_string) to common code: - Rename into safe_copy_string_from_guest - A

[Xen-devel] [PATCH v5 p2 00/19] xen/arm Add support for non-PCI passthrough

2015-04-09 Thread Julien Grall
Hello all, This is the fifth version of this patch series to add support for platform device passthrough on ARM. In order to passthrough a non-PCI device, the user will have to: - Map manually MMIO/IRQ - Describe the device in the newly partial device tree support - Specify the list o

[Xen-devel] [PATCH v5 p2 08/19] xen/passthrough: arm: release the DT devices assigned to a guest earlier

2015-04-09 Thread Julien Grall
From: Julien Grall 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 call to the release function when we relinquish

[Xen-devel] [PATCH v5 p2 06/19] xen/dts: Provide an helper to get a DT node from a path provided by a guest

2015-04-09 Thread Julien Grall
From: Julien Grall 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: Julien Grall --- Changes in v4: - Dro

[Xen-devel] [PATCH v5 p2 09/19] xen/passthrough: iommu_deassign_device_dt: By default reassign device to nobody

2015-04-09 Thread Julien Grall
From: Julien Grall 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 reset some platform devices. If Xen reassigns the

Re: [Xen-devel] [PATCH 3/6] x86/smp: Clean up use of memflags in cpu_smpboot_alloc()

2015-04-09 Thread Andrew Cooper
On 09/04/15 16:02, Tim Deegan wrote: > At 18:26 +0100 on 07 Apr (1428431177), Andrew Cooper wrote: >> Hoist MEMF_node(cpu_to_node(cpu)) to the start of the function, and avoid >> passing (potentially bogus) memflags if node information is not available. >> >> Signed-off-by: Andrew Cooper > As it h

  1   2   >