From patchwork Wed Mar 2 20:19:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 8485351 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 4EF4AC0554 for ; Wed, 2 Mar 2016 20:19:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BEF7B20383 for ; Wed, 2 Mar 2016 20:19:49 +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 1FA0920160 for ; Wed, 2 Mar 2016 20:19:49 +0000 (UTC) Received: from localhost ([::1]:58795 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abDFM-0002It-Dz for patchwork-qemu-devel@patchwork.kernel.org; Wed, 02 Mar 2016 15:19:48 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abDF7-0002IM-UI for qemu-devel@nongnu.org; Wed, 02 Mar 2016 15:19:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1abDF5-0005RZ-Jx for qemu-devel@nongnu.org; Wed, 02 Mar 2016 15:19:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33763) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abDF5-0005RV-EJ; Wed, 02 Mar 2016 15:19:31 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id E97D87F081; Wed, 2 Mar 2016 20:19:30 +0000 (UTC) Received: from thh440s.fritz.box (vpn1-4-99.ams2.redhat.com [10.36.4.99]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u22KJM3n019229; Wed, 2 Mar 2016 15:19:29 -0500 From: Thomas Huth To: qemu-ppc@nongnu.org, david@gibson.dropbear.id.au, agraf@suse.de Date: Wed, 2 Mar 2016 21:19:21 +0100 Message-Id: <1456949962-29920-3-git-send-email-thuth@redhat.com> In-Reply-To: <1456949962-29920-1-git-send-email-thuth@redhat.com> References: <1456949962-29920-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: qemu-devel@nongnu.org, kvm-ppc@vger.kernel.org Subject: [Qemu-devel] [PATCH 2/3] 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.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable 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 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 --- 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)