From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48619) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WuhVM-00082P-AS for qemu-devel@nongnu.org; Wed, 11 Jun 2014 08:19:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WuhVG-0001Pg-Rt for qemu-devel@nongnu.org; Wed, 11 Jun 2014 08:19:48 -0400 Received: from mail-wi0-x234.google.com ([2a00:1450:400c:c05::234]:57539) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WuhVG-0001PW-KY for qemu-devel@nongnu.org; Wed, 11 Jun 2014 08:19:42 -0400 Received: by mail-wi0-f180.google.com with SMTP id hi2so987359wib.13 for ; Wed, 11 Jun 2014 05:19:41 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Wed, 11 Jun 2014 14:19:23 +0200 Message-Id: <1402489176-19738-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [RFC PATCH 00/13] "Light" memory region QOMification List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.crosthwaite@xilinx.com, afaerber@suse.de This series is an approach to MemoryRegion QOMification that is complementary to Peter's posted patches. Instead of focusing on properties, it places attention on modeling the lifetime of memory regions correctly. MemoryRegions are added to the QOM tree as children of their owner device, and analogously to what was done for devices, memory_region_destroy becomes a simple forwarder for object_unparent. Still, I am including Peter's refactorings and also read-only access to region properties. In fact, with this change memory_region_destroy becomes mostly obsolete, because when the owner dies the children memory regions will be unparented themselves and then (as they lose the last ref) finalized. In other words, this effectively achieves the same as http://lists.gnu.org/archive/html/qemu-devel/2013-09/msg00477.html except it does this by way of removing code rather than adding it! Indeed I have a follow-up that drops all but 7 calls to memory_region_destroy. I have already applied patches 5 and 6 to the memory branch. Paolo Bonzini (5): qom: move unparenting to the child property's release callback qom: delete properties before calling instance_finalize memory: MemoryRegion: use /machine as default owner memory: MemoryRegion: rename parent to container memory: MemoryRegion: replace owner field with QOM parent Peter Crosthwaite (8): qom: object: Ignore refs/unrefs of NULL qom: object: remove parent pointer when unparenting memory: MemoryRegion: factor out subregion add functionality memory: MemoryRegion: factor out memory region re-adder memory: MemoryRegion: QOMify memory: MemoryRegion: Add container and addr props memory: MemoryRegion: Add may-overlap and priority props memory: MemoryRegion: Add size property exec.c | 4 +- include/exec/memory.h | 29 +++--- memory.c | 255 ++++++++++++++++++++++++++++++++++++++++---------- qom/object.c | 29 +++--- 4 files changed, 235 insertions(+), 82 deletions(-) -- 1.8.3.1