On Tue, Nov 13, 2018 at 11:21:26AM +0100, Lukáš Hrázký wrote: > Hi, > > On Tue, 2018-11-13 at 09:04 +0100, Gerd Hoffmann wrote: > > Hi, > > > > > To look up a PCI device by address, I could use the /sys filesystem. So > > > for pci/0000/02.0, I would translate the domain 0000 into the > > > filesystem path '/sys/devices/pci0000:00/' assuming bus '00'? And then > > > look inside that directory for the the path '0000:00:02.0'. And then > > > look for a path named 'drm' within that directory to determine whether > > > it's a drm card or not? Is the existence of the 'drm' directory the > > > thing that we should use to determine whether this is a drm card? > > > > Typically yes, except virtio-gpu which has an additional virtio level, > > i.e. /sys/devices/pci0000:00/0000:00:02.0/virtio<n>/drm. > > Why the exception? Doesn't make this check look that great and > reliable... All virtio devices have that, due to the separation between virtio and transport (which can be pci, mmio, ccw, maybe others too). cheers, Gerd _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel