WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [PATCH 01/17] xen/dom0: handle acpi lapic parsing in Xen

To: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH 01/17] xen/dom0: handle acpi lapic parsing in Xen dom0
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
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <alpine.LFD.2.00.0906021826430.3419@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1243409850-21577-1-git-send-email-jeremy@xxxxxxxx> <1243409850-21577-2-git-send-email-jeremy@xxxxxxxx> <alpine.LFD.2.00.0906021826430.3419@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.21 (X11/20090320)
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

<Prev in Thread] Current Thread [Next in Thread>