Skip to content

Commit

Permalink
kvm/ioapic: dump real object instead of a fake one
Browse files Browse the repository at this point in the history
When we do "info ioapic" for kvm ioapic, we were building up a temporary
ioapic object. Let's fetch the real one and update correspond to the
real object as well.

This fixes printing uninitialized version field in
ioapic_print_redtbl().

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <1486106298-3699-2-git-send-email-peterx@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
xzpeter authored and bonzini committed Feb 16, 2017
1 parent 5dae13c commit c6fcb0e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions hw/i386/kvm/ioapic.c
Expand Up @@ -114,11 +114,11 @@ static void kvm_ioapic_put(IOAPICCommonState *s)

void kvm_ioapic_dump_state(Monitor *mon, const QDict *qdict)
{
IOAPICCommonState s;
IOAPICCommonState *s = IOAPIC_COMMON(object_resolve_path("ioapic", NULL));

kvm_ioapic_get(&s);

ioapic_print_redtbl(mon, &s);
assert(s);
kvm_ioapic_get(s);
ioapic_print_redtbl(mon, s);
}

static void kvm_ioapic_reset(DeviceState *dev)
Expand Down

0 comments on commit c6fcb0e

Please sign in to comment.