From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
Alexander Graf <agraf@suse.de>, Michael Walle <michael@walle.cc>,
qemu-ppc@nongnu.org, David Gibson <dgibson@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Leon Alrae <leon.alrae@imgtec.com>,
Aurelien Jarno <aurelien@aurel32.net>,
Richard Henderson <rth@twiddle.net>
Subject: [Qemu-devel] Are "info pic" and "info irq" still of any use?
Date: Tue, 31 Mar 2015 11:56:37 +0200 [thread overview]
Message-ID: <87pp7pa3sa.fsf@blackfin.pond.sub.org> (raw)
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".
next reply other threads:[~2015-03-31 9:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-31 9:56 Markus Armbruster [this message]
2015-03-31 10:03 ` [Qemu-devel] Are "info pic" and "info irq" still of any use? Paolo Bonzini
2015-03-31 11:19 ` Markus Armbruster
2015-03-31 11:16 ` Michael Walle
2015-04-01 9:07 ` Kevin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pp7pa3sa.fsf@blackfin.pond.sub.org \
--to=armbru@redhat.com \
--cc=agraf@suse.de \
--cc=aurelien@aurel32.net \
--cc=dgibson@redhat.com \
--cc=leon.alrae@imgtec.com \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=michael@walle.cc \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.