Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp343054rdb; Mon, 18 Sep 2023 17:53:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEaRgKPaY6XKjEaGPorwhiUXBwipz21U9/QtoJqDNjtSfo3NHsX9wGorp9SFRdAdjIfMRbG X-Received: by 2002:a17:902:b901:b0:1b8:6987:de84 with SMTP id bf1-20020a170902b90100b001b86987de84mr11391446plb.48.1695084803695; Mon, 18 Sep 2023 17:53:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695084803; cv=none; d=google.com; s=arc-20160816; b=Cr9TpIGK6D6l82TsUfM1ZMwJRwGGOQLGyucmd76rDri2Es0w4VyF/ilEvfZhJvK0xN zK8tt4b5Dw6LH4U1ENJGNJbAlO4yIiY1MY4DM1wNshmWHDSaiFGkLb67oEu3jj8na0h1 dvRyA2HCaf/G2GmbObwUTsalq9Hm6JhvTJN8OHo8Ubh9y04tkXyO/3fYajkSwk7tx7FI RDytE20/wY19zxv0FjAMCGTUfwr/OLg/cHMI3G1cgy5reNm75F9s7z6heGKH0ngyA3iD raed+QH4ilOgieOVKoL2Ix2myJYtt8dSZ4TJVjbpTkfzifFW/lCGz9PP+5iolcsndS1U KS/A== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=THXh1C50UHURW8uY22mgz6II3159Rek3+k7Hf/FFQlY=; fh=rFLHJ70t4mfI1qQqEYVLmqFZLTlriBopqZgU3zeqtyQ=; b=wf2ea6rPMvoD4lUzYLOgum0FTIeml/WKCdYJ+or5dD1vs61qvUdScpuF9NLhhJuRMi CsQQIrkjd+tIVTLMlsqsdPEERvLQaIyo9TjONzSQxrSCTqH22aXL/p/vvz80y1xM8ToT kxS13h/pdhllYo06dtW6CpBLdVUQ6+AHh96H3gkwbfy87XAa/1gk8J8QG1o+KrE0C1kW rbpKp9qU/uNxAr6oDQnU9BeU0TT6602rDwx5pSEEwSC1WWBG9mYGIBHGJj0pYTBKGQVl 9m3JE8wZIZxm1VIBnfKx13Z592Yc4hARAd/IjZ2CGvfRHBtZa/Aj3eQAeFpCwOS7AY/B gGWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EmPOe33k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id a15-20020a170902eccf00b001bf01fee6bcsi8907263plh.610.2023.09.18.17.53.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 17:53:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EmPOe33k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 966F881CDE3D; Mon, 18 Sep 2023 13:52:14 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229821AbjIRUwG (ORCPT + 99 others); Mon, 18 Sep 2023 16:52:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229476AbjIRUwF (ORCPT ); Mon, 18 Sep 2023 16:52:05 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D36C111 for ; Mon, 18 Sep 2023 13:51:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695070271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=THXh1C50UHURW8uY22mgz6II3159Rek3+k7Hf/FFQlY=; b=EmPOe33k40eFEaBgl+/2h2azwSVPnkuSYRmZuPMSqnyf2L6inyiUY5hb6OwVdFzQhCjCMH YgKirN8x1CDbLlC0AZfTPxxGfwJbW48CRoXIfVSXGh+XQ5eWx9CdCWAqw3X/gzWHTZfNVf Y3hHBb4ax64Ufl1rGt2inOOqRHwVGlA= Received: from mail-io1-f71.google.com (mail-io1-f71.google.com [209.85.166.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-75-JS4oNZLEOVC6NBZbi4v3-A-1; Mon, 18 Sep 2023 16:51:09 -0400 X-MC-Unique: JS4oNZLEOVC6NBZbi4v3-A-1 Received: by mail-io1-f71.google.com with SMTP id ca18e2360f4ac-79554d73bd6so459768639f.1 for ; Mon, 18 Sep 2023 13:51:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695070269; x=1695675069; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=THXh1C50UHURW8uY22mgz6II3159Rek3+k7Hf/FFQlY=; b=vXN9A24Z3CkQS3YPXoXCJupaiwRxSKHuXYw69m2wa5zkQ6B/2ZEYghgSUoWAV1llBN UVNUsRqo/i7bGzWafCZbNFyS6ZSDhvY94FmC3DbhbB+jk+VsrN55ET9oXS5CI1pPDBSV ZR20gOGpg1K+yD4Zc8XVfynjt6yAvb+EKMr1O5575zQlfZIrO7N44f2JZGlmTzUgA/sz ggiXJJlq/Nb/Tw50vJOeeiakzbv0duHY+rkNNXapZMjH9GotSnwOY7W3xrHa63fttBRW +NL7QAHLCZ6UzDccCJzIsLzexIWexwxycqyS1JQphF4iuk0HE1bGeWbnQJ0Cpl6J/8zp hKfg== X-Gm-Message-State: AOJu0YzeGjxtrtR2BzhIgtSZQwlfEdqoqSgwt+G6UnQBr9sWdonpCZOb nvr4+zZ6cdo8NItkkXEddM7+iAULLwfhHzDqYAm+JSNDwrZJFT+jnAMxYX+Y6kgtnIceBwRLwTD fSbEp4nTsb1Bfs0C+C8K3H8NJ X-Received: by 2002:a5d:9557:0:b0:790:aedd:3e81 with SMTP id a23-20020a5d9557000000b00790aedd3e81mr11696527ios.8.1695070269174; Mon, 18 Sep 2023 13:51:09 -0700 (PDT) X-Received: by 2002:a5d:9557:0:b0:790:aedd:3e81 with SMTP id a23-20020a5d9557000000b00790aedd3e81mr11696518ios.8.1695070268957; Mon, 18 Sep 2023 13:51:08 -0700 (PDT) Received: from redhat.com ([38.15.60.12]) by smtp.gmail.com with ESMTPSA id c22-20020a5ea816000000b00786fe5039b8sm3010849ioa.46.2023.09.18.13.51.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 13:51:08 -0700 (PDT) Date: Mon, 18 Sep 2023 14:51:06 -0600 From: Alex Williamson To: oushixiong Cc: Jason Gunthorpe , Yishai Hadas , Shameer Kolothum , Kevin Tian , Brett Creeley , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] vfio/pds: Use proper PF device access helper Message-ID: <20230918145106.6d3c77fb.alex.williamson@redhat.com> In-Reply-To: <20230914021332.1929155-1-oushixiong@kylinos.cn> References: <20230914021332.1929155-1-oushixiong@kylinos.cn> Organization: Red Hat MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email 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 (lipwig.vger.email [0.0.0.0]); Mon, 18 Sep 2023 13:52:14 -0700 (PDT) On Thu, 14 Sep 2023 10:13:32 +0800 oushixiong wrote: > From: Shixiong Ou > > The pci_physfn() helper exists to support cases where the physfn > field may not be compiled into the pci_dev structure. We've > declared this driver dependent on PCI_IOV to avoid this problem, > but regardless we should follow the precedent not to access this > field directly. > > Signed-off-by: Shixiong Ou > --- > > This patch changes the subject line and commit log, and the previous > patch's links is: > https://patchwork.kernel.org/project/kvm/patch/20230911080828.635184-1-oushixiong@kylinos.cn/ > > drivers/vfio/pci/pds/vfio_dev.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Applied to vfio for-linus branch for v6.6. Thanks, Alex > > diff --git a/drivers/vfio/pci/pds/vfio_dev.c b/drivers/vfio/pci/pds/vfio_dev.c > index b46174f5eb09..649b18ee394b 100644 > --- a/drivers/vfio/pci/pds/vfio_dev.c > +++ b/drivers/vfio/pci/pds/vfio_dev.c > @@ -162,7 +162,7 @@ static int pds_vfio_init_device(struct vfio_device *vdev) > pci_id = PCI_DEVID(pdev->bus->number, pdev->devfn); > dev_dbg(&pdev->dev, > "%s: PF %#04x VF %#04x vf_id %d domain %d pds_vfio %p\n", > - __func__, pci_dev_id(pdev->physfn), pci_id, vf_id, > + __func__, pci_dev_id(pci_physfn(pdev)), pci_id, vf_id, > pci_domain_nr(pdev->bus), pds_vfio); > > return 0;