public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
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: Sat, 09 May 2009 08:40:56 -0700	[thread overview]
Message-ID: <4A05A408.3020006@goop.org> (raw)
In-Reply-To: <20090509084324.GA5158@elte.hu>

Ingo Molnar wrote:
> * Ingo Molnar <mingo@elte.hu> wrote:
>
>   
>> * Jeremy Fitzhardinge <jeremy@goop.org> wrote:
>>
>>     
>>> --- a/arch/x86/kernel/apic/io_apic.c
>>> +++ b/arch/x86/kernel/apic/io_apic.c
>>> @@ -62,8 +62,10 @@
>>>  #include <asm/uv/uv_hub.h>
>>>  #include <asm/uv/uv_irq.h>
>>>  
>>> +#include <asm/xen/hypervisor.h>
>>>  #include <asm/apic.h>
>>>  
>>> +
>>>  #define __apicdebuginit(type) static type __init
>>>  
>>>  /*
>>> @@ -407,14 +409,26 @@ static inline void io_apic_eoi(unsigned int apic, unsigned int vector)
>>>  
>>>  static inline unsigned int io_apic_read(unsigned int apic, unsigned int reg)
>>>  {
>>> -	struct io_apic __iomem *io_apic = io_apic_base(apic);
>>> +	struct io_apic __iomem *io_apic;
>>> +
>>> +	if (xen_initial_domain())
>>> +		return xen_io_apic_read(apic, reg);
>>>       
>> hm, any reason why we dont want to create a 'struct io_apic' 
>> driver abstraction instead of spreading xen_initial_domain() 
>> checks all around the code?
>>     

My initial patch did that, and I'm happy to revive it.  But HPA 
preferred this approach, arguing against introducing another layer of 
abstraction for the sake of one user.

> And on a higher level, i still dont see why you dont do the whole 
> Xen thing under an irqchip. There should be no extra crappy checks 
> in native code.
>   

Hm, every time you see this code, you always have this quasi-Pavlovian 
response.  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

And then you don't reply.  And then you raise it again.

I would *always* prefer to hook into an interface like irqchip rather 
than gouge into the code, but I really think that irqchip isn't that 
interface.  If you have a more specific suggestion or proposal I'll 
happily follow it up, but repeating "you should use an irqchip" isn't 
getting anywhere.

To reiterate:

    * irq_chip is all about interrupt delivery, masking, acking, etc
    * these Xen dom0 apic changes are all about interrupt routing
    * irq_chip doesn't cover routing


    J

  reply	other threads:[~2009-05-09 15:41 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 [this message]
2009-05-11 11:19         ` Ingo Molnar
2009-05-11 18:25           ` Jeremy Fitzhardinge
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=4A05A408.3020006@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