WSL2-Linux-Kernel/arch/powerpc/platforms/pseries
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
..
Kconfig powerpc/pseries: Implement paravirt qspinlocks for SPLPAR 2020-07-27 00:01:29 +10:00
Makefile powerpc/pseries/vas: Integrate API with open/close windows 2021-06-20 21:58:57 +10:00
cmm.c mm: remove unneeded includes of <asm/pgalloc.h> 2020-08-07 11:33:26 -07:00
dlpar.c powerpc/pseries/dlpar: use rtas_get_sensor() 2021-06-25 14:47:20 +10:00
dtl.c powerpc: rename powerpc_debugfs_root to arch_debugfs_dir 2021-08-13 22:04:26 +10:00
eeh_pseries.c pseries/eeh: Fix the kdump kernel crash during eeh_pseries_init 2021-10-07 23:37:22 +11:00
event_sources.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
firmware.c powerpc/pseries: Add support for FORM2 associativity 2021-08-13 22:04:27 +10:00
hotplug-cpu.c powerpc/pseries: Fix build error when NUMA=n 2021-08-16 14:11:00 +10:00
hotplug-memory.c Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
hvCall.S powerpc/64s: avoid reloading (H)SRR registers if they are still valid 2021-06-25 00:06:55 +10:00
hvCall_inst.c powerpc/pseries: Make symbol '__pcpu_scope_hcall_stats' static 2021-04-14 23:04:17 +10:00
hvconsole.c powerpc updates for 5.3 2019-07-13 16:08:36 -07:00
hvcserver.c powerpc: Use fallthrough pseudo-keyword 2020-07-29 21:09:37 +10:00
ibmebus.c bus: Make remove callback return void 2021-07-21 11:53:42 +02:00
io_event_irq.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
iommu.c powerpc/pseries/ddw: Do not try direct mapping with persistent memory and one window 2021-12-08 09:04:37 +01:00
kexec.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
lpar.c powerpc/pseries: Add a helper for form1 cpu distance 2021-08-13 22:04:27 +10:00
lparcfg.c powerpc/pseries: export LPAR security flavor in lparcfg 2021-03-26 23:19:41 +11:00
mobility.c powerpc/pseries/mobility: ignore ibm, platform-facilities updates 2021-11-18 19:17:19 +01:00
msi.c powerpc/pseries/msi: Add an empty irq_write_msi_msg() handler 2021-10-07 23:33:25 +11:00
nvram.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
of_helpers.c powerpc/pseries: Fix of_read_drc_info_cell() to point at next record 2020-03-25 12:06:43 +11:00
of_helpers.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
papr_scm.c powerpc/papr_scm: trivial: fix typo in a comment 2021-06-25 14:47:19 +10:00
pci.c powerpc/powernv: remove the nvlink support 2021-05-02 23:35:32 +10:00
pci_dlpar.c powerpc/pseries: Fix use after free in remove_phb_dynamic() 2022-04-08 14:23:42 +02:00
pmem.c powerpc/pseries/pmem: Make symbol 'drc_pmem_match' static 2021-04-14 23:04:17 +10:00
power.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 167 2019-05-30 11:26:39 -07:00
pseries.h powerpc/pseries: wire up rng during setup_arch() 2022-06-29 09:03:32 +02:00
pseries_energy.c powerpc/pseries: Fix drc-info mappings of logical cpus to drc-index 2019-11-13 16:57:57 +11:00
ras.c powerpc: Refactor verification of MSR_RI 2021-08-26 21:21:07 +10:00
reconfig.c proc: convert everything to "struct proc_ops" 2020-02-04 03:05:26 +00:00
rng.c powerpc/pseries: wire up rng during setup_arch() 2022-06-29 09:03:32 +02:00
rtas-fadump.c powerpc/fadump: make symbol 'rtas_fadump_set_regval' static 2021-04-14 23:04:19 +10:00
rtas-fadump.h powerpc/fadump: support holes in kernel boot memory area 2019-09-14 00:04:46 +10:00
scanlog.c proc: convert everything to "struct proc_ops" 2020-02-04 03:05:26 +00:00
setup.c powerpc/pseries: wire up rng during setup_arch() 2022-06-29 09:03:32 +02:00
smp.c powerpc/preempt: Don't touch the idle task's preempt_count during hotplug 2021-07-08 23:38:10 +10:00
suspend.c powerpc/pseries/hibernation: remove prepare_late() callback 2020-12-08 21:41:02 +11:00
svm.c powerpc/svm: Don't issue ultracalls if !mem_encrypt_active() 2021-07-31 22:28:39 -04:00
vas.c powerpc/pseries/vas: Pass hw_cpu_id to node associativity HCALL 2022-10-26 12:35:23 +02:00
vas.h powerpc/pseries/vas: Define VAS/NXGZIP hcalls and structs 2021-06-20 21:58:56 +10:00
vio.c dma-mapping updates for Linux 5.15 2021-09-02 10:32:06 -07:00
vphn.c powerpc/vphn: Check for error from hcall_vphn 2020-03-04 22:44:30 +11:00