From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: the arch/x86 maintainers <x86@kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Xen-devel <xen-devel@lists.xensource.com>,
Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Subject: Re: [PATCH 02/18] xen: hook io_apic read/write operations
Date: Mon, 11 May 2009 11:25:16 -0700 [thread overview]
Message-ID: <4A086D8C.3060404@goop.org> (raw)
In-Reply-To: <20090511111904.GK4648@elte.hu>
Ingo Molnar wrote:
>> Hm, every time you see this code, you always have this
>> quasi-Pavlovian response.
>>
>
> Yep, my reaction to ugly code is pretty predictable, and
> (hopefully!) repeatable. So calling it Pavlovian is an implicit
> (albeit, i suspect, unintended ;-) compliment.
>
My frustration is that you've generally not replied, and so we haven't
been able to discuss it. Could you be more specific about what's
triggering the reaction? Is it that the change is happening at the
io-apic level, or that its some explicit Xen code pasted in here rather
than via an io_apic_ops?
>> You say "use an irqchip". I say:
>>
>> * We already use irqchip
>> * but most of the interesting IO apic accesses (routing) are not
>> done via the irqchip interface
>> * so irqchip doesn't help
>>
>
> I dont see the problem. All APIs within Linux are kept minimalistic
> and are extended on the fly, on an on-demand basis.
>
Sure, where it makes sense. One wouldn't start extending an API in a
completely different direction. irq_chip currently only deals with
"irqs"; what those irqs mean and connect to are not its business because
that has all been set up elsewhere. If you start adding interrupt
routing, then it starts needing to know about devices, busses, etc. I
can't see how that makes much sense at all, particularly for an
arch-independent interface.
>
> Well, my main task at this stage is to point out ugly code. I might
> be able to do research for you and come up with a plan for you, but
> that's really a courtesy in general and is not always possible for
> maintainers. You might argue "of all possible solutions this is the
> cleanest" but i havent seen you make that point.
I'd love to, but Plato isn't taking my calls so I can't check.
But I do think hooking the io-apic operations makes more sense than any
other solution because we explicitly want all the other code above it.
The *only* difference between a Xen io-apic and a native io-apic is that
we need to access the registers with hypercalls rather than mmio. Same
registers, same meanings, same settings made at the same time. So the
io-apic accessors are at precisely the right level of abstraction for
our needs; introducing something higher-level would be an abstraction
impedance mismatch, and would be no better for it.
An io_apic_ops makes sense to me, if adding it would stop triggering
your ugly-code detector. But that's specifically what HPA objected to
in this series...
J
next prev parent reply other threads:[~2009-05-11 18:25 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-07 21:14 [GIT PULL] xen: apic support for dom0 Jeremy Fitzhardinge
2009-05-07 21:14 ` [PATCH 01/18] xen/dom0: handle acpi lapic parsing in Xen dom0 Jeremy Fitzhardinge
2009-05-07 21:14 ` [PATCH 02/18] xen: hook io_apic read/write operations Jeremy Fitzhardinge
2009-05-09 8:42 ` Ingo Molnar
2009-05-09 8:43 ` Ingo Molnar
2009-05-09 15:40 ` Jeremy Fitzhardinge
2009-05-11 11:19 ` Ingo Molnar
2009-05-11 18:25 ` Jeremy Fitzhardinge [this message]
2009-05-11 21:43 ` Ingo Molnar
2009-05-11 22:06 ` Jeremy Fitzhardinge
2009-05-07 21:14 ` [PATCH 03/18] xen: create dummy ioapic mapping Jeremy Fitzhardinge
2009-05-07 21:14 ` [PATCH 04/18] xen: implement pirq type event channels Jeremy Fitzhardinge
2009-05-07 21:14 ` [PATCH 05/18] x86/io_apic: add get_nr_irqs_gsi() Jeremy Fitzhardinge
2009-05-07 21:14 ` [PATCH 06/18] xen/apic: identity map gsi->irqs Jeremy Fitzhardinge
2009-05-07 21:14 ` [PATCH 07/18] xen: direct irq registration to pirq event channels Jeremy Fitzhardinge
2009-05-07 21:14 ` [PATCH 08/18] xen: bind pirq to vector and event channel Jeremy Fitzhardinge
2009-05-07 21:14 ` [PATCH 09/18] xen: pre-initialize legacy irqs early Jeremy Fitzhardinge
2009-05-07 21:14 ` [PATCH 10/18] xen: don't setup acpi interrupt unless there is one Jeremy Fitzhardinge
2009-05-07 21:14 ` [PATCH 11/18] xen: use acpi_get_override_irq() to get triggering for legacy irqs Jeremy Fitzhardinge
2009-05-07 21:14 ` [PATCH 12/18] xen: initialize irq 0 too Jeremy Fitzhardinge
2009-05-07 21:14 ` [PATCH 13/18] xen: dynamically allocate irq & event structures Jeremy Fitzhardinge
2009-05-07 21:14 ` [PATCH 14/18] xen: set pirq name to something useful Jeremy Fitzhardinge
2009-05-07 21:14 ` [PATCH 15/18] xen: fix legacy irq setup, make ioapic-less machines work Jeremy Fitzhardinge
2009-05-07 21:14 ` [PATCH 16/18] xen: disable MSI Jeremy Fitzhardinge
2009-05-07 21:14 ` [PATCH 17/18] xen/apic: checkpatch cleanups Jeremy Fitzhardinge
2009-05-07 21:14 ` [PATCH 18/18] xen/apic: add pin argument to setup_ioapic_entry() Jeremy Fitzhardinge
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=4A086D8C.3060404@goop.org \
--to=jeremy@goop.org \
--cc=jeremy.fitzhardinge@citrix.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=x86@kernel.org \
--cc=xen-devel@lists.xensource.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox