Re: [PATCH] KVM: forward declare structs in kvm_types.h

2014-08-29 Thread Christian Borntraeger
On 29/08/14 14:01, Paolo Bonzini wrote: Opaque KVM structs are useful for prototypes in asm/kvm_host.h, to avoid 'struct foo' declared inside parameter list warnings (and consequent breakage due to conflicting types). Move them from individual files to a generic place in linux/kvm_types.h.

Re: [Qemu-devel] [question] virtio-blk performance degradationhappened with virito-serial

2014-09-01 Thread Christian Borntraeger
On 01/09/14 14:52, Zhang Haoyu wrote: Hi, all I start a VM with virtio-serial (default ports number: 31), and found that virtio-blk performance degradation happened, about 25%, this problem can be reproduced 100%. without virtio-serial: 4k-read-random 1186 IOPS with virtio-serial:

Re: [Qemu-devel] [question] virtio-blk performance degradationhappened with virito-serial

2014-09-01 Thread Christian Borntraeger
On 01/09/14 15:12, Paolo Bonzini wrote: Il 01/09/2014 15:09, Christian Borntraeger ha scritto: This is just wild guessing: If virtio-blk and virtio-serial share an IRQ, the guest operating system has to check each virtqueue for activity. Maybe there is some inefficiency doing that. AFAIK

Re: [Qemu-devel] [question] virtio-blk performance degradationhappened with virito-serial

2014-09-01 Thread Christian Borntraeger
On 01/09/14 15:29, Paolo Bonzini wrote: Il 01/09/2014 15:22, Christian Borntraeger ha scritto: If virtio-blk and virtio-serial share an IRQ, the guest operating system has to check each virtqueue for activity. Maybe there is some inefficiency doing that. AFAIK virtio-serial registers 64

Re: [Qemu-devel] [question] virtio-blk performance degradationhappened with virito-serial

2014-09-01 Thread Christian Borntraeger
On 01/09/14 16:03, Christian Borntraeger wrote: On 01/09/14 15:29, Paolo Bonzini wrote: Il 01/09/2014 15:22, Christian Borntraeger ha scritto: If virtio-blk and virtio-serial share an IRQ, the guest operating system has to check each virtqueue for activity. Maybe there is some inefficiency

[GIT PULL 0/2] KVM: s390/mm: Two fixes for master (3.17)

2014-09-02 Thread Christian Borntraeger
transitions that we need to handle to transfer the storage key from/to pgste. Christian Borntraeger (2): KVM: s390/mm: Fix storage key corruption during swapping KVM: s390/mm: Fix guest storage key corruption

[GIT PULL 2/2] KVM: s390/mm: Fix guest storage key corruption in ptep_set_access_flags

2014-09-02 Thread Christian Borntraeger
in it might be read-only and due to a parallel scan old. An do_wp_page will make it writeable and young. Due to software reference tracking this page was invalid and now becomes valid. Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com Acked-by: Martin Schwidefsky schwidef...@de.ibm.com Cc

[GIT PULL 1/2] KVM: s390/mm: Fix storage key corruption during swapping

2014-09-02 Thread Christian Borntraeger
in that case. Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com Acked-by: Martin Schwidefsky schwidef...@de.ibm.com Cc: sta...@vger.kernel.org # v3.12+ --- arch/s390/include/asm/pgtable.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/s390/include/asm

[PATCH 2/3] KVM: remove redundant assigment of return value in kvm_dev_ioctl

2014-09-04 Thread Christian Borntraeger
The first statement of kvm_dev_ioctl is long r = -EINVAL; No need to reassign the same value. Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com --- virt/kvm/kvm_main.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 0a824a0

[PATCH 1/3] KVM: remove redundant check of in_spin_loop

2014-09-04 Thread Christian Borntraeger
The expression `vcpu-spin_loop.in_spin_loop' is always true, because it is evaluated only when the condition `!vcpu-spin_loop.in_spin_loop' is false. Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com --- virt/kvm/kvm_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff

[PATCH 0/3] cleanup of redundant statements

2014-09-04 Thread Christian Borntraeger
or apply the patches. Christian Borntraeger (3): KVM: remove redundant check of in_spin_loop KVM: remove redundant assigment of return value in kvm_dev_ioctl KVM: remove redundant assignments in __kvm_set_memory_region virt/kvm/kvm_main.c | 8 +--- 1 file changed, 1 insertion(+), 7

[PATCH 3/3] KVM: remove redundant assignments in __kvm_set_memory_region

2014-09-04 Thread Christian Borntraeger
__kvm_set_memory_region sets r to EINVAL very early. Doing it again is not necessary. The same is true later on, where r is assigned -ENOMEM twice. Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com --- virt/kvm/kvm_main.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/virt/kvm

[GIT PULL 0/7] KVM: s390: Fixes and features for next (3.18)

2014-09-10 Thread Christian Borntraeger
handling of the diag10 ballooning interface. If the guest freed the pages at absolute 0 some checks and frees were incorrect 4. Limit guests to 16TB 5. Add __must_check to interrupt injection code Christian Borntraeger (6): KVM

[GIT PULL 3/7] KVM: s390: Limit guest size to 16TB

2014-09-10 Thread Christian Borntraeger
that is totally untested as I do not have enough swap space/memory. We continue to allow ucontrol the full size. Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com Acked-by: Cornelia Huck cornelia.h...@de.ibm.com Cc: Martin Schwidefsky schwidef...@de.ibm.com --- arch/s390/kvm/kvm-s390.c | 2 +- 1

[GIT PULL 4/7] KVM: s390: unintended fallthrough for external call

2014-09-10 Thread Christian Borntraeger
We must not fallthrough if the conditions for external call are not met. Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com Reviewed-by: Thomas Huth th...@linux.vnet.ibm.com Cc: sta...@vger.kernel.org --- arch/s390/kvm/interrupt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch

[GIT PULL 5/7] KVM: s390: get rid of constant condition in ipte_unlock_simple

2014-09-10 Thread Christian Borntraeger
Due to the earlier check we know that ipte_lock_count must be 0. No need to add a useless if. Let's make clear that we are going to always wakeup when we execute that code. Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com Acked-by: Heiko Carstens heiko.carst...@de.ibm.com --- arch

[GIT PULL 6/7] KVM: s390/cmm: Fix prefix handling for diag 10 balloon

2014-09-10 Thread Christian Borntraeger
Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com Reviewed-by: Thomas Huth th...@linux.vnet.ibm.com --- arch/s390/kvm/diag.c | 26 ++ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/arch/s390/kvm/diag.c b/arch/s390/kvm/diag.c index b374b6c..9254aff

[GIT PULL 2/7] KVM: s390: add __must_check to interrupt deliver functions

2014-09-10 Thread Christian Borntraeger
We now propagate interrupt injection errors back to the ioctl. We should mark functions that might fail with __must_check. Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com Acked-by: Jens Freimann jf...@linux.vnet.ibm.com --- arch/s390/kvm/interrupt.c | 12 ++-- arch/s390/kvm

[GIT PULL 7/7] KVM: s390/interrupt: remove double assignment

2014-09-10 Thread Christian Borntraeger
r is already initialized to 0. Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com Reviewed-by: Thomas Huth th...@linux.vnet.ibm.com --- arch/s390/kvm/interrupt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c index 4abf819

blk-mq crash under KVM in multiqueue block code (with virtio-blk and ext4)

2014-09-11 Thread Christian Borntraeger
Folks, we have seen the following bug with 3.16 as a KVM guest. It suspect the blk-mq rework that happened between 3.15 and 3.16, but it can be something completely different. [ 65.992022] Unable to handle kernel pointer dereference in virtual kernel address space [ 65.992187] failing

Re: blk-mq crash under KVM in multiqueue block code (with virtio-blk and ext4)

2014-09-12 Thread Christian Borntraeger
On 09/11/2014 12:26 PM, Christian Borntraeger wrote: Folks, we have seen the following bug with 3.16 as a KVM guest. It suspect the blk-mq rework that happened between 3.15 and 3.16, but it can be something completely different. [ 65.992022] Unable to handle kernel pointer

Re: blk-mq crash under KVM in multiqueue block code (with virtio-blk and ext4)

2014-09-12 Thread Christian Borntraeger
On 09/12/2014 01:54 PM, Ming Lei wrote: On Thu, Sep 11, 2014 at 6:26 PM, Christian Borntraeger borntrae...@de.ibm.com wrote: Folks, we have seen the following bug with 3.16 as a KVM guest. It suspect the blk-mq rework that happened between 3.15 and 3.16, but it can be something completely

Re: blk-mq crash under KVM in multiqueue block code (with virtio-blk and ext4)

2014-09-17 Thread Christian Borntraeger
On 09/12/2014 10:09 PM, Christian Borntraeger wrote: On 09/12/2014 01:54 PM, Ming Lei wrote: On Thu, Sep 11, 2014 at 6:26 PM, Christian Borntraeger borntrae...@de.ibm.com wrote: Folks, we have seen the following bug with 3.16 as a KVM guest. It suspect the blk-mq rework that happened

Re: [PATCH] blk-mq: Avoid race condition with uninitialized requests

2014-09-19 Thread Christian Borntraeger
On 09/18/2014 11:04 AM, David Hildenbrand wrote: This patch should fix the bug reported in https://lkml.org/lkml/2014/9/11/249. We have to initialize at least the atomic_flags and the cmd_flags when allocating storage for the requests. Otherwise blk_mq_timeout_check() might dereference

Re: [[RFC] KVM-S390: Provide guest TOD Clock Get/Set Controls

2014-09-19 Thread Christian Borntraeger
On 09/19/2014 04:19 PM, Jason J. Herne wrote: From: Jason J. Herne jjhe...@us.ibm.com Enable KVM_SET_CLOCK and KVM_GET_CLOCK Ioctls on S390 for managing guest TOD clock value. Just some education. On s390 the guest visible TOD clock is thehost TOD clock + hypervisor programmable offset in

Re: [[RFC] KVM-S390: Provide guest TOD Clock Get/Set Controls

2014-09-22 Thread Christian Borntraeger
On 09/19/2014 10:38 PM, Alexander Graf wrote: On 19.09.14 20:51, Christian Borntraeger wrote: On 09/19/2014 04:19 PM, Jason J. Herne wrote: From: Jason J. Herne jjhe...@us.ibm.com Enable KVM_SET_CLOCK and KVM_GET_CLOCK Ioctls on S390 for managing guest TOD clock value. Just some

Re: [PATCH] kvm: don't take vcpu mutex for obviously invalid vcpu ioctls

2014-09-22 Thread Christian Borntraeger
On 09/22/2014 12:50 PM, Paolo Bonzini wrote: Il 20/09/2014 01:03, David Matlack ha scritto: vcpu ioctls can hang the calling thread if issued while a vcpu is running. If we know ioctl is going to be rejected as invalid anyway, we can fail before trying to take the vcpu mutex. This patch does

Re: [PATCH] blk-mq: Avoid race condition with uninitialized requests

2014-09-22 Thread Christian Borntraeger
in blk_mq_timeout_check(). Cc: sta...@vger.kernel.org Signed-off-by: David Hildenbrand d...@linux.vnet.ibm.com Acked-by: Christian Borntraeger borntrae...@de.ibm.com Can you please add Reported-by: Paulo De Rezende Pinatti ppina...@linux.vnet.ibm.com Tested-by: Paulo De Rezende Pinatti ppina

Re: [PATCH] kvm: don't take vcpu mutex for obviously invalid vcpu ioctls

2014-09-22 Thread Christian Borntraeger
On 09/22/2014 04:31 PM, Paolo Bonzini wrote: Il 22/09/2014 15:45, Christian Borntraeger ha scritto: We now have an extra condition check for every valid ioctl, to make an error case go faster. I know, the extra check is just a 1 or 2 cycles if branch prediction is right, but still. I

Re: [PATCH] kvm: don't take vcpu mutex for obviously invalid vcpu ioctls

2014-09-23 Thread Christian Borntraeger
On 09/23/2014 08:49 AM, Gleb Natapov wrote: On Mon, Sep 22, 2014 at 09:29:19PM +0200, Paolo Bonzini wrote: Il 22/09/2014 21:20, Christian Borntraeger ha scritto: while using trinity to fuzz KVM, we noticed long stalls on invalid ioctls. Lets bail out early on invalid ioctls. or similar

[GIT PULL 0/2] KVM: s390: Small enhancements for 3.18 (next)

2014-10-01 Thread Christian Borntraeger
) KVM: s390: Small enhancements for 3.18 (next) Provide TOD CLOCK steering to the guest and add cpu wakeup counter. Christian Borntraeger (1): KVM: s390/facilities: allow TOD-CLOCK

[GIT PULL 2/2] KVM: s390: count vcpu wakeups in stat.halt_wakeup

2014-10-01 Thread Christian Borntraeger
-off-by: Christian Borntraeger borntrae...@de.ibm.com --- arch/s390/include/asm/kvm_host.h | 1 + arch/s390/kvm/interrupt.c| 1 + arch/s390/kvm/kvm-s390.c | 1 + 3 files changed, 3 insertions(+) diff --git a/arch/s390/include/asm/kvm_host.h b/arch/s390/include/asm/kvm_host.h index

[GIT PULL 1/2] KVM: s390/facilities: allow TOD-CLOCK steering facility bit

2014-10-01 Thread Christian Borntraeger
There is nothing to do for KVM to support TOD-CLOCK steering. Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com Reviewed-by: David Hildenbrand d...@linux.vnet.ibm.com --- arch/s390/kvm/kvm-s390.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/s390/kvm/kvm-s390

Re: [GIT PULL 1/2] KVM: s390/facilities: allow TOD-CLOCK steering facility bit

2014-10-01 Thread Christian Borntraeger
On 10/01/2014 04:17 PM, Alexander Graf wrote: On 01.10.14 16:02, Christian Borntraeger wrote: There is nothing to do for KVM to support TOD-CLOCK steering. Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com Reviewed-by: David Hildenbrand d...@linux.vnet.ibm.com --- arch/s390

Re: [GIT PULL 1/2] KVM: s390/facilities: allow TOD-CLOCK steering facility bit

2014-10-02 Thread Christian Borntraeger
Am 02.10.2014 10:22, schrieb Heiko Carstens: On Wed, Oct 01, 2014 at 08:27:38PM +0200, Christian Borntraeger wrote: On 10/01/2014 04:17 PM, Alexander Graf wrote: On 01.10.14 16:02, Christian Borntraeger wrote: There is nothing to do for KVM to support TOD-CLOCK steering. Signed-off

Re: [[RFC] KVM-S390: Provide guest TOD Clock Get/Set Controls

2014-10-09 Thread Christian Borntraeger
Am 08.10.2014 16:55, schrieb Alexander Graf: On 08.10.14 16:09, Jason Herne wrote: Christian Borntraeger borntrae...@de.ibm.com wrote on 09/22/2014 05:08:34 AM: ... Actually, I would expect something different (more or less something like standby/resume). In fact Jasons code that we

Re: A question about HTL VM-Exit handling time

2014-10-28 Thread Christian Borntraeger
Am 21.10.2014 20:39, schrieb Paolo Bonzini: On 10/16/2014 10:15 AM, Wu, Feng wrote: Hi folks, I run kernel build in the guest and use perf kvm to get some VM-Exit result as the following: Analyze events for all VCPUs: VM-EXITSamples Samples% Time% Min Time

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

2014-10-28 Thread Christian Borntraeger
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: git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git

[GIT PULL 2/9] KVM: s390: Cleanup usage of current-mm in set_guest_storage_key

2014-10-28 Thread Christian Borntraeger
-by: Christian Borntraeger borntrae...@de.ibm.com --- arch/s390/mm/pgtable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c index 1b79ca6..cfecc24 100644 --- a/arch/s390/mm/pgtable.c +++ b/arch/s390/mm/pgtable.c @@ -936,7 +936,7 @@ int

[GIT PULL 8/9] KVM: s390: sigp: inject emergency calls in a separate function

2014-10-28 Thread Christian Borntraeger
...@linux.vnet.ibm.com Acked-by: Cornelia Huck cornelia.h...@de.ibm.com Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com --- arch/s390/kvm/sigp.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/arch/s390/kvm/sigp.c b/arch/s390/kvm/sigp.c index 9ee63e4..1b330d4

[GIT PULL 7/9] KVM: s390: sigp: instruction counters for all sigp orders

2014-10-28 Thread Christian Borntraeger
...@de.ibm.com Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com --- arch/s390/include/asm/kvm_host.h | 7 +++ arch/s390/kvm/kvm-s390.c | 7 +++ arch/s390/kvm/sigp.c | 8 +++- 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/arch/s390/include/asm

[GIT PULL 1/9] KVM: s390: Make the simple ipte mutex specific to a VM instead of global

2014-10-28 Thread Christian Borntraeger
Huth th...@linux.vnet.ibm.com Acked-by: Heiko Carstens heiko.carst...@de.ibm.com Reviewed-by: Christian Borntraeger borntrae...@de.ibm.com Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com --- arch/s390/include/asm/kvm_host.h | 2 ++ arch/s390/kvm/gaccess.c | 20

[GIT PULL 9/9] KVM: s390: sigp: split handling of SIGP STOP (AND STORE STATUS)

2014-10-28 Thread Christian Borntraeger
. Signed-off-by: David Hildenbrand d...@linux.vnet.ibm.com Acked-by: Cornelia Huck cornelia.h...@de.ibm.com Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com --- arch/s390/kvm/sigp.c | 25 ++--- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/arch/s390/kvm

[GIT PULL 4/9] KVM: s390: sigp: dispatch orders with one target in a separate function

2014-10-28 Thread Christian Borntraeger
...@linux.vnet.ibm.com Reviewed-by: Cornelia Huck cornelia.h...@de.ibm.com Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com --- arch/s390/kvm/sigp.c | 74 ++-- 1 file changed, 43 insertions(+), 31 deletions(-) diff --git a/arch/s390/kvm/sigp.c b/arch/s390/kvm

[GIT PULL 3/9] KVM: s390: Fix size of monitor-class number field

2014-10-28 Thread Christian Borntraeger
-by: Christian Borntraeger borntrae...@de.ibm.com --- arch/s390/kvm/interrupt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c index a398384..4fc3fed 100644 --- a/arch/s390/kvm/interrupt.c +++ b/arch/s390/kvm/interrupt.c @@ -270,7

[GIT PULL 6/9] KVM: s390: sigp: separate preparation handlers

2014-10-28 Thread Christian Borntraeger
- unknown sigp orders All sigp orders that require user space intervention are logged. Signed-off-by: David Hildenbrand d...@linux.vnet.ibm.com Reviewed-by: Cornelia Huck cornelia.h...@de.ibm.com Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com --- arch/s390/include/asm/sigp.h | 1 + arch

[GIT PULL 5/9] KVM: s390: sigp: move target cpu checks into dispatcher

2014-10-28 Thread Christian Borntraeger
...@de.ibm.com Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com --- arch/s390/kvm/sigp.c | 139 ++- 1 file changed, 48 insertions(+), 91 deletions(-) diff --git a/arch/s390/kvm/sigp.c b/arch/s390/kvm/sigp.c index 5e259bd..660a945 100644

Re: [PATCH v12 0/6] arm/KVM: dirty page logging support for ARMv7 (3.17.0-rc1)

2014-10-30 Thread Christian Borntraeger
Am 23.10.2014 00:34, schrieb Mario Smarduch: This patch series introduces dirty page logging for ARMv7 and adds some degree of generic dirty logging support for x86, armv7 and later armv8. I implemented Alex's suggestion after he took a look at the patches at kvm forum to simplify the

Re: [PATCH 1/1] kvm-s390: Provide guest TOD Clock Get/Set Controls

2014-11-05 Thread Christian Borntraeger
Am 05.11.2014 11:07, schrieb Alexander Graf: On 27.10.14 16:44, Jason J. Herne wrote: From: Jason J. Herne jjhe...@linux.vnet.ibm.com Enable KVM_SET_CLOCK and KVM_GET_CLOCK ioctls on s390 for managing guest Time Of Day clock value. Signed-off-by: Jason J. Herne

Re: [PATCH 1/1] kvm-s390: Provide guest TOD Clock Get/Set Controls

2014-11-05 Thread Christian Borntraeger
Am 05.11.2014 14:11, schrieb Paolo Bonzini: On 05/11/2014 13:28, Christian Borntraeger wrote: Am 05.11.2014 11:07, schrieb Alexander Graf: On 27.10.14 16:44, Jason J. Herne wrote: From: Jason J. Herne jjhe...@linux.vnet.ibm.com Enable KVM_SET_CLOCK and KVM_GET_CLOCK ioctls on s390

Re: [PATCH 1/1] kvm-s390: Provide guest TOD Clock Get/Set Controls

2014-11-05 Thread Christian Borntraeger
Am 05.11.2014 18:37, schrieb Alexander Graf: On 05.11.14 17:48, Christian Borntraeger wrote: Am 05.11.2014 14:11, schrieb Paolo Bonzini: On 05/11/2014 13:28, Christian Borntraeger wrote: Am 05.11.2014 11:07, schrieb Alexander Graf: On 27.10.14 16:44, Jason J. Herne wrote: From: Jason

Re: [PATCH 1/1] kvm-s390: Provide guest TOD Clock Get/Set Controls

2014-11-06 Thread Christian Borntraeger
Am 05.11.2014 20:45, schrieb Paolo Bonzini: On 05/11/2014 18:56, Christian Borntraeger wrote: Whether you want to follow that approach or do it as VM attribute straight away, I don't mind much :). given that top programmable field and epoch are available as ONEREG, lets do the same

Re: [PATCH 1/1] kvm-s390: Provide guest TOD Clock Get/Set Controls

2014-11-06 Thread Christian Borntraeger
Am 06.11.2014 09:43, schrieb Christian Borntraeger: Am 05.11.2014 20:45, schrieb Paolo Bonzini: On 05/11/2014 18:56, Christian Borntraeger wrote: Whether you want to follow that approach or do it as VM attribute straight away, I don't mind much :). given that top programmable field

[GIT PULL 0/4] KVM: s390: Fixes for kvm/next (3.19) and stable

2014-11-07 Thread Christian Borntraeger
. We should flush TLBs for load control instruction emulation (stable) 2. A workaround for a compiler bug that renders ACCESS_ONCE broken (stable) 3. Fix program check handling for load control 4. Documentation Fix Christian

[GIT PULL 2/4] KVM: s390: flush CPU on load control

2014-11-07 Thread Christian Borntraeger
intercept should not happen that often. Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com Acked-by: Cornelia Huck cornelia.h...@de.ibm.com Reviewed-by: David Hildenbrand d...@linux.vnet.ibm.com Cc: sta...@vger.kernel.org --- arch/s390/kvm/priv.c | 4 ++-- 1 file changed, 2 insertions

[GIT PULL 1/4] KVM: s390: Fix ipte locking

2014-11-07 Thread Christian Borntraeger
the ACCESS_ONCE scheme with a barrier() based scheme that should work for all supported compilers. Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com Cc: sta...@vger.kernel.org # v3.16+ --- arch/s390/kvm/gaccess.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git

[GIT PULL 4/4] KVM: fix vm device attribute documentation

2014-11-07 Thread Christian Borntraeger
From: Dominik Dingel din...@linux.vnet.ibm.com Documentation uses incorrect attribute names for some vm device attributes: fix this. Signed-off-by: Dominik Dingel din...@linux.vnet.ibm.com Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com --- Documentation/virtual/kvm/devices/vm.txt

[GIT PULL 3/4] KVM: s390: fix handling of lctl[g]/stctl[g]

2014-11-07 Thread Christian Borntraeger
-by: Christian Borntraeger borntrae...@de.ibm.com --- arch/s390/kvm/priv.c | 68 +--- 1 file changed, 32 insertions(+), 36 deletions(-) diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c index 9c565b6..9bde32f 100644 --- a/arch/s390/kvm/priv.c +++ b/arch

Re: [PATCH v2] kvm-s390: Provide guest TOD Clock Get/Set Controls

2014-11-07 Thread Christian Borntraeger
Am 07.11.2014 um 16:06 schrieb Paolo Bonzini: On 07/11/2014 15:55, Jason J. Herne wrote: From: Jason J. Herne jjhe...@linux.vnet.ibm.com Provide KVM_REG_S390_TOD and KVM_REG_S390_TOD_HIGH registers on s390 for managing guest Time Of Day clock value. KVM_REG_S390_TOD_HIGH is presently

compiler bug gcc4.6/4.7 with ACCESS_ONCE and workarounds

2014-11-10 Thread Christian Borntraeger
to be ok for the kernel. Christian Forwarded Message Subject: [GIT PULL 1/4] KVM: s390: Fix ipte locking Date: Fri, 7 Nov 2014 12:45:13 +0100 From: Christian Borntraeger borntrae...@de.ibm.com To: Paolo Bonzini pbonz...@redhat.com CC: KVM kvm@vger.kernel.org, Gleb Natapov g

Re: compiler bug gcc4.6/4.7 with ACCESS_ONCE and workarounds

2014-11-11 Thread Christian Borntraeger
Am 10.11.2014 um 22:07 schrieb Linus Torvalds: On Mon, Nov 10, 2014 at 12:18 PM, Christian Borntraeger borntrae...@de.ibm.com wrote: Now: I can reproduces belows miscompile on gcc46 and gcc 47 gcc 45 seems ok, gcc 48 is fixed. This makes blacklisting a bit hard, especially since

Re: compiler bug gcc4.6/4.7 with ACCESS_ONCE and workarounds

2014-11-12 Thread Christian Borntraeger
Am 12.11.2014 um 01:36 schrieb Linus Torvalds: On Tue, Nov 11, 2014 at 4:33 PM, Linus Torvalds torva...@linux-foundation.org wrote: I guess as a workaround it is fine, as long as we don't lose sight of trying to eventually do a better job. Oh, and when it comes to the actual gcc bug - do

Re: compiler bug gcc4.6/4.7 with ACCESS_ONCE and workarounds

2014-11-20 Thread Christian Borntraeger
Am 10.11.2014 um 22:07 schrieb Linus Torvalds: [...] So before blacklisting any compilers, let's first see if (a) we can actually make it a real rule that we only use ACCESS_ONCE on scalars (b) we can somehow enforce this with a compiler warning/error for mis-uses For example, the

Re: [PATCH RFC 1/2] KVM: don't check for PF_VCPU when yielding

2014-11-25 Thread Christian Borntraeger
Am 25.11.2014 um 17:04 schrieb David Hildenbrand: As some architectures (e.g. s390) can't disable preemption while entering/leaving the guest, they won't receive the yield in all situations. kvm_enter_guest() has to be called with preemption_disabled and will set PF_VCPU. After that point

Re: [PATCH RFC 2/2] KVM: thread creating a vcpu is the owner of that vcpu

2014-11-25 Thread Christian Borntraeger
synchronize_rc and the qemu fixes for s390 to bring all vCPU ioctls in the right thread). - It makes vcpu_load cheaper - It emphasizes what in api.txt: Only run vcpu ioctls from the same thread that was used to create the vcpu. Acked-by: Christian Borntraeger borntrae...@de.ibm.com

Re: [PATCH RFC 1/2] KVM: don't check for PF_VCPU when yielding

2014-11-26 Thread Christian Borntraeger
Am 26.11.2014 um 10:23 schrieb David Hildenbrand: This change is a trade-off. PRO: This patch would improve the case of preemption on s390. This is probably a corner case as most distros have preemption off anyway. CON: The downside is that kvm_vcpu_yield_to is called also from

Re: [PATCH RFC 1/2] KVM: don't check for PF_VCPU when yielding

2014-11-28 Thread Christian Borntraeger
+---+---+---++---+ 1x 6386.4737 1.04876703.9113 1.2298 4.97047 2x 2571.4712 1.37332571.8175 1.6919 0.01347 +---+---+---++---+ Raghu On Wed, Nov 26, 2014 at 3:01 PM, Christian Borntraeger borntrae

[GIT PULL 05/11] KVM: s390: refactor interrupt injection code

2014-11-28 Thread Christian Borntraeger
-by: Christian Borntraeger borntrae...@de.ibm.com --- arch/s390/kvm/interrupt.c | 221 +++--- 1 file changed, 167 insertions(+), 54 deletions(-) diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c index ead52bf..8f50f8c 100644 --- a/arch/s390/kvm

[GIT PULL 01/11] KVM: s390: Small fixes for the PFMF handler

2014-11-28 Thread Christian Borntraeger
priority than the specification exceptions, so the check for low-address protection has to be moved after the last spot where we inject a specification exception. Signed-off-by: Thomas Huth th...@linux.vnet.ibm.com Reviewed-by: Cornelia Huck cornelia.h...@de.ibm.com Signed-off-by: Christian

[GIT PULL 07/11] KVM: s390: add defines for virtio and pfault interrupt code

2014-11-28 Thread Christian Borntraeger
From: Jens Freimann jf...@linux.vnet.ibm.com Get rid of open coded value for virtio and pfault completion interrupts. Signed-off-by: Jens Freimann jf...@linux.vnet.ibm.com Reviewed-by: David Hildenbrand d...@linux.vnet.ibm.com Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com --- arch

[GIT PULL 11/11] KVM: s390: allow injecting all kinds of machine checks

2014-11-28 Thread Christian Borntraeger
Freimann jf...@linux.vnet.ibm.com Reviewed-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 --- arch/s390/kvm/interrupt.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions

[GIT PULL 10/11] KVM: s390: handle pending local interrupts via bitmap

2014-11-28 Thread Christian Borntraeger
...@linux.vnet.ibm.com Reviewed-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 --- arch/s390/include/asm/kvm_host.h | 2 - arch/s390/kvm/intercept.c| 4 +- arch/s390/kvm/interrupt.c| 601

[GIT PULL 08/11] KVM: s390: refactor interrupt delivery code

2014-11-28 Thread Christian Borntraeger
Reviewed-by: Cornelia Huck cornelia.h...@de.ibm.com Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com --- arch/s390/kvm/interrupt.c | 459 -- 1 file changed, 282 insertions(+), 177 deletions(-) diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm

[GIT PULL 02/11] KVM: s390: Fix rewinding of the PSW pointing to an EXECUTE instruction

2014-11-28 Thread Christian Borntraeger
kvm_s390_rewind_psw(). Signed-off-by: Thomas Huth th...@linux.vnet.ibm.com Reviewed-by: David Hildenbrand d...@linux.vnet.ibm.com Reviewed-by: Cornelia Huck cornelia.h...@de.ibm.com Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com --- arch/s390/include/asm/kvm_host.h | 2 +- arch/s390/kvm

[GIT PULL 00/11] KVM: s390: Several changes for 3.19 (kvm/next)

2014-11-28 Thread Christian Borntraeger
. Christian Borntraeger (1): KVM: s390: trigger the right CPU exit for floating interrupts David Hildenbrand (1): KVM: s390: external param not valid for cpu timer and ckc Jason J. Herne (1): KVM: S390: Create helper function get_guest_storage_key Jens

[GIT PULL 03/11] KVM: s390: trigger the right CPU exit for floating interrupts

2014-11-28 Thread Christian Borntraeger
true for machine checks. Since there is no special exit, just reuse the generic stop exit. The injection code inside the VCPU loop will recheck anyway and rearm the proper exits (e.g. control registers) if necessary. Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com Reviewed-by: Thomas Huth

[GIT PULL 04/11] KVM: S390: Create helper function get_guest_storage_key

2014-11-28 Thread Christian Borntraeger
storage keys. Signed-off-by: Jason J. Herne jjhe...@linux.vnet.ibm.com Reviewed-by: David Hildenbrand d...@linux.vnet.ibm.com Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com --- arch/s390/include/asm/pgalloc.h | 1 + arch/s390/mm/pgtable.c | 39

[GIT PULL 09/11] KVM: s390: add bitmap for handling cpu-local interrupts

2014-11-28 Thread Christian Borntraeger
-by: Thomas Huth th...@linux.vnet.ibm.com Reviewed-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 --- arch/s390/include/asm/kvm_host.h | 86 1 file changed

[GIT PULL 06/11] KVM: s390: external param not valid for cpu timer and ckc

2014-11-28 Thread Christian Borntraeger
From: David Hildenbrand d...@linux.vnet.ibm.com The 32bit external interrupt parameter is only valid for timing-alert and service-signal interrupts. Signed-off-by: David Hildenbrand d...@linux.vnet.ibm.com Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com --- arch/s390/kvm/interrupt.c

Re: [GIT PULL 09/11] KVM: s390: add bitmap for handling cpu-local interrupts

2014-11-29 Thread Christian Borntraeger
Am 28.11.2014 um 18:18 schrieb Paolo Bonzini: On 28/11/2014 14:25, Christian Borntraeger wrote: +struct kvm_s390_irq_payload { +struct kvm_s390_io_info io; +struct kvm_s390_ext_info ext; +struct kvm_s390_pgm_info pgm; +struct kvm_s390_emerg_info emerg; +struct

Re: [GIT PULL 05/11] KVM: s390: refactor interrupt injection code

2014-12-01 Thread Christian Borntraeger
Am 28.11.2014 um 18:16 schrieb Paolo Bonzini: On 28/11/2014 14:25, Christian Borntraeger wrote: +static int __inject_prog_irq(struct kvm_vcpu *vcpu, + struct kvm_s390_interrupt_info *inti) +{ Why the __s? :) In this case because its called with a lock already

Re: [PATCH RFC 0/2] assign each vcpu an owning thread and improve yielding

2014-12-03 Thread Christian Borntraeger
Am 03.12.2014 um 13:54 schrieb Paolo Bonzini: On 03/12/2014 13:12, David Hildenbrand wrote: This series improves yielding on architectures that cannot disable preemption while entering the guest and makes the creating thread of a VCPU the owning thread and therefore the yield target when

[GIT PULL 0/3] KVM: s390: Fixups for kvm/next (3.19)

2014-12-04 Thread Christian Borntraeger
Paolo, some last minute changes for 3.19 as followup for the latest interrupt rework + a small architectural compliance fix. Christian The following changes since commit be06b6bece19be5b167d863fd6c5271e4ec8f1fa: Merge tag 'kvm-s390-next-20141128' of

[GIT PULL 1/3] KVM: s390: some ext irqs have to clear the ext cpu addr

2014-12-04 Thread Christian Borntraeger
as a parameter field. As bit 6 is set, this implementation is correct. Reviewed-by: Thomas Huth th...@linux.vnet.ibm.com Signed-off-by: David Hildenbrand d...@linux.vnet.ibm.com Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com --- arch/s390/kvm/interrupt.c | 3 +++ 1 file changed, 3

[GIT PULL 3/3] KVM: s390: clean up return code handling in irq delivery code

2014-12-04 Thread Christian Borntraeger
...@de.ibm.com Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com --- arch/s390/kvm/interrupt.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c index 86bc89a..f00f31e 100644 --- a/arch/s390

[GIT PULL 2/3] KVM: s390: use atomic bitops to access pending_irqs bitmap

2014-12-04 Thread Christian Borntraeger
lock where interrupt data needs to be protected. Signed-off-by: Jens Freimann jf...@linux.vnet.ibm.com Reviewed-by: David Hildenbrand d...@linux.vnet.ibm.com Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com --- arch/s390/kvm/interrupt.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH/RFC] s390/kernel: use stnsm instead of stosm

2014-12-16 Thread Christian Borntraeger
At least on z196 stnsm is faster than stosm. Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com --- arch/s390/include/asm/irqflags.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/s390/include/asm/irqflags.h b/arch/s390/include/asm/irqflags.h index 37b9091

Re: [PATCH/RFC] s390/kernel: use stnsm instead of stosm

2014-12-16 Thread Christian Borntraeger
Paolo, sorry, should have only go to Martin and Heiko. Nothing to worry about from your side. :-) Am 16.12.2014 um 10:30 schrieb Christian Borntraeger: At least on z196 stnsm is faster than stosm. Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com --- arch/s390/include/asm

Re: [PATCH RFC 1/1] KVM: s390: Add MEMOP ioctl for reading/writing guest memory

2015-02-04 Thread Christian Borntraeger
Am 03.02.2015 um 16:22 schrieb Paolo Bonzini: On 03/02/2015 16:16, Thomas Huth wrote: Actually, I'd prefer to keep the virtual in the defines for the type of operation below: When it comes to s390 storage keys, we likely might need some calls for reading and writing to physical memory,

[PATCH 3/7] s390/kernel: Update /proc/sysinfo file with Extended Name and UUID

2015-02-04 Thread Christian Borntraeger
-by: David Hildenbrand d...@linux.vnet.ibm.com Reviewed-by: Cornelia Huck cornelia.h...@de.ibm.com Acked-by: Heiko Carstens heiko.carst...@de.ibm.com Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com --- arch/s390/include/asm/sysinfo.h | 10 +++--- arch/s390/kernel/sysinfo.c | 29

[PATCH 1/7] KVM: s390: floating irqs: fix user triggerable endless loop

2015-02-04 Thread Christian Borntraeger
...@linux.vnet.ibm.com Reviewed-by: Cornelia Huck cornelia.h...@de.ibm.com Signed-off-by: David Hildenbrand d...@linux.vnet.ibm.com Cc: sta...@vger.kernel.org # v3.15+ Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com --- arch/s390/kvm/interrupt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch

