From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52682) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGpnp-0006Gz-1z for qemu-devel@nongnu.org; Tue, 03 Sep 2013 08:33:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VGpnf-0006H1-Uu for qemu-devel@nongnu.org; Tue, 03 Sep 2013 08:33:48 -0400 Received: from mail-ee0-x22e.google.com ([2a00:1450:4013:c00::22e]:59381) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGpnf-0006Gt-Nw for qemu-devel@nongnu.org; Tue, 03 Sep 2013 08:33:39 -0400 Received: by mail-ee0-f46.google.com with SMTP id c13so2951674eek.5 for ; Tue, 03 Sep 2013 05:33:39 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Tue, 3 Sep 2013 14:32:52 +0200 Message-Id: <1378211609-16121-2-git-send-email-pbonzini@redhat.com> In-Reply-To: <1378211609-16121-1-git-send-email-pbonzini@redhat.com> References: <1378211609-16121-1-git-send-email-pbonzini@redhat.com> Subject: [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: qemu-devel@nongnu.org Cc: mst@redhat.com 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). 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