Re: [Xen-devel] [PATCH] x86, paravirt, xen: Remove the 64-bit irq_enable_sysexit pvop

2015-04-06 Thread Boris Ostrovsky
On 04/06/2015 01:44 PM, Andrew Cooper wrote: On 06/04/2015 16:29, Andy Lutomirski wrote: On Mon, Apr 6, 2015 at 7:10 AM, Konrad Rzeszutek Wilk konrad.w...@oracle.com wrote: On Fri, Apr 03, 2015 at 03:52:30PM -0700, Andy Lutomirski wrote: [cc: Boris and Konrad. Whoops] On Fri, Apr 3, 2015

Re: [Xen-devel] [PATCH] x86, paravirt, xen: Remove the 64-bit irq_enable_sysexit pvop

2015-04-06 Thread Andrew Cooper
On 06/04/2015 16:29, Andy Lutomirski wrote: On Mon, Apr 6, 2015 at 7:10 AM, Konrad Rzeszutek Wilk konrad.w...@oracle.com wrote: On Fri, Apr 03, 2015 at 03:52:30PM -0700, Andy Lutomirski wrote: [cc: Boris and Konrad. Whoops] On Fri, Apr 3, 2015 at 3:51 PM, Andy Lutomirski l...@kernel.org

Re: [Xen-devel] [PATCH] x86, paravirt, xen: Remove the 64-bit irq_enable_sysexit pvop

2015-04-06 Thread Andy Lutomirski
On Mon, Apr 6, 2015 at 11:30 AM, Boris Ostrovsky boris.ostrov...@oracle.com wrote: On 04/06/2015 01:44 PM, Andrew Cooper wrote: On 06/04/2015 16:29, Andy Lutomirski wrote: On Mon, Apr 6, 2015 at 7:10 AM, Konrad Rzeszutek Wilk konrad.w...@oracle.com wrote: On Fri, Apr 03, 2015 at

Re: [Xen-devel] [PATCH] x86, paravirt, xen: Remove the 64-bit irq_enable_sysexit pvop

2015-04-06 Thread Boris Ostrovsky
On 04/06/2015 04:03 PM, Andy Lutomirski wrote: On Mon, Apr 6, 2015 at 11:30 AM, Boris Ostrovsky boris.ostrov...@oracle.com wrote: On 04/06/2015 01:44 PM, Andrew Cooper wrote: On 06/04/2015 16:29, Andy Lutomirski wrote: On Mon, Apr 6, 2015 at 7:10 AM, Konrad Rzeszutek Wilk

Re: [Xen-devel] [PATCH] xen: arm: X-Gene Storm check GIC DIST address for EOI quirk

2015-04-06 Thread Julien Grall
Hi Pranav, Thank you for the patch. On 06/04/2015 10:54, Pranavkumar Sawargaonkar wrote: In old X-Gene Storm firmware and DT, secure mode addresses have been mentioned in GICv2 node. In this case maintenance interrupt is used instead of EOI HW method. This patch checks the GIC Distributor

[Xen-devel] [xen-4.3-testing test] 50332: regressions - FAIL

2015-04-06 Thread osstest service user
flight 50332 xen-4.3-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/50332/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-freebsd10-i386 8 guest-start fail REGR. vs. 36755 Regressions

[Xen-devel] [PATCH v6 5/5] libxl: Add interface for querying hypervisor about PCI topology

2015-04-06 Thread Boris Ostrovsky
.. and use this new interface to display it along with CPU topology and NUMA information when 'xl info -n' command is issued The output will look like ... cpu_topology : cpu:coresocket node 0: 000 ... device topology: device node

[Xen-devel] [PATCH v6 2/5] sysctl: Add sysctl interface for querying PCI topology

2015-04-06 Thread Boris Ostrovsky
Signed-off-by: Boris Ostrovsky boris.ostrov...@oracle.com --- Changes in v6: * Dropped continuations, the sysctl now returns after 64 iteration if necessary * -ENODEV returned if device is not found * sysctl's first_dev is now expected to be used by userspace to continue the query * Added XSM

[Xen-devel] [PATCH v6 1/5] sysctl: Make XEN_SYSCTL_numainfo a little more efficient

