From patchwork Thu Jun 17 21:16:20 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Borntraeger X-Patchwork-Id: 106749 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o5HLGhsM012207 for ; Thu, 17 Jun 2010 21:16:43 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756907Ab0FQVQ1 (ORCPT ); Thu, 17 Jun 2010 17:16:27 -0400 Received: from mtagate5.de.ibm.com ([195.212.17.165]:34625 "EHLO mtagate5.de.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760772Ab0FQVQ0 (ORCPT ); Thu, 17 Jun 2010 17:16:26 -0400 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate5.de.ibm.com (8.13.1/8.13.1) with ESMTP id o5HLGOMr012135 for ; Thu, 17 Jun 2010 21:16:24 GMT Received: from d12av01.megacenter.de.ibm.com (d12av01.megacenter.de.ibm.com [9.149.165.212]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o5HLGOeD1331256 for ; Thu, 17 Jun 2010 23:16:24 +0200 Received: from d12av01.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av01.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id o5HLGOqn022330 for ; Thu, 17 Jun 2010 23:16:24 +0200 Received: from cborntra.localnet (sig-9-146-176-146.uk.ibm.com [9.146.176.146]) by d12av01.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id o5HLGNeK022315 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 17 Jun 2010 23:16:23 +0200 From: Christian Borntraeger Organization: IBM To: Avi Kivity , Marcelo Tosatti Subject: kvm-s390: Dont exit SIE on SIGP sense running Date: Thu, 17 Jun 2010 23:16:20 +0200 User-Agent: KMail/1.13.3 (Linux/2.6.35-rc2-self-00089-g63a07cb; KDE/4.4.4; x86_64; ; ) Cc: kvm@vger.kernel.org, Heiko Carstens , Martin Schwidefsky , Carsten Otte MIME-Version: 1.0 Message-Id: <201006172316.21684.borntraeger@de.ibm.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 17 Jun 2010 21:16:45 +0000 (UTC) Index: kvm/arch/s390/include/asm/kvm_host.h =================================================================== --- kvm.orig/arch/s390/include/asm/kvm_host.h +++ kvm/arch/s390/include/asm/kvm_host.h @@ -26,7 +26,7 @@ struct sca_entry { atomic_t scn; - __u64 reserved; + __u32 reserved; __u64 sda; __u64 reserved2[2]; } __attribute__((packed)); Index: kvm/arch/s390/kvm/kvm-s390.c =================================================================== --- kvm.orig/arch/s390/kvm/kvm-s390.c +++ kvm/arch/s390/kvm/kvm-s390.c @@ -207,6 +207,7 @@ out_nokvm: void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu) { VCPU_EVENT(vcpu, 3, "%s", "free cpu"); + clear_bit(63 - vcpu->vcpu_id, (unsigned long *) &vcpu->kvm->arch.sca->mcn); if (vcpu->kvm->arch.sca->cpu[vcpu->vcpu_id].sda == (__u64) vcpu->arch.sie_block) vcpu->kvm->arch.sca->cpu[vcpu->vcpu_id].sda = 0; @@ -296,7 +297,7 @@ int kvm_arch_vcpu_setup(struct kvm_vcpu { atomic_set(&vcpu->arch.sie_block->cpuflags, CPUSTAT_ZARCH); set_bit(KVM_REQ_MMU_RELOAD, &vcpu->requests); - vcpu->arch.sie_block->ecb = 2; + vcpu->arch.sie_block->ecb = 6; vcpu->arch.sie_block->eca = 0xC1002001U; vcpu->arch.sie_block->fac = (int) (long) facilities; hrtimer_init(&vcpu->arch.ckc_timer, CLOCK_REALTIME, HRTIMER_MODE_ABS); @@ -329,6 +330,7 @@ struct kvm_vcpu *kvm_arch_vcpu_create(st kvm->arch.sca->cpu[id].sda = (__u64) vcpu->arch.sie_block; vcpu->arch.sie_block->scaoh = (__u32)(((__u64)kvm->arch.sca) >> 32); vcpu->arch.sie_block->scaol = (__u32)(__u64)kvm->arch.sca; + set_bit(63 - id, (unsigned long *) &kvm->arch.sca->mcn); spin_lock_init(&vcpu->arch.local_int.lock); INIT_LIST_HEAD(&vcpu->arch.local_int.list);