From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58517) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLaAY-0000Tm-DW for qemu-devel@nongnu.org; Mon, 16 Sep 2013 10:53:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VLaAP-0007E8-Ei for qemu-devel@nongnu.org; Mon, 16 Sep 2013 10:52:54 -0400 Received: from mail-ye0-x231.google.com ([2607:f8b0:4002:c04::231]:54286) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLaAP-0007Dw-9x for qemu-devel@nongnu.org; Mon, 16 Sep 2013 10:52:45 -0400 Received: by mail-ye0-f177.google.com with SMTP id q9so1725746yen.36 for ; Mon, 16 Sep 2013 07:52:44 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <52371B45.8000508@redhat.com> Date: Mon, 16 Sep 2013 16:52:53 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1379342904.17705.69.camel@localhost.localdomain> In-Reply-To: <1379342904.17705.69.camel@localhost.localdomain> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Question] memory: AddressSpace backed by single IO MemoryRegion List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: marcel.a@redhat.com Cc: qemu-devel@nongnu.org, Marcel Apfelbaum Il 16/09/2013 16:48, Marcel Apfelbaum ha scritto: > Hi all, > > I have an AddressSpace backed by a single MemoryRegion which is > initiated using memory_region_init_io (has ops). > Once I enable it, I get an assertion: > exec.c:806: register_subpage: Assertion `existing->mr->subpage || existing->mr == &io_mem_unassigned' failed. > > > Here is the pseudo-code: > memory_region_init_io(my_reg, owner, my_ops, my_obj, "my region", INT64_MAX); > memory_region_set_enabled(my_reg, false); > address_space_init(my_as, my_reg, name); > memory_region_set_enabled(my_reg, true); > Receives: > exec.c:806: register_subpage: Assertion `existing->mr->subpage || existing->mr == &io_mem_unassigned' failed. > > Any idea why? Any suggestion would be appreciated. Backtrace, and print of local variables in mem_add? Paolo