Re: [Qemu-devel] [Question] memory: AddressSpace backed by single IO MemoryRegion

2013-09-18 Thread Paolo Bonzini
Il 17/09/2013 10:29, Peter Maydell ha scritto: > On 16 September 2013 18:18, Paolo Bonzini wrote: >> Il 16/09/2013 19:11, Marcel Apfelbaum ha scritto: > memory_region_init_io(my_reg, owner, my_ops, my_obj, "my region", > INT64_MAX); >> >> This is 2^63-1, not 2^64-1. You need UINT64_M

Re: [Qemu-devel] [Question] memory: AddressSpace backed by single IO MemoryRegion

2013-09-17 Thread Peter Maydell
On 16 September 2013 18:18, Paolo Bonzini wrote: > Il 16/09/2013 19:11, Marcel Apfelbaum ha scritto: >>> > memory_region_init_io(my_reg, owner, my_ops, my_obj, "my region", >>> > INT64_MAX); > > This is 2^63-1, not 2^64-1. You need UINT64_MAX here. So does this mean address_space_init()'s b

Re: [Qemu-devel] [Question] memory: AddressSpace backed by single IO MemoryRegion

2013-09-16 Thread Marcel Apfelbaum
On Mon, 2013-09-16 at 19:18 +0200, Paolo Bonzini wrote: > Il 16/09/2013 19:11, Marcel Apfelbaum ha scritto: > >> > memory_region_init_io(my_reg, owner, my_ops, my_obj, "my region", > >> > INT64_MAX); > > This is 2^63-1, not 2^64-1. You need UINT64_MAX here. Ooops! Thanks a lot and sorry for

Re: [Qemu-devel] [Question] memory: AddressSpace backed by single IO MemoryRegion

2013-09-16 Thread Marcel Apfelbaum
On Mon, 2013-09-16 at 16:52 +0200, Paolo Bonzini wrote: > 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: > > exe

Re: [Qemu-devel] [Question] memory: AddressSpace backed by single IO MemoryRegion

2013-09-16 Thread Paolo Bonzini
Il 16/09/2013 19:11, Marcel Apfelbaum ha scritto: >> > memory_region_init_io(my_reg, owner, my_ops, my_obj, "my region", >> > INT64_MAX); This is 2^63-1, not 2^64-1. You need UINT64_MAX here. Paolo >> > memory_region_set_enabled(my_reg, false); >> > address_space_init(my_as, my_reg

Re: [Qemu-devel] [Question] memory: AddressSpace backed by single IO MemoryRegion

2013-09-16 Thread Marcel Apfelbaum
On Monday, September 16, 2013, Paolo Bonzini wrote: > Il 16/09/2013 16:48, Marcel Apfelbaum ha scritto: >> Hi all, >> >> I have an AddressSpace backed by a single MemoryRegion which yis >> initiated using memoy_region_init_io (has ops). >> Once I enable it, I get an assertion: >>     exec.c:806: r

Re: [Qemu-devel] [Question] memory: AddressSpace backed by single IO MemoryRegion

2013-09-16 Thread Paolo Bonzini
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 || > exis

[Qemu-devel] [Question] memory: AddressSpace backed by single IO MemoryRegion

2013-09-16 Thread Marcel Apfelbaum
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-cod