From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59302) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLr6p-0005AC-Hm for qemu-devel@nongnu.org; Tue, 17 Sep 2013 04:58:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VLr6j-0006Wv-HH for qemu-devel@nongnu.org; Tue, 17 Sep 2013 04:58:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9747) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLr6j-0006Wn-9c for qemu-devel@nongnu.org; Tue, 17 Sep 2013 04:58:05 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r8H8w3X1029837 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 17 Sep 2013 04:58:03 -0400 Date: Tue, 17 Sep 2013 12:00:15 +0300 From: "Michael S. Tsirkin" Message-ID: <20130917090015.GA18186@redhat.com> References: <1378211609-16121-1-git-send-email-pbonzini@redhat.com> <1378211609-16121-2-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1378211609-16121-2-git-send-email-pbonzini@redhat.com> Subject: Re: [Qemu-devel] [PATCH 01/38] qdev: document assumption that unrealize is followed by finalize List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org On Tue, Sep 03, 2013 at 02:32:52PM +0200, Paolo Bonzini wrote: > This becomes important when undoing realize's initializations is split > in two places (unrealize and exit). > > The way to fix this could be to split realize further into "alloc" (done > once) and "realize" (can be undone). Or alloc + init ? > > Signed-off-by: Paolo Bonzini > --- > include/hw/qdev-core.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h > index 46972f4..d840f06 100644 > --- a/include/hw/qdev-core.h > +++ b/include/hw/qdev-core.h > @@ -86,6 +86,10 @@ struct VMStateDescription; > * object_initialize() in their own #TypeInfo.instance_init and forward the > * realization events appropriately. > * > + * Note that for now it is not possible to unrealize a device and then > + * re-realize it. While this may change in the future, it is a valid > + * assumption for now. > + * > * The @init callback is considered private to a particular bus implementation > * (immediate abstract child types of TYPE_DEVICE). Derived leaf types set an > * "init" callback on their parent class instead. > -- > 1.8.3.1 >