From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: udev PATH_ID for virtio devices Date: Wed, 2 Sep 2015 15:09:41 +0300 Message-ID: <20150902150631-mutt-send-email-mst@redhat.com> References: <20140327191355.GB4114@redhat.com> <20140327205827.GA4440@redhat.com> <20150825144034-mutt-send-email-mst@redhat.com> <20150825145151-mutt-send-email-mst@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: Tom Gundersen Cc: Kay Sievers , Harald Hoyer , virtualization@lists.linux-foundation.org List-Id: virtualization@lists.linuxfoundation.org On Wed, Sep 02, 2015 at 01:53:33PM +0200, Tom Gundersen wrote: > On Tue, Aug 25, 2015 at 1:58 PM, Kay Sievers wrote: > > On Tue, Aug 25, 2015 at 1:52 PM, Michael S. Tsirkin wrote: > >> On Tue, Aug 25, 2015 at 01:46:49PM +0200, Kay Sievers wrote: > >>> On Tue, Aug 25, 2015 at 1:43 PM, Michael S. Tsirkin wrote: > >>> > On Mon, Aug 24, 2015 at 06:10:01PM +0200, Tom Gundersen wrote: > > > >>> >> 1) if there is a guarantee now and in the future (even if only > >>> >> restricted to netdevs) that no virtio bus will have a direct sibling > >>> >> bus (i.e., with the same parent device); or > >>> > > >>> > I think this is the case. The virtio bus is an artifact. > >>> > There's always a single one behind each pci device. > >>> > Is this sufficient? > >>> > >>> I *think* is not good enough for udev to offer such functionality. > >>> > >>> We need an authoritative answer that this cannot happen with today's > >>> code, and also that there are no plans to ever make multiple virtio > >>> devices per parent device. > > > >> But if virtio will make such a promise, will that be sufficient? > > > > Sure. > > Any chance we could get such a guarantee? Anything else needed from > our side? I have a pending patch that would be nice to get out, which > would depend on such a guarantee. > > Cheers, > > Tom I thought about this. The virtio spec makes it explicit for pci, ccw and mmio devices. I think we can make this promise - if we wanted to have many such buses, we can always make it something else, not a virtio bus. So please just check the type of the bus - if it's virtio, you can assume there is no sibling. -- MST