WSL2-Linux-Kernel/arch/powerpc
Haren Myneni 8484023b57 powerpc/pseries/vas: Pass hw_cpu_id to node associativity HCALL
[ Upstream commit f3e5d9e53e ]

Generally the hypervisor decides to allocate a window on different
VAS instances. But if user space wishes to allocate on the current VAS
instance where the process is executing, the kernel has to pass
associativity domain IDs to allocate VAS window HCALL.

To determine the associativity domain IDs for the current CPU,
smp_processor_id() is passed to node associativity HCALL which may
return H_P2 (-55) error during DLPAR CPU event. This is because Linux
CPU numbers (smp_processor_id()) are not the same as the hypervisor's
view of CPU numbers.

Fix the issue by passing hard_smp_processor_id() with
VPHN_FLAG_VCPU flag (PAPR 14.11.6.1 H_HOME_NODE_ASSOCIATIVITY).

Fixes: b22f2d88e4 ("powerpc/pseries/vas: Integrate API with open/close windows")
Reviewed-by: Nathan Lynch <nathanl@linux.ibm.com>
Signed-off-by: Haren Myneni <haren@linux.ibm.com>
[mpe: Update change log to mention Linux vs HV CPU numbers]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/55380253ea0c11341824cd4c0fc6bbcfc5752689.camel@linux.ibm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-10-26 12:35:23 +02:00
..
boot powerpc: Fix SPE Power ISA properties for e500v1 platforms 2022-10-26 12:35:23 +02:00
configs powerpc/configs: Properly enable PAPR_SCM in pseries_defconfig 2022-10-26 12:35:21 +02:00
crypto powerpc: flexible GPR range save/restore macros 2022-07-12 16:35:02 +02:00
include powerpc: Fix fallocate and fadvise64_64 compat parameter combination 2022-10-26 12:35:22 +02:00
kernel powerpc/kprobes: Fix null pointer reference in arch_prepare_kprobe() 2022-10-26 12:35:23 +02:00
kexec powerpc: Set crashkernel offset to mid of RMA region 2022-04-13 20:59:03 +02:00
kvm KVM: PPC: Book3S HV: Fix "rm_exit" entry in debugfs timings 2022-08-25 11:40:40 +02:00
lib powerpc: flexible GPR range save/restore macros 2022-07-12 16:35:02 +02:00
math-emu powerpc/math_emu/efp: Include module.h 2022-10-26 12:35:21 +02:00
mm powerpc/64s/radix: don't need to broadcast IPI for radix pmd collapse flush 2022-10-12 09:53:26 +02:00
net powerpc64/bpf: Limit 'ldbrx' to processors compliant with ISA v2.06 2022-02-01 17:27:09 +01:00
perf powerpc/perf: Optimize clearing the pending PMI and remove WARN_ON for PMI check in power_pmu_disable 2022-08-17 14:24:04 +02:00
platforms powerpc/pseries/vas: Pass hw_cpu_id to node associativity HCALL 2022-10-26 12:35:23 +02:00
purgatory
sysdev powerpc/sysdev/fsl_msi: Add missing of_node_put() 2022-10-26 12:35:22 +02:00
tools powerpc/64: Add UADDR64 relocation support 2022-05-09 09:14:44 +02:00
xmon powerpc/xmon: fix task state output 2021-11-18 19:16:57 +01:00
Kbuild
Kconfig powerpc/memhotplug: Add add_pages override for PPC 2022-07-07 17:53:28 +02:00
Kconfig.debug powerpc/ptdump: Convert powerpc to GENERIC_PTDUMP 2021-08-25 13:35:48 +10:00
Makefile powerpc/64s: Fix GENERIC_CPU build flags for PPC970 / G5 2022-10-26 12:35:23 +02:00
Makefile.postlink