powerpc/pseries/vas: Define global hv_cop_caps struct
authorHaren Myneni <haren@linux.ibm.com>
Mon, 28 Feb 2022 07:51:28 +0000 (23:51 -0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 7 Mar 2022 13:04:56 +0000 (00:04 +1100)
commit278fe1cc2205a05bfd92c794be3d207372b17289
treef9d216fdd1993b7519f19e9e69f630ccd9ae2dd5
parent45f06eac30e5abebecc66e41e7c89d5b4413bac1
powerpc/pseries/vas: Define global hv_cop_caps struct

The coprocessor capabilities struct is used to get default and
QoS capabilities from the hypervisor during init, DLPAR event and
migration. So instead of allocating this struct for each event,
define global struct and reuse it which allows the migration code
to avoid adding an error path.

Also disable copy/paste feature flag if any capabilities HCALL
is failed.

Signed-off-by: Haren Myneni <haren@linux.ibm.com>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Acked-by: Nathan Lynch <nathanl@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/57da6a270fcb9308cd57be7c88037029343080f7.camel@linux.ibm.com
arch/powerpc/platforms/pseries/vas.c