[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4A261A72.5040700@goop.org>
Date: Wed, 03 Jun 2009 16:38:42 +1000
From: Jeremy Fitzhardinge <jeremy@...p.org>
To: Thomas Gleixner <tglx@...utronix.de>
CC: Ingo Molnar <mingo@...e.hu>,
the arch/x86 maintainers <x86@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Xen-devel <xen-devel@...ts.xensource.com>,
Greg KH <gregkh@...e.de>, Jens Axboe <jens.axboe@...cle.com>,
Chris Wright <chrisw@...hat.com>, kurt.hackel@...cle.com,
Andrew Morton <akpm@...ux-foundation.org>,
Ky Srinivasan <ksrinivasan@...ell.com>,
Beulich <jbeulich@...ell.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Avi Kivity <avi@...hat.com>,
Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>
Subject: Re: [PATCH 01/17] xen/dom0: handle acpi lapic parsing in Xen dom0
Thomas Gleixner wrote:
> On Wed, 27 May 2009, Jeremy Fitzhardinge wrote:
>
>
>> When running in Xen dom0, we still want to parse the ACPI tables to
>> find out about local and IO apics, but we don't want to actually use
>> the lapics.
>>
>
> Hmm, we parse the tables and discard the information. What's the point
> of this exercise ? Some nice dmesg lines ?
>
No, it was to make some highly convoluted logic work. I'm planning on
revisting all this to make it so that clearing the APIC cpuid feature
flag works (ie, the local apics are skipped, but IO-APIC discovery still
works).
I don't remember the specific problems I encountered, but it was
something to do with the fact that CPU discovery is tied up with local
APIC discovery and some entanglement with how ACPI table parsing works,
all coupled through some global variables with unclear semantics.
> I hate these "if (xen_...)" extra cases even more than the paravirt
> misery. They stick Xen dependencies into random places and enforce the
> people who want to modify that code to find out why the heck this
> needs to be there.
>
I agree. The if (xen) stuff was there to avoid sugar-coating the
situation. I could have prettily hidden things in abstraction layers,
but if there were no current or even likely non-Xen users, I thought it
was more honest and direct to just make the situation obvious to the reader.
> That's the fundamental design problem with the Dom0 model that you
> want just certain parts of Linux and those parts which are in your way
> are just hacked out. But this is designed to be a nightmare for
> maintainence and development. Are you going to stick more and more of
> those "if (xen..)" constructs into places which provide functionality
> which is only partially useful to Xen ?
>
No.
My current plan for this apic stuff is to 1) clean up the local apic
discovery so we can just clear the APIC cpuid flag and have the right
thing happen (since that's the truth of the situation: there are no
local apics available to the kernel), and 2) implement the ioapic driver
layer so that we can just plug our Xen stuff into that. That should
avoid all the explicit if (xen) bits in this part of the code.
J
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists