From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:50774) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0b9w-0007Gf-T0 for qemu-devel@nongnu.org; Thu, 23 Feb 2012 11:04:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S0b9u-0006Tg-Jv for qemu-devel@nongnu.org; Thu, 23 Feb 2012 11:04:44 -0500 Received: from mx1.redhat.com ([209.132.183.28]:20569) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0b9u-0006TV-DB for qemu-devel@nongnu.org; Thu, 23 Feb 2012 11:04:42 -0500 Message-ID: <1330013079.4960.6.camel@ul30vt> From: Alex Williamson Date: Thu, 23 Feb 2012 09:04:39 -0700 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Mime-Version: 1.0 Subject: Re: [Qemu-devel] FLR capability hidden in VF config space List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: rukhsana ansari Cc: qemu-devel@nongnu.org, 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 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