2015-04-06 Thread Boris Ostrovsky
A number of changes to XEN_SYSCTL_numainfo interface: * Make sysctl NUMA topology query use fewer copies by combining some fields into a single structure and copying distances for each node in a single copy. * NULL meminfo and distance handles are a request for maximum number of nodes

[Xen-devel] [PATCH v6 4/5] libxl/libxc: Move libxl_get_numainfo()'s hypercall buffer management to libxc

2015-04-06 Thread Boris Ostrovsky
xc_numainfo() is not expected to be used on a hot path and therefore hypercall buffer management can be pushed into libxc. This will simplify life for callers. Also update error logging macros. Signed-off-by: Boris Ostrovsky boris.ostrov...@oracle.com --- Changes in v6: * Dropped separate NULL

[Xen-devel] [PATCH v6 0/5] Display IO topology when PXM data is available (plus some cleanup)

2015-04-06 Thread Boris Ostrovsky
Changes in v6: * PCI topology interface changes: no continuations, userspace will be dealing with unfinished sysctl (patches 2 and 5) * Unknown device will cause ENODEV in sysctl * No NULL tests in libxc * Loop control initialization fix (similar to commit 26da081ac91a) * Other minor changes

[Xen-devel] [PATCH v6 3/5] libxl/libxc: Move libxl_get_cpu_topology()'s hypercall buffer management to libxc

2015-04-06 Thread Boris Ostrovsky
xc_cputopoinfo() is not expected to be used on a hot path and therefore hypercall buffer management can be pushed into libxc. This will simplify life for callers. Also update error reporting macros. Signed-off-by: Boris Ostrovsky boris.ostrov...@oracle.com --- Changes in v6: * Dropped NULL

[Xen-devel] [PATCH v15 01/15] qspinlock: A simple generic 4-byte queue spinlock

2015-04-06 Thread Waiman Long
This patch introduces a new generic queue spinlock implementation that can serve as an alternative to the default ticket spinlock. Compared with the ticket spinlock, this queue spinlock should be almost as fair as the ticket spinlock. It has about the same speed in single-thread and it can be much

[Xen-devel] [PATCH v15 11/15] pvqspinlock, x86: Enable PV qspinlock for KVM

2015-04-06 Thread Waiman Long
This patch adds the necessary KVM specific code to allow KVM to support the CPU halting and kicking operations needed by the queue spinlock PV code. Signed-off-by: Waiman Long waiman.l...@hp.com --- arch/x86/kernel/kvm.c | 43 +++ kernel/Kconfig.locks |

[Xen-devel] [PATCH v15 04/15] qspinlock: Extract out code snippets for the next patch

2015-04-06 Thread Waiman Long
This is a preparatory patch that extracts out the following 2 code snippets to prepare for the next performance optimization patch. 1) the logic for the exchange of new and previous tail code words into a new xchg_tail() function. 2) the logic for clearing the pending bit and setting the

[Xen-devel] [PATCH v15 07/15] qspinlock: Revert to test-and-set on hypervisors

2015-04-06 Thread Waiman Long
From: Peter Zijlstra (Intel) pet...@infradead.org When we detect a hypervisor (!paravirt, see qspinlock paravirt support patches), revert to a simple test-and-set lock to avoid the horrors of queue preemption. Signed-off-by: Peter Zijlstra (Intel) pet...@infradead.org Signed-off-by: Waiman Long

[Xen-devel] [PATCH v15 03/15] qspinlock: Add pending bit

2015-04-06 Thread Waiman Long
From: Peter Zijlstra (Intel) pet...@infradead.org Because the qspinlock needs to touch a second cacheline (the per-cpu mcs_nodes[]); add a pending bit and allow a single in-word spinner before we punt to the second cacheline. It is possible so observe the pending bit without the locked bit when

[Xen-devel] [PATCH v15 05/15] qspinlock: Optimize for smaller NR_CPUS

2015-04-06 Thread Waiman Long
From: Peter Zijlstra (Intel) pet...@infradead.org When we allow for a max NR_CPUS 2^14 we can optimize the pending wait-acquire and the xchg_tail() operations. By growing the pending bit to a byte, we reduce the tail to 16bit. This means we can use xchg16 for the tail part and do away with all

Re: [Xen-devel] [RFC v1 12/15] vmx: Properly handle notification event when vCPU is running

