From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=34852 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ON6rX-0006Lw-M8 for qemu-devel@nongnu.org; Fri, 11 Jun 2010 12:13:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ON6rV-0008TP-N7 for qemu-devel@nongnu.org; Fri, 11 Jun 2010 12:13:43 -0400 Received: from mail.codesourcery.com ([38.113.113.100]:33175) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ON6rV-0008T0-Cm for qemu-devel@nongnu.org; Fri, 11 Jun 2010 12:13:41 -0400 From: Paul Brook Subject: Re: [Qemu-devel] [RFC PATCH 3/6] RAMBlock: Add a name field Date: Fri, 11 Jun 2010 17:12:35 +0100 References: <20100608191447.4451.47795.stgit@localhost.localdomain> <4C11F858.4050904@redhat.com> <1276271431.3100.26.camel@x201> In-Reply-To: <1276271431.3100.26.camel@x201> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201006111712.35756.paul@codesourcery.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex Williamson Cc: chrisw@redhat.com, kvm@vger.kernel.org, quintela@redhat.com, qemu-devel@nongnu.org, Gerd Hoffmann > The trouble I'm running into is that the SaveStateEntry.instance_id is > effectively private, and there's no easy way to associate a > SaveStateEntry to a device since it passes an opaque pointer, which > could be whatever the driver decides it wants. I'm wondering if we > should pass the DeviceState pointer in when registering the vmstate so > that we can stuff the instance_id into the DeviceInfo. Or maybe > DeviceInfo should include a pointer to the SaveStateEntry. It all seems > pretty messy. Any thoughts? DeviceInfo is effectively a const structure (it may be modified at startup, but there's only one of it shared between multiple devices). I suspect you mean DeviceState. Most likely a lot of the messyness is because we still have devices that have not been qdev-ified, so the VMState code can't assume it has a device. We should fix this. Paul