From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6EC10C282C8 for ; Mon, 28 Jan 2019 18:12:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 044922147A for ; Mon, 28 Jan 2019 18:12:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727133AbfA1SMv (ORCPT ); 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); > }