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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no 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 2FADDC4363D for ; Thu, 24 Sep 2020 11:50:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0863C2065C for ; Thu, 24 Sep 2020 11:50:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727511AbgIXLu4 (ORCPT ); Thu, 24 Sep 2020 07:50:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726406AbgIXLux (ORCPT ); Thu, 24 Sep 2020 07:50:53 -0400 Received: from theia.8bytes.org (8bytes.org [IPv6:2a01:238:4383:600:38bc:a715:4b6d:a889]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED88BC0613CE for ; Thu, 24 Sep 2020 04:50:52 -0700 (PDT) Received: by theia.8bytes.org (Postfix, from userid 1000) id 7689F295; Thu, 24 Sep 2020 13:50:50 +0200 (CEST) Date: Thu, 24 Sep 2020 13:50:49 +0200 From: Joerg Roedel To: Jean-Philippe Brucker Cc: "Michael S. Tsirkin" , Auger Eric , iommu@lists.linux-foundation.org, virtualization@lists.linux-foundation.org, virtio-dev@lists.oasis-open.org, linux-pci@vger.kernel.org, bhelgaas@google.com, jasowang@redhat.com, kevin.tian@intel.com, sebastien.boeuf@intel.com, lorenzo.pieralisi@arm.com Subject: Re: [PATCH v3 0/6] Add virtio-iommu built-in topology Message-ID: <20200924115048.GQ27174@8bytes.org> References: <20200821131540.2801801-1-jean-philippe@linaro.org> <20200924045958-mutt-send-email-mst@kernel.org> <20200924092129.GH27174@8bytes.org> <20200924053159-mutt-send-email-mst@kernel.org> <20200924100255.GM27174@8bytes.org> <20200924102953.GD170808@myrica> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200924102953.GD170808@myrica> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Thu, Sep 24, 2020 at 12:29:53PM +0200, Jean-Philippe Brucker wrote: > It's not possible to use exactly the same code for parsing. The access methods can be separate and don't affect the parsing logic. > The access methods are different (need to deal with port-IO for > built-in description on PCI, for example) and more importantly, the > structure is different as well. The ACPI table needs nodes for > virtio-iommu while the built-in description is contained in the > virtio-iommu itself. So the endpoint nodes point to virtio-iommu node > on ACPI, while they don't need a pointer on the built-in desc. I kept > as much as possible common in structures and implementation, but in > the end we still need about 200 unique lines on each side. Will it hurt the non-ACPI version to have the not-needed pointers anyway to keep the parsers the same? Joerg