From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MEPfL-0004j3-1C for qemu-devel@nongnu.org; Wed, 10 Jun 2009 11:24:39 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MEPfG-0004gZ-65 for qemu-devel@nongnu.org; Wed, 10 Jun 2009 11:24:38 -0400 Received: from [199.232.76.173] (port=55842 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MEPfF-0004gT-TD for qemu-devel@nongnu.org; Wed, 10 Jun 2009 11:24:33 -0400 Received: from mx20.gnu.org ([199.232.41.8]:59127) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MEPfF-0005lh-Kt for qemu-devel@nongnu.org; Wed, 10 Jun 2009 11:24:33 -0400 Received: from mail.codesourcery.com ([65.74.133.4]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MEPfE-0004e9-Uc for qemu-devel@nongnu.org; Wed, 10 Jun 2009 11:24:33 -0400 From: Paul Brook Subject: Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities Date: Wed, 10 Jun 2009 16:24:28 +0100 References: <20090610145540.GI19375@poweredge.glommer> <20090610150129.GC28601@redhat.com> In-Reply-To: <20090610150129.GC28601@redhat.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200906101624.30659.paul@codesourcery.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Carsten Otte , kvm@vger.kernel.org, "Michael S. Tsirkin" , Glauber Costa , Rusty Russell , virtualization@lists.linux-foundation.org, Blue Swirl , Christian Borntraeger , Avi Kivity > > caps can be anywhere, but we don't expect it to change during machine > > execution lifetime. > > > > Or I am just confused by the name "pci_device_load" ? > > Right. So I want to load an image and it has capability X at offset Y. > wmask has to match. I don't want to assume that we never change Y > for the device without breaking old images, so I clear wmask here > and set it up again after looking up capabilities that I loaded. We should not be loading state into a different device (or a similar device with a different set of capabilities). If you want to provide backwards compatibility then you should do that by creating a device that is the same as the original. As I mentioned in my earlier mail, loading a snapshot should never do anything that can not be achieved through normal operation. Paul