Skip to contentSkip to conversation

(Patch) Save Registers for QEMU Monitor Commands

PATCH David Beal 1 participant 1 message Jan 3, 2007 KVM

lore
Share & tools
lore

David Beal

author
#0 lore raw

Hello,

This patch adds a kvm_save_registers call before each command run in qemu monitor. This affects commands such as "info registers," "info tlb," and "info mem."

This is to synchronize the cpu state so that monitor commands are more accurate.

Best Regards,
David Beal

qemu/monitor.c +12 -0
Index: trunk/qemu/monitor.c
===================================================================
@@ -25,6 +25,9 @@
 #include "disas.h"
 #include <dirent.h>
 #include "migration.h"
+#if USE_KVM
+#include "qemu-kvm.h"
+#endif
 //#define DEBUG
 //#define DEBUG_COMPLETION
 
@@ -2231,6 +2234,15 @@
         goto fail;
     }
 
+#ifdef USE_KVM
+    if(1)
+    {
+        CPUState *env=mon_get_cpu();
+        if (kvm_allowed)
+            kvm_save_registers(env);
+    }
+#endif    
+
     switch(nb_args) {
     case 0:
         cmd->handler();

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
kvm-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel