From mboxrd@z Thu Jan 1 00:00:00 1970 From: ehrhardt@linux.vnet.ibm.com Subject: [PATCH 0/4] kvm-s390: revised version of kvm-s390 guest memory handling - v6 Date: Fri, 29 May 2009 13:15:47 +0200 Message-ID: <1243595747-21755-1-git-send-email-ehrhardt@linux.vnet.ibm.com> Cc: ehrhardt@linux.vnet.ibm.com, borntraeger@de.ibm.com, cotte@de.ibm.com, heiko.carstens@de.ibm.com, schwidefsky@de.ibm.com, mtosatti@redhat.com To: kvm@vger.kernel.org, avi@redhat.com Return-path: Received: from mtagate5.de.ibm.com ([195.212.29.154]:53821 "EHLO mtagate5.de.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753991AbZE2LQ4 (ORCPT ); Fri, 29 May 2009 07:16:56 -0400 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate5.de.ibm.com (8.14.3/8.13.8) with ESMTP id n4TBFm3R391064 for ; Fri, 29 May 2009 11:15:48 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n4TBFm0B3244122 for ; Fri, 29 May 2009 13:15:48 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n4TBFlbG001870 for ; Fri, 29 May 2009 13:15:48 +0200 Sender: kvm-owner@vger.kernel.org List-ID: From: Christian Ehrhardt *updates in v6* - drop the unrelated fix to kvm_host.h from the series to clear it thematically - ensure the wait_on_bit waiter is notified - move the reset of requests to kvm_vcpu_release to drop them early Note: I beg a pardon for the change rate of these series in the last three days. I wanted it off my todo pile and repeatedly found issues over night. I think it is now in a state that might not be perfect, but its an self-contained step and an improvement to what we had before. I ensure you this time I wait for feedback or acceptance *g*. *updates in v5* - ensure dropping all vcpu requests while freeing a vcpu *updates in v4* - ensure kick allocations (might_sleep) are out of atomic context - update vcpu->cpu in kvm-s390 arch handler for load/put - remove a redundant declaration in kvm_host.h related to load/put *updates in v3* - replaced "kick to level" behaviour by "kick to low level and bail out" - updates on running vcpus can now be handled without need to rerun the vcpu - kvm_arch_set_memory_region waits until the update is consumed by the vcpu - kickout only scheduled vcpus (wait might hang forever on non-scheduled vcpus) - moved some code between patches 1 & 2 thematically Note: further unification of make_all_cpu_request and the kick mechanism is planned, but it might be good to split it from this step towards commonality. *updates in v2* added optimization to patch 3/3 to skip (addtional) kickout of vcpu's that had the request already set. This patch series results from our discussions about handling memslots and vcpu mmu reloads. It streamlines kvm-s390 a bit by using slots_lock, vcpu-request (KVM_REQ_MMU_RELOAD) and a kick mechanism to ensure vcpus come out of guest context to catch the update. I tested the reworked code a while with multiple smp guests and some extra code that periodically injects kicks and/or mmu reload requests, but I'm happy about every additional review feedback. Patches included: Subject: [PATCH 1/4] kvm-s390: infrastructure to kick vcpus out of guest state - v3 Subject: [PATCH 2/4] kvm-s390: fix interruption caused by signal - v2 Subject: [PATCH 3/4] kvm-s390: update vcpu->cpu Subject: [PATCH 4/4] kvm-s390: streamline memslot handling - v6 Overall-Diffstat: arch/s390/include/asm/kvm_host.h | 9 ++--- arch/s390/kvm/gaccess.h | 23 ++++++------ arch/s390/kvm/intercept.c | 20 +++++++---- arch/s390/kvm/kvm-s390.c | 70 ++++++++++++++++++++------------------- arch/s390/kvm/kvm-s390.h | 53 ++++++++++++++++++++++++++++- arch/s390/kvm/sigp.c | 63 ++++++++++++++++++++++++----------- virt/kvm/kvm_main.c | 4 ++ 7 files changed, 166 insertions(+), 76 deletions(-)