From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?iso-8859-1?Q?Beno=EEt?= Canet Subject: Re: [Qemu-devel] SR-IOV PF reset and QEMU VFs VFIO passthrough Date: Mon, 3 Jun 2013 23:27:23 +0200 Message-ID: <20130603212723.GG4094@irqsave.net> References: <20130601121320.GC5157@irqsave.net> <51ACE340.1030406@redhat.com> <20130603192958.GB31044@irqsave.net> <51AD02B1.8070503@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: <51AD02B1.8070503-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Don Dutile Cc: =?iso-8859-1?Q?Beno=EEt?= Canet , linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, qemu-devel-qX2TKyscuCcdnm+yROfE0A@public.gmane.org List-Id: iommu@lists.linux-foundation.org > >I was asking this because the PF driver should reset the PF while the VF= are > >used by VFIO/QEMU when the PF doesn't respond anymore. > > > What your VF does while your PF is being reset is PF (& VF) dependent. > A 'good design' would not impact the VF operation, other than to stall it= until > the PF completed reset. My experience, though, is that the PF has to be = brought > up to some level of functionality to share the physical resources with th= e VFs. When the PF does an FLR the hardware go back to its default state, the SR-I= OV configuration is gone and the VFs disappears from the bus. Then the restore state function of the kernel reset code would bring the SR= -IOV PF configuration back. The hardware also have a privately owned SR-IOV related configuration in th= e PF configuration space. This configuration is used to configure the VFs resour= ces. (memory) Best regards Beno=EEt Canet From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nodalink.pck.nerim.net ([62.212.105.220]:52985 "EHLO paradis.irqsave.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753676Ab3FCVZ5 (ORCPT ); Mon, 3 Jun 2013 17:25:57 -0400 Date: Mon, 3 Jun 2013 23:27:23 +0200 From: =?iso-8859-1?Q?Beno=EEt?= Canet To: Don Dutile Cc: =?iso-8859-1?Q?Beno=EEt?= Canet , linux-pci@vger.kernel.org, qemu-devel@nongnu.org, iommu@lists.linux-foundation.org, alex.williamson@redhat.com Subject: Re: [Qemu-devel] SR-IOV PF reset and QEMU VFs VFIO passthrough Message-ID: <20130603212723.GG4094@irqsave.net> References: <20130601121320.GC5157@irqsave.net> <51ACE340.1030406@redhat.com> <20130603192958.GB31044@irqsave.net> <51AD02B1.8070503@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 In-Reply-To: <51AD02B1.8070503@redhat.com> Sender: linux-pci-owner@vger.kernel.org List-ID: > >I was asking this because the PF driver should reset the PF while the VF are > >used by VFIO/QEMU when the PF doesn't respond anymore. > > > What your VF does while your PF is being reset is PF (& VF) dependent. > A 'good design' would not impact the VF operation, other than to stall it until > the PF completed reset. My experience, though, is that the PF has to be brought > up to some level of functionality to share the physical resources with the VFs. When the PF does an FLR the hardware go back to its default state, the SR-IOV configuration is gone and the VFs disappears from the bus. Then the restore state function of the kernel reset code would bring the SR-IOV PF configuration back. The hardware also have a privately owned SR-IOV related configuration in the PF configuration space. This configuration is used to configure the VFs resources. (memory) Best regards Benoît Canet From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54971) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjcGN-0002Qs-2f for qemu-devel@nongnu.org; Mon, 03 Jun 2013 17:25:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UjcGL-0007RR-T3 for qemu-devel@nongnu.org; Mon, 03 Jun 2013 17:25:58 -0400 Received: from nodalink.pck.nerim.net ([62.212.105.220]:32860 helo=paradis.irqsave.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjcGL-0007R9-K4 for qemu-devel@nongnu.org; Mon, 03 Jun 2013 17:25:57 -0400 Date: Mon, 3 Jun 2013 23:27:23 +0200 From: =?iso-8859-1?Q?Beno=EEt?= Canet Message-ID: <20130603212723.GG4094@irqsave.net> References: <20130601121320.GC5157@irqsave.net> <51ACE340.1030406@redhat.com> <20130603192958.GB31044@irqsave.net> <51AD02B1.8070503@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <51AD02B1.8070503@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] SR-IOV PF reset and QEMU VFs VFIO passthrough List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Don Dutile Cc: =?iso-8859-1?Q?Beno=EEt?= Canet , linux-pci@vger.kernel.org, iommu@lists.linux-foundation.org, alex.williamson@redhat.com, qemu-devel@nongnu.org > >I was asking this because the PF driver should reset the PF while the = VF are > >used by VFIO/QEMU when the PF doesn't respond anymore. > > > What your VF does while your PF is being reset is PF (& VF) dependent. > A 'good design' would not impact the VF operation, other than to stall = it until > the PF completed reset. My experience, though, is that the PF has to b= e brought > up to some level of functionality to share the physical resources with = the VFs. When the PF does an FLR the hardware go back to its default state, the SR= -IOV configuration is gone and the VFs disappears from the bus. Then the restore state function of the kernel reset code would bring the = SR-IOV PF configuration back. The hardware also have a privately owned SR-IOV related configuration in = the PF configuration space. This configuration is used to configure the VFs reso= urces. (memory) Best regards Beno=EEt Canet