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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 B0681C4338F for ; Mon, 26 Jul 2021 15:08:01 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5A8F660184 for ; Mon, 26 Jul 2021 15:08:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5A8F660184 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=movementarian.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:47868 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m82D2-0006pB-EG for qemu-devel@archiver.kernel.org; Mon, 26 Jul 2021 11:08:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51940) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m82Ai-0003F3-9W for qemu-devel@nongnu.org; Mon, 26 Jul 2021 11:05:36 -0400 Received: from ssh.movementarian.org ([2a01:7e00::f03c:92ff:fefb:3ad2]:33980 helo=movementarian.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m82Af-0003tw-2v for qemu-devel@nongnu.org; Mon, 26 Jul 2021 11:05:35 -0400 Received: from movement by movementarian.org with local (Exim 4.93) (envelope-from ) id 1m82Aa-000IfR-O7; Mon, 26 Jul 2021 15:05:28 +0000 Date: Mon, 26 Jul 2021 15:05:28 +0000 From: John Levon To: Jagannathan Raman Subject: Re: [PATCH RFC server 04/11] vfio-user: find and init PCI device Message-ID: <20210726150528.GA71233@li1368-133.members.linode.com> References: <9c728a63a896ecf3de92a269668c3306cc3e6f5f.1626722742.git.jag.raman@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9c728a63a896ecf3de92a269668c3306cc3e6f5f.1626722742.git.jag.raman@oracle.com> X-Url: http://www.movementarian.org/ Received-SPF: none client-ip=2a01:7e00::f03c:92ff:fefb:3ad2; envelope-from=movement@li1368-133.members.linode.com; helo=movementarian.org X-Spam_score_int: 1 X-Spam_score: 0.1 X-Spam_bar: / X-Spam_report: (0.1 / 5.0 requ) BAYES_00=-1.9, FORGED_SPF_HELO=1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, KHOP_HELO_FCRDNS=0.4, RCVD_IN_XBL=0.375, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: elena.ufimtseva@oracle.com, john.g.johnson@oracle.com, swapnil.ingle@nutanix.com, qemu-devel@nongnu.org, alex.williamson@redhat.com, stefanha@redhat.com, thanos.makatos@nutanix.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Mon, Jul 19, 2021 at 04:00:06PM -0400, Jagannathan Raman wrote: > + vfu_pci_set_id(o->vfu_ctx, > + pci_get_word(o->pci_dev->config + PCI_VENDOR_ID), > + pci_get_word(o->pci_dev->config + PCI_DEVICE_ID), > + pci_get_word(o->pci_dev->config + PCI_SUBSYSTEM_VENDOR_ID), > + pci_get_word(o->pci_dev->config + PCI_SUBSYSTEM_ID)); Since you handle all config space accesses yourselves, is there even any need for this? regards john