Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752830AbbKYPcI (ORCPT ); Wed, 25 Nov 2015 10:32:08 -0500 Received: from mail-io0-f194.google.com ([209.85.223.194]:35810 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751194AbbKYPcF convert rfc822-to-8bit (ORCPT ); Wed, 25 Nov 2015 10:32:05 -0500 MIME-Version: 1.0 In-Reply-To: <56556F98.5060507@intel.com> References: <1448372298-28386-1-git-send-email-tianyu.lan@intel.com> <5654722D.4010409@gmail.com> <56552888.90108@intel.com> <56556F98.5060507@intel.com> Date: Wed, 25 Nov 2015 07:32:03 -0800 Message-ID: Subject: Re: [RFC PATCH V2 0/3] IXGBE/VFIO: Add live migration support for SRIOV NIC From: Alexander Duyck To: Lan Tianyu Cc: a.motakis@virtualopensystems.com, Alex Williamson , b.reynal@virtualopensystems.com, Bjorn Helgaas , Carolyn Wyborny , "Skidmore, Donald C" , eddie.dong@intel.com, nrupal.jani@intel.com, Alexander Graf , kvm@vger.kernel.org, Paolo Bonzini , qemu-devel@nongnu.org, "Tantilov, Emil S" , Or Gerlitz , "Rustad, Mark D" , "Michael S. Tsirkin" , Eric Auger , intel-wired-lan , Jeff Kirsher , "Brandeburg, Jesse" , "Ronciak, John" , linux-api@vger.kernel.org, "linux-kernel@vger.kernel.org" , "Vick, Matthew" , Mitch Williams , Netdev , "Nelson, Shannon" , Wei Yang , zajec5@gmail.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2260 Lines: 49 On Wed, Nov 25, 2015 at 12:21 AM, Lan Tianyu wrote: > On 2015年11月25日 13:30, Alexander Duyck wrote: >> No, what I am getting at is that you can't go around and modify the >> configuration space for every possible device out there. This >> solution won't scale. > > > PCI config space regs are emulation by Qemu and so We can find the free > PCI config space regs for the faked PCI capability. Its position can be > not permanent. Yes, but do you really want to edit every driver on every OS that you plan to support this on. What about things like direct assignment of regular Ethernet ports? What you really need is a solution that will work generically on any existing piece of hardware out there. >> If you instead moved the logic for notifying >> the device into a separate mechanism such as making it a part of the >> hot-plug logic then you only have to write the code once per OS in >> order to get the hot-plug capability to pause/resume the device. What >> I am talking about is not full hot-plug, but rather to extend the >> existing hot-plug in Qemu and the Linux kernel to support a >> "pause/resume" functionality. The PCI hot-plug specification calls >> out the option of implementing something like this, but we don't >> currently have support for it. >> > > Could you elaborate the part of PCI hot-plug specification you mentioned? > > My concern is whether it needs to change PCI spec or not. In the PCI Hot-Plug Specification 1.1, in section 4.1.2 it states: In addition to quiescing add-in card activity, an operating-system vendor may optionally implement a less drastic “pause” capability, in anticipation of the same or a similar add-in card being reinserted. The idea I had was basically if we were to implement something like that in Linux then we could pause/resume the device instead of outright removing it. The pause functionality could make use of the suspend/resume functionality most drivers already have for PCI power management. - Alex -- 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/