[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



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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.