Re: [GIT PULL 0/5] KVM: s390: Let user space control the cpu states

2014-07-21 Thread Christian Borntraeger
On 18/07/14 16:49, Paolo Bonzini wrote: Il 15/07/2014 15:27, Christian Borntraeger ha scritto: Paolo, The following changes since commit 9f6226a762c7ae02f6a23a3d4fc552dafa57ea23: arch: x86: kvm: x86.c: Cleaning up variable is set more than once (2014-06-30 16:52:04 +0200) are available

Re: [PATCH v2 2/2] docs: update ivshmem device spec

2014-07-21 Thread Claudio Fontana
On 20.07.2014 11:38, David Marchand wrote: Add some notes on the parts needed to use ivshmem devices: more specifically, explain the purpose of an ivshmem server and the basic concept to use the ivshmem devices in guests. Move some parts of the documentation and re-organise it.

Re: [GIT PULL 0/5] KVM: s390: Let user space control the cpu states

2014-07-21 Thread Paolo Bonzini
Il 21/07/2014 09:47, Christian Borntraeger ha scritto: So having such a state wont buy us much. It would be even wrong, because we want our MP_STATE defines to be a 1:1 match of the states that are defined in the architecture as proper CPU states. Some of the SIGP calls will return the state

Re: [PATCH] kvm-all: Use 'tmpcpu' instead of 'cpu' in sub-looping to avoid 'cpu' be NULL

2014-07-21 Thread Paolo Bonzini
Il 19/07/2014 03:21, Chen Gang ha scritto: If kvm_arch_remove_sw_breakpoint() in CPU_FOREACH() always be fail, it will let 'cpu' NULL. And the next kvm_arch_remove_sw_breakpoint() in QTAILQ_FOREACH_SAFE() will get NULL parameter for 'cpu'. And kvm_arch_remove_sw_breakpoint() can assumes

RE: [PATCH v5 4/5] KVM: PPC: Alow kvmppc_get_last_inst() to fail

2014-07-21 Thread mihai.cara...@freescale.com
-Original Message- From: Linuxppc-dev [mailto:linuxppc-dev- bounces+mihai.caraman=freescale@lists.ozlabs.org] On Behalf Of mihai.cara...@freescale.com Sent: Friday, July 18, 2014 12:06 PM To: Alexander Graf; kvm-...@vger.kernel.org Cc: linuxppc-...@lists.ozlabs.org;

[GIT PULL] KVM changes for 3.16-rc7

2014-07-21 Thread Paolo Bonzini
Linus, The following changes since commit cd3de83f147601356395b57a8673e9c5ff1e59d1: Linux 3.16-rc4 (2014-07-06 12:37:51 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/kvm.git tags/for-linus for you to fetch changes up to

KVM call for agenda for 2014-07-22

2014-07-21 Thread Juan Quintela
Hi Please, send any topic that you are interested in covering. Thanks, Juan. Call details: 15:00 CEST 13:00 UTC 09:00 EDT Every two weeks If you need phone number details, contact me privately -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to

[PATCH 2/2] KVM: nVMX: clean up nested_release_vmcs12 and code around it

2014-07-21 Thread Paolo Bonzini
Make nested_release_vmcs12 idempotent. Tested-by: Wanpeng Li wanpeng...@linux.intel.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- arch/x86/kvm/vmx.c | 42 +- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/arch/x86/kvm/vmx.c

[PATCH 0/2] KVM: nVMX: fix lifetime issues for vmcs02 and shadow VMCS

2014-07-21 Thread Paolo Bonzini
I think that commit 26a865f4aa8e (KVM: VMX: fix use after free of vmx-loaded_vmcs, 2014-01-03) was wrong, as it introduced a use of a dangling vmcs02. The first patch introduces what I think is the right fix, while the second patch strengthens the invariants around nested_release_vmcs12. Paolo

[PATCH 1/2] KVM: nVMX: fix lifetime issues for vmcs02

2014-07-21 Thread Paolo Bonzini
free_nested needs the loaded_vmcs to be valid if it is a vmcs02, in order to detach it from the shadow vmcs. However, this is not available anymore after commit 26a865f4aa8e (KVM: VMX: fix use after free of vmx-loaded_vmcs, 2014-01-03). Revert that patch, and fix its problem by forcing a vmcs01

Re: [patch 3/4] KVM: MMU: reload request from GET_DIRTY_LOG path

2014-07-21 Thread Gleb Natapov
On Wed, Jul 09, 2014 at 04:12:53PM -0300, mtosa...@redhat.com wrote: Reload remote vcpus MMU from GET_DIRTY_LOG codepath, before deleting a pinned spte. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com --- arch/x86/kvm/mmu.c | 29 +++-- 1 file changed, 23

RE: [PATCH 1/6 v2] KVM: PPC: Book3E: Use common defines for SPE/FP/AltiVec int numbers

2014-07-21 Thread mihai.cara...@freescale.com
-Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Thursday, July 03, 2014 3:21 PM To: Caraman Mihai Claudiu-B02008; kvm-...@vger.kernel.org Cc: kvm@vger.kernel.org; linuxppc-...@lists.ozlabs.org Subject: Re: [PATCH 1/6 v2] KVM: PPC: Book3E: Use common defines for

[PATCH] vhost: Add polling mode

2014-07-21 Thread Razya Ladelsky
Hello All, When vhost is waiting for buffers from the guest driver (e.g., more packets to send in vhost-net's transmit queue), it normally goes to sleep and waits for the guest to kick it. This kick involves a PIO in the guest, and therefore an exit (and possibly userspace involvement in

Re: [PATCH v2 1/2] contrib: add ivshmem client and server

2014-07-21 Thread Eric Blake
On 07/20/2014 03:38 AM, David Marchand wrote: When using ivshmem devices, notifications between guests can be sent as interrupts using a ivshmem-server (typical use described in documentation). The client is provided as a debug tool. Signed-off-by: Olivier Matz olivier.m...@6wind.com

Re: [Qemu-devel] [PATCH v2 1/2] contrib: add ivshmem client and server

2014-07-21 Thread Daniel P. Berrange
On Mon, Jul 21, 2014 at 08:21:21AM -0600, Eric Blake wrote: On 07/20/2014 03:38 AM, David Marchand wrote: When using ivshmem devices, notifications between guests can be sent as interrupts using a ivshmem-server (typical use described in documentation). The client is provided as a debug

Re: [PATCH kvm-unit-tests] x86: Check DR6.RTM is writable

2014-07-21 Thread Paolo Bonzini
Il 15/07/2014 16:41, Nadav Amit ha scritto: Recently discovered bug shows DR6.RTM is fixed to one. The bug is only apparent when the host emulates the MOV-DR instruction or when the host debugs the guest kernel. This patch tests whether DR6.RTM is indeed accessible according to RTM support

Re: [PATCH] KVM: x86: DR6/7.RTM cannot be written

2014-07-21 Thread Paolo Bonzini
Il 15/07/2014 16:37, Nadav Amit ha scritto: Haswell and newer Intel CPUs have support for RTM, and in that case DR6.RTM is not fixed to 1 and DR7.RTM is not fixed to zero. That is not the case in the current KVM implementation. This bug is apparent only if the MOV-DR instruction is emulated

Re: [PATCH v2 1/2] contrib: add ivshmem client and server

2014-07-21 Thread David Marchand
Hello Eric, On 07/21/2014 04:21 PM, Eric Blake wrote: On 07/20/2014 03:38 AM, David Marchand wrote: +# Copyright 2014 6WIND S.A. +# All rights reserved This file has no other license, and is therefore incompatible with GPLv2. You'll need to resubmit under an appropriately open license.

Re: [Qemu-devel] [PATCH v2 1/2] contrib: add ivshmem client and server

2014-07-21 Thread Markus Armbruster
David Marchand david.march...@6wind.com writes: When using ivshmem devices, notifications between guests can be sent as interrupts using a ivshmem-server (typical use described in documentation). The client is provided as a debug tool. [...] diff --git

[GIT PULL 9/9] KVM: s390: add ipte to trace event decoding

2014-07-21 Thread Christian Borntraeger
IPTE intercept can happen, let's decode that. Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com Acked-by: Cornelia Huck cornelia.h...@de.ibm.com --- arch/s390/include/uapi/asm/sie.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/s390/include/uapi/asm/sie.h

[GIT PULL 7/9] KVM: s390: document KVM_CAP_S390_IRQCHIP

2014-07-21 Thread Christian Borntraeger
From: Cornelia Huck cornelia.h...@de.ibm.com Let's document that this is a capability that may be enabled per-vm. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com Reviewed-by: David Hildenbrand d...@linux.vnet.ibm.com Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com ---

[GIT PULL 6/9] KVM: document target of capability enablement

2014-07-21 Thread Christian Borntraeger
From: Cornelia Huck cornelia.h...@de.ibm.com Capabilities can be enabled on a vcpu or (since recently) on a vm. Document this and note for the existing capabilites whether they are per-vcpu or per-vm. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com Reviewed-by: David Hildenbrand

[GIT PULL 1/9] KVM: s390: cleanup handle_wait by reusing kvm_vcpu_block

2014-07-21 Thread Christian Borntraeger
From: David Hildenbrand d...@linux.vnet.ibm.com This patch cleans up the code in handle_wait by reusing the common code function kvm_vcpu_block. signal_pending(), kvm_cpu_has_pending_timer() and kvm_arch_vcpu_runnable() are sufficient for checking if we need to wake-up that VCPU. kvm_vcpu_block

[GIT PULL 5/9] KVM: s390: remove the tasklet used by the hrtimer

2014-07-21 Thread Christian Borntraeger
From: David Hildenbrand d...@linux.vnet.ibm.com We can get rid of the tasklet used for waking up a VCPU in the hrtimer code but wakeup the VCPU directly. Signed-off-by: David Hildenbrand d...@linux.vnet.ibm.com Reviewed-by: Christian Borntraeger borntrae...@de.ibm.com Acked-by: Cornelia Huck

[GIT PULL 2/9] KVM: s390: remove _bh locking from local_int.lock

2014-07-21 Thread Christian Borntraeger
From: David Hildenbrand d...@linux.vnet.ibm.com local_int.lock is not used in a bottom-half handler anymore, therefore we can turn it into an ordinary spin_lock at all occurrences. Signed-off-by: David Hildenbrand d...@linux.vnet.ibm.com Reviewed-by: Christian Borntraeger borntrae...@de.ibm.com

[GIT PULL 8/9] KVM: s390: advertise KVM_CAP_S390_IRQCHIP

2014-07-21 Thread Christian Borntraeger
From: Cornelia Huck cornelia.h...@de.ibm.com We should advertise all capabilities, including those that can be enabled. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com Acked-by: Christian Borntraeger borntrae...@de.ibm.com Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com ---

[GIT PULL 3/9] KVM: s390: remove _bh locking from start_stop_lock

2014-07-21 Thread Christian Borntraeger
From: David Hildenbrand d...@linux.vnet.ibm.com The start_stop_lock is no longer acquired when in atomic context, therefore we can convert it into an ordinary spin_lock. Signed-off-by: David Hildenbrand d...@linux.vnet.ibm.com Reviewed-by: Christian Borntraeger borntrae...@de.ibm.com Acked-by:

[GIT PULL 0/9] KVM: s390: Fixes and cleanups for 3.17

2014-07-21 Thread Christian Borntraeger
+0200) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git tags/kvm-s390-20140721 for you to fetch changes up to e59d120f96687a606db0513c427f10e30a427cc4: KVM: s390: add ipte to trace event decoding (2014-07-21 13:22:47 +0200

[GIT PULL 4/9] KVM: s390: move vcpu wakeup code to a central point

2014-07-21 Thread Christian Borntraeger
From: David Hildenbrand d...@linux.vnet.ibm.com Let's move the vcpu wakeup code to a central point. We should set the vcpu-preempted flag only if the target is actually sleeping and before the real wakeup happens. Otherwise the preempted flag might be set, when not necessary. This may result in

Re: [patch 2/4] KVM: MMU: allow pinning spte translations (TDP-only)

2014-07-21 Thread Xiao Guangrong
Hi Marcelo, On Jul 10, 2014, at 3:12 AM, mtosa...@redhat.com wrote: struct kvm_vcpu_arch { /* * rip and regs accesses must go through @@ -392,6 +402,9 @@ struct kvm_mmu_memory_cache mmu_page_cache; struct kvm_mmu_memory_cache mmu_page_header_cache; +

Re: [patch 3/4] KVM: MMU: reload request from GET_DIRTY_LOG path

2014-07-21 Thread Xiao Guangrong
On Jul 10, 2014, at 3:12 AM, mtosa...@redhat.com wrote: Reload remote vcpus MMU from GET_DIRTY_LOG codepath, before deleting a pinned spte. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com --- arch/x86/kvm/mmu.c | 29 +++-- 1 file changed, 23 insertions(+), 6

Re: [patch 4/4] KVM: MMU: pinned sps are not candidates for deletion.

2014-07-21 Thread Xiao Guangrong
On Jul 10, 2014, at 3:12 AM, mtosa...@redhat.com wrote: Skip pinned shadow pages when selecting pages to zap. It seems there is no way to prevent changing pinned spte on zap-all path? I am thing if we could move pinned spte to another list (eg. pinned_shadow_pages) instead of active list so

Re: [PATCH 1/2 V3] PCI: introduce device assignment interface and refactory related code

2014-07-21 Thread Alexander Duyck
On 07/11/2014 05:30 AM, Ethan Zhao wrote: This patch introduces two new device assignment functions pci_iov_assign_device(), pci_iov_deassign_device() along with the existed one pci_vfs_assigned() They construct the VFs assignment management interface, used to assign/ deassign

buildbot failure in kvm on ia64

2014-07-21 Thread kvm
The Buildbot has detected a new failure on builder ia64 while building kvm. Full details are available at: http://buildbot.b1-systems.de/kvm/builders/ia64/builds/1315 Buildbot URL: http://buildbot.b1-systems.de/kvm/ Buildslave for this Build: b1_kvm_1 Build Reason: The Nightly scheduler named

Re: [patch 2/4] KVM: MMU: allow pinning spte translations (TDP-only)

2014-07-21 Thread Xiao Guangrong
On 07/22/2014 05:46 AM, Xiao Guangrong wrote: +if (is_pinned_spte(*sptep)) { +/* don't nuke pinned sptes if page aging: return + * young=yes instead. + */ +if (age) +

Re: [PATCH v1 2/3] powerpc/powernv: Support PCI error injection

2014-07-21 Thread Mike Qiu
On 06/25/2014 11:19 AM, Benjamin Herrenschmidt wrote: On Wed, 2014-06-25 at 11:05 +0800, Mike Qiu wrote: Here maybe /sys/kernel/debug/powerpc/errinjct is better, because it will supply PCI_domain_nr in parameters, so no need supply errinjct for each PCI domain. Another reason is error inject

RE: [PATCH v5 4/5] KVM: PPC: Alow kvmppc_get_last_inst() to fail

2014-07-21 Thread mihai.cara...@freescale.com
-Original Message- From: Linuxppc-dev [mailto:linuxppc-dev- bounces+mihai.caraman=freescale@lists.ozlabs.org] On Behalf Of mihai.cara...@freescale.com Sent: Friday, July 18, 2014 12:06 PM To: Alexander Graf; kvm-ppc@vger.kernel.org Cc: linuxppc-...@lists.ozlabs.org;

RE: [PATCH 1/6 v2] KVM: PPC: Book3E: Use common defines for SPE/FP/AltiVec int numbers

2014-07-21 Thread mihai.cara...@freescale.com
-Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Thursday, July 03, 2014 3:21 PM To: Caraman Mihai Claudiu-B02008; kvm-ppc@vger.kernel.org Cc: k...@vger.kernel.org; linuxppc-...@lists.ozlabs.org Subject: Re: [PATCH 1/6 v2] KVM: PPC: Book3E: Use common defines for

Re: [PATCH v1 2/3] powerpc/powernv: Support PCI error injection

2014-07-21 Thread Benjamin Herrenschmidt
On Mon, 2014-07-21 at 16:06 +0800, Mike Qiu wrote: I don't like this. I much prefer have dedicated error injection files in their respective locations, something for PCI under the corresponding PCI bridge etc... So PowerNV error injection will be designed rely on debugfs been

Re: [PATCH v1 2/3] powerpc/powernv: Support PCI error injection

2014-07-21 Thread Mike Qiu
On 07/22/2014 06:49 AM, Benjamin Herrenschmidt wrote: On Mon, 2014-07-21 at 16:06 +0800, Mike Qiu wrote: I don't like this. I much prefer have dedicated error injection files in their respective locations, something for PCI under the corresponding PCI bridge etc... So PowerNV error injection

Re: [PATCH v1 2/3] powerpc/powernv: Support PCI error injection

2014-07-21 Thread Benjamin Herrenschmidt
On Tue, 2014-07-22 at 11:10 +0800, Mike Qiu wrote: On 07/22/2014 06:49 AM, Benjamin Herrenschmidt wrote: On Mon, 2014-07-21 at 16:06 +0800, Mike Qiu wrote: I don't like this. I much prefer have dedicated error injection files in their respective locations, something for PCI under the

Re: [PATCH v1 2/3] powerpc/powernv: Support PCI error injection

2014-07-21 Thread Gavin Shan
On Tue, Jul 22, 2014 at 11:10:42AM +0800, Mike Qiu wrote: On 07/22/2014 06:49 AM, Benjamin Herrenschmidt wrote: On Mon, 2014-07-21 at 16:06 +0800, Mike Qiu wrote: I don't like this. I much prefer have dedicated error injection files in their respective locations, something for PCI under the

Re: [PATCH v1 2/3] powerpc/powernv: Support PCI error injection

2014-07-21 Thread Mike Qiu
On 07/22/2014 11:26 AM, Gavin Shan wrote: On Tue, Jul 22, 2014 at 11:10:42AM +0800, Mike Qiu wrote: On 07/22/2014 06:49 AM, Benjamin Herrenschmidt wrote: On Mon, 2014-07-21 at 16:06 +0800, Mike Qiu wrote: I don't like this. I much prefer have dedicated error injection files in their