[RFC PATCH 4/4] vhost_net: byteswap virtio_net header

2014-10-29 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- drivers/vhost/net.c | 39 ++- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 8dae2f724a35..f2d5f585dae9 100644 --- a/drivers/vhost/net.c +++

[RFC PATCH 1/4] vhost: add VHOST_VRING_F_BYTESWAP flag

2014-10-29 Thread Cédric Le Goater
The VHOST_VRING_F_BYTESWAP flag will be used by the host to byteswap the vring data when the guest and the host have a different endian order. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- drivers/vhost/vhost.c |5 - drivers/vhost/vhost.h |1 +

[RFC PATCH 3/4] vhost: byteswap virtqueue attributes

2014-10-29 Thread Cédric Le Goater
The virtqueue structure shares a few attributes with the guest OS which need to be byteswapped when the endian order of the host is different. This patch uses the vq-byteswap attribute to decide whether to byteswap or not data being accessed in the guest memory. Signed-off-by: Cédric Le Goater

[RFC PATCH 0/4] vhost_net: support for cross endian guests

2014-10-29 Thread Cédric Le Goater
This patchset adds a VHOST_VRING_F_BYTESWAP flag to inform the host to byteswap data of the vring when the guest and the host have a different endian order. The flag is stored at initialization in an attribute of the virtio queues. It is then used to byteswap, or not, the vring indexes and

[RFC PATCH 2/4] vhost: add byteswap routines

2014-10-29 Thread Cédric Le Goater
This patch adds a few helper routines around get_user and put_user to ease byteswapping. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- I am not sure these routines belong to this file. There is room for improvement to remove the ugly switch (sizeof(*(ptr))). Please comment !

Re: [PATCH 3.10] vhost-net: backport extend device allocation to 3.10

2014-10-29 Thread Michael S. Tsirkin
On Tue, Oct 28, 2014 at 07:38:30PM +, Eddie Chapman wrote: On 12/10/14 10:30, Michael S. Tsirkin wrote: On Thu, Oct 09, 2014 at 08:41:23AM +0400, Dmitry Petuhov wrote: From: Michael S. Tsirkin m...@redhat.com upstream commit 23cc5a991c7a9fb7e6d6550e65cee4f4173111c5 Michael Mueller

Re: [Xen-devel] [RFC] Hypervisor RNG and enumeration

2014-10-29 Thread Andrew Cooper
On 29/10/14 05:19, Andy Lutomirski wrote: Here's a draft CommonHV spec. It's also on github: https://github.com/amluto/CommonHV So far, this provides a two-way RNG interface, a way to detect it, and a way to detect other hypervisor leaves. The latter is because, after both the enormous

Re: [GIT PULL 0/9] KVM: s390: Fixes and cleanups for kvm/next (3.19)

2014-10-29 Thread Paolo Bonzini
On 10/28/2014 08:39 PM, Christian Borntraeger wrote: Paolo, the first bunch on s390 change for next: The following changes since commit cac7f2429872d3733dc3f9915857b1691da2eb2f: Linux 3.18-rc2 (2014-10-26 16:48:41 -0700) are available in the git repository at:

Benchmarking for vhost polling patch

2014-10-29 Thread Razya Ladelsky
Hi Michael, Following the polling patch thread: http://marc.info/?l=kvmm=140853271510179w=2, I changed poll_stop_idle to be counted in micro seconds, and carried out experiments using varying sizes of this value. The setup for netperf consisted of 1 vm and 1 vhost , each running on their own

Re: [Xen-devel] [RFC] Hypervisor RNG and enumeration

2014-10-29 Thread Paolo Bonzini
On 10/29/2014 11:37 AM, Andrew Cooper wrote: While testing various nested combinations, XenServer has found that modern Windows Server versions must have the hypervisor bit hidden from them for them to be happy running HyperV, despite the fact that they will make use of the Viridian virtual

Re: [Xen-devel] [RFC] Hypervisor RNG and enumeration

2014-10-29 Thread David Vrabel
On 29/10/14 13:45, Paolo Bonzini wrote: On 10/29/2014 11:37 AM, Andrew Cooper wrote: While testing various nested combinations, XenServer has found that modern Windows Server versions must have the hypervisor bit hidden from them for them to be happy running HyperV, despite the fact that

