Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1314139imu; Thu, 20 Dec 2018 14:06:28 -0800 (PST) X-Google-Smtp-Source: AFSGD/X34uBmBwe3QXZHhr5RZSV9itesEelb55InVyIbkrE2ZAG7fy9tCeC2cCNStkdRr2maRg/n X-Received: by 2002:a62:670f:: with SMTP id b15mr25729115pfc.212.1545343588746; Thu, 20 Dec 2018 14:06:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545343588; cv=none; d=google.com; s=arc-20160816; b=MeBQmUDwhyV3fgQZMF4frzWBzQG8ymTsH47L2TckP5HfxEbrUqsAKs/LvUmCTybh0u P1CETDWAQjx/40GUBhnWi+yzFGPuuI5ZDr+SiHmC4ost+GMh1zvazWZWBW7y51cfEcIA lN322WVXOOp61bkHvhn8PA3ILC81IvUG/YOlYkuPToWmyyXoN4ehuhASyb8fV86ApU+L MK7QQO9/CcTGlZzZYwKvF9XtzlMV6j/C4WD+kSWHsqgjPgsW/Q59Sgt7iqeKz4UKmj8Q xdUAhim3BmMcWCi29J4xrUJUNNZsBhH29a6TvZmzGiQs675KTNRcK7EiHnoEmZhwJKR+ GgGg== 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 :content-language:in-reply-to:mime-version:user-agent:date :organization:from:references:cc:to:subject:reply-to; bh=PjZ2zxplfjsyBwePy7zg38RAY8GkJ/lzkZLxZC8ZN58=; b=NMZBg8gSJQx+an84oZdOGNzullnSpLRaSOCXfiEaWzs4CFEfTKwKs/B6JY0ytFQiXd Ish1P8+UM9ElwnWvNzkC0lvbO5waRFNXY9ox7d+AL0FWeq2zSH9SNmdHuC1u2olbvnId boEZdZY9bHjk9tsc2VAv7R5WHycdxwTvk7YBmRsCtEDCHA0LulIfrjLvuMMmmITdSpjq claGGTUXlyfflrYFfCkKeTaVJGANQR2yNxsWyaGOUacDkeod/ia+5hw5KlzwaS1OsnQw obZLUNSOi37UNwxbvWMd+N6g3j4E5MDOenQu3XaCwhAYzIrzKB3zoxHS+s6VbSMlYkyR M1eQ== 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 u27si20218117pfa.103.2018.12.20.14.06.13; Thu, 20 Dec 2018 14:06:28 -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 S1731234AbeLTQk4 (ORCPT + 99 others); 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; >>>>>> -} >>> >> >