[v3,08/17] Synchronize VCPU states before reset

Submitted by Jan Kiszka on March 2, 2011, 7:56 a.m.


Message ID 9abcbd5321a7a6239b7f37c5b9d88e9eee826d0e.1299052578.git.jan.kiszka@siemens.com
State New
Headers show

Commit Message

Jan Kiszka March 2, 2011, 7:56 a.m.
This is required to support keeping VCPU states across a system reset.
If we do not read the current state before the reset,
cpu_synchronize_all_post_reset may write back incorrect state

The first user of this will be MCE MSR synchronization which currently
works around the missing cpu_synchronize_all_states.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
 vl.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Patch hide | download patch | download mbox

diff --git a/vl.c b/vl.c
index b436952..7751843 100644
--- a/vl.c
+++ b/vl.c
@@ -1452,6 +1452,7 @@  static void main_loop(void)
         if (qemu_reset_requested()) {
+            cpu_synchronize_all_states();