These commands look like bit-rotted development aids to me. They're limited to just a few interrupt controllers. For the most common machine types and accelerators, they do nothing.
They complicate David Gibson's work on disentangling dependencies on ISA. I'm cc'ing the maintainers of all machines that can be configured in a way that makes these commands do something. Please speak up if you think they provide value. The gory details: Only some targets provide "info pic" and "info irq", namely: #if defined(TARGET_I386) || defined(TARGET_PPC) || defined(TARGET_MIPS) || \ defined(TARGET_LM32) || (defined(TARGET_SPARC) && !defined(TARGET_SPARC64)) They're HMP-only. Their documentation in full: info pic -- show i8259 (PIC) state info irq -- show the interrupts statistics (if available) The first line is a lie: as we'll see, it's not just i8259, but it isn't all PICs, either. Not even all i8259. Three separate implementations: * sparc-softmmu This is sun4m_hmp_info_pic(), sun4m_hmp_info_irq(). Both do nothing when !slavio_intctl. Set by sun4m_hw_init(). Thus, two cases: - The sun4m machine types These are SS-5, SS-10, SS-600MP, SS-20, Voyager, LX, SS-4, SPARCclassic, SPARCbook. Their board initialization runs sun4m_hw_init(). "info pic" prints selected registers of the "slavio_intctl" device model. This isn't a i8259. "info irq" prints "irq statistic code not compiled" unless you manually enable DEBUG_IRQ_COUNT to make slavio_set_irq() count IRQs. Then it prints IRQ counts. - The other machine types These are leon3_generic and none. Both commands do nothing. * lm32-softmmu This is lm32_hmp_info_pic(), lm32_hmp_info_irq(). Both do nothing when !pic. Set by init() method of "lm32-pic". Thus, two cases: - Machines sporting an "lm32-pic" These are lm32-evr, lm32-uclinux, milkymist. "info pic" prints selected registers of the "lm32-pic" device model realized last. Fortunately, all machines have just one. This isn't a i8259. "info irq" prints its IRQ counts. - Other machine types This is just none right now. Both commands do nothing. * {i386,mips,mips64,mips64el,mipsel,ppc,ppc64,ppcemb,x86_64}-softmmu This is hmp_info_pic(), hmp_info_irq(). hmp_info_pic() does nothing when !isa_pic. Set by the i8259_init() helper that creates a master/slave pair of the "isa-i8259" device model. Cases: - Machines using the helper These are alpha clipper i386 & x86_64 pc*, isapc when accel=tcg or kernel_irqchip=off mips* magnum, pica64, malta, mips mips64el fulong2e ppc & ppc64 prep "info pic" prints selected registers of the last "isa-i8259" master/slave pair created with i8259_init(). I can't see a machine creating more than one. For the pc machine types, the pair of i8259s is just a piece of legacy crap hanging off LAPIC or I/O APIC. The commands are thus of dubious utility there. "info irq" prints "irq statistic code not compiled" unless you manually enable DEBUG_IRQ_COUNT to make pic_set_irq() count IRQs. Then it prints IRQ counts for *all* "isa-i8259", whether they're created with i8259_init() or not. Looks like all are. - Machines not using the helper These include i386 & x86_64 pc*, isapc when accel=kvm and kernel_irqchip=on (this is the default). Both commands do nothing. Even when the machine has in fact a pair of i8259 implemented by device model "kvm-i8259".