From patchwork Thu Jul 13 08:08:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Borntraeger X-Patchwork-Id: 9837961 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 90B8C602D8 for ; Thu, 13 Jul 2017 08:09:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 831F228671 for ; Thu, 13 Jul 2017 08:09:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 76BE7286CA; Thu, 13 Jul 2017 08:09:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0CCCB28671 for ; Thu, 13 Jul 2017 08:09:21 +0000 (UTC) Received: from localhost ([::1]:57832 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVZBY-0000DJ-Sv for patchwork-qemu-devel@patchwork.kernel.org; Thu, 13 Jul 2017 04:09:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53603) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVZAv-0000DC-RD for qemu-devel@nongnu.org; Thu, 13 Jul 2017 04:08:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVZAs-0001L0-Kp for qemu-devel@nongnu.org; Thu, 13 Jul 2017 04:08:41 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:45211) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dVZAs-0001KB-AQ for qemu-devel@nongnu.org; Thu, 13 Jul 2017 04:08:38 -0400 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v6D83uKa061649 for ; Thu, 13 Jul 2017 04:08:36 -0400 Received: from e18.ny.us.ibm.com (e18.ny.us.ibm.com [129.33.205.208]) by mx0a-001b2d01.pphosted.com with ESMTP id 2bnt3r53u5-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 13 Jul 2017 04:08:35 -0400 Received: from localhost by e18.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 13 Jul 2017 04:08:34 -0400 Received: from b01cxnp22036.gho.pok.ibm.com (9.57.198.26) by e18.ny.us.ibm.com (146.89.104.205) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 13 Jul 2017 04:08:32 -0400 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v6D88WUv62193762; Thu, 13 Jul 2017 08:08:32 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 796E4B2054; Thu, 13 Jul 2017 04:06:02 -0400 (EDT) Received: from oc1450873852.ibm.com (unknown [9.152.224.155]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP id 0A72BB2046; Thu, 13 Jul 2017 04:06:00 -0400 (EDT) To: Thomas Huth , qemu-devel References: <1499864265-144136-1-git-send-email-borntraeger@de.ibm.com> <1499864265-144136-12-git-send-email-borntraeger@de.ibm.com> <27238e54-2a92-dbb8-73b0-e3f5b0e67934@redhat.com> From: Christian Borntraeger Date: Thu, 13 Jul 2017 10:08:29 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <27238e54-2a92-dbb8-73b0-e3f5b0e67934@redhat.com> Content-Language: en-IE X-TM-AS-GCONF: 00 x-cbid: 17071308-0044-0000-0000-0000036D012B X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007359; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000214; SDB=6.00886882; UDB=6.00442747; IPR=6.00667027; BA=6.00005469; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00016209; XFM=3.00000015; UTC=2017-07-13 08:08:34 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17071308-0045-0000-0000-0000079B05A4 Message-Id: <2c703b61-a77f-c5dc-0f26-9af136dd8181@de.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-07-13_03:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1706020000 definitions=main-1707130125 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.156.1 Subject: Re: [Qemu-devel] [PATCH 11/11] s390x/css: update css_adapter_interrupt X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , Yi Min Zhao , Alexander Graf , Fei Li , Cornelia Huck Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP On 07/12/2017 04:26 PM, Thomas Huth wrote: > On 12.07.2017 14:57, Christian Borntraeger wrote: >> From: Yi Min Zhao >> >> Let's use the new inject_airq callback of flic to inject adapter >> interrupts. For kvm case, if the kernel flic doesn't support the new >> interface, the irq routine remains unchanged. For non-kvm case, >> qemu-flic handles the suppression process. >> >> Signed-off-by: Yi Min Zhao >> Signed-off-by: Fei Li >> Signed-off-by: Christian Borntraeger >> --- >> hw/s390x/css.c | 18 ++++++++++++++++-- >> hw/s390x/s390-pci-bus.c | 2 +- >> hw/s390x/virtio-ccw.c | 2 +- >> include/hw/s390x/css.h | 2 +- >> 4 files changed, 19 insertions(+), 5 deletions(-) >> >> diff --git a/hw/s390x/css.c b/hw/s390x/css.c >> index 7b82176..ee4ebbf 100644 >> --- a/hw/s390x/css.c >> +++ b/hw/s390x/css.c >> @@ -547,12 +547,26 @@ out: >> return r; >> } >> >> -void css_adapter_interrupt(uint8_t isc) >> +void css_adapter_interrupt(CssIoAdapterType type, uint8_t isc) >> { >> + S390FLICState *fs = s390_get_flic(); >> + S390FLICStateClass *fsc = S390_FLIC_COMMON_GET_CLASS(fs); >> uint32_t io_int_word = (isc << 27) | IO_INT_WORD_AI; >> + IoAdapter *adapter = channel_subsys.io_adapters[type][isc]; >> + >> + if (!adapter) { >> + return; >> + } >> >> trace_css_adapter_interrupt(isc); >> - s390_io_interrupt(0, 0, 0, io_int_word); >> + if (fs->ais_supported) { >> + if (fsc->inject_airq(fs, type, isc, adapter->flags)) { >> + fprintf(stderr, "Failed to inject airq with AIS supported\n"); > > Use error_report() instead? something like this on top? diff --git a/hw/s390x/css.c b/hw/s390x/css.c index 3d28caa..997815c 100644 --- a/hw/s390x/css.c +++ b/hw/s390x/css.c @@ -674,7 +674,7 @@ void css_adapter_interrupt(CssIoAdapterType type, uint8_t isc) trace_css_adapter_interrupt(isc); if (fs->ais_supported) { if (fsc->inject_airq(fs, type, isc, adapter->flags)) { - fprintf(stderr, "Failed to inject airq with AIS supported\n"); + error_report("Failed to inject airq with AIS supported"); exit(1); } } else {