Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932267Ab0FDC2x (ORCPT ); Thu, 3 Jun 2010 22:28:53 -0400 Received: from mail-pv0-f174.google.com ([74.125.83.174]:46611 "EHLO mail-pv0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757040Ab0FDC2v convert rfc822-to-8bit (ORCPT ); Thu, 3 Jun 2010 22:28:51 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=b9ushosSytx9KHy23tBLNc7yRKky9/f9L+REzJS4PrBSEVGIY42TDHD9F5cvFODoUf chkcikVU6zZujRHGD2GNSqGIsrk3n2qI0JQXnkSqLg+1jv91zpXT2rIFWxydERFmLP98 2o4CuQ/UeCEVUdb7SMX+2zWqFxF2PccmehPlI= MIME-Version: 1.0 In-Reply-To: References: <20100601183920.GB19955@kroah.com> From: Frank Pan Date: Fri, 4 Jun 2010 10:28:30 +0800 Message-ID: Subject: Re: Add a helper function in PCI IOV to get VF device To: "Williams, Mitch A" Cc: Greg KH , Andrew Morton , Jesse Barnes , Kenji Kaneshige , Yu Zhao , Chris Wright , "Rafael J. Wysocki" , "David S. Miller" , Matt Carlson , "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1620 Lines: 34 > Frank, I still don't understand what you're trying to do here. What's the use case? What is the end goal that you're trying to get to? > > What information do you need about the VF, and why? ?SR-IOV works properly today without this stuff. > > If we can understand what you're trying to do, then maybe we can help. Sorry, I used to think of this issue is common, but maybe not. I'm hacking igb to add support of VF migration. Migration is emerging as a standard of PCI IOV, but has not implemented in intel 82576(igb). The idea is interact with VF's MMIO/PCI configuration in the physical machine, which only PF's driver exists. This work started by userspace. All I know is the PCI BDF of the VF, because give BDF to the VMM is enough to assign a VF to a VM. So here comes the first issue, neither userspace nor PF driver knows the map from VF's ID to BDF. My plan is communicating with PF's driver by sysfs, so I repeatly complain about the sysfs issue. PF can access VF's BAR when it knows VF's ID. On the other hand, PF can access VF's PCI configuration only when if knows VF's BDF. This is the second issue. Even when userspace calculated and gave it an id, PF driver still cannot access the PCI configuration of VF. Really thanks for your help. I'm new on both kernel scope and English scope. :) -- Frank Pan Computer Science and Technology Tsinghua University -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/