Skip to content

Commit eca9f6e

Browse files
hmynenimpe
authored andcommitted
powerpc/pseries/vas: Ignore VAS update for DLPAR if copy/paste is not enabled
The hypervisor supports user-mode NX from Power10. pseries_vas_dlpar_cpu() is called from lparcfg_write() to update VAS windows for DLPAR event in shared processor mode and the kernel gets -ENOTSUPP for HCALLs if the user-mode NX is not supported. The current VAS implementation also supports only with Radix page tables. Whereas in dedicated processor mode, pseries_vas_notifier() is registered only if the copy/paste feature is enabled. So instead of displaying HCALL error messages, update VAS capabilities if the copy/paste feature is available. This patch ignores updating VAS capabilities in pseries_vas_dlpar_cpu() and returns success if the copy/paste feature is not enabled. Then lparcfg_write() completes the processor DLPAR operations without any failures. Fixes: 2147783 ("powerpc/pseries: Use lparcfg to reconfig VAS windows for DLPAR CPU") Cc: stable@vger.kernel.org # v6.1+ Signed-off-by: Haren Myneni <haren@linux.ibm.com> Reviewed-by: Nathan Lynch <nathanl@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/1d0e727e7dbd9a28627ef08ca9df9c86a50175e2.camel@linux.ibm.com
1 parent fd72761 commit eca9f6e

File tree

1 file changed

+8
-0
lines changed
  • arch/powerpc/platforms/pseries

1 file changed

+8
-0
lines changed

arch/powerpc/platforms/pseries/vas.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -856,6 +856,13 @@ int pseries_vas_dlpar_cpu(void)
856856
{
857857
int new_nr_creds, rc;
858858

859+
/*
860+
* NX-GZIP is not enabled. Nothing to do for DLPAR event
861+
*/
862+
if (!copypaste_feat)
863+
return 0;
864+
865+
859866
rc = h_query_vas_capabilities(H_QUERY_VAS_CAPABILITIES,
860867
vascaps[VAS_GZIP_DEF_FEAT_TYPE].feat,
861868
(u64)virt_to_phys(&hv_cop_caps));
@@ -1012,6 +1019,7 @@ static int __init pseries_vas_init(void)
10121019
* Linux supports user space COPY/PASTE only with Radix
10131020
*/
10141021
if (!radix_enabled()) {
1022+
copypaste_feat = false;
10151023
pr_err("API is supported only with radix page tables\n");
10161024
return -ENOTSUPP;
10171025
}

0 commit comments

Comments
 (0)