Patch "powerpc/pseries/vas: Pass hw_cpu_id to node associativity HCALL" has been added to the 6.0-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    powerpc/pseries/vas: Pass hw_cpu_id to node associativity HCALL

to the 6.0-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     powerpc-pseries-vas-pass-hw_cpu_id-to-node-associati.patch
and it can be found in the queue-6.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 42e45ea93a4b6e8b26e52876f4778c18edaa510d
Author: Haren Myneni <haren@xxxxxxxxxxxxx>
Date:   Wed Sep 28 18:57:33 2022 -0700

    powerpc/pseries/vas: Pass hw_cpu_id to node associativity HCALL
    
    [ Upstream commit f3e5d9e53e74d77e711a2c90a91a8b0836a9e0b3 ]
    
    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: b22f2d88e435 ("powerpc/pseries/vas: Integrate API with open/close windows")
    Reviewed-by: Nathan Lynch <nathanl@xxxxxxxxxxxxx>
    Signed-off-by: Haren Myneni <haren@xxxxxxxxxxxxx>
    [mpe: Update change log to mention Linux vs HV CPU numbers]
    Signed-off-by: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/55380253ea0c11341824cd4c0fc6bbcfc5752689.camel@xxxxxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/powerpc/platforms/pseries/vas.c b/arch/powerpc/platforms/pseries/vas.c
index 7e6e6dd2e33e..1a2cbc156e8f 100644
--- a/arch/powerpc/platforms/pseries/vas.c
+++ b/arch/powerpc/platforms/pseries/vas.c
@@ -333,7 +333,7 @@ static struct vas_window *vas_allocate_window(int vas_id, u64 flags,
 		 * So no unpacking needs to be done.
 		 */
 		rc = plpar_hcall9(H_HOME_NODE_ASSOCIATIVITY, domain,
-				  VPHN_FLAG_VCPU, smp_processor_id());
+				  VPHN_FLAG_VCPU, hard_smp_processor_id());
 		if (rc != H_SUCCESS) {
 			pr_err("H_HOME_NODE_ASSOCIATIVITY error: %d\n", rc);
 			goto out;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux