Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3957916rwb; Tue, 8 Nov 2022 10:13:50 -0800 (PST) X-Google-Smtp-Source: AMsMyM7irvxJkW+Vj4++T1RMDKimEx0ovGk3gg809cdYaE7TuEjFzDlN8OYXOqwm5Vadp3tc7oEg X-Received: by 2002:a17:902:8205:b0:185:33e:2a0e with SMTP id x5-20020a170902820500b00185033e2a0emr56344930pln.92.1667931230545; Tue, 08 Nov 2022 10:13:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667931230; cv=none; d=google.com; s=arc-20160816; b=Zx42DPztHL5FK6b2uB9u3L0IVjcnJowSWgoQ9e5yxVLo8szy+rnjSFEpE0DzYHnbg9 6sU779wsNCRT3r5+8KryoNfjWwNoKftUf00Yjjo6NPK2VA1jVV93TnMNhSeasAcmscNH 7sipyUbvQc/J1Kj5jsoJWPSAaNyVKnAdLyW6w99NWnGY41WXBLGwAf6UBudoxBX5OGKn 2UiIqTeVfVmPydwNuKy+vsvS4M6tuB1CllmQ2eQN8ccWEHBsx63mYT/w5tZ2THVwH+bi nhHKrKDGnMmWUEhPFQYPCPVLsH+BixUrGzHhGX2NWZJNmbBRo8ZDPH16RHRH/HlkH0hy SMfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=X/6YPcfQ3OHCxcTVYe00PAa4barWuyYRCkyxGpkjxyY=; b=f2Yv+QhZ+diq8wriW6CrZwTblG96e+8tgUDOWlW36z//S0Jxew8KzeHiVMX189L0HQ /A+mPMn6u2iPfOOzADE1KAX8jnttsjE4TIsWMFR9nflkLTYPPDNLZ9tk+V6W7GJ+V8LS 5UJGO5O8O8Pq7HDu0M88Sssz/9UtwWfL1JJ3J8HJha9layhJ81UOboRP2btN55iUyAel +9fJ89GPXoqCkFsBC7mG1If2t4VhY2enU85A+NjQPNeGu2MPwBMOxhQ6uA+M/3zhGmsU LZly7553JxBFIsZ0WdEcwAQoclAK1QvNAV0pbXAM/LiB+stPQoG/TapBG+fQT5mg/H/i jV8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IKhn8EFD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nd12-20020a17090b4ccc00b0021321b3bf6esi20358684pjb.112.2022.11.08.10.13.39; Tue, 08 Nov 2022 10:13:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IKhn8EFD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234133AbiKHSDo (ORCPT + 91 others); Tue, 8 Nov 2022 13:03:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233627AbiKHSDm (ORCPT ); Tue, 8 Nov 2022 13:03:42 -0500 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 D4F7245A04 for ; Tue, 8 Nov 2022 10:02:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667930563; 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: in-reply-to:in-reply-to:references:references; bh=X/6YPcfQ3OHCxcTVYe00PAa4barWuyYRCkyxGpkjxyY=; b=IKhn8EFDGQ6vFiMq5oSNSmc29Tj2F1Hq8CQTPPoJCiC3h2FSHE2Je5zSaCSvLUj8rZPyLi gRYPH8xKOdj/eY7oZG63e2cuJz8ytoYUb/pJgqXX6fD1wHwHbbHf5qDaW0l350Y4RN66aX xxk/EfY3X3d99aXsoxcoEoq66IdgTb8= Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-373-DviGj2n_MsCvXH1wwDG1kg-1; Tue, 08 Nov 2022 13:02:41 -0500 X-MC-Unique: DviGj2n_MsCvXH1wwDG1kg-1 Received: by mail-qk1-f197.google.com with SMTP id i17-20020a05620a249100b006fa2e10a2ecso13528818qkn.16 for ; Tue, 08 Nov 2022 10:02:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=X/6YPcfQ3OHCxcTVYe00PAa4barWuyYRCkyxGpkjxyY=; b=YvIWM3f+8j+L/v2k27oJjX3g2S5QGyeTaeWqMdnPqc4t4pdF+yM5yzoe/JPtZbvc4Y K1huHiagpKCf+/g8/fIf15XfBuRx7O6YBy13KPgiwHosHGoFyv4axK+emvcvJpHt+rZp QrrD+jIAILlkiNKcMdP1OzQ6tZLA/u4mNl6NqThqnL7n0EqCJDqow+nBDlwA4i8xPeKF 31hdoLF4UTnj1+BVyaGs8SXgeaVxqnpDmG0jILLel9QwTWsHbQA4k/DwVP0bTy2rRHTI Yz7R7MD8Zv5gr75u8oTmrP8Z1Acc2cRKZ0R3ftWI0Gs16mGyF+vC59lFNsgHI9gzcMMZ nndw== X-Gm-Message-State: ACrzQf3QrDIVxoSYlvA5zp3DV+roEA4ENbPn1YJZigIHjVAMEkMXj/5s e163h3bTDW8szOkLZWQsdeDnFwrxyxGOi1+5uLgILgqu/dHEJFzL99Z5PvTWhoYTLwrv5m7hAUA 2jEGCAcH20N8MojdHLAhnd8lk X-Received: by 2002:ac8:785:0:b0:3a5:46b0:ffd7 with SMTP id l5-20020ac80785000000b003a546b0ffd7mr26189392qth.632.1667930560884; Tue, 08 Nov 2022 10:02:40 -0800 (PST) X-Received: by 2002:ac8:785:0:b0:3a5:46b0:ffd7 with SMTP id l5-20020ac80785000000b003a546b0ffd7mr26189363qth.632.1667930560614; Tue, 08 Nov 2022 10:02:40 -0800 (PST) Received: from redhat.com ([185.195.59.50]) by smtp.gmail.com with ESMTPSA id l21-20020a37f915000000b006fa9d101775sm9815931qkj.33.2022.11.08.10.02.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Nov 2022 10:02:40 -0800 (PST) Date: Tue, 8 Nov 2022 13:02:35 -0500 From: "Michael S. Tsirkin" To: Bjorn Helgaas Cc: linux-kernel@vger.kernel.org, Wei Gong , Bjorn Helgaas , linux-pci@vger.kernel.org Subject: Re: [PATCH v2] pci: fix device presence detection for VFs Message-ID: <20221108130203-mutt-send-email-mst@kernel.org> References: <20221108101209-mutt-send-email-mst@kernel.org> <20221108175853.GA484920@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221108175853.GA484920@bhelgaas> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,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 On Tue, Nov 08, 2022 at 11:58:53AM -0600, Bjorn Helgaas wrote: > On Tue, Nov 08, 2022 at 10:19:07AM -0500, Michael S. Tsirkin wrote: > > On Tue, Nov 08, 2022 at 09:02:28AM -0600, Bjorn Helgaas wrote: > > > On Tue, Nov 08, 2022 at 08:53:00AM -0600, Bjorn Helgaas wrote: > > > > On Wed, Oct 26, 2022 at 02:11:21AM -0400, Michael S. Tsirkin wrote: > > > > > virtio uses the same driver for VFs and PFs. Accordingly, > > > > > pci_device_is_present is used to detect device presence. This function > > > > > isn't currently working properly for VFs since it attempts reading > > > > > device and vendor ID. > > > > > > > > > As VFs are present if and only if PF is present, > > > > > just return the value for that device. > > > > > > > > VFs are only present when the PF is present *and* the PF has VF Enable > > > > set. Do you care about the possibility that VF Enable has been > > > > cleared? > > I think you missed this question. I was hoping Wei will answer that, I don't have the hardware. > > > Can you also include a hint about how the problem manifests, and a URL > > > to the report if available? > > > > Here you go: > > lore.kernel.org/all/20221108044819.GA861843%40zander/t.mbox.gz > > > > is it enough to include this link or do you want me > > to repost copying the text from there? > > Uh, well, OK, I guess I could dig through that and figure what what's > relevant. I'd like the commit log to contain a hint of what the > problem looks like and some justification for why it should be > backported to stable. > > I still look at Documentation/process/stable-kernel-rules.rst > occasionally to decide things like this, but I get the feeling that > it's a little out-of-date and more restrictive than current practice. > > But I do think the "PF exists but VF disabled" situation needs to be > clarified somehow, too. > > Bjorn