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 petar.jovano...@imgtec.com 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

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 being

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 binary,

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 the run

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

2014-05-29 Thread Peter Maydell
On 29 May 2014 14:22, James Hogan james.ho...@imgtec.com 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.

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. [1]

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 it

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 Peter Maydell
On 29 May 2014 14:35, Petar Jovanovic petar.jovano...@imgtec.com 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 Aurelien Jarno
On Thu, May 29, 2014 at 02:48:28PM +0100, Peter Maydell wrote: On 29 May 2014 14:35, Petar Jovanovic petar.jovano...@imgtec.com 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

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 petar.jovano...@imgtec.com wrote: change as CP0_Config3 is a read-only register. If I am right, probably the best is to

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 james.ho...@imgtec.com 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

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

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

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 james.ho...@imgtec.com wrote: On 29/05/14 14:26, Peter Maydell wrote: On 29 May 2014 14:22, James Hogan james.ho...@imgtec.com wrote: loadvm/migration will write Config3, possibly with a different value if the snapshot

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

2014-05-29 Thread Petar Jovanovic
] 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 wrote: On Thu

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

2014-05-28 Thread Petar Jovanovic
From: Petar Jovanovic petar.jovano...@imgtec.com 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