[PATCH 0/7] KVM: s390: fixes and features for kvm/next (3.20)

2015-02-04 Thread Christian Borntraeger
of these patches some more days for external review. Is it ok to send a pull request early next week or do you want it before 3.19? There is one non-KVM s390 patch, but it has an ACK from Heiko Carstens Christian Borntraeger (1): KVM: s390: reenable LPP facility David Hildenbrand (1): KVM

[PATCH 4/7] KVM: s390/CPACF: Choose crypto control block format

2015-02-04 Thread Christian Borntraeger
accordingly. Signed-off-by: Tony Krowiak akrow...@linux.vnet.ibm.com Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com --- arch/s390/include/asm/kvm_host.h | 2 ++ arch/s390/kvm/kvm-s390.c | 49 ++-- 2 files changed, 49 insertions(+), 2 deletions

[PATCH 7/7] KVM: s390: Create ioctl for Getting/Setting guest storage keys

2015-02-04 Thread Christian Borntraeger
...@linux.vnet.ibm.com Reviewed-by: David Hildenbrand d...@linux.vnet.ibm.com Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com --- Documentation/virtual/kvm/api.txt | 58 ++ arch/s390/kvm/kvm-s390.c | 121 ++ include/uapi/linux/kvm.h

[PATCH 2/7] KVM: s390: reenable LPP facility

