* [Qemu-devel] FLR capability hidden in VF config space
@ 2012-02-15 9:24 rukhsana ansari
2012-02-23 3:55 ` rukhsana ansari
0 siblings, 1 reply; 4+ messages in thread
From: rukhsana ansari @ 2012-02-15 9:24 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 647 bytes --]
Hi,
The following code snippet (line 1457,
function:assigned_device_pci_cap_init() file: hw/device-assignment.c)
from the latest qemu-kvm git (qemu-kvm-devel: 1.0.50) implies that FLR
capability is unset for VF that is assigned to a guest:
/* device capabilities: hide FLR */
devcap = pci_get_long(pci_dev->config + pos + PCI_EXP_DEVCAP);
devcap &= ~PCI_EXP_DEVCAP_FLR;
pci_set_long(pci_dev->config + pos + PCI_EXP_DEVCAP, devcap);
However the SR-IOV spec mandates VF FLR.
Could someone explain the reason for unsetting the FLR bit in the PCI
Express device capabilities register of the VF?
Thanks
-Rukhsana
[-- Attachment #2: Type: text/html, Size: 724 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] FLR capability hidden in VF config space
2012-02-15 9:24 [Qemu-devel] FLR capability hidden in VF config space rukhsana ansari
@ 2012-02-23 3:55 ` rukhsana ansari
2012-02-23 16:04 ` Alex Williamson
0 siblings, 1 reply; 4+ messages in thread
From: rukhsana ansari @ 2012-02-23 3:55 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 968 bytes --]
Hello,
Was wondering whether someone could shed some light on the issue below.
Without FLR exposed in the VF, VF reset via FLR cannot be initiated from
the guest.
Appreciate any pointers.
Thanks,
Rukhsana
On Wed, Feb 15, 2012 at 2:54 PM, rukhsana ansari <ruk.ansari@gmail.com>wrote:
> Hi,
>
> The following code snippet (line 1457,
> function:assigned_device_pci_cap_init() file: hw/device-assignment.c)
> from the latest qemu-kvm git (qemu-kvm-devel: 1.0.50) implies that FLR
> capability is unset for VF that is assigned to a guest:
>
> /* device capabilities: hide FLR */
> devcap = pci_get_long(pci_dev->config + pos + PCI_EXP_DEVCAP);
> devcap &= ~PCI_EXP_DEVCAP_FLR;
> pci_set_long(pci_dev->config + pos + PCI_EXP_DEVCAP, devcap);
>
>
> However the SR-IOV spec mandates VF FLR.
> Could someone explain the reason for unsetting the FLR bit in the PCI
> Express device capabilities register of the VF?
>
> Thanks
> -Rukhsana
>
[-- Attachment #2: Type: text/html, Size: 1424 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] FLR capability hidden in VF config space
2012-02-23 3:55 ` rukhsana ansari
@ 2012-02-23 16:04 ` Alex Williamson
2012-02-24 11:02 ` rukhsana ansari
0 siblings, 1 reply; 4+ messages in thread
From: Alex Williamson @ 2012-02-23 16:04 UTC (permalink / raw)
To: rukhsana ansari; +Cc: qemu-devel, kvm
On Thu, 2012-02-23 at 09:25 +0530, rukhsana ansari wrote:
> Hello,
>
> Was wondering whether someone could shed some light on the issue below.
> Without FLR exposed in the VF, VF reset via FLR cannot be initiated from
> the guest.
> Appreciate any pointers.
The device state needs to be restored after an FLR. A guest is not able
to do this by this by itself as much of the config space is virtualized.
That means qemu needs to be involved in the FLR. It's possible we could
trap FLR and call reset_assign_device(). Patches welcome. Why do want
to reset the device?
> On Wed, Feb 15, 2012 at 2:54 PM, rukhsana ansari <ruk.ansari@gmail.com>wrote:
>
> > Hi,
> >
> > The following code snippet (line 1457,
> > function:assigned_device_pci_cap_init() file: hw/device-assignment.c)
> > from the latest qemu-kvm git (qemu-kvm-devel: 1.0.50) implies that FLR
> > capability is unset for VF that is assigned to a guest:
> >
> > /* device capabilities: hide FLR */
> > devcap = pci_get_long(pci_dev->config + pos + PCI_EXP_DEVCAP);
> > devcap &= ~PCI_EXP_DEVCAP_FLR;
> > pci_set_long(pci_dev->config + pos + PCI_EXP_DEVCAP, devcap);
> >
> >
> > However the SR-IOV spec mandates VF FLR.
The SR-IOV spec mandates that the VF supports FLR. That doesn't mean it
has to be exposed though to a guest. Thanks,
Alex
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] FLR capability hidden in VF config space
2012-02-23 16:04 ` Alex Williamson
@ 2012-02-24 11:02 ` rukhsana ansari
0 siblings, 0 replies; 4+ messages in thread
From: rukhsana ansari @ 2012-02-24 11:02 UTC (permalink / raw)
To: Alex Williamson; +Cc: qemu-devel, kvm
[-- Attachment #1: Type: text/plain, Size: 1959 bytes --]
Thanks Alex. Pls see my responses below:
On Thu, Feb 23, 2012 at 9:34 PM, Alex Williamson <alex.williamson@redhat.com
> wrote:
> On Thu, 2012-02-23 at 09:25 +0530, rukhsana ansari wrote:
> > Hello,
> >
> > Was wondering whether someone could shed some light on the issue below.
> > Without FLR exposed in the VF, VF reset via FLR cannot be initiated from
> > the guest.
> > Appreciate any pointers.
>
> The device state needs to be restored after an FLR. A guest is not able
> to do this by this by itself as much of the config space is virtualized.
> That means qemu needs to be involved in the FLR. It's possible we could
> trap FLR and call reset_assign_device(). Patches welcome. Why do want
> to reset the device?
>
[RA] While trying to figure out what the reason for not exposing FLR in VF,
I had missed out what you brought up about the VF config space being
virtualized.
The reason for looking at FLR support in VF (apart from ease of testing
using setpci) is as a possible replacement of driver specific mechanism to
initiate software FLR (for example via mailbox mechanism) when VF
driver get a shutdown call.
But given the issue with config space being virtualized, it makes sense to
continue with the current approach
> >
> > The following code snippet (line 1457,
> > function:assigned_device_pci_cap_init() file: hw/device-assignment.c)
> > from the latest qemu-kvm git (qemu-kvm-devel: 1.0.50) implies that FLR
> > capability is unset for VF that is assigned to a guest:
> >
> > /* device capabilities: hide FLR */
> > devcap = pci_get_long(pci_dev->config + pos + PCI_EXP_DEVCAP);
> > devcap &= ~PCI_EXP_DEVCAP_FLR;
> > pci_set_long(pci_dev->config + pos + PCI_EXP_DEVCAP, devcap);
> >
> >
> > However the SR-IOV spec mandates VF FLR.
The SR-IOV spec mandates that the VF supports FLR. That doesn't mean it
> has to be exposed though to a guest. Thanks,
>
>
[RA] Yes, point noted.
--
-Rukhsana
[-- Attachment #2: Type: text/html, Size: 2651 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-02-24 11:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-15 9:24 [Qemu-devel] FLR capability hidden in VF config space rukhsana ansari
2012-02-23 3:55 ` rukhsana ansari
2012-02-23 16:04 ` Alex Williamson
2012-02-24 11:02 ` rukhsana ansari
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).