qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-arm] [PATCH 02/16] exec.c: Allow target CPUs to define multipl


From: Paolo Bonzini
Subject: Re: [Qemu-arm] [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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]