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=-1.0 required=3.0 tests=MAILING_LIST_MULTI,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 6D9EBC43387 for ; Thu, 20 Dec 2018 16:40:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4361421773 for ; Thu, 20 Dec 2018 16:40:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731243AbeLTQk4 (ORCPT ); Thu, 20 Dec 2018 11:40:56 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:40512 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729937AbeLTQkz (ORCPT ); Thu, 20 Dec 2018 11:40:55 -0500 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wBKGdEfS031269 for ; Thu, 20 Dec 2018 11:40:54 -0500 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 2pgd2ad3nm-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 20 Dec 2018 11:40:53 -0500 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 20 Dec 2018 16:40:51 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 20 Dec 2018 16:40:49 -0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wBKGelA138731886 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 20 Dec 2018 16:40:47 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3D5394C04E; Thu, 20 Dec 2018 16:40:47 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D0AA04C040; Thu, 20 Dec 2018 16:40:46 +0000 (GMT) Received: from [9.152.224.123] (unknown [9.152.224.123]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 20 Dec 2018 16:40:46 +0000 (GMT) Reply-To: mimu@linux.ibm.com Subject: Re: [PATCH v5 05/15] KVM: s390: unify pending_irqs() and pending_irqs_no_gisa() To: pierre morel , Cornelia Huck Cc: KVM Mailing List , Linux-S390 Mailing List , linux-kernel@vger.kernel.org, Martin Schwidefsky , Heiko Carstens , Christian Borntraeger , Janosch Frank , David Hildenbrand , Halil Pasic , Pierre Morel References: <20181219191756.57973-1-mimu@linux.ibm.com> <20181219191756.57973-6-mimu@linux.ibm.com> <20181220120614.65acacac.cohuck@redhat.com> <62bf4bcf-585f-ddfc-e7a5-18fc946819d9@linux.ibm.com> <20181220132130.33a417fa.cohuck@redhat.com> <83553348-0b10-8bcc-34b0-c87a0e2f95ac@linux.ibm.com> <3944cf13-130a-d4ea-8d14-f8b055506339@mnis.fr> From: Michael Mueller Organization: IBM Date: Thu, 20 Dec 2018 17:40:46 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.3.3 MIME-Version: 1.0 In-Reply-To: <3944cf13-130a-d4ea-8d14-f8b055506339@mnis.fr> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 18122016-0008-0000-0000-000002A4258C X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18122016-0009-0000-0000-0000220EC422 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-12-20_08:,, 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=786 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1812200135 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20.12.18 16:43, pierre morel wrote: > > > Le 12/20/18 à 13:33, Michael Mueller a écrit : >> >> >> On 20.12.18 13:21, Cornelia Huck wrote: >>> On Thu, 20 Dec 2018 12:49:56 +0100 >>> Michael Mueller wrote: >>> >>>> On 20.12.18 12:06, Cornelia Huck wrote: >>>>> On Wed, 19 Dec 2018 20:17:46 +0100 >>>>> Michael Mueller wrote: >>>>>> Use a single function with parameter irq_flags to differentiate >>>>>> between cases. >>>>>> > ...snip >>>>>>    } >>>>>> -static inline unsigned long pending_irqs_no_gisa(struct kvm_vcpu >>>>>> *vcpu) >>>>>> +static inline unsigned long pending_irqs(struct kvm_vcpu *vcpu, >>>>>> u16 irq_flags) >>>>> >>>>> Any deeper reason why this is a u16? 16 bits should be enough for >>>>> everyone? :) >>>> >>>> I want to use the 8 bits for the IRQ type and the other 8 for >>>> additional >>>> controls, see: "KVM: s390: restore IAM in get_ipm() when IPM is clean" >>> >>> Still need to look at that patch, but my question mainly was "why only >>> 16 bits"? I would think making this local variable larger is cheap. >>> > > +1 > >> >> I will enlarge the flag mask to u32 with 16 bits for the IRQ types then. > > AFAIK CPU generally work better with int (or long) > Is there any hardware reason to restrict the size? It's already changed to 4 bytes > >> >>>> >>>>>>    { >>>>>> -    return vcpu->kvm->arch.float_int.pending_irqs | >>>>>> -        vcpu->arch.local_int.pending_irqs; >>>>>> -} >>> >> >