From patchwork Wed Mar 16 05:06:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 8594811 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 25158C0553 for ; Wed, 16 Mar 2016 05:06:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5119F20218 for ; Wed, 16 Mar 2016 05:06:18 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 229EB201FE for ; Wed, 16 Mar 2016 05:06:16 +0000 (UTC) Received: from localhost ([::1]:53142 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ag3ew-00016X-OO for patchwork-qemu-devel@patchwork.kernel.org; Wed, 16 Mar 2016 01:06:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34115) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ag3eo-00016P-9y for qemu-devel@nongnu.org; Wed, 16 Mar 2016 01:06:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ag3en-0005PK-Eg for qemu-devel@nongnu.org; Wed, 16 Mar 2016 01:06:06 -0400 Received: from ozlabs.org ([2401:3900:2:1::2]:39482) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ag3en-0005Ot-3a; Wed, 16 Mar 2016 01:06:05 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 3qPzw93SdFz9sRB; Wed, 16 Mar 2016 16:06:01 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1458104761; bh=zY2/WYuIhV0XO3GMEUHWjxri6RXcFGTgRtG+f63OQRg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eLVH2hmtygZESgnRREIkYj5ciK4YHdGdoaEYlUNFC/9idp3WfwbmoP23yXaB/ga3h v3N3q7YMwN7vSI/sX6ms4j7jY4Djw4qYXmFpI2IYOZgYEFraMd8MEaFpfXqSAgDUVG OfgJULBQbSdmOvkYGakKHETBFPJ4G6oGFZ/mJBrY= From: David Gibson To: peter.maydell@linaro.org Date: Wed, 16 Mar 2016 16:06:54 +1100 Message-Id: <1458104828-32541-3-git-send-email-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1458104828-32541-1-git-send-email-david@gibson.dropbear.id.au> References: <1458104828-32541-1-git-send-email-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2401:3900:2:1::2 Cc: qemu-devel@nongnu.org, aik@ozlabs.ru, agraf@suse.de, mdroth@linux.vnet.ibm.com, alex.williamson@redhat.com, qemu-ppc@nongnu.org, Thomas Huth , David Gibson Subject: [Qemu-devel] [PULL 02/16] ppc: Fix migration of the TAR SPR X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Thomas Huth The TAR special purpose register currently does not get migrated under KVM because it does not get synchronized with the kernel. Use spr_register_kvm() instead of spr_register() to fix this issue. Signed-off-by: Thomas Huth Signed-off-by: David Gibson --- target-ppc/translate_init.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index f72148c..48a1635 100644 --- a/target-ppc/translate_init.c +++ b/target-ppc/translate_init.c @@ -7714,10 +7714,10 @@ static void spr_write_tar(DisasContext *ctx, int sprn, int gprn) static void gen_spr_power8_tce_address_control(CPUPPCState *env) { - spr_register(env, SPR_TAR, "TAR", - &spr_read_tar, &spr_write_tar, - &spr_read_generic, &spr_write_generic, - 0x00000000); + spr_register_kvm(env, SPR_TAR, "TAR", + &spr_read_tar, &spr_write_tar, + &spr_read_generic, &spr_write_generic, + KVM_REG_PPC_TAR, 0x00000000); } static void spr_read_tm(DisasContext *ctx, int gprn, int sprn)