mirror of https://github.com/xemu-project/xemu.git
ioapic: support "info pic"
People start to use "info pic" for all kinds of irqchip dumps. Let x86 ioapic join the family. It dumps the same thing as "info ioapic". Signed-off-by: Peter Xu <peterx@redhat.com> Message-Id: <20171229073104.3810-3-peterx@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
0cda9d876c
commit
4a499ad295
|
@ -24,6 +24,7 @@
|
||||||
#include "monitor/monitor.h"
|
#include "monitor/monitor.h"
|
||||||
#include "hw/i386/ioapic.h"
|
#include "hw/i386/ioapic.h"
|
||||||
#include "hw/i386/ioapic_internal.h"
|
#include "hw/i386/ioapic_internal.h"
|
||||||
|
#include "hw/intc/intc.h"
|
||||||
#include "hw/sysbus.h"
|
#include "hw/sysbus.h"
|
||||||
|
|
||||||
/* ioapic_no count start from 0 to MAX_IOAPICS,
|
/* ioapic_no count start from 0 to MAX_IOAPICS,
|
||||||
|
@ -142,6 +143,15 @@ static void ioapic_common_realize(DeviceState *dev, Error **errp)
|
||||||
ioapic_no++;
|
ioapic_no++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void ioapic_print_info(InterruptStatsProvider *obj,
|
||||||
|
Monitor *mon)
|
||||||
|
{
|
||||||
|
IOAPICCommonState *s = IOAPIC_COMMON(obj);
|
||||||
|
|
||||||
|
ioapic_dispatch_pre_save(s);
|
||||||
|
ioapic_print_redtbl(mon, s);
|
||||||
|
}
|
||||||
|
|
||||||
static const VMStateDescription vmstate_ioapic_common = {
|
static const VMStateDescription vmstate_ioapic_common = {
|
||||||
.name = "ioapic",
|
.name = "ioapic",
|
||||||
.version_id = 3,
|
.version_id = 3,
|
||||||
|
@ -161,9 +171,11 @@ static const VMStateDescription vmstate_ioapic_common = {
|
||||||
static void ioapic_common_class_init(ObjectClass *klass, void *data)
|
static void ioapic_common_class_init(ObjectClass *klass, void *data)
|
||||||
{
|
{
|
||||||
DeviceClass *dc = DEVICE_CLASS(klass);
|
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||||
|
InterruptStatsProviderClass *ic = INTERRUPT_STATS_PROVIDER_CLASS(klass);
|
||||||
|
|
||||||
dc->realize = ioapic_common_realize;
|
dc->realize = ioapic_common_realize;
|
||||||
dc->vmsd = &vmstate_ioapic_common;
|
dc->vmsd = &vmstate_ioapic_common;
|
||||||
|
ic->print_info = ioapic_print_info;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const TypeInfo ioapic_common_type = {
|
static const TypeInfo ioapic_common_type = {
|
||||||
|
@ -173,6 +185,10 @@ static const TypeInfo ioapic_common_type = {
|
||||||
.class_size = sizeof(IOAPICCommonClass),
|
.class_size = sizeof(IOAPICCommonClass),
|
||||||
.class_init = ioapic_common_class_init,
|
.class_init = ioapic_common_class_init,
|
||||||
.abstract = true,
|
.abstract = true,
|
||||||
|
.interfaces = (InterfaceInfo[]) {
|
||||||
|
{ TYPE_INTERRUPT_STATS_PROVIDER },
|
||||||
|
{ }
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static void ioapic_common_register_types(void)
|
static void ioapic_common_register_types(void)
|
||||||
|
|
Loading…
Reference in New Issue