Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752142AbdHHEHN (ORCPT ); Tue, 8 Aug 2017 00:07:13 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:3026 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751919AbdHHEGL (ORCPT ); Tue, 8 Aug 2017 00:06:11 -0400 From: "Longpeng(Mike)" To: , CC: , , , , , , , , , , , , , "Longpeng(Mike)" Subject: [PATCH v2 3/4] KVM: s390: implements the kvm_arch_vcpu_in_kernel() Date: Tue, 8 Aug 2017 12:05:34 +0800 Message-ID: <1502165135-4784-4-git-send-email-longpeng2@huawei.com> X-Mailer: git-send-email 1.8.4.msysgit.0 In-Reply-To: <1502165135-4784-1-git-send-email-longpeng2@huawei.com> References: <1502165135-4784-1-git-send-email-longpeng2@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.177.246.209] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A010202.598938B0.004B,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 03bcfdd20655c4806f746adafa265279 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 624 Lines: 23 This implements the kvm_arch_vcpu_in_kernel() for s390. Signed-off-by: Longpeng(Mike) --- arch/s390/kvm/kvm-s390.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index 0b0c689..e46177b 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c @@ -2449,7 +2449,7 @@ int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu) bool kvm_arch_vcpu_in_kernel(struct kvm_vcpu *vcpu) { - return false; + return !(vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE); } EXPORT_SYMBOL_GPL(kvm_arch_vcpu_in_kernel); -- 1.8.3.1