[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [PATCH 11/16] memory: Add address_space_init_shareable()
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-arm] [PATCH 11/16] memory: Add address_space_init_shareable() |
Date: |
Mon, 9 Nov 2015 12:02:20 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 09/11/2015 11:59, Peter Maydell wrote:
>>> >> + as = g_malloc0(sizeof *as);
>>> >> + address_space_init(as, root, name);
>>> >> + as->malloced = true;
>>> >> + return as;
>>> >> }
>> >
>> > You shouldn't return a non-shareable address space here, I think,
>> > because it might be contained into another object and that object might
>> > disappear. I haven't thought this through very much, but adding an " &&
>> > as->malloced" to the conditional seems easy and safe.
> That would prevent sharing the system address space, which is one
> you really commonly want to share. I guess we could make that one
> be alloced-shareable.
You would only allocate one duplicate of the system address space
though. The second call to address_space_init_shareable would not
create a new AS.
Paolo
[Qemu-arm] [PATCH 11/16] memory: Add address_space_init_shareable(), Peter Maydell, 2015/11/05
[Qemu-arm] [PATCH 06/16] include/qom/cpu.h: Add new get_phys_page_asidx_debug method, Peter Maydell, 2015/11/05
[Qemu-arm] [PATCH 02/16] exec.c: Allow target CPUs to define multiple AddressSpaces, Peter Maydell, 2015/11/05
Re: [Qemu-arm] [PATCH 02/16] exec.c: Allow target CPUs to define multiple AddressSpaces, Paolo Bonzini, 2015/11/09
[Qemu-arm] [PATCH 07/16] exec.c: Use cpu_get_phys_page_asidx_debug, Peter Maydell, 2015/11/05