* [Qemu-devel] [PATCH] target-i386: fix "info lapic" segfault on isapc
@ 2017-03-28 7:19 Tejaswini
2017-03-28 8:05 ` Paolo Bonzini
0 siblings, 1 reply; 2+ messages in thread
From: Tejaswini @ 2017-03-28 7:19 UTC (permalink / raw)
To: qemu-devel; +Cc: stefanha, kwolf, pbonzini, rth, ehabkost, Tejaswini Poluri
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] target-i386: fix "info lapic" segfault on isapc
2017-03-28 7:19 [Qemu-devel] [PATCH] target-i386: fix "info lapic" segfault on isapc Tejaswini
@ 2017-03-28 8:05 ` Paolo Bonzini
0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2017-03-28 8:05 UTC (permalink / raw)
To: Tejaswini, qemu-devel; +Cc: stefanha, kwolf, rth, ehabkost
On 28/03/2017 09:19, Tejaswini wrote:
> 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",
>
Queued, thanks.
Paolo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-28 8:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-28 7:19 [Qemu-devel] [PATCH] target-i386: fix "info lapic" segfault on isapc Tejaswini
2017-03-28 8:05 ` Paolo Bonzini
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.