qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Knut Omang <knut.omang@oracle.com>
To: Marcel Apfelbaum <marcel.a@redhat.com>
Cc: Juan Quintela <quintela@redhat.com>,
	Alexey Kardashevskiy <aik@ozlabs.ru>,
	"Michael S.Tsirkin" <mst@redhat.com>,
	Markus Armbruster <armbru@redhat.com>,
	qemu-devel@nongnu.org, Gonglei <arei.gonglei@huawei.com>,
	Igor Mammedov <imammedo@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 3/3] ioh3420: Support ARI forwarding
Date: Wed, 20 Aug 2014 11:22:05 +0200	[thread overview]
Message-ID: <1408526525.14053.98.camel@abi.no.oracle.com> (raw)
In-Reply-To: <1408525048.13594.49.camel@localhost.localdomain>

On Wed, 2014-08-20 at 11:57 +0300, Marcel Apfelbaum wrote:
> On Wed, 2014-08-20 at 08:53 +0200, Knut Omang wrote:
> > Enable the PCIe capability bit that indicates that this port is able to support
> > and forward requests to > 8 functions for ARI capable devices.
> > 
> > Signed-off-by: Knut Omang <knut.omang@oracle.com>
> > ---
> >  hw/pci-bridge/ioh3420.c | 7 +++++++
> >  1 file changed, 7 insertions(+)
> > 
> > diff --git a/hw/pci-bridge/ioh3420.c b/hw/pci-bridge/ioh3420.c
> > index 8f6c8b0..c14ea6b 100644
> > --- a/hw/pci-bridge/ioh3420.c
> > +++ b/hw/pci-bridge/ioh3420.c
> > @@ -92,8 +92,10 @@ static void ioh3420_reset(DeviceState *qdev)
> >  
> >  static int ioh3420_initfn(PCIDevice *d)
> >  {
> > +    PCIBridge* br = PCI_BRIDGE(d);
> >      PCIEPort *p = PCIE_PORT(d);
> >      PCIESlot *s = PCIE_SLOT(d);
> > +    uint8_t *exp_cap;
> >      int rc;
> >      char tmp[100];
> >      sprintf(tmp, "pcie_port.%d", s->slot);
> > @@ -121,6 +123,10 @@ static int ioh3420_initfn(PCIDevice *d)
> >      if (rc < 0) {
> >          goto err_msi;
> >      }
> > +    /* Support ARI forwarding */
> > +    exp_cap = d->config + d->exp.exp_cap;
> > +    pci_word_test_and_set_mask(exp_cap + PCI_EXP_DEVCAP2, PCI_EXP_DEVCAP2_ARI);
> > +
> Hi,
> 
> I think is better to move the implementation to a function, say pcie_cap_ari_init
> and place it into hw/pci/pcie.c so other devices like downstream ports can use it.

Yes, definitely - I'll fix that, thanks.
Knut

> Thanks,
> Marcel
> 
> >      pcie_cap_deverr_init(d);
> >      pcie_cap_slot_init(d, s->slot);
> >      pcie_chassis_create(s->chassis);
> > @@ -151,6 +157,7 @@ err_bridge:
> >  static void ioh3420_exitfn(PCIDevice *d)
> >  {
> >      PCIESlot *s = PCIE_SLOT(d);
> > +    PCIBridge* br = PCI_BRIDGE(d);
> >  
> >      pcie_aer_exit(d);
> >      pcie_chassis_del_slot(s);
> 
> 
> 

      parent reply	other threads:[~2014-08-20  9:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-20  6:53 [Qemu-devel] [PATCH 3/3] ioh3420: Support ARI forwarding Knut Omang
2014-08-20  8:34 ` Gonglei (Arei)
2014-08-20  8:43   ` Knut Omang
2014-08-20  8:57 ` Marcel Apfelbaum
2014-08-20  9:02   ` Gonglei (Arei)
2014-08-20 10:18     ` Knut Omang
2014-08-20  9:22   ` Knut Omang [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=1408526525.14053.98.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).