On 2021-04-30 07:52:58 Fri, Daniel Henrique Barboza wrote: > > > On 4/29/21 6:02 AM, Mahesh J Salgaonkar wrote: > > On 2021-04-28 22:33:45 Wed, Oliver O'Halloran wrote: > > > On Tue, Apr 27, 2021 at 9:56 PM Mahesh Salgaonkar <mah...@linux.ibm.com> > > > wrote: > > > > > > > > With upstream kernel, especially after commit 98ba956f6a389 > > > > ("powerpc/pseries/eeh: Rework device EEH PE determination") we see that > > > > KVM > > > > guest isn't able to enable EEH option for PCI pass-through devices > > > > anymore. > > > > > > How are you passing the devices through to the guest? > > > > I am using libvirt with below xml section to add pass-through: > > > > <hostdev mode='subsystem' type='pci' managed='yes'> > > <driver name='vfio'/> > > <source> > > <address domain='0x0033' bus='0x01' slot='0x00' function='0x0'/> > > </source> > > <address type='pci' domain='0x0000' bus='0x01' slot='0x01' > > function='0x0' multifunction='on'/> > > </hostdev> > > <hostdev mode='subsystem' type='pci' managed='yes'> > > <driver name='vfio'/> > > <source> > > <address domain='0x0033' bus='0x01' slot='0x00' function='0x1'/> > > </source> > > <address type='pci' domain='0x0000' bus='0x01' slot='0x01' > > function='0x1' multifunction='on'/> > > </hostdev> > > > > Looks like libvirt does not allow pass through device in slot zero, and > > throws following error. > > There's no such restriction in Libvirt, at least as far as I remember. > > > > > error: XML error: Invalid PCI address 0000:01:00.0. slot must be >= 1 > > Failed. Try again? [y,n,i,f,?]: > > > This looks odd. The error message is complaining about 0000:01:00.0 but > your XML up there is declaring 0000:01:01.0.
Above XML snipphet is working one. I see the XML error when I change slot value to zero. > > Also, the 'multifunction' bool is usually used only in the function 0 > passthrough, indicating that the guest will configure all other functions as > the the multifunction device. You can ignore this bool in the XML for > PCI passthrough if you don't care about the guest seeing this device as > multifunction (i.e. all functions in the same IOMMU group and so on). > Thanks, -Mahesh.