Re: [Xen-devel] [RFC] Hypervisor RNG and enumeration

2014-10-29 Thread Paolo Bonzini
On 10/29/2014 02:57 PM, David Vrabel wrote: Microsoft already has a specification to obtain a random number via an ACPI device. The VM Generation ID. http://www.microsoft.com/en-us/download/details.aspx?id=30707 That's a very different thing. The VM Generation ID always returns the same

Re: [Xen-devel] [RFC] Hypervisor RNG and enumeration

2014-10-29 Thread Ian Jackson
Andy Lutomirski writes ([Xen-devel] [RFC] Hypervisor RNG and enumeration): Here's a draft CommonHV spec. It's also on github: https://github.com/amluto/CommonHV This a worthwhile direction to investigate, and an interesting proposal. From a Xen point of view I have some concerns, though. I

Re: [Xen-devel] [RFC] Hypervisor RNG and enumeration

2014-10-29 Thread H. Peter Anvin
On 10/29/2014 03:37 AM, Andrew Cooper wrote: CPUID with EAX = 0x4F01 and ECX = N MUST return all zeros. To the extent that the hypervisor prefers a given interface, it should specify that interface earlier in the list. For example, KVM might place its KVMKVMKVM signature first in the

Re: [Xen-devel] [RFC] Hypervisor RNG and enumeration

2014-10-29 Thread H. Peter Anvin
On 10/29/2014 03:37 AM, Andrew Cooper wrote: CPUID with EAX = 0x4F01 and ECX = N MUST return all zeros. To the extent that the hypervisor prefers a given interface, it should specify that interface earlier in the list. For example, KVM might place its KVMKVMKVM signature first in the

Re: [Xen-devel] [RFC] Hypervisor RNG and enumeration

2014-10-29 Thread H. Peter Anvin
On 10/29/2014 03:37 AM, Andrew Cooper wrote: CPUID with EAX = 0x4F01 and ECX = N MUST return all zeros. To the extent that the hypervisor prefers a given interface, it should specify that interface earlier in the list. For example, KVM might place its KVMKVMKVM signature first in the

Re: [Xen-devel] [RFC] Hypervisor RNG and enumeration

2014-10-29 Thread Andy Lutomirski
On Oct 29, 2014 8:17 AM, Ian Jackson ian.jack...@eu.citrix.com wrote: Andy Lutomirski writes ([Xen-devel] [RFC] Hypervisor RNG and enumeration): Here's a draft CommonHV spec. It's also on github: https://github.com/amluto/CommonHV This a worthwhile direction to investigate, and an

Re: [Xen-devel] [RFC] Hypervisor RNG and enumeration

2014-10-29 Thread Andy Lutomirski
On Wed, Oct 29, 2014 at 9:07 AM, H. Peter Anvin h...@zytor.com wrote: On 10/29/2014 03:37 AM, Andrew Cooper wrote: CPUID with EAX = 0x4F01 and ECX = N MUST return all zeros. To the extent that the hypervisor prefers a given interface, it should specify that interface earlier in the list.

Re: [PATCH 2/4] mm: gup: add get_user_pages_locked and get_user_pages_unlocked

2014-10-29 Thread Andrea Arcangeli
On Thu, Oct 09, 2014 at 12:47:23PM +0200, Peter Zijlstra wrote: On Wed, Oct 01, 2014 at 10:56:35AM +0200, Andrea Arcangeli wrote: +static inline long __get_user_pages_locked(struct task_struct *tsk, + struct mm_struct *mm, +

RE: [Xen-devel] [RFC] Hypervisor RNG and enumeration

2014-10-29 Thread Jake Oshins
I have no objection to specifying that these reads may be quite slow. Guests should only use them at boot and if they have some reason to distrust their RNG pool. The latter can legitimately happen after various types of suspend or after migration (detected by VM Generation ID, for example).

Re: [Xen-devel] [RFC] Hypervisor RNG and enumeration

2014-10-29 Thread Andy Lutomirski
On Wed, Oct 29, 2014 at 9:29 AM, Jake Oshins ja...@microsoft.com wrote: I have no objection to specifying that these reads may be quite slow. Guests should only use them at boot and if they have some reason to distrust their RNG pool. The latter can legitimately happen after various types of

Re: [Qemu-devel] [PATCH v3 4/6] target-i386: Remove unsupported bits from all CPU models

2014-10-29 Thread Andreas Färber
Am 03.10.2014 um 21:39 schrieb Eduardo Habkost: The following CPU features were never supported by neither TCG or KVM, so they are useless on the CPU model definitions, today: * CPUID_DTS (DS) * CPUID_HT * CPUID_TM * CPUID_PBE * CPUID_EXT_DTES64 * CPUID_EXT_DSCPL * CPUID_EXT_EST

Re: [PATCH 2/4] mm: gup: add get_user_pages_locked and get_user_pages_unlocked

2014-10-29 Thread Andrea Arcangeli
On Thu, Oct 09, 2014 at 12:50:37PM +0200, Peter Zijlstra wrote: On Wed, Oct 01, 2014 at 10:56:35AM +0200, Andrea Arcangeli wrote: +static inline long __get_user_pages_locked(struct task_struct *tsk, + struct mm_struct *mm, +

Re: [Qemu-devel] [PATCH v3 5/6] target-i386: Don't enable nested VMX by default

2014-10-29 Thread Andreas Färber
Am 03.10.2014 um 21:39 schrieb Eduardo Habkost: TCG doesn't support VMX, and nested VMX is not enabled by default on the KVM kernel module. So, there's no reason to have VMX enabled by default on the core2duo and coreduo CPU models, today. Even the newer Intel CPU model definitions don't

Re: [PATCH 00/17] RFC: userfault v2

2014-10-29 Thread Andrea Arcangeli
Hi Zhanghailiang, On Mon, Oct 27, 2014 at 05:32:51PM +0800, zhanghailiang wrote: Hi Andrea, Thanks for your hard work on userfault;) This is really a useful API. I want to confirm a question: Can we support distinguishing between writing and reading memory for userfault? That is, we

Re: [Qemu-devel] [PATCH 00/17] RFC: userfault v2

2014-10-29 Thread Peter Maydell
On 29 October 2014 17:46, Andrea Arcangeli aarca...@redhat.com wrote: After some chat during the KVMForum I've been already thinking it could be beneficial for some usage to give userland the information about the fault being read or write ...I wonder if that would let us replace the current

Re: [Xen-devel] [RFC] Hypervisor RNG and enumeration

2014-10-29 Thread Paolo Bonzini
On 10/29/2014 05:29 PM, Jake Oshins wrote: Just as a point of clarification, the VM Generation ID changes (at least in the Hyper-V implementation) only when the VM may have observed a different future, as when a VM backup is restored, a checkpoint is applied, etc. It does not change during

Fix Penguin Penalty 17th October2014 ( mail-archive.com )

2014-10-29 Thread centroids86916
Dear Sir Did your website get hit by Google Penguin update on October 17th 2014? What basically is Google Penguin Update? It is actually a code name for Google algorithm which aims at decreasing your websites search engine rankings that violate Google’s guidelines by using black hat SEO

Re: [PATCH v12 09/11] pvqspinlock, x86: Add para-virtualization support

2014-10-29 Thread Waiman Long
On 10/27/2014 05:22 PM, Waiman Long wrote: On 10/27/2014 02:04 PM, Peter Zijlstra wrote: On Mon, Oct 27, 2014 at 01:38:20PM -0400, Waiman Long wrote: On 10/24/2014 04:54 AM, Peter Zijlstra wrote: On Thu, Oct 16, 2014 at 02:10:38PM -0400, Waiman Long wrote: Since enabling paravirt spinlock

Re: [Qemu-devel] [PATCH v3 5/6] target-i386: Don't enable nested VMX by default

2014-10-29 Thread Eduardo Habkost
On Wed, Oct 29, 2014 at 06:40:48PM +0100, Andreas Färber wrote: Am 03.10.2014 um 21:39 schrieb Eduardo Habkost: TCG doesn't support VMX, and nested VMX is not enabled by default on the KVM kernel module. So, there's no reason to have VMX enabled by default on the core2duo and coreduo

[PATCH v13 00/11] qspinlock: a 4-byte queue spinlock with PV support

2014-10-29 Thread Waiman Long
v12-v13: - Change patch 9 to generate separate versions of the queue_spin_lock_slowpath functions for bare metal and PV guest. This reduces the performance impact of the PV code on bare metal systems. v11-v12: - Based on PeterZ's version of the qspinlock patch

[PATCH v13 10/11] pvqspinlock, x86: Enable PV qspinlock for KVM

2014-10-29 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. Two KVM guests of 20 CPU cores (2 nodes) were created for performance testing in one of the following three configurations: 1) Only 1 VM is active

[PATCH v13 11/11] pvqspinlock, x86: Enable PV qspinlock for XEN

2014-10-29 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 | 149 +--

[PATCH v13 09/11] pvqspinlock, x86: Add para-virtualization support

2014-10-29 Thread Waiman Long
This patch adds para-virtualization support to the queue spinlock code base with minimal impact to the native case. There are some minor code changes in the generic qspinlock.c file which should be usable in other architectures. The other code changes are specific to x86 processors and so are all

[PATCH v13 08/11] qspinlock, x86: Rename paravirt_ticketlocks_enabled

2014-10-29 Thread Waiman Long
This patch renames the paravirt_ticketlocks_enabled static key to a more generic paravirt_spinlocks_enabled name. Signed-off-by: Waiman Long waiman.l...@hp.com Signed-off-by: Peter Zijlstra pet...@infradead.org --- arch/x86/include/asm/spinlock.h |4 ++-- arch/x86/kernel/kvm.c

[PATCH v13 04/11] qspinlock: Extract out code snippets for the next patch

2014-10-29 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

[PATCH v13 07/11] qspinlock: Revert to test-and-set on hypervisors

2014-10-29 Thread Waiman Long
From: Peter Zijlstra 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 pet...@infradead.org Signed-off-by: Waiman Long

[PATCH v13 05/11] qspinlock: Optimize for smaller NR_CPUS

2014-10-29 Thread Waiman Long
From: Peter Zijlstra 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 the

[PATCH v13 06/11] qspinlock: Use a simple write to grab the lock

2014-10-29 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

[PATCH v13 01/11] qspinlock: A simple generic 4-byte queue spinlock

2014-10-29 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

[PATCH v13 03/11] qspinlock: Add pending bit

2014-10-29 Thread Waiman Long
From: Peter Zijlstra 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 the last

[PATCH v13 02/11] qspinlock, x86: Enable x86-64 to use queue spinlock

2014-10-29 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

Re: [PATCH v12 09/11] pvqspinlock, x86: Add para-virtualization support

2014-10-29 Thread Waiman Long
On 10/29/2014 03:05 PM, Waiman Long wrote: On 10/27/2014 05:22 PM, Waiman Long wrote: On 10/27/2014 02:04 PM, Peter Zijlstra wrote: On Mon, Oct 27, 2014 at 01:38:20PM -0400, Waiman Long wrote: On 10/24/2014 04:54 AM, Peter Zijlstra wrote: On Thu, Oct 16, 2014 at 02:10:38PM -0400, Waiman Long

[RFC PATCH 3/4] vhost: byteswap virtqueue attributes

2014-10-29 Thread Cédric Le Goater
The virtqueue structure shares a few attributes with the guest OS which need to be byteswapped when the endian order of the host is different. This patch uses the vq-byteswap attribute to decide whether to byteswap or not data being accessed in the guest memory. Signed-off-by: Cédric Le Goater

[RFC PATCH 4/4] vhost_net: byteswap virtio_net header

2014-10-29 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- drivers/vhost/net.c | 39 ++- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 8dae2f724a35..f2d5f585dae9 100644 --- a/drivers/vhost/net.c +++

[RFC PATCH 2/4] vhost: add byteswap routines

2014-10-29 Thread Cédric Le Goater
This patch adds a few helper routines around get_user and put_user to ease byteswapping. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- I am not sure these routines belong to this file. There is room for improvement to remove the ugly switch (sizeof(*(ptr))). Please comment !