qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Berger <stefanb@linux.vnet.ibm.com>
To: agraf@suse.de, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
	qemu-devel <qemu-devel@nongnu.org>,
	qemu-ppc@nongnu.org
Subject: [Qemu-devel] ppc64 not resuming with v2.3.0-rc3
Date: Thu, 16 Apr 2015 12:43:52 -0400	[thread overview]
Message-ID: <552FE6C8.106@linux.vnet.ibm.com> (raw)

The culprit patch seems to be the following commit. If I remove these 
changes from the tip of the tree it works again (on SLOF level):

commit 2360b6e84f78d41fa0f76555a947148b73645259
Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Date:   Mon Feb 9 22:40:48 2015 +0000

     target-ppc: force update of msr bits in cpu_post_load

     Since env->msr has already been restored by the time cpu_post_load 
is called,
     make sure that ppc_store_msr() is explicitly called with all msr 
bits except
     MSR_TGPR marked as invalid.

     This solves the issue where MSR flags aren't set correctly when 
restoring a VM
     snapshot, in particular the internal env->excp_prefix value when 
MSR_EP has
     been altered by a guest.

     Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
     Signed-off-by: Alexander Graf <agraf@suse.de>

diff --git a/target-ppc/machine.c b/target-ppc/machine.c
index c801b82..3921012 100644
--- a/target-ppc/machine.c
+++ b/target-ppc/machine.c
@@ -159,6 +159,7 @@ static int cpu_post_load(void *opaque, int version_id)
      PowerPCCPU *cpu = opaque;
      CPUPPCState *env = &cpu->env;
      int i;
+    target_ulong msr;

      /*
       * We always ignore the source PVR. The user or management
@@ -190,7 +191,12 @@ static int cpu_post_load(void *opaque, int version_id)
          /* Restore htab_base and htab_mask variables */
          ppc_store_sdr1(env, env->spr[SPR_SDR1]);
      }
-    hreg_compute_hflags(env);
+
+    /* Mark msr bits except MSR_TGPR invalid before restoring */
+    msr = env->msr;
+    env->msr ^= ~(1ULL << MSR_TGPR);
+    ppc_store_msr(env, msr);
+
      hreg_compute_mem_idx(env);

      return 0;


    Stefan

PS: Sorry for the late notice (-rc3), but I only started doing things 
with ppc64 a few days ago.

             reply	other threads:[~2015-04-16 16:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-16 16:43 Stefan Berger [this message]
2015-04-16 19:42 ` [Qemu-devel] ppc64 not resuming with v2.3.0-rc3 Mark Cave-Ayland
2015-04-16 19:49   ` Stefan Berger
2015-04-16 20:53     ` Mark Cave-Ayland
2015-04-16 21:24       ` Stefan Berger
2015-04-16 21:53         ` Paolo Bonzini
2015-04-16 22:23           ` Mark Cave-Ayland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=552FE6C8.106@linux.vnet.ibm.com \
    --to=stefanb@linux.vnet.ibm.com \
    --cc=agraf@suse.de \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).