[Skiboot] [PATCH] cpufeatures: Add tm-suspend-hypervisor-assist and tm-suspend-xer-so-bug node

Michael Ellerman mpe at ellerman.id.au
Wed Apr 10 22:29:36 AEST 2019


Stewart Smith <stewart at linux.ibm.com> writes:

> Stewart Smith <stewart at linux.ibm.com> writes:
>
>> tm-suspend-hypervisor-assist for P9 >=DD2.2
>> And a tm-suspend-xer-so-bug node for P9 DD2.2 only.
>>
>> I also treat P9P as P9 DD2.3 and add a unit test for the cpufeatures
>> infrastructure.
>>
>> Fixes: https://github.com/open-power/skiboot/issues/233
>> Suggested-by: Paul Mackerras <paulus at ozlabs.org>
>> Signed-off-by: Stewart Smith <stewart at linux.ibm.com>
>> ---
>>  core/cpufeatures.c          |  56 ++++++++++++-
>>  core/test/Makefile.check    |   1 +
>>  core/test/run-cpufeatures.c | 155 ++++++++++++++++++++++++++++++++++++
>>  3 files changed, 209 insertions(+), 3 deletions(-)
>>  create mode 100644 core/test/run-cpufeatures.c
>>
>> diff --git a/core/cpufeatures.c b/core/cpufeatures.c
>> index 070419d9cfb7..530dc77f73c4 100644
>> --- a/core/cpufeatures.c
>> +++ b/core/cpufeatures.c
>> @@ -721,6 +725,39 @@ static const struct cpu_feature cpu_features_table[] = {
>>  	HV_NONE, OS_NONE,
>>  	-1, -1, -1,
>>  	NULL, },
>> +
>> +	/*
>> +	 * Due to hardware bugs in POWER9, the hypervisor needs to assist
>> +	 * guests.
>> +	 *
>> +	 * Presence of this feature indicates presence of the bug.
>> +	 *
>> +	 * See linux kernel commit 4bb3c7a0208f
>> +	 * and linux Documentation/powerpc/transactional_memory.txt
>> +	 */
>> +	{ "tm-suspend-hypervisor-assist",
>> +	CPU_P9_DD2_2|CPU_P9_DD2_3|CPU_P9P,
>> +	ISA_V3_0B, USABLE_HV|USABLE_OS,
>
> After chatting with Nick quickly on Slack, he suggests dropping the
> USABLE_OS.
>
> Another option raised was to also use `errata-` as a prefix for
> these. Thoughts from the gallery?

+1 from me.

cheers


More information about the Skiboot mailing list