Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752098AbdHHIj1 (ORCPT ); Tue, 8 Aug 2017 04:39:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59342 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750818AbdHHIjZ (ORCPT ); Tue, 8 Aug 2017 04:39:25 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 64E765D697 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=pbonzini@redhat.com Subject: Re: [PATCH v2 2/4] KVM: X86: implement the logic for spinlock optimization To: "Longpeng (Mike)" Cc: rkrcmar@redhat.com, agraf@suse.com, borntraeger@de.ibm.com, cohuck@redhat.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 References: <1502165135-4784-1-git-send-email-longpeng2@huawei.com> <1502165135-4784-3-git-send-email-longpeng2@huawei.com> <58915b27-bbbe-8c2d-43b6-65fa8e1c0c17@redhat.com> <598976D3.6090202@huawei.com> From: Paolo Bonzini Message-ID: <266af4a4-7d77-27df-a483-b13b5b0b198b@redhat.com> Date: Tue, 8 Aug 2017 10:39:09 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <598976D3.6090202@huawei.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 08 Aug 2017 08:39:25 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 996 Lines: 30 On 08/08/2017 10:31, Longpeng (Mike) wrote: > > > On 2017/8/8 15:30, Paolo Bonzini wrote: > >> On 08/08/2017 06:05, Longpeng(Mike) wrote: >>> diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c >>> index cd0e6e6..dec5e8a 100644 >>> --- a/arch/x86/kvm/hyperv.c >>> +++ b/arch/x86/kvm/hyperv.c >>> @@ -1268,7 +1268,7 @@ int kvm_hv_hypercall(struct kvm_vcpu *vcpu) >>> >>> switch (code) { >>> case HVCALL_NOTIFY_LONG_SPIN_WAIT: >>> - kvm_vcpu_on_spin(vcpu, kvm_arch_vcpu_in_kernel(vcpu)); >>> + kvm_vcpu_on_spin(vcpu, kvm_x86_ops->spin_in_kernel(vcpu)); >>> break; >>> case HVCALL_POST_MESSAGE: >>> case HVCALL_SIGNAL_EVENT: >> >> This can be true as well. I can change this on commit. > > Thanks, > hope you could help me to fix the same problem in patch-1(s390) too. Yes. Another possibility is to always pass false in patch 1 to kvm_vcpu_on_spin. Then the parameter can be adjusted in patches 3 and 4 (passing true for s390 and vcpu_mode_priv(vcpu) for ARM). Paolo