Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752016AbdHHHnk (ORCPT ); Tue, 8 Aug 2017 03:43:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46858 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750776AbdHHHni (ORCPT ); Tue, 8 Aug 2017 03:43:38 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 720C4C049D5C Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=cohuck@redhat.com Date: Tue, 8 Aug 2017 09:43:32 +0200 From: Cornelia Huck To: Paolo Bonzini Cc: "Longpeng(Mike)" , rkrcmar@redhat.com, agraf@suse.com, borntraeger@de.ibm.com, christoffer.dall@linaro.org, marc.zyngier@arm.com, james.hogan@imgtec.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, weidong.huang@huawei.com, arei.gonglei@huawei.com, wangxinxin.wang@huawei.com, longpeng.mike@gmail.com, david@redhat.com Subject: Re: [PATCH v2 1/4] KVM: add spinlock optimization framework Message-ID: <20170808094332.25dc10ef@gondolin> In-Reply-To: References: <1502165135-4784-1-git-send-email-longpeng2@huawei.com> <1502165135-4784-2-git-send-email-longpeng2@huawei.com> Organization: Red Hat GmbH MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 08 Aug 2017 07:43:38 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 689 Lines: 24 On Tue, 8 Aug 2017 09:34:14 +0200 Paolo Bonzini wrote: > On 08/08/2017 06:05, Longpeng(Mike) wrote: > > return 1; > > diff --git a/arch/s390/kvm/diag.c b/arch/s390/kvm/diag.c > > index ce865bd..4ea8c38 100644 > > --- a/arch/s390/kvm/diag.c > > +++ b/arch/s390/kvm/diag.c > > @@ -150,7 +150,7 @@ static int __diag_time_slice_end(struct kvm_vcpu *vcpu) > > { > > VCPU_EVENT(vcpu, 5, "%s", "diag time slice end"); > > vcpu->stat.diagnose_44++; > > - kvm_vcpu_on_spin(vcpu); > > + kvm_vcpu_on_spin(vcpu, kvm_arch_vcpu_in_kernel(vcpu)); > > return 0; > > } > > > > IIUC, diag is a privileged instruction so this an also be "true". > > Paolo Yes, indeed.