2015-04-06 Thread Wu, Feng
-Original Message- From: Konrad Rzeszutek Wilk [mailto:konrad.w...@oracle.com] Sent: Friday, April 03, 2015 9:37 PM To: Wu, Feng Cc: Tian, Kevin; Zhang, Yang Z; xen-devel@lists.xen.org; k...@xen.org; jbeul...@suse.com Subject: Re: [Xen-devel] [RFC v1 12/15] vmx: Properly handle

[Xen-devel] Nested Virt - Xen 4.4 through 4.6 - Hyper-V; Can't boot after enabling Hyper-V

2015-04-06 Thread mailing lists
Hi -- I've been trying to get nested virtualization working with Xen so that I could boot Windows and use Hyper-V related features, however I have not had much success. Using Windows 8.1 or Windows 2012r2, I'm able to install Windows, select and install Hyper-V features, and start rebooting.

[Xen-devel] [PATCH v15 14/15] pvqspinlock: Improve slowpath performance by avoiding cmpxchg

2015-04-06 Thread Waiman Long
In the pv_scan_next() function, the slow cmpxchg atomic operation is performed even if the other CPU is not even close to being halted. This extra cmpxchg can harm slowpath performance. This patch introduces the new mayhalt flag to indicate if the other spinning CPU is close to being halted or

[Xen-devel] [PATCH v15 00/15] qspinlock: a 4-byte queue spinlock with PV support

2015-04-06 Thread Waiman Long
v14-v15: - Incorporate PeterZ's v15 qspinlock patch and improve upon the PV qspinlock code by dynamically allocating the hash table as well as some other performance optimization. - Simplified the Xen PV qspinlock code as suggested by David Vrabel david.vra...@citrix.com. - Add

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

2015-04-06 Thread Waiman Long
Before this patch, a CPU may have been kicked twice before getting the lock - one before it becomes queue head and once before it gets the lock. All these CPU kicking and halting (VMEXIT) can be expensive and slow down system performance, especially in an overcommitted guest. This patch add a new

[Xen-devel] [PATCH v15 02/15] qspinlock, x86: Enable x86-64 to use queue spinlock

2015-04-06 Thread Waiman Long
This patch makes the necessary changes at the x86 architecture specific layer to enable the use of queue spinlock for x86-64. As x86-32 machines are typically not multi-socket. The benefit of queue spinlock may not be apparent. So queue spinlock is not enabled. Currently, there is some

[Xen-devel] [PATCH v15 06/15] qspinlock: Use a simple write to grab the lock

2015-04-06 Thread Waiman Long
Currently, atomic_cmpxchg() is used to get the lock. However, this is not really necessary if there is more than one task in the queue and the queue head don't need to reset the tail code. For that case, a simple write to set the lock bit is enough as the queue head will be the only one eligible

[Xen-devel] [PATCH v15 10/15] pvqspinlock: Implement the paravirt qspinlock for x86

2015-04-06 Thread Waiman Long
From: Peter Zijlstra (Intel) pet...@infradead.org We use the regular paravirt call patching to switch between: native_queue_spin_lock_slowpath() __pv_queue_spin_lock_slowpath() native_queue_spin_unlock()__pv_queue_spin_unlock() We use a callee saved call for the unlock

[Xen-devel] [PATCH v15 08/15] lfsr: a simple binary Galois linear feedback shift register

2015-04-06 Thread Waiman Long
This patch is based on the code sent out by Peter Zijstra as part of his queue spinlock patch to provide a hashing function with open addressing. The lfsr() function can be used to return a sequence of numbers that cycle through all the bit patterns (2^n -1) of a given bit width n except the

[Xen-devel] [PATCH v15 12/15] pvqspinlock, x86: Enable PV qspinlock for Xen

2015-04-06 Thread Waiman Long
This patch adds the necessary Xen specific code to allow Xen to support the CPU halting and kicking operations needed by the queue spinlock PV code. Signed-off-by: Waiman Long waiman.l...@hp.com --- arch/x86/xen/spinlock.c | 63 ---

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

2015-04-06 Thread Waiman Long
Provide a separate (second) version of the spin_lock_slowpath for paravirt along with a special unlock path. The second slowpath is generated by adding a few pv hooks to the normal slowpath, but where those will compile away for the native case, they expand into special wait/wake code for the pv

[Xen-devel] [PATCH v15 15/15] pvqspinlock: Add debug code to check for PV lock hash sanity

2015-04-06 Thread Waiman Long
The current code for PV lock hash table processing will panic the system if pv_hash_find() can't find the desired hash bucket. However, there is no check to see if there is more than one entry for a given lock which should never happen. This patch adds a pv_hash_check_duplicate() function to do

[Xen-devel] [xen-4.4-testing test] 50333: trouble: blocked/broken/fail/pass

2015-04-06 Thread osstest service user
flight 50333 xen-4.4-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/50333/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: build-armhf 3 host-install(3) broken REGR. vs.

[Xen-devel] [PATCH] xen: arm: X-Gene Storm check GIC DIST address for EOI quirk

2015-04-06 Thread Pranavkumar Sawargaonkar
In old X-Gene Storm firmware and DT, secure mode addresses have been mentioned in GICv2 node. In this case maintenance interrupt is used instead of EOI HW method. This patch checks the GIC Distributor Base Address to enable EOI quirk for old firmware. Ref:

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

2015-04-06 Thread Julien Grall
Hi Ian, Subject: s/HSR/HCR/ On 31/03/2015 12:07, Ian Campbell wrote: This traps variety of implementation defined registers, so add a note to the default case of the respective handler. Signed-off-by: Ian Campbell ian.campb...@citrix.com Other than the typo in the subject: Reviewed-by:

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

2015-04-06 Thread Julien Grall
Hi Ian, On 31/03/2015 12:07, Ian Campbell wrote: While annotating ACTLR I noticed that we don't appear to handle the 64-bit version of this trap. Do so and annotate everything. While Linux doesn't use ACTLR_EL1 on aarch64, another OS may use it. I'm not sure if we should consider it as a

Re: [Xen-devel] [PATCH v1 1/3] xen/arm: smmu: Rename arm_smmu_xen_device with, device_iommu_info

