[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 25/38] target-ppc: force update of msr bits in cpu_post
From: |
Alexander Graf |
Subject: |
[Qemu-ppc] [PULL 25/38] target-ppc: force update of msr bits in cpu_post_load |
Date: |
Sun, 8 Mar 2015 09:44:44 +0100 |
From: Mark Cave-Ayland <address@hidden>
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 <address@hidden>
Signed-off-by: Alexander Graf <address@hidden>
---
target-ppc/machine.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
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;
--
1.8.1.4
- [Qemu-ppc] [PULL 2.3 00/38] ppc patch queue 2015-03-08, Alexander Graf, 2015/03/08
- [Qemu-ppc] [PULL 02/38] target-ppc: Use right page size with hash table lookup, Alexander Graf, 2015/03/08
- [Qemu-ppc] [PULL 09/38] pseries: Add more parameter validation in RTAS time of day functions, Alexander Graf, 2015/03/08
- [Qemu-ppc] [PULL 33/38] ppc64-softmmu: Remove duplicated OPENPIC from config, Alexander Graf, 2015/03/08
- [Qemu-ppc] [PULL 20/38] display cpu id dump state, Alexander Graf, 2015/03/08
- [Qemu-ppc] [PULL 14/38] pseries: Export RTC time via QOM, Alexander Graf, 2015/03/08
- [Qemu-ppc] [PULL 24/38] target-ppc: move sdr1 value change detection logic to helper_store_sdr1(), Alexander Graf, 2015/03/08
- [Qemu-ppc] [PULL 15/38] PPC: Clean up misuse of qdev_init() in kvm-openpic creation, Alexander Graf, 2015/03/08
- [Qemu-ppc] [PULL 06/38] Generalize QOM publishing of date and time from mc146818rtc.c, Alexander Graf, 2015/03/08
- [Qemu-ppc] [PULL 25/38] target-ppc: force update of msr bits in cpu_post_load,
Alexander Graf <=
- [Qemu-ppc] [PULL 05/38] spapr-pci: Enable huge BARs, Alexander Graf, 2015/03/08
- [Qemu-ppc] [PULL 16/38] spapr: Clean up misuse of qdev_init() in xics-kvm creation, Alexander Graf, 2015/03/08
- [Qemu-ppc] [PULL 26/38] openpic: fix segfault on -M mac99 savevm, Alexander Graf, 2015/03/08
- [Qemu-ppc] [PULL 23/38] cuda.c: include adb_poll_timer in VMStateDescription, Alexander Graf, 2015/03/08
- [Qemu-ppc] [PULL 01/38] spapr_vio/spapr_iommu: Move VIO bypass where it belongs, Alexander Graf, 2015/03/08
- [Qemu-ppc] [PULL 38/38] sPAPR: Implement sPAPRPHBClass EEH callbacks, Alexander Graf, 2015/03/08
- [Qemu-ppc] [PULL 28/38] openpic: switch IRQQueue queue from inline to bitmap, Alexander Graf, 2015/03/08
- [Qemu-ppc] [PULL 31/38] Revert "default-configs/ppc64: add all components of i82378 SuperIO chip used by prep", Alexander Graf, 2015/03/08
- [Qemu-ppc] [PULL 18/38] pseries: Switch VGA endian on H_SET_MODE, Alexander Graf, 2015/03/08
- [Qemu-ppc] [PULL 10/38] pseries: Add spapr_rtc_read() helper function, Alexander Graf, 2015/03/08