Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp335256rdb; Fri, 6 Oct 2023 05:11:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGYCqlcrhWFvi44Hq+Z9XqyMfzPI6r+ds3iNtBXzNdubh2kSNsC4PvcEVswVcVyBbYp4MD1 X-Received: by 2002:a17:90a:4ce5:b0:274:c284:c83c with SMTP id k92-20020a17090a4ce500b00274c284c83cmr6735529pjh.48.1696594298995; Fri, 06 Oct 2023 05:11:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696594298; cv=none; d=google.com; s=arc-20160816; b=DI1VFmBlR1Zbiv7c1+ata5MW19rjeT5yjnT3ECgPDjZYLOnpyS4kO2+stiDhBSqBvk e/g3CXoBp/vJWDFIB4Nc392pNrxM/537+gwSCoUzufhaHDBtxQxhDIikJmiPT4E14nZK Ksami164vpFYBVp7JiHV7C1dIa36aSBaquTEo6SxdpOU6z/VquklCoYBjp3pqHlSVD6i FL1QlVJwnwUvKfzb8o0Z1O9a2Ole0KK2n/yzcd9MXbNIhbj6A/DjwpVO5xi2/inG9Ikm 0a7rFlh+Rqqx5ge/MO0mtIdEAewKvdkrDHsgu60mA2lKokUl0uG2iPc4d3O+yaAkH8US KiMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:message-id:in-reply-to:subject:cc:to:from :date; bh=HmgBKoL2Y41bO/f8AN5aRQD/ZLqyRgnGyS7Xwlne2Qg=; fh=fltnq3n2Caz69R+7lo9fdypbEOxjBOXo8UkOVJpSWWY=; b=S+0CYdmB5g1BufYcES5QiZ6Yqcn3d+UJWTBD+S/7ebvv4zBpnUkGmGKZ0tD+EDHC7O tZvLHyUHegnYf6lHyjJj54UcXn1NU2KhYgLTmO3dKs7HofXqQgVUdzi2rkrtPVRpiOAe Kssc1Ndjk/n8m4O4WubFULNnm/uM+6pCQvTq3BPtjlzquRUHo+xrTfgpD5PV0zBROPZX Ag7ZPTHTBew3frRUfzCuyaE/WjsHNwDge820F+K3IrlhdcWZfYia5IKmD5+JPTm+tL2k 31Ej5BWZRnXB1NFI0ZoVOK2aNvOPacvg0ckx1xewLpyGYyzlwMKJvzQWXQvy9zB2AN4l mtfQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id d13-20020a17090ad98d00b0027450695a78si5522122pjv.172.2023.10.06.05.11.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 05:11:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id ACCB880A5F98; Fri, 6 Oct 2023 05:10:55 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232136AbjJFMKv (ORCPT + 99 others); Fri, 6 Oct 2023 08:10:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231991AbjJFMKt (ORCPT ); Fri, 6 Oct 2023 08:10:49 -0400 Received: from angie.orcam.me.uk (angie.orcam.me.uk [IPv6:2001:4190:8020::34]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 535B2C2; Fri, 6 Oct 2023 05:10:47 -0700 (PDT) Received: by angie.orcam.me.uk (Postfix, from userid 500) id 899A492009C; Fri, 6 Oct 2023 14:10:45 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id 7CC1892009B; Fri, 6 Oct 2023 13:10:45 +0100 (BST) Date: Fri, 6 Oct 2023 13:10:45 +0100 (BST) From: "Maciej W. Rozycki" To: Sui Jingfeng cc: Bjorn Helgaas , Sui Jingfeng , Bjorn Helgaas , Gerd Hoffmann , Gurchetan Singh , Chia-I Wu , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org Subject: Re: [-next 1/5] PCI: Add the pci_is_vga() helper In-Reply-To: <42a15522-7bed-c5b1-1dc3-65446b65e348@loongson.cn> Message-ID: References: <20231005225101.GA792747@bhelgaas> <42a15522-7bed-c5b1-1dc3-65446b65e348@loongson.cn> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 06 Oct 2023 05:10:55 -0700 (PDT) On Fri, 6 Oct 2023, Sui Jingfeng wrote: > > I think this makes sense per the spec, but there's always a risk of > > breaking something, so it's nice if the change actually *fixes* > > something to make that risk worthwhile. > > > Maciej mentioned that PCI_CLASS_NOT_DEFINED_VGA device should also be handled > in the past. > see [1]. But if no one interested in PCI_CLASS_NOT_DEFINED_VGA nowaday, then I > guess > the gains of this patch may not deserve the time and risk. But I don't mind if > someone > would like pick it up for other purpose. Well, if we need to determine for whatever purpose whether a PCI/e device presents a VGA programming interface, then I think we ought to do this in a complete manner. I'm not sure offhand what could possibly break if we write our code according to specs and include PCI_CLASS_NOT_DEFINED_VGA devices in the class. Yes, I'm aware they won't be the latest and greatest, but they may still be there out there in service. For one I continue using my 30 years old Trident 8900C ISA VGA adapter with the most recent Linux kernel. The card serves its purpose, mostly as a glass TTY, so why should I replace it? Of course there are broken devices out there regardless, which won't work as we expect without special handling or sometimes at all even. It does not mean we should refrain from making the best effort for good compliant devices and assume in advance that something will break even if we write our code according to the relevant specs. I'd say do write according to specs and only try to sort out the situation somehow if something actually does break. In any case if we actually do choose to ignore PCI_CLASS_NOT_DEFINED_VGA devices, then I wanted to make sure we do it deliberately rather than from the lack of awareness of the existence of such devices. Maciej