linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sunil Kovvuri <sunil.kovvuri@gmail.com>
To: Bob Biloxi <iambobbiloxi@gmail.com>
Cc: "linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>
Subject: Re: Can a PF driver access the VF config space, BAR(MMIO) etc?
Date: Wed, 24 Sep 2014 23:12:17 +0530	[thread overview]
Message-ID: <CA+sq2CdKkuOpqwPZdAVT90Xkf_K97ArcUUJjv2f9v4WTDmwXxA@mail.gmail.com> (raw)
In-Reply-To: <CANwwZzUvLHVGshgqrf_w4Pz8wP1H95YAXWLpWFTLD1hWKE_voA@mail.gmail.com>

If you anyway want to simulate VF functionality in PF driver itself,
i am not sure why do you need to access VF's config space from PF.

FYI, VF's BAR(MMIO) are not used, MMIO regions are carved using
VF BARs in PF's SRIOV config space.

VFx BAR0 = PF SRIOV BAR0 + BAR_SIZE * x (VF_NUMBER);

For accessing VF's MMIO regions you can try mapping
PF's pci_dev->resource[PCI_IOV_RESOURCES] and using above formula
to get exact MMIO base for corresponding VF.

Regards,
Sunil.

On Wed, Sep 24, 2014 at 10:10 PM, Bob Biloxi <iambobbiloxi@gmail.com> wrote:
> Hi,
>
> I am new to writing pci sriov drivers. So i could use your help and
> expertise here....
>
> As I understand once sriov is enabled, the PF driver can access the
> PF(Physical Function) configuration space, BAR(MMIO) etc and the VF
> driver can access the VF(Virtual Function) configuration space,
> BAR(MMIO)...
>
> Is it possible for a PF driver to access the VF config space, BAR(MMIO)?
> If yes, can you please point me as to what needs to be done in order
> to do it(existing driver sources will be really helpful).
>
> Now as to why this requirement is if the PF driver is ready and the VF
> driver is still under development, and I want to simulate the VF
> functionality from PF itself.
>
> It would be of immense help to me if anyone can help me understand my
> aforementioned query.
>
>
> Thanks a lot!!!
>
>
> Best Regards,
> Bob
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2014-09-24 17:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-24 16:40 Can a PF driver access the VF config space, BAR(MMIO) etc? Bob Biloxi
2014-09-24 17:42 ` Sunil Kovvuri [this message]
2014-09-25  6:50   ` Bob Biloxi

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=CA+sq2CdKkuOpqwPZdAVT90Xkf_K97ArcUUJjv2f9v4WTDmwXxA@mail.gmail.com \
    --to=sunil.kovvuri@gmail.com \
    --cc=iambobbiloxi@gmail.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.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).