Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp299418lqr; Wed, 5 Jun 2024 06:35:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWSMk9zfNREb32HmX8kUo9erl41Re1Wb2CsTM3zVVDbL6oGnQaabk3os6HMCzcrAVSiwOM+5g4xvN1eTuwqxz2YTRP+/vruQomDfuxs7Q== X-Google-Smtp-Source: AGHT+IGqa1h88k8EZ/5hwNRoStVbaTJUDSAo15WMHzmM7IaybiLPF8izZVCGKoCpagjQuSb8Y9Rt X-Received: by 2002:a05:6808:292:b0:3c7:50ac:c570 with SMTP id 5614622812f47-3d2045fbbecmr2635401b6e.44.1717594525049; Wed, 05 Jun 2024 06:35:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717594525; cv=pass; d=google.com; s=arc-20160816; b=bGZNjn8nzoekWBTQzERMoPLb/pPItewT8PYElFuQZMHX2o6q7qyKMbcx3IDIgqKons 35nktdmkqs1WKObz14jGFxT+N2kzdJJze62mGM6NsKiNrqyybp4dWB5NIEKEYq7jXUxo ZpLee0cMaLASQf+7vwY+whQ7OBhUUqtXuP0/mDzVm1LTjp6ggSwNkCWDqkmJWTiRBeBW EJVYtnx7W1LUw8aZbFH2HpJvgnmI15b7nQ3tb9IR40LXkE6DkuOaDeWDCSRw6fBepQky YX8RTsywn2DRB320vn2xEQOz29/qEL1JwX/g6K96IpliUNizsCcWSApUmJu6bF/7O7Y2 ertg== 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=65kRB3COaqAUVvLza2YlzCjywkZSYYviDgHfYjK4FJQ=; fh=3wLRez1daRxQ046IropRUujjxbZxHcqKX5Vmx4WeL2Q=; b=0kBQvAWfDdlckX2PEiomxk/qYIrLs3u96e82kVsGW+b5TmLoRXhUieXypGH5M1Fbqc 2oe7S2FC1UUG3QxAp4avcqqq4JvEQ9+1REt7WhUwGC5nZwokRnamWoQY0D00HkX3L8+7 wlNDKgyvL6u7k5f3BpMtfOg/wER56usIxGiatU5JSxCM6dPUe4ZPPRXqSuRdQt4BtL63 eJcSGCkVLs9hX8hFtGI0YhETj6+2rqccbXLxvOV3OgM4ucD96MBrR9lkW8GI6UQutQZe FvkxXKaUhRfIlhqyzFndS/oHqwIbdASgp1deQeDvUP53M1jdGzXKbeeaAC4yv6wfH++3 ZxEA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=rtWUhHBk; 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-202671-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202671-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. [147.75.199.223]) by mx.google.com with ESMTPS id ada2fe7eead31-48bbcea6190si2300763137.294.2024.06.05.06.35.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 06:35:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-202671-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=rtWUhHBk; 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-202671-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202671-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 88D5D1C24155 for ; Wed, 5 Jun 2024 13:34:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 32C43197A60; Wed, 5 Jun 2024 13:07:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="rtWUhHBk" 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 smtp.subspace.kernel.org (Postfix) with ESMTPS id C9CEB19D8AE; Wed, 5 Jun 2024 13:07:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.156.1 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717592846; cv=none; b=myEZsoa0kFup7cQOVia+QnZEFh8Oq+9ySfYSX92qLixO+LAsLDRUJUvoBnyzYh2AL8SORcPBWWKHC2Oeynv2vzUhHF2aljP0DnvP6A5duGkq6JIAiDSt59K/4ldT3xH4qZ6VpfS0cU5wkX8aHF2ybCOtoD0uFrDdokRyk0buis0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717592846; c=relaxed/simple; bh=snuRZJKSTBnfmPFzvn4EEWc+CUByjqBQxa42/YMBPbc=; h=Subject:From:To:Cc:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Hs3y1Q9hMrW76JyojwWgPf9ZPlLTwOrTFU6jKVBL8qew9jIyQdVNPkLYq8ZJsYbc109Nq51kT666IXKBGvjsGsSb6yXUPw8MDcoqNaSFGqCEDr0joz4DJDj47fzuLNtmdvVd8l2z/fcKQ0vnZDIk3fQ+Rg4RHet4XD6cE/6V278= 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=rtWUhHBk; arc=none smtp.client-ip=148.163.156.1 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 (m0353726.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 455Cv73r032125; Wed, 5 Jun 2024 13:07:14 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=65kRB3COaqAUVvLza2YlzCjywkZSYYviDgHfYjK4FJQ=; b=rtWUhHBkGtrinlAuQZ6y0rS8hMQC0TR31szIRJyflDO5luyQvodE/RhZvFtgV9CSfDuC vsistNmQLKtIAsclf8T/1aA3c9sv5bi4LZKio4O3Cy+1vgOcvNUwJE088wW4rjvBJtGk 1wvAFV6PWBwqx69pfOTVDzY003rKbX+Nyjsjkml1mXU5XEXEEYxgKCkYUa+bhqxAXUTA 6Qohfa/YTI82Q8kDBOH37tEUcZDorND9h9XJH+Fvn3Jt8UTFDbS42wcmHIzMY39kBl7A 3ZmznWGnmi+YBbo7jCrfp2NPkER4Y+aIk1nAa+CdaiCd28BbTRo6fSo69osbG34RPhXt Cg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3yjrfn80s5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 05 Jun 2024 13:07:14 +0000 Received: from m0353726.ppops.net (m0353726.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 455D7DSA016116; Wed, 5 Jun 2024 13:07:13 GMT Received: from ppma22.wdc07v.mail.ibm.com (5c.69.3da9.ip4.static.sl-reverse.com [169.61.105.92]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3yjrfn80s0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 05 Jun 2024 13:07:13 +0000 Received: from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1]) by ppma22.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 455CMtXS008468; Wed, 5 Jun 2024 13:07:12 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3ygec0ve7x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 05 Jun 2024 13:07:12 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 455D76Sw49807720 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 5 Jun 2024 13:07:08 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 73EB320040; Wed, 5 Jun 2024 13:07:06 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 897392004B; Wed, 5 Jun 2024 13:07:04 +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:04 +0000 (GMT) Subject: [PATCH v2 4/8] KVM: PPC: Book3S HV nestedv2: Keep nested guest DEXCR 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:04 +0000 Message-ID: <171759281060.1480.654592298305141881.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: d-QnL1F6SFNwTvmNCisfgUqSQYQNSca- X-Proofpoint-GUID: 9qDg-aPxDAZFStNZWqAg9C3r8j_sOg1R 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 lowpriorityscore=0 priorityscore=1501 spamscore=0 bulkscore=0 adultscore=0 mlxlogscore=909 mlxscore=0 impostorscore=0 suspectscore=0 malwarescore=0 clxscore=1015 phishscore=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 DEXCR for the save-restore with L0. However, its ignored in the code. The patch takes care of this for the DEXCR GSID. Signed-off-by: Shivaprasad G Bhat Reviewed-by: Nicholas Piggin --- 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 1091f7a83b25..d207a6d936ff 100644 --- a/arch/powerpc/kvm/book3s_hv_nestedv2.c +++ b/arch/powerpc/kvm/book3s_hv_nestedv2.c @@ -193,6 +193,9 @@ static int gs_msg_ops_vcpu_fill_info(struct kvmppc_gs_buff *gsb, case KVMPPC_GSID_DAWRX1: rc = kvmppc_gse_put_u32(gsb, iden, vcpu->arch.dawrx1); break; + case KVMPPC_GSID_DEXCR: + rc = kvmppc_gse_put_u64(gsb, iden, vcpu->arch.dexcr); + break; case KVMPPC_GSID_CIABR: rc = kvmppc_gse_put_u64(gsb, iden, vcpu->arch.ciabr); break; @@ -441,6 +444,9 @@ static int gs_msg_ops_vcpu_refresh_info(struct kvmppc_gs_msg *gsm, case KVMPPC_GSID_DAWRX1: vcpu->arch.dawrx1 = kvmppc_gse_get_u32(gse); break; + case KVMPPC_GSID_DEXCR: + vcpu->arch.dexcr = kvmppc_gse_get_u64(gse); + break; case KVMPPC_GSID_CIABR: vcpu->arch.ciabr = kvmppc_gse_get_u64(gse); break;