qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Mahesh J Salgaonkar <mahesh@linux.ibm.com>
To: Daniel Henrique Barboza <danielhb413@gmail.com>
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
	Qemu-ppc <qemu-ppc@nongnu.org>,
	Oliver O'Halloran <oohall@gmail.com>,
	Qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [PATCH] spapr: Modify ibm, get-config-addr-info2 to set DEVNUM in PE config address.
Date: Mon, 3 May 2021 14:22:54 +0530	[thread overview]
Message-ID: <20210503085254.l23kcv6iaeupbrm7@in.ibm.com> (raw)
In-Reply-To: <88cbb94c-33a1-642a-009a-133ffb51ea9d@gmail.com>

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 <mahesh@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.


      reply	other threads:[~2021-05-03  9:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-27 11:56 [PATCH] spapr: Modify ibm,get-config-addr-info2 to set DEVNUM in PE config address Mahesh Salgaonkar
2021-04-27 14:02 ` [PATCH] spapr: Modify ibm, get-config-addr-info2 " Daniel Henrique Barboza
2021-04-28 12:33 ` Oliver O'Halloran
2021-04-29  8:10   ` Alexey Kardashevskiy
2021-04-29  9:02   ` Mahesh J Salgaonkar
2021-04-30  1:53     ` Oliver O'Halloran
2021-05-03 15:47       ` Mahesh J Salgaonkar
2021-04-30 10:52     ` Daniel Henrique Barboza
2021-05-03  8:52       ` Mahesh J Salgaonkar [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210503085254.l23kcv6iaeupbrm7@in.ibm.com \
    --to=mahesh@linux.ibm.com \
    --cc=aik@ozlabs.ru \
    --cc=danielhb413@gmail.com \
    --cc=oohall@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).