2015-04-06 Thread Manish Jaggi
On Friday 27 March 2015 11:30 PM, Jaggi, Manish wrote: From: Julien Grall julien.gr...@linaro.org Sent: Friday, March 27, 2015 7:05 PM To: Jaggi, Manish; Xen Devel; Stefano Stabellini; Ian Campbell; prasun.kap...@cavium.com; Kumar, Vijaya Subject: Re: [PATCH v1

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

2015-04-06 Thread Julien Grall
Hi Ian, On 31/03/2015 12:07, Ian Campbell wrote: Signed-off-by: Ian Campbell ian.campb...@citrix.com --- xen/arch/arm/traps.c | 32 xen/include/asm-arm/cpregs.h |4 xen/include/asm-arm/sysregs.h |1 + 3 files changed, 37

Re: [Xen-devel] [PATCH v5 3/7] libxl/libxl_domain_info: Log if domain not found.

2015-04-06 Thread Konrad Rzeszutek Wilk
On Fri, Apr 03, 2015 at 11:12:15PM +0100, Ian Murray wrote: On 03/04/15 21:02, Konrad Rzeszutek Wilk wrote: If we cannot find the domain - log an error (and still continue returning an error). Forgive me if I am misunderstanding the effect of this patch (I tried to find the original

Re: [Xen-devel] [RFC PATCH 3/7] xen: psr: reserve an RMID for each core

2015-04-06 Thread Konrad Rzeszutek Wilk
On Sat, Apr 04, 2015 at 04:14:41AM +0200, Dario Faggioli wrote: This allows for a new item to be passed as part of the psr= boot option: percpu_cmt. If that is specified, Xen tries, at boot time, to associate an RMID to each core. XXX This all looks rather straightforward, if it weren't

[Xen-devel] [linux-linus test] 50329: tolerable FAIL - PUSHED

2015-04-06 Thread osstest service user
flight 50329 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/50329/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): test-amd64-i386-freebsd10-i386 7 freebsd-install fail like 50276

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

2015-04-06 Thread Julien Grall
Hi Ian, On 31/03/2015 12:07, Ian Campbell wrote: 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 ian.campb...@citrix.com Reviewed-by: Julien Grall julien.gr...@citrix.com Regards, -- Julien

Re: [Xen-devel] [RFC PATCH 1/7] x86: improve psr scheduling code

2015-04-06 Thread Konrad Rzeszutek Wilk
On Sat, Apr 04, 2015 at 04:14:24AM +0200, Dario Faggioli wrote: From: Chao Peng chao.p.p...@linux.intel.com 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

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

2015-04-06 Thread Julien Grall
Hi Ian, On 31/03/2015 12:07, Ian Campbell wrote: 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

Re: [Xen-devel] [PATCH] x86, paravirt, xen: Remove the 64-bit irq_enable_sysexit pvop

2015-04-06 Thread Konrad Rzeszutek Wilk
On Fri, Apr 03, 2015 at 03:52:30PM -0700, Andy Lutomirski wrote: [cc: Boris and Konrad. Whoops] On Fri, Apr 3, 2015 at 3:51 PM, Andy Lutomirski l...@kernel.org wrote: We don't use irq_enable_sysexit on 64-bit kernels any more. Remove Is there an commit (or name of patch) that explains why

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

2015-04-06 Thread Julien Grall
On 02/04/2015 18:19, Ian Campbell wrote: On Thu, 2015-04-02 at 17:01 +0100, Ian Campbell wrote: On Thu, 2015-04-02 at 16:50 +0100, Ian Campbell wrote: Writing to the bottom half (e.g. w0) of a register implicitly clears the top half, IIRC, so I think a kernel is unlikely to want to do this,

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

2015-04-06 Thread Julien Grall
Hi Ian, On 31/03/2015 12:07, Ian Campbell wrote: Signed-off-by: Ian Campbell ian.campb...@citrix.com --- 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

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

2015-04-06 Thread Julien Grall
Hi Ian, Subject: s/PCTR/CPTR/ On 31/03/2015 12:07, Ian Campbell wrote: Signed-off-by: Ian Campbell ian.campb...@citrix.com --- 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

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

2015-04-06 Thread Julien Grall
Hi Ian, On 31/03/2015 12:07, Ian Campbell wrote: 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. It's a bit strange to name the patch Annotate... while the main change is 64-bit CP14 accesses.

Re: [Xen-devel] [RFC PATCH 2/7] Xen: x86: print max usable RMID during init

2015-04-06 Thread Konrad Rzeszutek Wilk
On Sat, Apr 04, 2015 at 04:14:33AM +0200, Dario Faggioli wrote: Just print it. Signed-off-by: Dario Faggioli dario.faggi...@citrix.com --- xen/arch/x86/psr.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/psr.c b/xen/arch/x86/psr.c index

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

2015-04-06 Thread Julien Grall
Hi Ian, On 31/03/2015 12:07, Ian Campbell wrote: Signed-off-by: Ian Campbell ian.campb...@citrix.com --- 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

Re: [Xen-devel] [PATCH v1 3/3] xen/arm: smmu: Renaming struct iommu_domain *domain to, struct iommu_domain *iommu_domain

2015-04-06 Thread Julien Grall
Hi Ian, On 01/04/2015 10:30, Ian Campbell wrote: On Tue, 2015-03-31 at 17:48 +0100, Stefano Stabellini wrote: If it helps we could add a couple of comments on top of the structs in smmu.c to explain the meaning of the fields, like: /* iommu_domain, not to be confused with a Xen domain */ I

Re: [Xen-devel] [PATCH] x86, paravirt, xen: Remove the 64-bit irq_enable_sysexit pvop

2015-04-06 Thread Andy Lutomirski
On Mon, Apr 6, 2015 at 7:10 AM, Konrad Rzeszutek Wilk konrad.w...@oracle.com wrote: On Fri, Apr 03, 2015 at 03:52:30PM -0700, Andy Lutomirski wrote: [cc: Boris and Konrad. Whoops] On Fri, Apr 3, 2015 at 3:51 PM, Andy Lutomirski l...@kernel.org wrote: We don't use irq_enable_sysexit on

[Xen-devel] [qemu-upstream-4.5-testing test] 50330: regressions - FAIL

2015-04-06 Thread osstest service user
flight 50330 qemu-upstream-4.5-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/50330/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-pair 17 guest-migrate/src_host/dst_host fail REGR. vs. 36517 Tests

[Xen-devel] remove entry in shadow table

2015-04-06 Thread HANNAS YAYA Issa
Hi I want to remove entry of a given page in the shadow page table so that when the next time the guest access to the page there is page fault. Here is what I try to do: 1. I have a timer which wake up every 30 seconds and remove entry in the shadow by calling