Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1131715imu; Thu, 20 Dec 2018 10:37:44 -0800 (PST) X-Google-Smtp-Source: AFSGD/VPmX7NPfpuNSP3a/e7NcaOoTbtZzKp5UBqYInBk9HiTCYeumpoMHAdGxQvR19qqnYFxAoD X-Received: by 2002:a63:f047:: with SMTP id s7mr23980822pgj.441.1545331064048; Thu, 20 Dec 2018 10:37:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545331064; cv=none; d=google.com; s=arc-20160816; b=LG2aMehmYrGp9RMbLlwnKrFVthjNOKCIUx1/lLtqaMZ/NeDmuSJILMWEmz5m6C1XXU svuZlMrH2ynU9itS0LIwR09phbgwm7cAXS+FxWRllp9f/qehUsC98rFClg6RVoNpuCuI 01nbkQsFkRLfmWSebnSn4XkENGptdIk0SOzEXaq2tBETrFlBNlEECiEB6vh04otbq2Kt W+K77QoXB+i//q8CPFGb9Gsfz7Vkr2WhrCiu6HFTy01WNObPqMvWT3fEQVn9VqXjsgP8 MDA6l03pU5rD9xJIBbQtEPz3BZIQl1qjovMbYmA+wyH/BUSeuDL2/AWO2+2fqdIY357r 59Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject; bh=9//bFSXBsMgU1F+Bjg1zpnkdvPK6kuhH7bcS4Msfxrg=; b=J86c8UMb/o/0mqguc8DITHScYTCdKde/OeQ3XZzzbWs0xN2A32zXGp6fmBa+27o8pW G8vsgy6Iz+PlXfI/FKwPrTWZfdn6wkV49N0v2ZaIoCEHFECDw6eAHIO9EbSxjH0c/3hM RELOjRwVEhoswZHDPFzJe5QNRpvSA5yxloyCMN7KqqDmibOxr1/KEU8B/B+Nn5OJsL5s BPKRyPOEvfMtLechMkAPNHnvb9ApypDnEXK4kx+fWYkVuGA7VJjjleTnFej0txQk5Op7 DCtSiqhSy4be5IamcIQgod0HFBJwlrdUah+SanvBwLLGq/XMIosOKvdh3HyW6qg8eJcd /BIQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d17si1351818pfm.40.2018.12.20.10.37.27; Thu, 20 Dec 2018 10:37:44 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731945AbeLTPvP (ORCPT + 99 others); Thu, 20 Dec 2018 10:51:15 -0500 Received: from ns360863.ovh.net ([91.121.165.116]:37120 "EHLO ns360863.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728172AbeLTPvP (ORCPT ); Thu, 20 Dec 2018 10:51:15 -0500 X-Greylist: delayed 464 seconds by postgrey-1.27 at vger.kernel.org; Thu, 20 Dec 2018 10:51:13 EST Received: from [192.168.0.16] (HSI-KBW-046-005-005-080.hsi8.kabel-badenwuerttemberg.de [46.5.5.80]) by ns360863.ovh.net (Postfix) with ESMTPSA id 98A32401BA; Thu, 20 Dec 2018 16:47:54 +0100 (CET) Subject: Re: [PATCH v5 05/15] KVM: s390: unify pending_irqs() and pending_irqs_no_gisa() To: mimu@linux.ibm.com, 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> From: pierre morel Organization: MNIS Message-ID: <3944cf13-130a-d4ea-8d14-f8b055506339@mnis.fr> Date: Thu, 20 Dec 2018 16:43:26 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <83553348-0b10-8bcc-34b0-c87a0e2f95ac@linux.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? > >>> >>>>>    { >>>>> -    return vcpu->kvm->arch.float_int.pending_irqs | >>>>> -        vcpu->arch.local_int.pending_irqs; >>>>> -} >> >