Re: [PATCH 0/2] Fix IOMMU setup for hotplugged devices on pseries

2019-09-05 Thread Shawn Anastasio
On 9/5/19 4:38 AM, Lukas Wunner wrote: On Wed, Sep 04, 2019 at 11:22:13PM -0500, Shawn Anastasio wrote: If anybody has more insight or a better way to fix this, please let me know. Have you considered moving the invocation of pcibios_setup_device() to pcibios_bus_add_device()? The latter is

Re: [PATCH 0/2] Fix IOMMU setup for hotplugged devices on pseries

2019-09-05 Thread Shawn Anastasio
On 9/5/19 4:08 AM, Alexey Kardashevskiy wrot> I just tried hotplugging 3 virtio-net devices into a guest system with v5.2 kernel and it seems working (i.e. BARs mapped, a driver is bound): root@le-dbg:~# lspci -v | egrep -i '(virtio|Memory)' 00:00.0 Ethernet controller: Red Hat, Inc Virtio

Re: [PATCH 0/2] Fix IOMMU setup for hotplugged devices on pseries

2019-09-05 Thread Alexey Kardashevskiy
On 05/09/2019 14:22, Shawn Anastasio wrote: On pseries QEMU guests, IOMMU setup for hotplugged PCI devices is currently broken for all but the first device on a given bus. The culprit is an ordering issue in the pseries hotplug path (via pci_rescan_bus()) which results in IOMMU group

[PATCH 0/2] Fix IOMMU setup for hotplugged devices on pseries

2019-09-04 Thread Shawn Anastasio
On pseries QEMU guests, IOMMU setup for hotplugged PCI devices is currently broken for all but the first device on a given bus. The culprit is an ordering issue in the pseries hotplug path (via pci_rescan_bus()) which results in IOMMU group assigment occuring before device registration in sysfs.