From nobody Mon Nov 25 04:27:14 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1717415619; cv=none; d=zohomail.com; s=zohoarc; b=AC3Xjlw9b5rQv0eRi04yKtDA2D5mKtIoTEneK8N3J6gcOpRkqN98uK3ure4yO+3Uw3Bwk49PwDcfY4VawMccyf2Kg6brQkT4+pfAcfDrVpJwxcDxZRrW0AzmmbgTS0/nywyXw99MVumNYTMABTK9d9Hpdk3VHGqn4y9g20os5s0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1717415619; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=nHN8pbGL+7S0tw+IWhkjkpDrxoe96dNyMyHn5qj/6mY=; b=JsrAfl7QGLsvQNwZaW5uq0vvJ/G1DIgvepyVF/Oau+5bvVF9GY6lG5cF6aeiFEpkWBrFWGfm1/ksVjMokeKV0YWV4ujsJn9xr2i1A2F6sTUfn56w3gTBLxz9JGoEx0kf/hOUpDQrMmYpClyhgbBZdNmNYVepT2L4FUv54MEEOjc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1717415619752189.46379359421803; Mon, 3 Jun 2024 04:53:39 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sE6FN-0006eX-Cz; Mon, 03 Jun 2024 07:53:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sE6FL-0006dT-1Z; Mon, 03 Jun 2024 07:53:03 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sE6FH-0005zx-Qz; Mon, 03 Jun 2024 07:53:02 -0400 Received: from pps.filterd (m0353729.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 453Bq8UG032156; Mon, 3 Jun 2024 11:52:55 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3yhdb78015-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Jun 2024 11:52:55 +0000 Received: from m0353729.ppops.net (m0353729.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 453BqsY4032518; Mon, 3 Jun 2024 11:52:54 GMT Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3yhdb78012-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Jun 2024 11:52:54 +0000 Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 453A0FxU026628; Mon, 3 Jun 2024 11:52:53 GMT Received: from smtprelay06.fra02v.mail.ibm.com ([9.218.2.230]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3ygffmqgfp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Jun 2024 11:52:53 +0000 Received: from smtpav07.fra02v.mail.ibm.com (smtpav07.fra02v.mail.ibm.com [10.20.54.106]) by smtprelay06.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 453BqnQ421168470 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 3 Jun 2024 11:52:51 GMT Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 262432004B; Mon, 3 Jun 2024 11:52:49 +0000 (GMT) Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F255120040; Mon, 3 Jun 2024 11:52:47 +0000 (GMT) Received: from [172.17.0.2] (unknown [9.3.101.175]) by smtpav07.fra02v.mail.ibm.com (Postfix) with ESMTP; Mon, 3 Jun 2024 11:52:47 +0000 (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=nHN8pbGL+7S0tw+IWhkjkpDrxoe96dNyMyHn5qj/6mY=; b=bd4/QvxHo+72e0S4CndKCGVctJjH0DLddf5FjPI/T9lzfh0yZqLeO6+DH9gkyxrxfyke dhuQb4qZmmVXSx4EvXyIe7FohPmWmBzwFu8X8hEYScWUDMZU5wvYR68bR4aPMTxm9Uod F+d7ZpJuOP9+hShnc9f2l4F1gu95g/qDNC6WzEdniLEQ1g6ax01tRnO6s144xWE+uJNC gq4sUggeX3AI5PR7FngVlbZa7jHUk/YIW80IdvQwGWxZeuPxdy5mBxPkCbK+0z/THCAV rrYmwbW+I3JztLtfJvTq50oixmUncUAYx39Ty+PPwSv9D4UQRizBggILBLKkEuK9J9fy vg== Subject: [PATCH 1/2] target/ppc/cpu_init: Synchronize DEXCR with KVM for migration From: Shivaprasad G Bhat To: cohuck@redhat.com, pbonzini@redhat.com, npiggin@gmail.com, kvm@vger.kernel.org, qemu-devel@nongnu.org Cc: mst@redhat.com, danielhb413@gmail.com, qemu-ppc@nongnu.org Date: Mon, 03 Jun 2024 11:52:47 +0000 Message-ID: <171741556422.11675.17890249605948158450.stgit@c0c876608f2d> In-Reply-To: <171741555734.11675.17428208097186191736.stgit@c0c876608f2d> References: <171741555734.11675.17428208097186191736.stgit@c0c876608f2d> User-Agent: StGit/1.5 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-GUID: GfIDvydjSrSK7nT8JOnSnb0b3arF4UlA X-Proofpoint-ORIG-GUID: hufeLzn_pYLqIPyzWkjiq-QEbS9VPX8m X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-06-03_08,2024-05-30_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxlogscore=907 mlxscore=0 priorityscore=1501 adultscore=0 suspectscore=0 phishscore=0 clxscore=1015 bulkscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2406030099 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=148.163.156.1; envelope-from=sbhat@linux.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ibm.com) X-ZM-MESSAGEID: 1717415621936100001 The patch enables DEXCR migration by hooking with the "KVM one reg" ID KVM_REG_PPC_DEXCR. Signed-off-by: Shivaprasad G Bhat --- linux-headers/asm-powerpc/kvm.h | 1 + target/ppc/cpu_init.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/linux-headers/asm-powerpc/kvm.h b/linux-headers/asm-powerpc/kv= m.h index 1691297a76..fcb947f656 100644 --- a/linux-headers/asm-powerpc/kvm.h +++ b/linux-headers/asm-powerpc/kvm.h @@ -645,6 +645,7 @@ struct kvm_ppc_cpu_char { #define KVM_REG_PPC_SIER3 (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xc3) #define KVM_REG_PPC_DAWR1 (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xc4) #define KVM_REG_PPC_DAWRX1 (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xc5) +#define KVM_REG_PPC_DEXCR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xc6) =20 /* Transactional Memory checkpointed state: * This is all GPRs, all VSX regs and a subset of SPRs diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index c11a69fd90..b1422c2eab 100644 --- a/target/ppc/cpu_init.c +++ b/target/ppc/cpu_init.c @@ -5818,9 +5818,9 @@ static void register_power10_hash_sprs(CPUPPCState *e= nv) =20 static void register_power10_dexcr_sprs(CPUPPCState *env) { - spr_register(env, SPR_DEXCR, "DEXCR", + spr_register_kvm(env, SPR_DEXCR, "DEXCR", SPR_NOACCESS, SPR_NOACCESS, - &spr_read_generic, &spr_write_generic, + &spr_read_generic, &spr_write_generic, KVM_REG_PPC_DEXCR, 0); =20 spr_register(env, SPR_UDEXCR, "UDEXCR", From nobody Mon Nov 25 04:27:14 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1717415635; cv=none; d=zohomail.com; s=zohoarc; b=EWCrvlJfjErr1eukaYTGUIeTDHddBSUq7vFHxw66qCcQ+HRJdIA7BElx95UZFJWH6TxsaE1tqlHYzN3cu+j0HmqtAu7nYcv+/144qkaGm/D/Fw9G37npBtnm+06gGBEDgAv7ptoH6aqy0033gyQlTZQjrE1Wnl5XfRoe81DJHmU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1717415635; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=U8grBbLnuptcbkJz/FoIWfmUXYQni3ocYzh7OnET6Yw=; b=aNiyEJvcjrFRcBJZKrV5YtQXevrUi+bwONEV1v/x4dGKwhwhDQp1Zai+f+MEiAvhzg2AW3gkXDojJWwVqsruubMY9sWgZGKiGwBgYDX3Y6Z90ZrqWmeXlEbKoA+Ksm4X4EY5/RgmmAIhUvVXpYDSLHi1FoP2Hv2gkqUHHTg0l4c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1717415635388457.1365460113892; Mon, 3 Jun 2024 04:53:55 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sE6FZ-0006lK-84; Mon, 03 Jun 2024 07:53:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sE6FX-0006jj-Ip; Mon, 03 Jun 2024 07:53:15 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sE6FT-00061p-G6; Mon, 03 Jun 2024 07:53:15 -0400 Received: from pps.filterd (m0356517.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 453BoiXl015685; Mon, 3 Jun 2024 11:53:09 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3yhctt02rf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Jun 2024 11:53:08 +0000 Received: from m0356517.ppops.net (m0356517.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 453Br8CE018854; Mon, 3 Jun 2024 11:53:08 GMT Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3yhctt02rc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Jun 2024 11:53:08 +0000 Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 4538ZNAk000815; Mon, 3 Jun 2024 11:53:07 GMT Received: from smtprelay04.fra02v.mail.ibm.com ([9.218.2.228]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 3ygdytqvx1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Jun 2024 11:53:07 +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 453Br3XQ10748246 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 3 Jun 2024 11:53:05 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B9B6020043; Mon, 3 Jun 2024 11:53:03 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8D9E620040; Mon, 3 Jun 2024 11:53:02 +0000 (GMT) Received: from [172.17.0.2] (unknown [9.3.101.175]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Mon, 3 Jun 2024 11:53:02 +0000 (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=U8grBbLnuptcbkJz/FoIWfmUXYQni3ocYzh7OnET6Yw=; b=SwKhx9wCW7oeRUj7EFjoKDtFdwC4m/714xZgnp18xvHdY8l/TfVt+wgDHgV2GB78S0pP 5HK4a+EmUlPiVNV3IAUCmDXo1NzFTYqwk7cDvAqzQ4FN/kXqyKG/NYWqp7DoK4AF72KC ndHqfnxmtzO5ipAeumWrzwNhiWnCC0ywT0AgSv+nxpxuT8f1jnOdLXdJ0lyQQvaFTLYi hKnbo/dwlLwn0PMJez2OcxARJz31FpU0Xqe3sCVoEYbu+QrwCKaaUKE5mETLvkfbBBJP 3pOgbSxYVbG5ne419tBrsaLfm1Na4wgEuqhbx+c4QUpJStz1+5xqoo4IpMkSvUjRZoSc jA== Subject: [PATCH 2/2] target/ppc/cpu_init: Synchronize HASHKEYR with KVM for migration From: Shivaprasad G Bhat To: cohuck@redhat.com, pbonzini@redhat.com, npiggin@gmail.com, kvm@vger.kernel.org, qemu-devel@nongnu.org Cc: mst@redhat.com, danielhb413@gmail.com, qemu-ppc@nongnu.org Date: Mon, 03 Jun 2024 11:53:01 +0000 Message-ID: <171741557432.11675.11683958406314165970.stgit@c0c876608f2d> In-Reply-To: <171741555734.11675.17428208097186191736.stgit@c0c876608f2d> References: <171741555734.11675.17428208097186191736.stgit@c0c876608f2d> User-Agent: StGit/1.5 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: zN48z9-Ppsmfr3TuSvnHQcpH0LUSpptu X-Proofpoint-GUID: VjdGXuh1SRVgSi_bFcGDJCwttgbvKVOP X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-06-03_08,2024-05-30_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 priorityscore=1501 lowpriorityscore=0 bulkscore=0 spamscore=0 adultscore=0 mlxlogscore=874 phishscore=0 clxscore=1015 malwarescore=0 impostorscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2406030099 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=148.163.156.1; envelope-from=sbhat@linux.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ibm.com) X-ZM-MESSAGEID: 1717415635987100001 The patch enables HASHKEYR migration by hooking with the "KVM one reg" ID KVM_REG_PPC_HASHKEYR. Signed-off-by: Shivaprasad G Bhat --- linux-headers/asm-powerpc/kvm.h | 1 + target/ppc/cpu_init.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/linux-headers/asm-powerpc/kvm.h b/linux-headers/asm-powerpc/kv= m.h index fcb947f656..23a0af739c 100644 --- a/linux-headers/asm-powerpc/kvm.h +++ b/linux-headers/asm-powerpc/kvm.h @@ -646,6 +646,7 @@ struct kvm_ppc_cpu_char { #define KVM_REG_PPC_DAWR1 (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xc4) #define KVM_REG_PPC_DAWRX1 (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xc5) #define KVM_REG_PPC_DEXCR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xc6) +#define KVM_REG_PPC_HASHKEYR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xc7) =20 /* Transactional Memory checkpointed state: * This is all GPRs, all VSX regs and a subset of SPRs diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index b1422c2eab..cee0a609eb 100644 --- a/target/ppc/cpu_init.c +++ b/target/ppc/cpu_init.c @@ -5805,10 +5805,10 @@ static void register_power10_hash_sprs(CPUPPCState = *env) ((uint64_t)g_rand_int(rand) << 32) | (uint64_t)g_rand_int(rand); g_rand_free(rand); #endif - spr_register(env, SPR_HASHKEYR, "HASHKEYR", + spr_register_kvm(env, SPR_HASHKEYR, "HASHKEYR", SPR_NOACCESS, SPR_NOACCESS, &spr_read_generic, &spr_write_generic, - hashkeyr_initial_value); + KVM_REG_PPC_HASHKEYR, hashkeyr_initial_value); spr_register_hv(env, SPR_HASHPKEYR, "HASHPKEYR", SPR_NOACCESS, SPR_NOACCESS, SPR_NOACCESS, SPR_NOACCESS,