* [Qemu-devel] Are "info pic" and "info irq" still of any use?
@ 2015-03-31 9:56 Markus Armbruster
2015-03-31 10:03 ` Paolo Bonzini
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Markus Armbruster @ 2015-03-31 9:56 UTC (permalink / raw)
To: qemu-devel
Cc: Mark Cave-Ayland, Alexander Graf, Michael Walle, qemu-ppc,
David Gibson, Paolo Bonzini, Leon Alrae, Aurelien Jarno,
Richard Henderson
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".
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Are "info pic" and "info irq" still of any use?
2015-03-31 9:56 [Qemu-devel] Are "info pic" and "info irq" still of any use? Markus Armbruster
@ 2015-03-31 10:03 ` Paolo Bonzini
2015-03-31 11:19 ` Markus Armbruster
2015-03-31 11:16 ` Michael Walle
2015-04-01 9:07 ` Kevin Wolf
2 siblings, 1 reply; 5+ messages in thread
From: Paolo Bonzini @ 2015-03-31 10:03 UTC (permalink / raw)
To: Markus Armbruster, qemu-devel
Cc: Mark Cave-Ayland, Alexander Graf, Michael Walle, qemu-ppc,
David Gibson, Leon Alrae, Aurelien Jarno, Richard Henderson
On 31/03/2015 11:56, Markus Armbruster wrote:
> 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.
For x86, they can be removed. However, it would be nice to provide
access to the same information via QOM, especially for "info pic". This
is the old QIDL project.
Paolo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Are "info pic" and "info irq" still of any use?
2015-03-31 9:56 [Qemu-devel] Are "info pic" and "info irq" still of any use? Markus Armbruster
2015-03-31 10:03 ` Paolo Bonzini
@ 2015-03-31 11:16 ` Michael Walle
2015-04-01 9:07 ` Kevin Wolf
2 siblings, 0 replies; 5+ messages in thread
From: Michael Walle @ 2015-03-31 11:16 UTC (permalink / raw)
To: Markus Armbruster
Cc: Mark Cave-Ayland, Alexander Graf, qemu-devel, qemu-ppc,
David Gibson, Paolo Bonzini, Leon Alrae, Aurelien Jarno,
Richard Henderson
Am 2015-03-31 11:56, schrieb Markus Armbruster:
[..]
> * 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.
Can be removed. Is there another way to make these information visible?
Esp. the irq counters.
-michael
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Are "info pic" and "info irq" still of any use?
2015-03-31 10:03 ` Paolo Bonzini
@ 2015-03-31 11:19 ` Markus Armbruster
0 siblings, 0 replies; 5+ messages in thread
From: Markus Armbruster @ 2015-03-31 11:19 UTC (permalink / raw)
To: Paolo Bonzini
Cc: Mark Cave-Ayland, qemu-devel, Alexander Graf, Michael Walle,
qemu-ppc, David Gibson, Leon Alrae, Aurelien Jarno,
Richard Henderson
Paolo Bonzini <pbonzini@redhat.com> writes:
> On 31/03/2015 11:56, Markus Armbruster wrote:
>> 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.
>
> For x86, they can be removed. However, it would be nice to provide
> access to the same information via QOM, especially for "info pic". This
> is the old QIDL project.
I guess you mean introspecting device state via QOM, thus QMP. Would be
nice indeed, and much more useful than on-off hacks like "info pic".
Should be no harder than serializing device state, which we already do
for migration. At least in theory. In practice, ...
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Are "info pic" and "info irq" still of any use?
2015-03-31 9:56 [Qemu-devel] Are "info pic" and "info irq" still of any use? Markus Armbruster
2015-03-31 10:03 ` Paolo Bonzini
2015-03-31 11:16 ` Michael Walle
@ 2015-04-01 9:07 ` Kevin Wolf
2 siblings, 0 replies; 5+ messages in thread
From: Kevin Wolf @ 2015-04-01 9:07 UTC (permalink / raw)
To: Markus Armbruster
Cc: Mark Cave-Ayland, qemu-devel, Alexander Graf, Michael Walle,
qemu-ppc, Paolo Bonzini, David Gibson, Leon Alrae, Aurelien Jarno,
Richard Henderson
Am 31.03.2015 um 11:56 hat Markus Armbruster geschrieben:
> 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.
I've used 'info pic' before (on i386) and I think it has helped me a bit
in debugging a guest. Definitely not mainstream usage, but there is some
value.
It's not specifically this feature, but in my experience TCG guests are
much friendlier for debugging (or I just don't know how to do it right
for KVM guests - which would mean that for TCG the features are more
discoverable and therefore friendlier again), so I actively avoid KVM
when doing that.
I would appreciate if the disparity would be solved by KVM guests
getting friendlier instead of TCG guests becoming harder to debug.
That said, if there are good replacements, there is nothing that should
stop us from removing old HMP commands when they are worse than newer
commands.
Kevin
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-04-01 9:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-31 9:56 [Qemu-devel] Are "info pic" and "info irq" still of any use? Markus Armbruster
2015-03-31 10:03 ` Paolo Bonzini
2015-03-31 11:19 ` Markus Armbruster
2015-03-31 11:16 ` Michael Walle
2015-04-01 9:07 ` Kevin Wolf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).