[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Xen-devel] Re: [PATCH 01/17] xen/dom0: handle acpi lapic parsing in Xen dom0
- To: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
- From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
- Date: Wed, 03 Jun 2009 16:38:42 +1000
- Cc: Chris Wright <chrisw@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Ky Srinivasan <ksrinivasan@xxxxxxxxxx>, kurt.hackel@xxxxxxxxxx, the arch/x86 maintainers <x86@xxxxxxxxxx>, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>, Avi Kivity <avi@xxxxxxxxxx>, Jens Axboe <jens.axboe@xxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxx>, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>, Greg KH <gregkh@xxxxxxx>
- Delivery-date: Tue, 02 Jun 2009 23:39:11 -0700
- List-id: Xen developer discussion <xen-devel.lists.xensource.com>
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
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
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 ?
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.
Xen-devel mailing list