powerpc/pseries: Use lparcfg to reconfig VAS windows for DLPAR CPU
authorHaren Myneni <haren@linux.ibm.com>
Fri, 7 Oct 2022 05:29:59 +0000 (22:29 -0700)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 18 Oct 2022 11:46:18 +0000 (22:46 +1100)
commit2147783d6bf0b7ca14c72a25527dc5135bd17f65
treee01b83d7e3d8b0fe309d398c84d2e0059eed4b46
parent89ed0b769d6adf30364f60e6b1566961821a9893
powerpc/pseries: Use lparcfg to reconfig VAS windows for DLPAR CPU

The hypervisor assigns VAS (Virtual Accelerator Switchboard)
windows depends on cores configured in LPAR. The kernel uses
OF reconfig notifier to reconfig VAS windows for DLPAR CPU event.
In the case of shared CPU mode partition, the hypervisor assigns
VAS windows depends on CPU entitled capacity, not based on vcpus.
When the user changes CPU entitled capacity for the partition,
drmgr uses /proc/ppc64/lparcfg interface to notify the kernel.

This patch adds the following changes to update VAS resources
for shared mode:
- Call vas reconfig windows from lparcfg_write()
- Ignore reconfig changes in the VAS notifier

Signed-off-by: Haren Myneni <haren@linux.ibm.com>
[mpe: Rework error handling, report any errors as EIO]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/efa9c16e4a78dda4567a16f13dabfd73cb4674a2.camel@linux.ibm.com
arch/powerpc/platforms/pseries/lparcfg.c
arch/powerpc/platforms/pseries/vas.c
arch/powerpc/platforms/pseries/vas.h