2015-02-04 Thread Christian Borntraeger
commit 7be81a46695d (KVM: s390/facilities: allow TOD-CLOCK steering facility bit) accidentially disabled the load program parameter facility bit during rebase for upstream submission (my fault). Re-add that bit. Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com Reviewed-by: David

[PATCH 6/7] KVM: s390: add cpu model support

2015-02-04 Thread Christian Borntraeger
Hildenbrand d...@linux.vnet.ibm.com Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com --- Documentation/virtual/kvm/devices/vm.txt | 45 +++ arch/s390/include/asm/kvm_host.h | 4 +- arch/s390/include/uapi/asm/kvm.h | 21 + arch/s390/kvm/kvm-s390.c

[PATCH 5/7] KVM: s390: use facilities and cpu_id per KVM

2015-02-04 Thread Christian Borntraeger
...@linux.vnet.ibm.com Reviewed-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 --- arch/s390/include/asm/kvm_host.h | 21 + arch/s390/kvm/gaccess.c | 4 +- arch/s390/kvm/kvm-s390.c

Re: [PATCH 3/7] s390/kernel: Update /proc/sysinfo file with Extended Name and UUID

2015-02-04 Thread Christian Borntraeger
Am 04.02.2015 um 14:03 schrieb Paolo Bonzini: On 04/02/2015 14:01, Christian Borntraeger wrote: Am 04.02.2015 um 13:57 schrieb Paolo Bonzini: On 04/02/2015 10:44, Christian Borntraeger wrote: From: Ekaterina Tumanova tuman...@linux.vnet.ibm.com Read the additional data fields (Extended

Re: [PATCH RFC 0/1] KVM: ioctl for reading/writing guest memory

2015-02-03 Thread Christian Borntraeger
Am 03.02.2015 um 13:59 schrieb Paolo Bonzini: On 03/02/2015 13:11, Thomas Huth wrote: The userspace (QEMU) then can simply call this ioctl when it wants to read or write from/to virtual guest memory. Then kernel then takes the IPTE-lock, walks the MMU table of the guest to find out the

Re: [PATCH RFC 1/1] KVM: s390: Add MEMOP ioctl for reading/writing guest memory

2015-02-04 Thread Christian Borntraeger
Am 04.02.2015 um 11:39 schrieb Paolo Bonzini: Conny: I am asking myself, if we should explicitly add a comment in the virtio-ccw spec, that all accesses are assumed to be with key 0 and thus never cause key protection. The change/reference bit is set by the underlying I/O or memory copy

<    2   3   4   5   6   7   8   9   10   11   >