summaryrefslogtreecommitdiffstats
path: root/hw/i386/kvm
diff options
context:
space:
mode:
authorPeter Xu2017-02-03 08:18:16 +0100
committerPaolo Bonzini2017-02-16 14:06:55 +0100
commitc6fcb0e201ad296a9c0f587486830d9508094efb (patch)
tree02d88091fccc90e2d45b15d8c747de30d6b5f22f /hw/i386/kvm
parentMerge remote-tracking branch 'remotes/rth/tags/pull-or-20170214' into staging (diff)
downloadqemu-c6fcb0e201ad296a9c0f587486830d9508094efb.tar.gz
qemu-c6fcb0e201ad296a9c0f587486830d9508094efb.tar.xz
qemu-c6fcb0e201ad296a9c0f587486830d9508094efb.zip
kvm/ioapic: dump real object instead of a fake one
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>
Diffstat (limited to 'hw/i386/kvm')
-rw-r--r--hw/i386/kvm/ioapic.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/i386/kvm/ioapic.c b/hw/i386/kvm/ioapic.c
index 8eb2c7a70f..716d59aa22 100644
--- a/hw/i386/kvm/ioapic.c
+++ b/hw/i386/kvm/ioapic.c
@@ -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)