[PATCH v2 01/16] powerpc/xive: add OPAL extensions for the XIVE native exploitation support

Cédric Le Goater clg at kaod.org
Mon Feb 25 21:11:58 AEDT 2019


On 2/25/19 4:50 AM, Michael Ellerman wrote:
> Cédric Le Goater <clg at kaod.org> writes:
> 
>> The support for XIVE native exploitation mode in Linux/KVM needs a
>> couple more OPAL calls to configure the sPAPR guest and to get/set the
>> state of the XIVE internal structures.
>>
>> Signed-off-by: Cédric Le Goater <clg at kaod.org>
>> ---
>>  arch/powerpc/include/asm/opal-api.h           | 11 ++-
>>  arch/powerpc/include/asm/opal.h               |  7 ++
>>  arch/powerpc/include/asm/xive.h               | 14 +++
>>  arch/powerpc/sysdev/xive/native.c             | 99 +++++++++++++++++++
>>  .../powerpc/platforms/powernv/opal-wrappers.S |  3 +
>>  5 files changed, 130 insertions(+), 4 deletions(-)
>>
>> diff --git a/arch/powerpc/include/asm/opal-api.h b/arch/powerpc/include/asm/opal-api.h
>> index 870fb7b239ea..cdfc54f78101 100644
>> --- a/arch/powerpc/include/asm/opal-api.h
>> +++ b/arch/powerpc/include/asm/opal-api.h
>> @@ -186,8 +186,8 @@
>>  #define OPAL_XIVE_FREE_IRQ			140
>>  #define OPAL_XIVE_SYNC				141
>>  #define OPAL_XIVE_DUMP				142
>> -#define OPAL_XIVE_RESERVED3			143
>> -#define OPAL_XIVE_RESERVED4			144
>> +#define OPAL_XIVE_GET_QUEUE_STATE		143
>> +#define OPAL_XIVE_SET_QUEUE_STATE		144
>>  #define OPAL_SIGNAL_SYSTEM_RESET		145
>>  #define OPAL_NPU_INIT_CONTEXT			146
>>  #define OPAL_NPU_DESTROY_CONTEXT		147
>> @@ -209,8 +209,11 @@
>>  #define OPAL_SENSOR_GROUP_ENABLE		163
>>  #define OPAL_PCI_GET_PBCQ_TUNNEL_BAR		164
>>  #define OPAL_PCI_SET_PBCQ_TUNNEL_BAR		165
>> -#define	OPAL_NX_COPROC_INIT			167
>> -#define OPAL_LAST				167
>> +#define OPAL_HANDLE_HMI2			166
>> +#define OPAL_NX_COPROC_INIT			167
>> +#define OPAL_NPU_SET_RELAXED_ORDER		168
>> +#define OPAL_NPU_GET_RELAXED_ORDER		169
>> +#define OPAL_XIVE_GET_VP_STATE			170
> 
> You should only be defining the calls you need, leaving gaps for other
> things, and you need to retain OPAL_LAST. So it should look more like:
> 
>  -#define OPAL_LAST				167
>  +#define OPAL_XIVE_GET_VP_STATE		170
>  +#define OPAL_LAST				170
> 
> 
> Also I can't merge this until it's merged into skiboot.

OK. Let's start with skiboot.

C. 


More information about the Linuxppc-dev mailing list