qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH 2/2] monitor: sync from kvm state before generating output
Date: Sun, 25 Jan 2009 19:11:51 +0100	[thread overview]
Message-ID: <497CAB67.1090206@web.de> (raw)

[ No change, just a repost together with the first patch. ]

Ported from the KVM tree: Synchronize the qemu cpu state with kvm's
before invoking various monitor info commands (like 'info registers').

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

 monitor.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/monitor.c b/monitor.c
index 8815688..81795ec 100644
--- a/monitor.c
+++ b/monitor.c
@@ -297,6 +297,8 @@ static CPUState *mon_get_cpu(void)
     if (!mon_cpu) {
         mon_set_cpu(0);
     }
+    if (kvm_enabled())
+        kvm_get_registers(mon_cpu);
     return mon_cpu;
 }
 
@@ -323,6 +325,8 @@ static void do_info_cpus(void)
     mon_get_cpu();
 
     for(env = first_cpu; env != NULL; env = env->next_cpu) {
+        if (kvm_enabled())
+            kvm_get_registers(env);
         term_printf("%c CPU #%d:",
                     (env == mon_cpu) ? '*' : ' ',
                     env->cpu_index);

                 reply	other threads:[~2009-01-25 18:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=497CAB67.1090206@web.de \
    --to=jan.kiszka@web.de \
    --cc=qemu-devel@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).