Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3756058imu; Mon, 28 Jan 2019 10:13:18 -0800 (PST) X-Google-Smtp-Source: ALg8bN47i5dWUaJ7UgsQT+L9quOhDVIlAbukst17lzuuxmgYbQgwcbOOhBjtNA+m98tmSmTJkcFi X-Received: by 2002:a62:9913:: with SMTP id d19mr22889573pfe.107.1548699197946; Mon, 28 Jan 2019 10:13:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548699197; cv=none; d=google.com; s=arc-20160816; b=KukTgg+Im3jqVz1gUriyMIb6Ib4rDiBg/QwZbGStBuTnlI7lMsRyiqiiBYXC/S2upZ DqbeB7zpY5Vl1MaO5sXFDXgmqG02h03+rhQQs9cCfRr7UZxteXbEYdPm3EBV1SSSxX8j 4zBD5fOodgte/wyLpwEwkk2HAUvfWaaWbq/NVrkw1/iJ4IRV8n9+USfngCpgKu9r6fON hQnIH0gNSP9MuCMr3smcCNJaZfrseATyeAGKhIdpOXhlGLcCqVxLsh8a+qLl3Odvn+Pf 0NPHmKa3RN7gdeWGHZu2xJecucsG4HBzaddN/zCzES7c/QbmFCtkjjgNQCaOwMpGc/CY xVuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :mime-version:organization:references:in-reply-to:subject:cc:to:from :date; bh=l84rMvCoM3bcN84I1CdceFtDdmYtGjyZyKlsiiQ4AQc=; b=qTGpbrRW7EgUsAXYeEjPu7xP9qUxxw2ZmNM0S2o2ct+FvydNto2a+lAm9GEZRBk4sB 6DSML3LECiqkvsdV5BFePACVDLFM1wNy0X0lRuujCGnD/IviCEx598aVTNm6rFya4M4+ HKYuPWHAbaxJgL90lQIWqhTGgOURg8QKESnDnB6gurrBn3AImG9B+HLas3FzHKvscVHI /12Y/kG9zicDTCk69MV6c+D5dhaU1v0r6UBADxbUxSyy9aEmh8+KprORDjCq9/e9jGAX hq3zykueQ4lKVJzfpF7DlgqM/kJ7LstMI5OmERJZG+mXr5IDKULi+vuyJJEPvcFHUNrh PSxA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w5si6216719pll.64.2019.01.28.10.13.02; Mon, 28 Jan 2019 10:13:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727120AbfA1SMv (ORCPT + 99 others); Mon, 28 Jan 2019 13:12:51 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:48292 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726802AbfA1SMv (ORCPT ); Mon, 28 Jan 2019 13:12:51 -0500 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x0SI4q4K059341 for ; Mon, 28 Jan 2019 13:12:49 -0500 Received: from e06smtp04.uk.ibm.com (e06smtp04.uk.ibm.com [195.75.94.100]) by mx0b-001b2d01.pphosted.com with ESMTP id 2qa4rwxp93-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 28 Jan 2019 13:12:49 -0500 Received: from localhost by e06smtp04.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 28 Jan 2019 18:12:48 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp04.uk.ibm.com (192.168.101.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 28 Jan 2019 18:12:45 -0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x0SICi9a53411936 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 28 Jan 2019 18:12:44 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 200FD11C054; Mon, 28 Jan 2019 18:12:44 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A458C11C04A; Mon, 28 Jan 2019 18:12:43 +0000 (GMT) Received: from oc2783563651 (unknown [9.152.97.178]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 28 Jan 2019 18:12:43 +0000 (GMT) Date: Mon, 28 Jan 2019 19:12:42 +0100 From: Halil Pasic To: Michael Mueller Cc: KVM Mailing List , Linux-S390 Mailing List , linux-kernel@vger.kernel.org, Martin Schwidefsky , Heiko Carstens , Christian Borntraeger , Janosch Frank , David Hildenbrand , Cornelia Huck , Pierre Morel Subject: Re: [PATCH v6 11/13] KVM: s390: add functions to (un)register GISC with GISA In-Reply-To: <20190124125939.130763-12-mimu@linux.ibm.com> References: <20190124125939.130763-1-mimu@linux.ibm.com> <20190124125939.130763-12-mimu@linux.ibm.com> Organization: IBM X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.31; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 19012818-0016-0000-0000-0000024BFD5A X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19012818-0017-0000-0000-000032A605E9 Message-Id: <20190128191242.0f65d82b@oc2783563651> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-01-28_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1901280136 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 24 Jan 2019 13:59:37 +0100 Michael Mueller wrote: > Add the Interruption Alert Mask (IAM) to the architecture specific > kvm struct. This mask in the GISA is used to define for which ISC > a GIB alert will be issued. > > The functions kvm_s390_gisc_register() and kvm_s390_gisc_unregister() > are used to (un)register a GISC (guest ISC) with a virtual machine and > its GISA. > > Upon successful completion, kvm_s390_gisc_register() returns the > ISC to be used for GIB alert interruptions. A negative return code > indicates an error during registration. > > Theses functions will be used by other adapter types like AP and PCI to > request pass-through interruption support. I'm not sure this interface is going to to fit PCI that well. But IMHO no reason to delay the whole series -- we can think about zPCI later. Same goes for some of the names. Another idea for later would be to sanity check in gisa destroy that alert.mask is back to all zero -- to catch any corresponding driver bugs. Acked-by: Halil Pasic > > Signed-off-by: Michael Mueller [..] > static inline void gisa_set_ipm_gisc(struct kvm_s390_gisa *gisa, u32 gisc) > { > set_bit_inv(IPM_BIT_OFFSET + gisc, (unsigned long *) gisa); > @@ -2911,6 +2938,8 @@ void kvm_s390_gisa_init(struct kvm *kvm) > if (!css_general_characteristics.aiv) > return; > gi->origin = &kvm->arch.sie_page2->gisa; > + gi->alert.mask = 0; I don't think this is necessary. Otherwise you would need to zero the alert.ref[] too, or? Regards, Halil > + spin_lock_init(&gi->alert.ref_lock); > kvm_s390_gisa_clear(kvm); > VM_EVENT(kvm, 3, "gisa 0x%pK initialized", gi->origin); > }