Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp300032lqr; Wed, 5 Jun 2024 06:36:22 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWPL3I0r78MmEMHlD4Ywb99e5w6bI3Me1xPpS9zdUvjyf0J/YjJ25UykTXUCXmY3aG520i7IBUkA819GFdygixbvGMqJWjM6kABVO2wGQ== X-Google-Smtp-Source: AGHT+IEFZjqkMmO08CUp4Qj7a15X6B5spbimTKMnoaVO7fl9iMsT/95Wu5p1DCwi7ec98yw5ADCy X-Received: by 2002:a1f:e604:0:b0:4eb:1499:607f with SMTP id 71dfb90a1353d-4eb3a4c5ad3mr2717705e0c.14.1717594582515; Wed, 05 Jun 2024 06:36:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717594582; cv=pass; d=google.com; s=arc-20160816; b=y7cYn8dW2oPoLbiSh25vrKXLH3xMXJJaQEKARRJpJ2jJwGA5EqubRyLBtZZu3j7aQt jvB5Du0cLvpQrTLhXUp4YlNpRCaKS0t40JHYO+ellVf9uhXNjGlCEMmnmrsh7WImYOKO 832jzJqDuXZZ4g6H3rE/1Af17Mhhirf4v2sluOQzeaodwawklVLR5VM5McOIl0tuAZhp +pAJsIhKlHrWR2IifQuvgwLjuCe7sfSSlJoMDZHQ2y9dcHdpou5j1Au+MtCoxrNYLt3b saNf5aP+9k5BKlUz6weRd828GR68k9eeym8eyhU4aV6nPi20Uy/q5WggJkzUgz4yNCjt 8/jA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:user-agent:references:in-reply-to :message-id:date:cc:to:from:subject:dkim-signature; bh=mFLcIDXgGUAznwVNJ5mDXGol2z/KTIFsV52opagDPYs=; fh=3wLRez1daRxQ046IropRUujjxbZxHcqKX5Vmx4WeL2Q=; b=j7Mh+ik7Ia+ai9dQXRUL7QIyYUne5TXB0IbiHOHXyV1F7zBkw2Kmua/kXWkUg54jyV V7oAE5soY6hzjL8GKUjzlJVLC/Ko2s29xT92IylTK92bD3RWpLAyFzQSmM/dToFpU98U 8xq+3YftPRGrOBAAEqtPp2PD21Gs9IPIcr/9qorHiO7NJ4mAG3Sq5+e1W63NvNNHC8U2 Cq4/Q8pSlsvnRH9/ZRw1MRzmwTG4EK34Owghzl3PApWR89RyoRqSsZmRA9qcDvgaH+JJ 6FrSjPkTkb0H4wWO8T0dDgmDPuQHoH4WEoFvf/GYP1jtnWzv26/XqCJgzDJzro9VxFUz Wc/A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=Pjenno7i; arc=pass (i=1 spf=pass spfdomain=linux.ibm.com dkim=pass dkdomain=ibm.com dmarc=pass fromdomain=linux.ibm.com); spf=pass (google.com: domain of linux-kernel+bounces-202675-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202675-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id ada2fe7eead31-48c0d9330e9si173972137.513.2024.06.05.06.36.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 06:36:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-202675-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=Pjenno7i; arc=pass (i=1 spf=pass spfdomain=linux.ibm.com dkim=pass dkdomain=ibm.com dmarc=pass fromdomain=linux.ibm.com); spf=pass (google.com: domain of linux-kernel+bounces-202675-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202675-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id BC5B11C25107 for ; Wed, 5 Jun 2024 13:35:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9DB82198E83; Wed, 5 Jun 2024 13:08:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="Pjenno7i" Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 633E7198E79; Wed, 5 Jun 2024 13:08:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.158.5 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717592891; cv=none; b=lKdFqK3h/L0WqcXLCqw9MzzVmg/B/SbI9i0AUy1utQ5ep51s3wBjckCK7y3prbTd0IH9WINK0wsEqDGsoIgglu5Nch4PciNYbstiRSbpTMVdaYSIcNlq/cXoUU8Kv93c17i/40ZIHmqbpAeJY5Uy5RUcJC4He+oy3W8Aof7bKO4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717592891; c=relaxed/simple; bh=SSTkQ9Bpa1mQeISdMSKX4VE0rtbc9/D1JOW83DJ9Cqw=; h=Subject:From:To:Cc:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=j/8f8FDR6l1UqeIvr3m/Y1Tm2uuaJC6VCKL6NvPLYgUWnbv2lGVSPQhOzH1FMwt9r2yj5YjhMerjbeMSeQQPfJ/b3YKrGt+qJ0rtthhzG/vmYr/CZDk3TNsK4tNoFPhO6YKHkkd8lBlpRmgb9p2dqXbwq5AOlo6n7U1k28bvvkE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=Pjenno7i; arc=none smtp.client-ip=148.163.158.5 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Received: from pps.filterd (m0353725.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 455D2qB8014691; Wed, 5 Jun 2024 13:08:00 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc : content-transfer-encoding : content-type : date : from : in-reply-to : message-id : mime-version : references : subject : to; s=pp1; bh=mFLcIDXgGUAznwVNJ5mDXGol2z/KTIFsV52opagDPYs=; b=Pjenno7ip8/KhEmRXPWf/I3w/BMulqSXU3ptVzbp56FdiUYyPToBrDyOG67NvaaP040b hNuEjkyWVNFHmsxciOqwVASo98O2QV7WsOk8imDjf/NlJwrM6//cL8ovggHwBBHj0o55 QJOtIlza1gZAhIw7mxF1nTy0UIwvdI+vdVfY0FDCtSZfq0NDWCOmLWoTUe63ff9S0S9z x7QC3rk5v4soGME/aPn+5TD44E/8zPCuzYY2zrYuAaaPqCbFRF7KQCw2DISHPJHfB3gc shhJ3S5EBRzKsOHz7416OagK/v7fYLM5AIQnGnf5ivw0M5eHjIwVO0oo2B6LXlsrSpP3 Xw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3yjrdr81tn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 05 Jun 2024 13:07:59 +0000 Received: from m0353725.ppops.net (m0353725.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 455D6klN021135; Wed, 5 Jun 2024 13:07:59 GMT Received: from ppma21.wdc07v.mail.ibm.com (5b.69.3da9.ip4.static.sl-reverse.com [169.61.105.91]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3yjrdr81tf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 05 Jun 2024 13:07:59 +0000 Received: from pps.filterd (ppma21.wdc07v.mail.ibm.com [127.0.0.1]) by ppma21.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 455D3trO031204; Wed, 5 Jun 2024 13:07:58 GMT Received: from smtprelay04.fra02v.mail.ibm.com ([9.218.2.228]) by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3ygeypm837-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 05 Jun 2024 13:07:58 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay04.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 455D7qgx16253354 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 5 Jun 2024 13:07:54 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7A2D92004B; Wed, 5 Jun 2024 13:07:52 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8686C2004D; Wed, 5 Jun 2024 13:07:50 +0000 (GMT) Received: from [172.17.0.2] (unknown [9.3.101.175]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 5 Jun 2024 13:07:50 +0000 (GMT) Subject: [PATCH v2 8/8] KVM: PPC: Book3S HV nestedv2: Keep nested guest HASHPKEYR in sync From: Shivaprasad G Bhat To: kvm@vger.kernel.org, linux-doc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Cc: pbonzini@redhat.com, naveen.n.rao@linux.ibm.com, christophe.leroy@csgroup.eu, corbet@lwn.net, mpe@ellerman.id.au, namhyung@kernel.org, npiggin@gmail.com, pbonzini@redhat.com, sbhat@linux.ibm.com, jniethe5@gmail.com, atrajeev@linux.vnet.ibm.com, linux-kernel@vger.kernel.org Date: Wed, 05 Jun 2024 13:07:49 +0000 Message-ID: <171759286679.1480.17383725118762651985.stgit@linux.ibm.com> In-Reply-To: <171759276071.1480.9356137231993600304.stgit@linux.ibm.com> References: <171759276071.1480.9356137231993600304.stgit@linux.ibm.com> User-Agent: StGit/1.5 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: A4A4cEVO5J6laLrV8L0MPkLqIyqRsVUA X-Proofpoint-GUID: zxhI1M_BGkdE-4EyZGpGsWRpmVdO6kp6 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-05_02,2024-06-05_02,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 adultscore=0 spamscore=0 priorityscore=1501 suspectscore=0 malwarescore=0 clxscore=1015 impostorscore=0 mlxscore=0 mlxlogscore=891 bulkscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2406050099 The nestedv2 APIs has the guest state element defined for HASHPKEYR for the save-restore with L0. However, its ignored in the code. The patch takes care of this for the HASHPKEYR GSID. Signed-off-by: Shivaprasad G Bhat --- arch/powerpc/kvm/book3s_hv_nestedv2.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/powerpc/kvm/book3s_hv_nestedv2.c b/arch/powerpc/kvm/book3s_hv_nestedv2.c index bbff933f2ccc..ce61cb6fc9b9 100644 --- a/arch/powerpc/kvm/book3s_hv_nestedv2.c +++ b/arch/powerpc/kvm/book3s_hv_nestedv2.c @@ -199,6 +199,9 @@ static int gs_msg_ops_vcpu_fill_info(struct kvmppc_gs_buff *gsb, case KVMPPC_GSID_HASHKEYR: rc = kvmppc_gse_put_u64(gsb, iden, vcpu->arch.hashkeyr); break; + case KVMPPC_GSID_HASHPKEYR: + rc = kvmppc_gse_put_u64(gsb, iden, vcpu->arch.hashpkeyr); + break; case KVMPPC_GSID_CIABR: rc = kvmppc_gse_put_u64(gsb, iden, vcpu->arch.ciabr); break; @@ -453,6 +456,9 @@ static int gs_msg_ops_vcpu_refresh_info(struct kvmppc_gs_msg *gsm, case KVMPPC_GSID_HASHKEYR: vcpu->arch.hashkeyr = kvmppc_gse_get_u64(gse); break; + case KVMPPC_GSID_HASHPKEYR: + vcpu->arch.hashpkeyr = kvmppc_gse_get_u64(gse); + break; case KVMPPC_GSID_CIABR: vcpu->arch.ciabr = kvmppc_gse_get_u64(gse); break;