On Wed, Mar 01, 2017 at 07:28:46PM +0100, Viktor Mihajlovski wrote:> On 01.03.2017 16:58, Daniel P. Berrange wrote: > > given a basic Fedora 25 guest, with a virtio-mmio disk added as per the > > guide above... > > > > looking at device '/devices/platform/a003e00.virtio_mmio/virtio3/block/vda': > > KERNEL=="vda" > > SUBSYSTEM=="block" > > DRIVER=="" > > ATTR{alignment_offset}=="0" > > ATTR{badblocks}=="" > > ATTR{cache_type}=="write back" > > ATTR{capability}=="50" > > ATTR{discard_alignment}=="0" > > ATTR{ext_range}=="256" > > ATTR{inflight}==" 0 0" > > ATTR{range}=="16" > > ATTR{removable}=="0" > > ATTR{ro}=="0" > > ATTR{serial}=="" > > ATTR{size}=="2097152" > > ATTR{stat}==" 94 0 4208 285 0 0 0 > > 0 0 100 280" > > > > looking at parent device '/devices/platform/a003e00.virtio_mmio/virtio3': > > KERNELS=="virtio3" > > SUBSYSTEMS=="virtio" > > DRIVERS=="virtio_blk" > > ATTRS{device}=="0x0002" > > ATTRS{features}=="0010101101110000000000000000110000000000000000000000000000 > > 000000" > > ATTRS{status}=="0x00000007" > > ATTRS{vendor}=="0x554d4551" > > > > looking at parent device '/devices/platform/a003e00.virtio_mmio': > > KERNELS=="a003e00.virtio_mmio" > > SUBSYSTEMS=="platform" > > DRIVERS=="virtio-mmio" > > ATTRS{driver_override}=="(null)" > Since I can't do that on my box, would you be so kind to run > ls -l /dev/disk/by-path > If it returns ids like > virtio-pci-a003e00.virtio_mmio[-partn] > my suggested patch should be OK for ARM in that it will produce ids in > the format > platform-a003e00.virtio_mmio[-partn]Ok, my guest has 4 disks - sda - virtio-scsi, over virtio-pci transport - sdb - virtio-scsi, over virtio-mmio transport - vda - virtio-scsi, over virtio-pci transport - vdb - virtio-scsi, over virtio-mmio transport with systemd 231 I get these links platform-3f000000.pcie-pci-0000:00:01.1-virtio-pci-0000:02:00.0-scsi-0:0:0:0 -> ../../sda platform-3f000000.pcie-pci-0000:00:01.3-virtio-pci-0000:04:00.0 -> ../../vda virtio-pci-a003c00.virtio_mmio -> ../../vdb virtio-pci-a003e00.virtio_mmio-scsi-0:0:0:0 -> ../../sdb after applying your patch I get these links: platform-3f000000.pcie-pci-0000:00:01.1-virtio-pci-0000:02:00.0-scsi-0:0:0:0 -> ../../sda platform-3f000000.pcie-pci-0000:00:01.3-virtio-pci-0000:04:00.0 -> ../../vda platform-3f000000.pcie-pci-0000:02:00.0-scsi-0:0:0:0 -> ../../sda platform-3f000000.pcie-pci-0000:04:00.0 -> ../../vda platform-a003c00.virtio_mmio -> ../../vdb platform-a003e00.virtio_mmio-scsi-0:0:0:0 -> ../../sdb virtio-pci-a003c00.virtio_mmio -> ../../vdb virtio-pci-a003e00.virtio_mmio-scsi-0:0:0:0 -> ../../sdb So that appears to be working as designed - the 4 backcompat symlinks are still there, and the new symlinks all live under the platform- prefix and don't have a bogus 'pci' in the name for mmio links Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :|
On 01.03.2017 19:44, Daniel P. Berrange wrote: [...] replying on the list, a bit lengthy> > Ok, my guest has 4 disks > > - sda - virtio-scsi, over virtio-pci transport > - sdb - virtio-scsi, over virtio-mmio transport > - vda - virtio-scsi, over virtio-pci transport > - vdb - virtio-scsi, over virtio-mmio transport > > with systemd 231 I get these links > > platform-3f000000.pcie-pci-0000:00:01.1-virtio-pci-0000:02:00.0-scsi-0:0:0:0 -> ../../sda > platform-3f000000.pcie-pci-0000:00:01.3-virtio-pci-0000:04:00.0 -> ../../vdathis is somewhat suprising (the pcie-pci-xxxx part), could you once more do me a favor and run udevadm info -a /dev/vda and paste the output?> virtio-pci-a003c00.virtio_mmio -> ../../vdb > virtio-pci-a003e00.virtio_mmio-scsi-0:0:0:0 -> ../../sdb > > after applying your patch I get these links: > > platform-3f000000.pcie-pci-0000:00:01.1-virtio-pci-0000:02:00.0-scsi-0:0:0:0 -> ../../sda > platform-3f000000.pcie-pci-0000:00:01.3-virtio-pci-0000:04:00.0 -> ../../vdawell, these are probably stale links from the old systemd baked into your initrd> platform-3f000000.pcie-pci-0000:02:00.0-scsi-0:0:0:0 -> ../../sda > platform-3f000000.pcie-pci-0000:04:00.0 -> ../../vdaI don't yet understand these, especially why the intermediate pci-xxxx id has vanished> platform-a003c00.virtio_mmio -> ../../vdb > platform-a003e00.virtio_mmio-scsi-0:0:0:0 -> ../../sdbthese look as expected> virtio-pci-a003c00.virtio_mmio -> ../../vdb > virtio-pci-a003e00.virtio_mmio-scsi-0:0:0:0 -> ../../sdbstale> > So that appears to be working as designed - the 4 backcompat symlinks are > still there, and the new symlinks all live under the platform- prefix > and don't have a bogus 'pci' in the name for mmio linksthe patch only provide compat symlinks for the pci path ids traditionally seen on x86 systems, but I think we don't want those for platforms other than x86, right?> > Regards, > Daniel >-- Mit freundlichen Gr??en/Kind Regards Viktor Mihajlovski IBM Deutschland Research & Development GmbH Vorsitzender des Aufsichtsrats: Martina K?deritz Gesch?ftsf?hrung: Dirk Wittkopp Sitz der Gesellschaft: B?blingen Registergericht: Amtsgericht Stuttgart, HRB 243294
On 01.03.2017 20:23, Viktor Mihajlovski wrote:> On 01.03.2017 19:44, Daniel P. Berrange wrote: > [...] > replying on the list, a bit lengthy >> >> Ok, my guest has 4 disks >> >> - sda - virtio-scsi, over virtio-pci transport >> - sdb - virtio-scsi, over virtio-mmio transport >> - vda - virtio-scsi, over virtio-pci transport >> - vdb - virtio-scsi, over virtio-mmio transport >> >> with systemd 231 I get these links >> >> platform-3f000000.pcie-pci-0000:00:01.1-virtio-pci-0000:02:00.0-scsi-0:0:0:0 -> ../../sda >> platform-3f000000.pcie-pci-0000:00:01.3-virtio-pci-0000:04:00.0 -> ../../vda > this is somewhat suprising (the pcie-pci-xxxx part), could you once more > do me a favor and run > udevadm info -a /dev/vda > and paste the output?nevermind, I think I get it now, the PCI bus is a child to the platform bus, and the virtio PCI functions are connected via PCI bridges 0000:00:01.1 and 0000:00:01.3>> virtio-pci-a003c00.virtio_mmio -> ../../vdb >> virtio-pci-a003e00.virtio_mmio-scsi-0:0:0:0 -> ../../sdb >> >> after applying your patch I get these links: >> >> platform-3f000000.pcie-pci-0000:00:01.1-virtio-pci-0000:02:00.0-scsi-0:0:0:0 -> ../../sda >> platform-3f000000.pcie-pci-0000:00:01.3-virtio-pci-0000:04:00.0 -> ../../vda > well, these are probably stale links from the old systemd baked into > your initrd >> platform-3f000000.pcie-pci-0000:02:00.0-scsi-0:0:0:0 -> ../../sda >> platform-3f000000.pcie-pci-0000:04:00.0 -> ../../vda > I don't yet understand these, especially why the intermediate pci-xxxx > id has vanishedthat is then correct as well, because the PCI bridges don't contribute to the path id, which is a bonus effect of removing the special virtio handling I think we're good with the patch as is. [...] -- Mit freundlichen Gr??en/Kind Regards Viktor Mihajlovski IBM Deutschland Research & Development GmbH Vorsitzender des Aufsichtsrats: Martina K?deritz Gesch?ftsf?hrung: Dirk Wittkopp Sitz der Gesellschaft: B?blingen Registergericht: Amtsgericht Stuttgart, HRB 243294