From nobody Tue Feb 10 02:55:43 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1541680180279160.77507963291134; Thu, 8 Nov 2018 04:29:40 -0800 (PST) Received: from localhost ([::1]:56316 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gKjRL-0005ea-1o for importer@patchew.org; Thu, 08 Nov 2018 07:29:39 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43587) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gKjFQ-0005KG-UX for qemu-devel@nongnu.org; Thu, 08 Nov 2018 07:17:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gKjFO-00041N-Co for qemu-devel@nongnu.org; Thu, 08 Nov 2018 07:17:20 -0500 Received: from ozlabs.org ([2401:3900:2:1::2]:49715) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gKjFN-0003wp-SD; Thu, 08 Nov 2018 07:17:18 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 42rMj24YRWz9sNg; Thu, 8 Nov 2018 23:16:53 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1541679414; bh=WYgpnIfXIYu5WufFNaO3pPW+PMWvAaHF+Gllo8n6gPI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dkj/7/cCi61qsEvSdEIMwyRoBDfowwi4XSNuexY8Cnaut3K7i5Lgen7q16ll0mQPT dwHIQx/rHDpV1bTpwCIS0Xf3s6kZB7Q4EiE0L/RdXkPoz4VzYyvmhcPTubUP2CSCoR z3asIuWwEA3HZsxoIRJVAgrjMMTI3SQzSI6zB2UY= From: David Gibson To: peter.maydell@linaro.org Date: Thu, 8 Nov 2018 23:16:45 +1100 Message-Id: <20181108121646.26173-22-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181108121646.26173-1-david@gibson.dropbear.id.au> References: <20181108121646.26173-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2401:3900:2:1::2 Subject: [Qemu-devel] [PULL 21/22] target/ppc: Add one reg id for ptcr X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, agraf@suse.de, qemu-devel@nongnu.org, groug@kaod.org, qemu-ppc@nongnu.org, Suraj Jitindar Singh , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Suraj Jitindar Singh The ptcr (partition table control register) is used to store the address and size of the partition table. For nested kvm-hv we have a level 1 guest register the location of it's partition table with the hypervisor. Thus to support migration we need to be able to read this out of kvm and restore it post migration. Add the one reg id for the ptcr. Signed-off-by: Suraj Jitindar Singh Signed-off-by: David Gibson --- target/ppc/translate_init.inc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/target/ppc/translate_init.inc.c b/target/ppc/translate_init.in= c.c index 9a2d4a9835..168d0cec28 100644 --- a/target/ppc/translate_init.inc.c +++ b/target/ppc/translate_init.inc.c @@ -8214,11 +8214,11 @@ static void gen_spr_power9_mmu(CPUPPCState *env) { #if !defined(CONFIG_USER_ONLY) /* Partition Table Control */ - spr_register_hv(env, SPR_PTCR, "PTCR", - SPR_NOACCESS, SPR_NOACCESS, - SPR_NOACCESS, SPR_NOACCESS, - &spr_read_generic, &spr_write_ptcr, - 0x00000000); + spr_register_kvm_hv(env, SPR_PTCR, "PTCR", + SPR_NOACCESS, SPR_NOACCESS, + SPR_NOACCESS, SPR_NOACCESS, + &spr_read_generic, &spr_write_ptcr, + KVM_REG_PPC_PTCR, 0x00000000); #endif } =20 --=20 2.19.1