All of lore.kernel.org
 help / color / mirror / Atom feed
* Can a PF driver access the VF config space, BAR(MMIO) etc?
@ 2014-09-24 16:40 Bob Biloxi
       [not found] ` <CANwwZzUvLHVGshgqrf_w4Pz8wP1H95YAXWLpWFTLD1hWKE_voA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Bob Biloxi @ 2014-09-24 16:40 UTC (permalink / raw)
  To: linux-pci, linux-rdma

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Can a PF driver access the VF config space, BAR(MMIO) etc?
  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
  0 siblings, 0 replies; 4+ messages in thread
From: Sunil Kovvuri @ 2014-09-24 17:42 UTC (permalink / raw)
  To: Bob Biloxi
  Cc: linux-pci-u79uwXL29TY76Z2rM5mHXA, linux-rdma-u79uwXL29TY76Z2rM5mHXA

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-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Can a PF driver access the VF config space, BAR(MMIO) etc?
@ 2014-09-24 17:42     ` Sunil Kovvuri
  0 siblings, 0 replies; 4+ messages in thread
From: Sunil Kovvuri @ 2014-09-24 17:42 UTC (permalink / raw)
  To: Bob Biloxi; +Cc: linux-pci, linux-rdma

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Can a PF driver access the VF config space, BAR(MMIO) etc?
  2014-09-24 17:42     ` Sunil Kovvuri
  (?)
@ 2014-09-25  6:50     ` Bob Biloxi
  -1 siblings, 0 replies; 4+ messages in thread
From: Bob Biloxi @ 2014-09-25  6:50 UTC (permalink / raw)
  To: Sunil Kovvuri; +Cc: linux-pci, linux-rdma

Hi,

Thanks so much for the quick reply! This is really helpful.
I will try to do the same and would get back if i face any difficulties.


Thanks again!

Best Regards,
Bob

On Wed, Sep 24, 2014 at 11:12 PM, Sunil Kovvuri <sunil.kovvuri@gmail.com> wrote:
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-09-25  6:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-24 16:40 Can a PF driver access the VF config space, BAR(MMIO) etc? Bob Biloxi
     [not found] ` <CANwwZzUvLHVGshgqrf_w4Pz8wP1H95YAXWLpWFTLD1hWKE_voA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-09-24 17:42   ` Sunil Kovvuri
2014-09-24 17:42     ` Sunil Kovvuri
2014-09-25  6:50     ` Bob Biloxi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.