[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 02/16] exec.c: Allow target CPUs to define multi
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 02/16] exec.c: Allow target CPUs to define multiple AddressSpaces |
Date: |
Mon, 9 Nov 2015 11:32:02 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 06/11/2015 14:34, Peter Maydell wrote:
>> > IIUC, g_renew may move the entire cpu_ases area. The internals of
>> > memory_listener_register (called below) seem to put away the pointers to
>> > listeners
>> > so a renew+move would leave invalid pointers to listeners in memory.c
>> > wouldn't it?
>> >
>> > There are various ways of solving this, (e.g dynamic allocation of the
>> > listener,
>> > static allocation of the cpu_ases, invalidate all listeners and restore
>> > them after
>> > each as init and more). I'm sure you'll figure something out.
> Oops, yes, you're right.
>
> Maybe we should just have the target CPU say in advance what the
> maximum number of AddressSpaces it will have is -- my expectation
> is that this will be (a) small (b) known in advance anyway.
I agree. Or even just allocate room statically, for the largest amount
that all targets in QEMU use. My expectation is that this will be 2. :)
Paolo
[Qemu-devel] [PATCH 06/16] include/qom/cpu.h: Add new get_phys_page_asidx_debug method, Peter Maydell, 2015/11/05
[Qemu-devel] [PATCH 07/16] exec.c: Use cpu_get_phys_page_asidx_debug, Peter Maydell, 2015/11/05
[Qemu-devel] [PATCH 15/16] [RFC] hw/arm/virt: add secure memory region and UART, Peter Maydell, 2015/11/05
[Qemu-devel] [PATCH 03/16] tlb_set_page_with_attrs: Take argument specifying AddressSpace to use, Peter Maydell, 2015/11/05