OSDN Git Service

powerpc/pseries/vas: Implement getting capabilities from hypervisor
authorHaren Myneni <haren@linux.ibm.com>
Thu, 17 Jun 2021 20:35:54 +0000 (13:35 -0700)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 20 Jun 2021 11:58:57 +0000 (21:58 +1000)
commitca77d48854177bb9749aef7329201f03b2382fbb
tree31115797e728ae139f837fe1b4d139e304342fad
parentf33ecfde30ce6909fff41339285e0274bb403fb8
powerpc/pseries/vas: Implement getting capabilities from hypervisor

The hypervisor provides VAS capabilities for GZIP default and QoS
features. These capabilities gives information for the specific
features such as total number of credits available in LPAR,
maximum credits allowed per window, maximum credits allowed in
LPAR, whether usermode copy/paste is supported, and etc.

This patch adds the following:
- Retrieve all features that are provided by hypervisor using
  H_QUERY_VAS_CAPABILITIES hcall with 0 as feature type.
- Retrieve capabilities for the specific feature using the same
  hcall and the feature type (1 for QoS and 2 for default type).

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