All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sreekanth Reddy <sreekanth.reddy@avagotech.com>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-pci@vger.kernel.org, konrad.wilk@oracle.com,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Christoph Hellwig <hch@lst.de>,
	boris.ostrovsky@oracle.com,
	Sathya Prakash <sathya.prakash@avagotech.com>,
	Nagalakshmi Nandigama <nagalakshmi.nandigama@avagotech.com>
Subject: Re: How to get the number of VFs assigned to the guests in XEN
Date: Wed, 20 Aug 2014 19:14:25 +0530	[thread overview]
Message-ID: <CAK=zhgrFV10k0yzOrkSnmYJge3M+kQrcNz9e5qZZ5q180NY2xQ@mail.gmail.com> (raw)
In-Reply-To: <1408538771.11383.33.camel@ul30vt.home>

Thanks Alex,

Then, Is there any other ways to stop accidental unload of PF driver
while still some VFs are accessing by the running VMs.

Regards,
Sreekanth

On Wed, Aug 20, 2014 at 6:16 PM, Alex Williamson
<alex.williamson@redhat.com> wrote:
> On Wed, 2014-08-20 at 16:39 +0530, Sreekanth Reddy wrote:
>> HI,
>>
>> For SRIOV support, currently in the KVM environment, mpt3sas driver
>> can use the API pci_vfs_assigned() to know the number of VFs that are
>> currently assigned to the running VMs. So that during the PF driver
>> unload time, if the return value of this API is greater than zero the
>> our driver won't call the pci_disable_sriov() to disable the VFs.
>>
>> Now for the same purpose in XEN environment, is there any API similar
>> to pci_vfs_assigned() which the low lever device driver can use to
>> know 'the number of VFs that are currently assigned to the running
>> VMs'. In XEN environment this API pci_vfs_assigned() will return
>> always zero even though VFs are assigned to the running VMs.
>
> Note that pci_vfs_assigned() assigned is only used by legacy KVM device
> assignment and primarily as a workaround for not using an actual
> host-based device driver to manage device ownership.  When using
> VFIO-based device assignment with KVM, pci_vfs_assigned() is not
> updated.  Please don't rely on this interface.  Thanks,
>
> Alex
>

  reply	other threads:[~2014-08-20 13:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-20 11:09 How to get the number of VFs assigned to the guests in XEN Sreekanth Reddy
2014-08-20 12:46 ` Alex Williamson
2014-08-20 13:44   ` Sreekanth Reddy [this message]
2014-08-20 14:09     ` Alex Williamson
     [not found] <CAK=zhgpH2tG-EG4QP1SE46e+uHXA+GJGOPA1vi8UqAfRZ-EFTA@mail.gmail.com>
2014-08-20 22:29 ` Konrad Rzeszutek Wilk
2014-08-21  8:20   ` Sreekanth Reddy

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='CAK=zhgrFV10k0yzOrkSnmYJge3M+kQrcNz9e5qZZ5q180NY2xQ@mail.gmail.com' \
    --to=sreekanth.reddy@avagotech.com \
    --cc=alex.williamson@redhat.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=hch@lst.de \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=nagalakshmi.nandigama@avagotech.com \
    --cc=sathya.prakash@avagotech.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 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.