Re: [Qemu-devel] [v3 PATCH] target-mips: implement UserLocal Register

2014-05-29 Thread Petar Jovanovic
rel32.net] Sent: Thursday, May 29, 2014 4:26 PM To: Peter Maydell Cc: Petar Jovanovic; r...@twiddle.net; Petar Jovanovic; afaer...@suse.de; qemu-devel@nongnu.org Subject: Re: [Qemu-devel] [v3 PATCH] target-mips: implement UserLocal Register On Thu, May 29, 2014 at 04:06:56PM +0200, Aurelien Jarno wr

Re: [Qemu-devel] [v3 PATCH] target-mips: implement UserLocal Register

2014-05-29 Thread James Hogan
On 29/05/14 16:38, Peter Maydell wrote: > On 29 May 2014 15:29, James Hogan wrote: >> On 29/05/14 14:26, Peter Maydell wrote: >>> On 29 May 2014 14:22, James Hogan wrote: loadvm/migration will write Config3, possibly with a different value if the snapshot being loaded is an older one wi

Re: [Qemu-devel] [v3 PATCH] target-mips: implement UserLocal Register

2014-05-29 Thread Peter Maydell
On 29 May 2014 15:29, James Hogan wrote: > On 29/05/14 14:26, Peter Maydell wrote: >> On 29 May 2014 14:22, James Hogan wrote: >>> loadvm/migration will write Config3, possibly with a different value if >>> the snapshot being loaded is an older one without userlocal support. >> >> Migration load

Re: [Qemu-devel] [v3 PATCH] target-mips: implement UserLocal Register

2014-05-29 Thread James Hogan
On 29/05/14 14:26, Peter Maydell wrote: > On 29 May 2014 14:22, James Hogan wrote: >> loadvm/migration will write Config3, possibly with a different value if >> the snapshot being loaded is an older one without userlocal support. > > Migration load always happens with a freshly reset system, > so

Re: [Qemu-devel] [v3 PATCH] target-mips: implement UserLocal Register

2014-05-29 Thread Aurelien Jarno
On Thu, May 29, 2014 at 04:06:56PM +0200, Aurelien Jarno wrote: > On Thu, May 29, 2014 at 02:48:28PM +0100, Peter Maydell wrote: > > On 29 May 2014 14:35, Petar Jovanovic wrote: > > >> change as CP0_Config3 is a read-only register. If I am right, probably > > >> the best is to check directly env->

Re: [Qemu-devel] [v3 PATCH] target-mips: implement UserLocal Register

2014-05-29 Thread Aurelien Jarno
On Thu, May 29, 2014 at 02:48:28PM +0100, Peter Maydell wrote: > On 29 May 2014 14:35, Petar Jovanovic wrote: > >> change as CP0_Config3 is a read-only register. If I am right, probably > >> the best is to check directly env->CP0_Config3. > > > > If you take a look at v1 of the patch, that's what

Re: [Qemu-devel] [v3 PATCH] target-mips: implement UserLocal Register

2014-05-29 Thread Peter Maydell
On 29 May 2014 14:35, Petar Jovanovic wrote: >> change as CP0_Config3 is a read-only register. If I am right, probably >> the best is to check directly env->CP0_Config3. > > If you take a look at v1 of the patch, that's what was done. > In the code review, this was marked as unacceptable because i

Re: [Qemu-devel] [v3 PATCH] target-mips: implement UserLocal Register

2014-05-29 Thread Aurelien Jarno
On Thu, May 29, 2014 at 01:35:17PM +, Petar Jovanovic wrote: > > change as CP0_Config3 is a read-only register. If I am right, probably > > the best is to check directly env->CP0_Config3. > > If you take a look at v1 of the patch, that's what was done. > In the code review, this was marked as

Re: [Qemu-devel] [v3 PATCH] target-mips: implement UserLocal Register

2014-05-29 Thread Andreas Färber
Am 29.05.2014 15:35, schrieb Petar Jovanovic: >> change as CP0_Config3 is a read-only register. If I am right, probably >> the best is to check directly env->CP0_Config3. > > If you take a look at v1 of the patch, that's what was done. > In the code review, this was marked as unacceptable because

Re: [Qemu-devel] [v3 PATCH] target-mips: implement UserLocal Register

2014-05-29 Thread Petar Jovanovic
> change as CP0_Config3 is a read-only register. If I am right, probably > the best is to check directly env->CP0_Config3. If you take a look at v1 of the patch, that's what was done. In the code review, this was marked as unacceptable because it required [1] passing env within the translator. [

Re: [Qemu-devel] [v3 PATCH] target-mips: implement UserLocal Register

2014-05-29 Thread Peter Maydell
On 29 May 2014 14:22, James Hogan wrote: > loadvm/migration will write Config3, possibly with a different value if > the snapshot being loaded is an older one without userlocal support. Migration load always happens with a freshly reset system, so this isn't a problem. thanks -- PMM

Re: [Qemu-devel] [v3 PATCH] target-mips: implement UserLocal Register

2014-05-29 Thread James Hogan
On 29/05/14 14:08, Aurelien Jarno wrote: > On Thu, May 29, 2014 at 01:01:38PM +, Petar Jovanovic wrote: >>> While adding MIPS_HFLAG_HWRENA_ULR is a good idea for performance >>> reasons, I don't think we should add MIPS_HFLAG_CP0UL. This value is >>> always the same (true or false) during all t

Re: [Qemu-devel] [v3 PATCH] target-mips: implement UserLocal Register

2014-05-29 Thread Aurelien Jarno
On Thu, May 29, 2014 at 01:01:38PM +, Petar Jovanovic wrote: > > While adding MIPS_HFLAG_HWRENA_ULR is a good idea for performance > > reasons, I don't think we should add MIPS_HFLAG_CP0UL. This value is > > always the same (true or false) during all the run time of the > > qemu-system-mips bin

Re: [Qemu-devel] [v3 PATCH] target-mips: implement UserLocal Register

2014-05-29 Thread Petar Jovanovic
> While adding MIPS_HFLAG_HWRENA_ULR is a good idea for performance > reasons, I don't think we should add MIPS_HFLAG_CP0UL. This value is > always the same (true or false) during all the run time of the > qemu-system-mips binary, and thus we don't need to take care of code > generated with it bein

Re: [Qemu-devel] [v3 PATCH] target-mips: implement UserLocal Register

2014-05-29 Thread Aurelien Jarno
On Thu, May 29, 2014 at 02:58:20AM +0200, Petar Jovanovic wrote: > From: Petar Jovanovic > > From MIPS documentation (Volume III): > > UserLocal Register (CP0 Register 4, Select 2) > Compliance Level: Recommended. > > The UserLocal register is a read-write register that is not interpreted by >

[Qemu-devel] [v3 PATCH] target-mips: implement UserLocal Register

2014-05-28 Thread Petar Jovanovic
From: Petar Jovanovic >From MIPS documentation (Volume III): UserLocal Register (CP0 Register 4, Select 2) Compliance Level: Recommended. The UserLocal register is a read-write register that is not interpreted by the hardware and conditionally readable via the RDHWR instruction. This register