Re: [Qemu-devel] [RFC PATCH v2 1/2] utils: Add helper to read arm MIDR_EL1 register

2016-08-19 Thread Richard Henderson
On 08/19/2016 02:05 AM, Vijay Kilari wrote: On Thu, Aug 18, 2016 at 8:26 PM, Peter Maydell wrote: On 18 August 2016 at 15:46, Richard Henderson wrote: On 08/18/2016 07:14 AM, Peter Maydell wrote: While we're on the subject, can somebody explain to

Re: [Qemu-devel] [RFC PATCH v2 1/2] utils: Add helper to read arm MIDR_EL1 register

2016-08-19 Thread Vijay Kilari
On Thu, Aug 18, 2016 at 8:26 PM, Peter Maydell wrote: > On 18 August 2016 at 15:46, Richard Henderson wrote: >> On 08/18/2016 07:14 AM, Peter Maydell wrote: >>> While we're on the subject, can somebody explain to me why we >>> use ifuncs at all? I

Re: [Qemu-devel] [RFC PATCH v2 1/2] utils: Add helper to read arm MIDR_EL1 register

2016-08-18 Thread Peter Maydell
On 18 August 2016 at 15:46, Richard Henderson wrote: > On 08/18/2016 07:14 AM, Peter Maydell wrote: >> While we're on the subject, can somebody explain to me why we >> use ifuncs at all? I couldn't work out why it would be better than >> just using a straightforward function

Re: [Qemu-devel] [RFC PATCH v2 1/2] utils: Add helper to read arm MIDR_EL1 register

2016-08-18 Thread Richard Henderson
On 08/18/2016 07:14 AM, Peter Maydell wrote: On 18 August 2016 at 15:04, Richard Henderson wrote: or (2) ifunc While we're on the subject, can somebody explain to me why we use ifuncs at all? I couldn't work out why it would be better than just using a straightforward

Re: [Qemu-devel] [RFC PATCH v2 1/2] utils: Add helper to read arm MIDR_EL1 register

2016-08-18 Thread Peter Maydell
On 18 August 2016 at 15:04, Richard Henderson wrote: > or (2) ifunc While we're on the subject, can somebody explain to me why we use ifuncs at all? I couldn't work out why it would be better than just using a straightforward function pointer -- when I tried single stepping

Re: [Qemu-devel] [RFC PATCH v2 1/2] utils: Add helper to read arm MIDR_EL1 register

2016-08-18 Thread Richard Henderson
On 08/18/2016 02:39 AM, Paolo Bonzini wrote: On 18/08/2016 11:01, Vijay Kilari wrote: On Thu, Aug 18, 2016 at 2:20 PM, Paolo Bonzini wrote: On 18/08/2016 09:56, Vijay Kilari wrote: The get_aarch_cpu_id() has check " if (unlikely(!cpu_info_read)) ". If we call

Re: [Qemu-devel] [RFC PATCH v2 1/2] utils: Add helper to read arm MIDR_EL1 register

2016-08-18 Thread Paolo Bonzini
On 18/08/2016 11:01, Vijay Kilari wrote: > On Thu, Aug 18, 2016 at 2:20 PM, Paolo Bonzini wrote: >> >> >> On 18/08/2016 09:56, Vijay Kilari wrote: >>> The get_aarch_cpu_id() has check " if (unlikely(!cpu_info_read)) ". >>> If we call get_aarch_cpu_id() from

Re: [Qemu-devel] [RFC PATCH v2 1/2] utils: Add helper to read arm MIDR_EL1 register

2016-08-18 Thread Vijay Kilari
On Thu, Aug 18, 2016 at 2:20 PM, Paolo Bonzini wrote: > > > On 18/08/2016 09:56, Vijay Kilari wrote: >> The get_aarch_cpu_id() has check " if (unlikely(!cpu_info_read)) ". >> If we call get_aarch_cpu_id() from is_thunderx_pass2_cpu() which is >> called from inside the loop,

Re: [Qemu-devel] [RFC PATCH v2 1/2] utils: Add helper to read arm MIDR_EL1 register

2016-08-18 Thread Paolo Bonzini
On 18/08/2016 09:56, Vijay Kilari wrote: > The get_aarch_cpu_id() has check " if (unlikely(!cpu_info_read)) ". > If we call get_aarch_cpu_id() from is_thunderx_pass2_cpu() which is > called from inside the loop, we will be adding one additional check. On the other hand, you are making an

Re: [Qemu-devel] [RFC PATCH v2 1/2] utils: Add helper to read arm MIDR_EL1 register

2016-08-18 Thread Vijay Kilari
On Wed, Aug 17, 2016 at 7:09 PM, Paolo Bonzini wrote: > > > On 16/08/2016 14:02, vijay.kil...@gmail.com wrote: >> From: Vijaya Kumar K >> >> Add helper API to read MIDR_EL1 registers to fetch >> cpu identification information. This helps in >> adding

Re: [Qemu-devel] [RFC PATCH v2 1/2] utils: Add helper to read arm MIDR_EL1 register

2016-08-17 Thread Paolo Bonzini
On 16/08/2016 14:02, vijay.kil...@gmail.com wrote: > From: Vijaya Kumar K > > Add helper API to read MIDR_EL1 registers to fetch > cpu identification information. This helps in > adding errata's and architecture specific features. > > This is implemented only for arm

[Qemu-devel] [RFC PATCH v2 1/2] utils: Add helper to read arm MIDR_EL1 register

2016-08-16 Thread vijay . kilari
From: Vijaya Kumar K Add helper API to read MIDR_EL1 registers to fetch cpu identification information. This helps in adding errata's and architecture specific features. This is implemented only for arm architecture. Signed-off-by: Vijaya Kumar K