Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp847929pxb; Tue, 19 Oct 2021 14:27:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwyyOLoZBIHgaRC5iQJhyeXJHTTPdSnDTRnA47Rc1vq2xkWoPNzeAe/esaYNZTL2cXCWBkQ X-Received: by 2002:aa7:c78f:: with SMTP id n15mr57711133eds.338.1634678843655; Tue, 19 Oct 2021 14:27:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634678843; cv=none; d=google.com; s=arc-20160816; b=jdy560zA9vnWiEcKtC1J9ZqkGDHePIc1Ip9UWV1pJmIiO4tDnUp1EWdNmIlGrK8TVl 5A2Sg6RBObj/woJpcSJMaU0vzVxfi2aMLgC7F+5946pBcsKEe44DdytKy84hakUzG51g WJr/eODhQGlDRNHT7UhxvfBQIoJdBrWAMQqPpsI1Wf0PByfcwZPTDFN4asxMWF6uEHX3 Vk3pKAMX+im8JpTvPIo073AtlH3zsh2R4f1twFvpYr5DjV5hZrYSSftXu/xcBU0MJVdI 5LAxXtGIRZp4qR/UM+WsE77cqsAUffIdeX/HNWXhqS0OVExZM/g3+Vys4APYt1GDQiXE rYyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=mQPAKHdHgKlOZTBNm1OjmfNiqGzyQSM0iUDWVQSTjRs=; b=hH1YufppIytyvnEvbzVOR2i4cEJPvX02i+bC1HbiST9fIHSYCy545GIpZZf+/Iz3km Lx3lxcvT+u7lKzUb0BUeq0UaNx5+jOP3SAI9J/S1RLiaEEysPf8KEP46xNeKiXLvb/m7 7qVrzZ82AeTDf7tQyLPtNXw5DfcSrD+xAO2h6zNOOKpC1F+agFwPL96rVKfNfxV3yEFs AcPExYrA4LQcNyHSwcmptPzv4k0RaPst+pemFDgocZ+8ZLtFxehfeUFPQPs3It5ESq89 klMZe49RFpCUS21N5GNzdhPdNroDIIUHAENqpCmfRDWCj6dnj8HRl3J5mHxlVoovvh0V jCeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=sxynQ3cj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id se25si178103ejb.336.2021.10.19.14.26.58; Tue, 19 Oct 2021 14:27:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=sxynQ3cj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229839AbhJSV04 (ORCPT + 99 others); Tue, 19 Oct 2021 17:26:56 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:10976 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229790AbhJSV0z (ORCPT ); Tue, 19 Oct 2021 17:26:55 -0400 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19JKmvA8003889; Tue, 19 Oct 2021 17:24:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=mQPAKHdHgKlOZTBNm1OjmfNiqGzyQSM0iUDWVQSTjRs=; b=sxynQ3cjMn9aHWwvxPGNJbqV//GVf0zahh3ab+mtNc5FenUwRPFbTUVmtypI9Bu/SIqt exiZnIs6VaP0hUKxy8f0eg0UcLWIZNbBRPh7r0SkLDPjmWYhkqEa7wJeCChJgDZyglUs wp1h3lavTsykaIOERuxc/fg1OolPB7fuuicFfmnvbLTT38COp/wNPeAJPmAp7sID4he0 dKRB2HUzGzzXQWjGFysB5Pm6HNqu9fLcJQSJJ8j+Esq0KmBBoh9MGuvZkHugYNrr6pIc LFxchcrIRkPeDOR7HrQFL1vQm8mt6dNpVjUvuFLTjlCIhItCfzHz4X62VYcwomPGSqLa 6Q== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 3bt362c2vd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 19 Oct 2021 17:24:41 -0400 Received: from m0098416.ppops.net (m0098416.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 19JK8BMC017358; Tue, 19 Oct 2021 17:24:40 -0400 Received: from ppma06fra.de.ibm.com (48.49.7a9f.ip4.static.sl-reverse.com [159.122.73.72]) by mx0b-001b2d01.pphosted.com with ESMTP id 3bt362c2uy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 19 Oct 2021 17:24:40 -0400 Received: from pps.filterd (ppma06fra.de.ibm.com [127.0.0.1]) by ppma06fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 19JLCIE4032115; Tue, 19 Oct 2021 21:24:39 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma06fra.de.ibm.com with ESMTP id 3bqp0k4925-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 19 Oct 2021 21:24:38 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 19JLOZ5A52494836 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 19 Oct 2021 21:24:35 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8B6714C050; Tue, 19 Oct 2021 21:24:35 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E0A3E4C04E; Tue, 19 Oct 2021 21:24:34 +0000 (GMT) Received: from li-43c5434c-23b8-11b2-a85c-c4958fb47a68.ibm.com (unknown [9.171.54.36]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 19 Oct 2021 21:24:34 +0000 (GMT) Subject: Re: [PATCH 2/3] KVM: s390: preserve deliverable_mask in __airqs_kick_single_vcpu To: Halil Pasic , Janosch Frank , Michael Mueller , linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org Cc: David Hildenbrand , Claudio Imbrenda , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Pierre Morel , Tony Krowiak , Matthew Rosato , Niklas Schnelle , farman@linux.ibm.com, kvm@vger.kernel.org References: <20211019175401.3757927-1-pasic@linux.ibm.com> <20211019175401.3757927-3-pasic@linux.ibm.com> From: Christian Borntraeger Message-ID: Date: Tue, 19 Oct 2021 23:24:34 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <20211019175401.3757927-3-pasic@linux.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 8YUA7e5jHvjyBjmkC1j-tXi4Hs0Vxn_a X-Proofpoint-ORIG-GUID: fDWV0cTXB5mDtPQVT3Ac9K-F6mH_qqoz X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-10-19_02,2021-10-19_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 mlxlogscore=966 clxscore=1015 adultscore=0 suspectscore=0 impostorscore=0 malwarescore=0 phishscore=0 mlxscore=0 bulkscore=0 lowpriorityscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110190122 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 19.10.21 um 19:54 schrieb Halil Pasic: > Changing the deliverable mask in __airqs_kick_single_vcpu() is a bug. If > one idle vcpu can't take the interrupts we want to deliver, we should > look for another vcpu that can, instead of saying that we don't want > to deliver these interrupts by clearing the bits from the > deliverable_mask. > > Signed-off-by: Halil Pasic > Fixes: 9f30f6216378 ("KVM: s390: add gib_alert_irq_handler()") Reviewed-by: Christian Borntraeger > --- > arch/s390/kvm/interrupt.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c > index 10722455fd02..2245f4b8d362 100644 > --- a/arch/s390/kvm/interrupt.c > +++ b/arch/s390/kvm/interrupt.c > @@ -3053,13 +3053,14 @@ static void __airqs_kick_single_vcpu(struct kvm *kvm, u8 deliverable_mask) > int vcpu_idx, online_vcpus = atomic_read(&kvm->online_vcpus); > struct kvm_s390_gisa_interrupt *gi = &kvm->arch.gisa_int; > struct kvm_vcpu *vcpu; > + u8 vcpu_isc_mask; > > for_each_set_bit(vcpu_idx, kvm->arch.idle_mask, online_vcpus) { > vcpu = kvm_get_vcpu(kvm, vcpu_idx); > if (psw_ioint_disabled(vcpu)) > continue; > - deliverable_mask &= (u8)(vcpu->arch.sie_block->gcr[6] >> 24); > - if (deliverable_mask) { > + vcpu_isc_mask = (u8)(vcpu->arch.sie_block->gcr[6] >> 24); > + if (deliverable_mask & vcpu_isc_mask) { > /* lately kicked but not yet running */ > if (test_and_set_bit(vcpu_idx, gi->kicked_mask)) > return; >