From: Knut Omang <knut.omang@oracle.com>
To: "Gonglei (Arei)" <arei.gonglei@huawei.com>
Cc: Juan Quintela <quintela@redhat.com>,
Alexey Kardashevskiy <aik@ozlabs.ru>,
Marcel Apfelbaum <marcel.a@redhat.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
Markus Armbruster <armbru@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Igor Mammedov <imammedo@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 4/4] ioh3420: Enable ARI forwarding
Date: Mon, 25 Aug 2014 11:13:01 +0200 [thread overview]
Message-ID: <1408957981.14053.190.camel@abi.no.oracle.com> (raw)
In-Reply-To: <33183CC9F5247A488A2544077AF1902086D6DEDF@SZXEMA503-MBS.china.huawei.com>
On Mon, 2014-08-25 at 06:09 +0000, Gonglei (Arei) wrote:
> > From: Michael S. Tsirkin [mailto:mst@redhat.com]
> > Subject: Re: [PATCH v2 4/4] ioh3420: Enable ARI forwarding
> >
> > On Sun, Aug 24, 2014 at 03:32:20PM +0200, Knut Omang wrote:
> > > Signed-off-by: Knut Omang <knut.omang@oracle.com>
> >
> > BTW pcie_cap_is_arifwd_enabled is still unused.
>
> Not yet, but I have posted a patch series:
>
> [PATCH v2 0/2] add check for PCIe root ports and downstream ports
>
> Which we used this function to check ARI Forwarding is enabled or not.
> I hope you can help me review it, thanks a lot!
>
> BTW, I will rebase my patches on Kunt's patch series. And will do some fixes
> about Hu Tao's and Marcel Apfelbaum's comments.
>
> > We really should use it to make ARI work properly, right?
> >
> Yes. I think we should.
Modelling the real world, one way to go with multifunction devices would
be to introduce a separate concept of a "PCIFunction" object in the
current Qemu model, and let each device have 1 or more such function
objects associated with them.
The simpler way to implement a true multifunction device would just be
to add one PCIDevice object at the right bus, devfn for each additional
function that are associated with the master device.
I have implemented the latter approach in a simple SR/IOV emulation
implementation - will post a patch for that shortly, as it seems to be
relevant for this discussion.
With that approach (which came out pleasantly simple wrt changes in the
code) the role of the ARI forwarding bit would be to do nothing when
enabled, as ARI forwarding works with no changes, but make ARI
forwarding, when disabled or not available, makes the additional
functions beyond #8 not addressable from the outside (which in my view
is what a modified version of Gonglei's patch should do)
Knut
> Best regards,
> -Gonglei
>
> > > ---
> > > hw/pci-bridge/ioh3420.c | 2 ++
> > > 1 file changed, 2 insertions(+)
> > >
> > > diff --git a/hw/pci-bridge/ioh3420.c b/hw/pci-bridge/ioh3420.c
> > > index e6674a1..cce2fdd 100644
> > > --- a/hw/pci-bridge/ioh3420.c
> > > +++ b/hw/pci-bridge/ioh3420.c
> > > @@ -85,6 +85,7 @@ static void ioh3420_reset(DeviceState *qdev)
> > > pcie_cap_root_reset(d);
> > > pcie_cap_deverr_reset(d);
> > > pcie_cap_slot_reset(d);
> > > + pcie_cap_arifwd_reset(d);
> > > pcie_aer_root_reset(d);
> > > pci_bridge_reset(qdev);
> > > pci_bridge_disable_base_limit(d);
> > > @@ -119,6 +120,7 @@ static int ioh3420_initfn(PCIDevice *d)
> > > goto err_msi;
> > > }
> > >
> > > + pcie_cap_arifwd_init(d);
> > > pcie_cap_deverr_init(d);
> > > pcie_cap_slot_init(d, s->slot);
> > > pcie_chassis_create(s->chassis);
> > > --
> > > 1.9.0
>
next prev parent reply other threads:[~2014-08-25 9:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-24 13:32 [Qemu-devel] [PATCH v2 0/4] q35: Minor fixes/enhancements to improve usability of root ports Knut Omang
2014-08-24 13:32 ` [Qemu-devel] [PATCH v2 1/4] pcie: Fix incorrect write to the ari capability next function field Knut Omang
2014-08-24 13:32 ` [Qemu-devel] [PATCH v2 2/4] pcie: Rename the pcie_cap_ari_* functions to pcie_cap_arifwd_* Knut Omang
2014-08-24 13:32 ` [Qemu-devel] [PATCH v2 3/4] ioh3420: Remove obsoleted, unused ioh3420_init function Knut Omang
2014-08-25 7:47 ` Gonglei (Arei)
2014-08-25 9:15 ` Knut Omang
2014-08-24 13:32 ` [Qemu-devel] [PATCH v2 4/4] ioh3420: Enable ARI forwarding Knut Omang
2014-08-24 22:52 ` Michael S. Tsirkin
2014-08-25 6:09 ` Gonglei (Arei)
2014-08-25 9:13 ` Knut Omang [this message]
2014-08-25 19:57 ` Michael S. Tsirkin
2014-08-24 20:44 ` [Qemu-devel] [PATCH v2 0/4] q35: Minor fixes/enhancements to improve usability of root ports Michael S. Tsirkin
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=1408957981.14053.190.camel@abi.no.oracle.com \
--to=knut.omang@oracle.com \
--cc=aik@ozlabs.ru \
--cc=arei.gonglei@huawei.com \
--cc=armbru@redhat.com \
--cc=imammedo@redhat.com \
--cc=marcel.a@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/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).