From patchwork Sun Feb 6 02:25:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haren Myneni X-Patchwork-Id: 1588889 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=nCnbf2yl; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JrtSS01FJz9s1l for ; Sun, 6 Feb 2022 13:26:31 +1100 (AEDT) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4JrtSP5mHLz3bZY for ; Sun, 6 Feb 2022 13:26:29 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=nCnbf2yl; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linux.ibm.com (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=haren@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=nCnbf2yl; dkim-atps=neutral Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4JrtS63b5qz2yPj for ; Sun, 6 Feb 2022 13:26:13 +1100 (AEDT) Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 215NM3gM000698; Sun, 6 Feb 2022 02:26:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : subject : from : to : cc : date : content-type : mime-version : content-transfer-encoding; s=pp1; bh=DGfuPVMeHoT7I/Q4BQcqTyBiwPznj04kTntuu4B0jow=; b=nCnbf2ylMb3z9ipClf2L3hoGUwdI0wr8eU4zOX5GAcE2Y6SReHO5sYWb6EgKxqHjrUW+ jw32L/56/YwWJJMUuYWSLG5i0qaDZqo0Yh30MAqjv7/OjTKBr1TlmVqe7dDVPXT+rfLB ei/DqBDoTaTuIsB6/uTyJXx9SNAMmYKWzFOSvFX3CzVXQMhnu6s5ALi0TUvOS7pn4JB5 lf88yUo1OpgG9h9vNhyOnbFKHrtFOEMKY2TYA9ZmQFEq4awQQGswlsXbz1a7RRDH2WrY rI7vJNsinH9jdTYQp8bk4zbBQ0Vc6e4VJsz3EuKq7hZDmwM+F9cdvSwf79Hrr5bSC0un tw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3e22u21td4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 06 Feb 2022 02:26:05 +0000 Received: from m0098394.ppops.net (m0098394.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 2162KSKt023625; Sun, 6 Feb 2022 02:26:05 GMT Received: from ppma04dal.us.ibm.com (7a.29.35a9.ip4.static.sl-reverse.com [169.53.41.122]) by mx0a-001b2d01.pphosted.com with ESMTP id 3e22u21tcw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 06 Feb 2022 02:26:05 +0000 Received: from pps.filterd (ppma04dal.us.ibm.com [127.0.0.1]) by ppma04dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2162N41x025583; Sun, 6 Feb 2022 02:26:04 GMT Received: from b01cxnp23034.gho.pok.ibm.com (b01cxnp23034.gho.pok.ibm.com [9.57.198.29]) by ppma04dal.us.ibm.com with ESMTP id 3e1gv9kx9t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 06 Feb 2022 02:26:04 +0000 Received: from b01ledav004.gho.pok.ibm.com (b01ledav004.gho.pok.ibm.com [9.57.199.109]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2162Q1DK33554744 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 6 Feb 2022 02:26:01 GMT Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3F540112063; Sun, 6 Feb 2022 02:26:01 +0000 (GMT) Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6BAC2112061; Sun, 6 Feb 2022 02:26:00 +0000 (GMT) Received: from sig-9-65-84-116.ibm.com (unknown [9.65.84.116]) by b01ledav004.gho.pok.ibm.com (Postfix) with ESMTP; Sun, 6 Feb 2022 02:26:00 +0000 (GMT) Message-ID: Subject: [PATCH v2 0/4] powerpc/pseries/vas: VAS/NXGZIP support with LPM From: Haren Myneni To: mpe@ellerman.id.au, linuxppc-dev@lists.ozlabs.org, npiggin@gmail.com, nathanl@linux.ibm.com Date: Sat, 05 Feb 2022 18:25:58 -0800 User-Agent: Evolution 3.36.5 (3.36.5-2.fc32) MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: sqXyBrvE8Rx3lsOJLcwRJ2c1Sx_C9JGf X-Proofpoint-ORIG-GUID: M5gE9jUpv-fbfjiUj6KSMtR0fznOY5Du X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-02-05_15,2022-02-03_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 spamscore=0 malwarescore=0 adultscore=0 impostorscore=0 mlxscore=0 priorityscore=1501 suspectscore=0 bulkscore=0 lowpriorityscore=0 mlxlogscore=318 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2201110000 definitions=main-2202060011 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: haren@linux.ibm.com Errors-To: linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Virtual Accelerator Switchboard (VAS) is an engine stays on the chip. So all windows opened on a specific engine belongs to VAS the chip. The hypervisor expects the partition to close all active windows on the sources system and reopen them after migration on the destination machine. This patch series adds VAS support with the partition migration. When the migration initiates, the VAS migration handler will be invoked before pseries_suspend() to close all active windows and mark them in-active with VAS_WIN_MIGRATE_CLOSE status. Whereas this migration handler is called after migration to reopen all windows which has VAS_WIN_MIGRATE_CLOSE status and make them active again. The user space gets paste instruction failure when it sends requests on these in-active windows. These patches depend on VAS/DLPAR support patch series Changes in v2: - Added new patch "Define global hv_cop_caps struct" to eliminate memory allocation failure during migration (suggestion by Nathan Lynch) Haren Myneni (4): powerpc/pseries/vas: Define global hv_cop_caps struct powerpc/pseries/vas: Modify reconfig open/close functions for migration powerpc/pseries/vas: Add VAS migration handler powerpc/pseries/vas: Disable window open during migration arch/powerpc/include/asm/vas.h | 2 + arch/powerpc/platforms/pseries/mobility.c | 5 + arch/powerpc/platforms/pseries/vas.c | 236 +++++++++++++++++----- arch/powerpc/platforms/pseries/vas.h | 6 + 4 files changed, 202 insertions(+), 47 deletions(-)