qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH, RFC] mips: fix cpu_reset memory leak


From: Aurelien Jarno
Subject: Re: [Qemu-devel] [PATCH, RFC] mips: fix cpu_reset memory leak
Date: Sat, 14 Nov 2009 02:56:48 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

On Tue, Nov 10, 2009 at 04:30:59PM +0100, Aurelien Jarno wrote:
> On Sun, Nov 08, 2009 at 12:50:21PM +0200, Blue Swirl wrote:
> > Both mmu_init() and mvp_init() allocate structures, so call 
> > cpu_mips_register
> > only when creating a CPU.
> > 
> > In addition, maybe some of the some of the field initialization stuff
> > in  cpu_mips_register, mmu_init, mvp_init, fpu_init etc. should be
> > moved to cpu_reset instead, in case the fields should be reset to
> > original values during CPU reset. Maximally only the env->mvp etc.
> > structure allocation would be left to cpu_mips_register. This is the
> > minimal version, but it may be incorrect. Comments?
> 
> There is clearly a problem with some _init functions being called at
> each reset. However, your solution does not reset all the registers upon
> reset. osme of the registers are read-only (e.g. CP0_PRid) so it's not a
> problem, but some other are read-write (e.g. CP0_Config2). It looks like
> we need more code move to fix the problem.
> 

I have just pushed a patch that should fix the problem.

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
address@hidden                 http://www.aurel32.net




reply via email to

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