[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [GIT PULL] x86/mm changes for v3.9-rc1
 
- To: "H. Peter Anvin" <hpa@xxxxxxxxxxxxxxx>
 
- From: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
 
- Date: Fri, 22 Feb 2013 08:22:30 -0800
 
- Cc: linux-mips <linux-mips@xxxxxxxxxxxxxx>,	Jeremy Fitzhardinge <jeremy@xxxxxxxx>,	Gleb Natapov <gleb@xxxxxxxxxx>, "H. J. Lu" <hjl.tools@xxxxxxxxx>,	Frederic Weisbecker <fweisbec@xxxxxxxxx>,	Joe Millenbach <jmillenbach@xxxxxxxxx>,	virtualization <virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx>,	Gokul Caushik <caushik1@xxxxxxxxx>,	Ralf Baechle <ralf@xxxxxxxxxxxxxx>, Pavel Machek <pavel@xxxxxx>,	"H. Peter Anvin" <hpa@xxxxxxxxx>, sparclinux@xxxxxxxxxxxxxxx,	Christoph Lameter <cl@xxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>,	Ville SyrjÃlà <ville.syrjala@xxxxxxxxxxxxxxx>,	Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>,	Andrea Arcangeli <aarcange@xxxxxxxxxx>,	Lee Schermerhorn <Lee.Schermerhorn@xxxxxx>,	"Xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>,	Russell King <linux@xxxxxxxxxxxxxxxx>,	Len Brown <len.brown@xxxxxxxxx>, Joerg Roedel <joro@xxxxxxxxxx>,	Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>,	Hugh Dickins <hughd@xxxxxxxxxx>,	Yasuaki Ishimatsu <isimatu.yasuaki@xxxxxxxxxxxxxx>,	Mel Gorman <mgorman@xxxxxxx>, Ingo Molnar <mingo@xxxxxxx>,	Borislav Petkov <bp@xxxxxxx>, Paul Turner <pjt@xxxxxxxxxx>,	Avi Kivity <avi@xxxxxxxxxx>, Alexander Duyck <alexander.h.duyck@xxxxxxxxx>,	Fenghua Yu <fenghua.yu@xxxxxxxxx>, Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>,	Arnd Bergmann <arnd@xxxxxxxx>,	Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>,	Rusty Russell <rusty@xxxxxxxxxxxxxxx>, Jamie Lokier <jamie@xxxxxxxxxxxxx>,	Josh Triplett <josh@xxxxxxxxxxxxxxxx>,	Steven Rostedt <rostedt@xxxxxxxxxxx>, "Rafael J. Wysocki" <rjw@xxxxxxx>,	Matt Fleming <matt.fleming@xxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>,	Andrzej Pietrasiewicz <andrzej.p@xxxxxxxxxxx>,	Shuah Khan <shuah.khan@xxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>,	Yinghai Lu <yinghai@xxxxxxxxxx>,	Jarkko Sakkinen <jarkko.sakkinen@xxxxxxxxx>,	Daniel J Blueman <daniel@xxxxxxxxxxxxxxxxxx>,	Zachary Amsden <zamsden@xxxxxxxxx>,	"linux-pm@xxxxxxxxxxxxxxx" <linux-pm@xxxxxxxxxxxxxxx>,	Marcelo Tosatti <mtosatti@xxxxxxxxxx>, Jacob Shin <jacob.shin@xxxxxxx>,	Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>,	stable <stable@xxxxxxxxxxxxxxx>, Dave Hansen <dave@xxxxxxxxxxxxxxxxxx>,	Pekka Enberg <penberg@xxxxxxxxxx>,	Kyungmin Park <kyungmin.park@xxxxxxxxxxx>,	"Michael S. Tsirkin" <mst@xxxxxxxxxx>,	"Eric W. Biederman" <ebiederm@xxxxxxxxxxxx>, Rob Landley <rob@xxxxxxxxxxx>,	Johannes Weiner <hannes@xxxxxxxxxxx>,	Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,	"David S. Miller" <davem@xxxxxxxxxxxxx>, Shuah Khan <shuahkhan@xxxxxxxxx>
 
- Delivery-date: Fri, 22 Feb 2013 16:49:24 +0000
 
- List-id: Xen developer discussion <xen-devel.lists.xen.org>
 
 
 
On Thu, Feb 21, 2013 at 4:34 PM, H. Peter Anvin <hpa@xxxxxxxxxxxxxxx> wrote:
>
> This is a huge set of several partly interrelated (and concurrently
> developed) changes, which is why the branch history is messier than
> one would like.
>
> The *really* big items are two humonguous patchsets mostly developed
> by Yinghai Lu at my request, which completely revamps the way we
> create initial page tables.
Ugh. So I've tried to walk through this, and it's painful. If this
results in problems, we're going to be *so* screwed. Is it bisectable?
I also don't understand how "early_idt_handler" could *possibly* work.
In particular, it seems to rely on the trap number being set up in the
stack frame:
        cmpl $14,72(%rsp)       # Page fault?
but that's not even *true*. Why? Because we export both the
early_idt_handlers[] array (that sets up the trap number and makes the
stack frame be reliable) and the single early_idt_handler function
(that relies on the trap number and the reliable stack frame), AND
AFAIK WE USE THE LATTER!
See x86_64_start_kernel():
        for (i = 0; i < NUM_EXCEPTION_VECTORS; i++) {
#ifdef CONFIG_EARLY_PRINTK
                set_intr_gate(i, &early_idt_handlers[i]);
#else
                set_intr_gate(i, early_idt_handler);
#endif
        }
so unless you have CONFIG_EARLY_PRINTK, the interrupt gate will point
to that raw early_idt_handler function that doesn't *work* on its own,
afaik.
Btw, it's not just the page fault index testing that is wrong. The whole
        cmpl $__KERNEL_CS,96(%rsp)
        jne 11f
also relies on the stack frame being set up the same way for all
exceptions - which again is only true if we ran through the
early_idt_handlers[] prologue that added the extra stack entry.
How does this even work for me? I don't have EARLY_PRINTK enabled.
What am I missing?
                Linus
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
 
    
     |