lkml.org 
[lkml]   [2018]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3] powerpc/kernel/sysfs: Export ldbar spr to sysfs
From
Date
Hi,


On Tuesday 06 March 2018 04:35 PM, Michael Ellerman wrote:
> Anju T Sudhakar <anju@linux.vnet.ibm.com> writes:
>
>> diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c
>> index 4437c70..caefb64 100644
>> --- a/arch/powerpc/kernel/sysfs.c
>> +++ b/arch/powerpc/kernel/sysfs.c
>> @@ -757,6 +759,9 @@ static int register_cpu_online(unsigned int cpu)
>> device_create_file(s, &pmc_attrs[i]);
>>
>> #ifdef CONFIG_PPC64
>> + if (cpu_has_feature(CPU_FTR_ARCH_300))
>> + device_create_file(s, &dev_attr_ldbar);
> Is this register readable in supervisor state?

This is a nice catch, thanks. :)
The guest kernel can not access the register, it is only readable in the
hypervisor state.
I will resend the patch with a condition check so that this spr will not
get registered for guest kernel.


Regards,
Anju
>
> cheers
>

\
 
 \ /
  Last update: 2018-03-13 06:44    [W:0.060 / U:3.500 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site