From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48214) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1tXP-0002MV-Az for qemu-devel@nongnu.org; Tue, 01 Jul 2014 04:35:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X1tXI-0000t1-Io for qemu-devel@nongnu.org; Tue, 01 Jul 2014 04:35:39 -0400 Received: from mail-we0-x22c.google.com ([2a00:1450:400c:c03::22c]:40657) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1tXI-0000sj-0F for qemu-devel@nongnu.org; Tue, 01 Jul 2014 04:35:32 -0400 Received: by mail-we0-f172.google.com with SMTP id u57so9249676wes.3 for ; Tue, 01 Jul 2014 01:35:31 -0700 (PDT) Received: from playground.station (net-37-116-207-238.cust.vodafonedsl.it. [37.116.207.238]) by mx.google.com with ESMTPSA id dj2sm40758365wib.11.2014.07.01.01.35.29 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Jul 2014 01:35:30 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Tue, 1 Jul 2014 10:34:58 +0200 Message-Id: <1404203705-15674-9-git-send-email-pbonzini@redhat.com> In-Reply-To: <1404203705-15674-1-git-send-email-pbonzini@redhat.com> References: <1404203705-15674-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 08/15] memory: MemoryRegion: use /machine as default owner List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This will be added (after QOMification) as the QOM parent. Reviewed-by: Peter Crosthwaite Signed-off-by: Paolo Bonzini --- memory.c | 2 +- vl.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/memory.c b/memory.c index b91a60a..7eaa1e9 100644 --- a/memory.c +++ b/memory.c @@ -849,7 +849,7 @@ void memory_region_init(MemoryRegion *mr, { mr->ops = &unassigned_mem_ops; mr->opaque = NULL; - mr->owner = owner; + mr->owner = owner ? owner : qdev_get_machine(); mr->iommu_ops = NULL; mr->container = NULL; mr->size = int128_make64(size); diff --git a/vl.c b/vl.c index 41ddcd2..88feeab 100644 --- a/vl.c +++ b/vl.c @@ -3986,12 +3986,11 @@ int main(int argc, char **argv, char **envp) exit(1); } - cpu_exec_init_all(); - current_machine = MACHINE(object_new(object_class_get_name( OBJECT_CLASS(machine_class)))); object_property_add_child(object_get_root(), "machine", OBJECT(current_machine), &error_abort); + cpu_exec_init_all(); if (machine_class->hw_version) { qemu_set_version(machine_class->hw_version); -- 1.8.3.1