On Wed, Dec 30, 2009 at 12:01:28PM +0000, Blue Swirl wrote: > On Wed, Dec 30, 2009 at 11:50 AM, Gleb Natapov <g...@redhat.com> wrote: > > Knowing ioapic configuration is very useful for the poor soles > > how need to debug guest occasionally. > > > +static struct IOAPICState *ioapic; > > Ugly. I really think the monitor interface needs to be changed to take > an opaque parameter. > Agree, but that's the reality now. Pic does the same. As long as there is only one IOAPIC (and there is no indication that there will be more) that is OK.
> The parameter can passed to the caller with for example a registration > function, like the patches I sent before QObject conversion. > > > +void monitor_print_ioapic(Monitor *mon, const QObject *ret_data) > > In this case the function would be > void monitor_print_ioapic(Monitor *mon, const QObject *ret_data, void *opaque) > where opaque replaces the static ioapic variable. > > > +void do_info_ioapic(Monitor *mon, QObject **ret_data) > > Same here. > -- Gleb.