All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejaswini <tejaswinipoluri3@gmail.com>
To: qemu-devel@nongnu.org
Cc: stefanha@redhat.com, kwolf@redhat.com, pbonzini@redhat.com,
	rth@twiddle.net, ehabkost@redhat.com,
	Tejaswini Poluri <tejaswinipoluri3@gmail.com>
Subject: [Qemu-devel] [PATCH] target-i386: fix "info lapic" segfault on isapc
Date: Tue, 28 Mar 2017 12:49:43 +0530	[thread overview]
Message-ID: <1490685583-16987-1-git-send-email-tejaswinipoluri3@gmail.com> (raw)

From: Tejaswini Poluri <tejaswinipoluri3@gmail.com>

Start QEMU with
"qemu-system-x86_64 -nographic -M isapc -serial none-monitor stdio"
and enter "info lapic" at the monitor prompt ⇒
Segmentation fault

Signed-off-by: Tejaswini Poluri <tejaswinipoluri3@gmail.com>
---
 target/i386/helper.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/target/i386/helper.c b/target/i386/helper.c
index e2af340..f11cac6 100644
--- a/target/i386/helper.c
+++ b/target/i386/helper.c
@@ -326,6 +326,10 @@ void x86_cpu_dump_local_apic_state(CPUState *cs, FILE *f,
 {
     X86CPU *cpu = X86_CPU(cs);
     APICCommonState *s = APIC_COMMON(cpu->apic_state);
+    if (!s) {
+        cpu_fprintf(f, "local apic state not available\n");
+        return;
+    }
     uint32_t *lvt = s->lvt;
 
     cpu_fprintf(f, "dumping local APIC state for CPU %-2u\n\n",
-- 
2.7.4

             reply	other threads:[~2017-03-28  7:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-28  7:19 Tejaswini [this message]
2017-03-28  8:05 ` [Qemu-devel] [PATCH] target-i386: fix "info lapic" segfault on isapc Paolo Bonzini

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=1490685583-16987-1-git-send-email-tejaswinipoluri3@gmail.com \
    --to=tejaswinipoluri3@gmail.com \
    --cc=ehabkost@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=stefanha@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.