From patchwork Tue Jun 2 14:26:10 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ehrhardt@linux.vnet.ibm.com X-Patchwork-Id: 27467 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n52EQJn2008249 for ; Tue, 2 Jun 2009 14:26:20 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752994AbZFBO0Q (ORCPT ); Tue, 2 Jun 2009 10:26:16 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753370AbZFBO0Q (ORCPT ); Tue, 2 Jun 2009 10:26:16 -0400 Received: from mtagate2.uk.ibm.com ([194.196.100.162]:57354 "EHLO mtagate2.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753207AbZFBO0O (ORCPT ); Tue, 2 Jun 2009 10:26:14 -0400 Received: from d06nrmr1806.portsmouth.uk.ibm.com (d06nrmr1806.portsmouth.uk.ibm.com [9.149.39.193]) by mtagate2.uk.ibm.com (8.13.1/8.13.1) with ESMTP id n52EQDRc008767 for ; Tue, 2 Jun 2009 14:26:13 GMT Received: from d06av01.portsmouth.uk.ibm.com (d06av01.portsmouth.uk.ibm.com [9.149.37.212]) by d06nrmr1806.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n52EQDS81331248 for ; Tue, 2 Jun 2009 15:26:13 +0100 Received: from d06av01.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av01.portsmouth.uk.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n52EQCjC025377 for ; Tue, 2 Jun 2009 15:26:13 +0100 Received: from localhost.localdomain (dyn-9-152-212-64.boeblingen.de.ibm.com [9.152.212.64]) by d06av01.portsmouth.uk.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id n52EQBfY025327; Tue, 2 Jun 2009 15:26:12 +0100 From: ehrhardt@linux.vnet.ibm.com To: kvm@vger.kernel.org, avi@redhat.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 Subject: [PATCH 2/3] kvm-s390: update vcpu->cpu - rebased Date: Tue, 2 Jun 2009 16:26:10 +0200 Message-Id: <1243952771-32428-3-git-send-email-ehrhardt@linux.vnet.ibm.com> X-Mailer: git-send-email 1.6.0.4 In-Reply-To: <1243952771-32428-1-git-send-email-ehrhardt@linux.vnet.ibm.com> References: <1243952771-32428-1-git-send-email-ehrhardt@linux.vnet.ibm.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org From: Christian Ehrhardt As requested this is a rebased patch on top of the already applied v3 of the patch series. kvm on s390 formerly ignored vcpu->cpu. This patch adds set/unset vcpu->cpu in kvm_arch_vcpu_load/put to allow further architecture unification e.g. let generic code not find -1 on currently scheduled vcpus. Signed-off-by: Christian Ehrhardt --- [diffstat] kvm-s390.c | 2 ++ 1 file changed, 2 insertions(+) [diff] -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: kvm/arch/s390/kvm/kvm-s390.c =================================================================== --- kvm.orig/arch/s390/kvm/kvm-s390.c +++ kvm/arch/s390/kvm/kvm-s390.c @@ -244,6 +244,7 @@ void kvm_arch_vcpu_uninit(struct kvm_vcp void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu) { + vcpu->cpu = cpu; save_fp_regs(&vcpu->arch.host_fpregs); save_access_regs(vcpu->arch.host_acrs); vcpu->arch.guest_fpregs.fpc &= FPC_VALID_MASK; @@ -253,6 +254,7 @@ void kvm_arch_vcpu_load(struct kvm_vcpu void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu) { + vcpu->cpu = -1; save_fp_regs(&vcpu->arch.guest_fpregs); save_access_regs(vcpu->arch.guest_acrs); restore_fp_regs(&vcpu->arch.host_fpregs);