linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: discuss@x86-64.org
Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com>,
	Andi Kleen <ak@suse.de>, Pavel Machek <pavel@ucw.cz>,
	Andrew Morton <akpm@osdl.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [discuss] Re: [PATCH][Fix][Resend] Fix Bug #4959: Page tables corrupted during resume on x86-64 (take 3)
Date: Fri, 30 Sep 2005 08:51:08 +0200	[thread overview]
Message-ID: <200509300851.09327.rjw@sisk.pl> (raw)
In-Reply-To: <200509300726.20528.rjw@sisk.pl>

Hi,

On Friday, 30 of September 2005 07:26, Rafael J. Wysocki wrote:
> On Friday, 30 of September 2005 01:59, Siddha, Suresh B wrote:
> > On Fri, Sep 30, 2005 at 01:04:35AM +0200, Rafael J. Wysocki wrote:
> > > On Friday, 30 of September 2005 00:29, Siddha, Suresh B wrote:
> > > > Did you try just only my patch on top of 2.6.14-rc2? You can get that
> > > > patch from http://www.x86-64.org/lists/discuss/msg07313.html
> > > 
> > > The patch that I tested is attached.  I think it's the same one.  I've just applied
> > > it on top of 2.6.14-rc2-git7, and it doesn't boot.
> > 
> > It works fine for me. Only thing I see though is a warning for UP configuration.
> > Other than that UP, SMP(with and without hotplug) kernels boot fine. I will
> > send the warning fix to Andrew.
> > 
> > > The problem (as I see it) is this:
> > > In x86_64_start_kernel() you copy boot_level4_pgt[] into init_level4_pgt[],
> > > and you make the latter your current PGD by loading cr3 with its address.
> > > Fine.  With this PGD you call start_kernel() which calls setup_arch(), which
> > > calls zap_low_mappings(0) that fills init_level4_pgt[] (which at this moment
> > > is still your current PGD) with zeros ...
> > 
> > It clears only the zeroth entry. Not the whole pgd.
> 
> You are absolutely right.  I have misread this, sorry.
> 
> > Please send me your .config so that I can try reproducing the issue locally
> > here.
> 
> Of course.  The .config is attached.  Generally, it's a non-SMP box, and commenting
> out the zap_low_mappings((0) in setup_arch() makes the box boot again.

One more datapoint: The box boots if I move the zap_low_mappings((0)
in the following way:

--- linux-2.6.14-rc2-git7.orig/arch/x86_64/kernel/setup.c	2005-09-30 07:39:35.000000000 +0200
+++ linux-2.6.14-rc2-git7/arch/x86_64/kernel/setup.c	2005-09-30 08:31:20.000000000 +0200
@@ -571,8 +571,6 @@
 
 	init_memory_mapping(0, (end_pfn_map << PAGE_SHIFT));
 
-	zap_low_mappings(0);
-
 #ifdef CONFIG_ACPI
 	/*
 	 * Initialize the ACPI boot-time table parser (gets the RSDP and SDT).
@@ -680,6 +678,8 @@
 		get_smp_config();
 	init_apic_mappings();
 #endif
+	zap_low_mappings(0);
+
 
 	/*
 	 * Request address space for all standard RAM and ROM resources

iHowever, if I place the zap_low_mappings((0) before the
#define CONFIG_X86_LOCAL_APIC in line 673, it doesn't boot.

Certainly init_apic_mappings() is at fault.  Could that be a reult of a call to
alloc_bootmem_pages()?.

And one more: I have to boot with "noapic".

Greetings,
Rafael

  reply	other threads:[~2005-09-30  6:50 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-28 14:24 [PATCH][Fix][Resend] Fix Bug #4959: Page tables corrupted during resume on x86-64 (take 3) Rafael J. Wysocki
2005-09-28 19:18 ` Andi Kleen
2005-09-28 20:24   ` Rafael J. Wysocki
2005-09-28 20:33     ` [discuss] " Andi Kleen
2005-09-28 22:11       ` Rafael J. Wysocki
2005-09-28 22:35         ` Pavel Machek
2005-09-29 11:25           ` Rafael J. Wysocki
2005-09-29  0:00     ` Siddha, Suresh B
2005-09-29 10:58       ` Rafael J. Wysocki
2005-09-29 22:01       ` Rafael J. Wysocki
2005-09-29 22:29         ` Siddha, Suresh B
2005-09-29 23:04           ` Rafael J. Wysocki
2005-09-29 23:59             ` Siddha, Suresh B
2005-09-30  5:26               ` Rafael J. Wysocki
2005-09-30  6:51                 ` Rafael J. Wysocki [this message]
2005-10-01  1:25                   ` [discuss] " Siddha, Suresh B
2005-10-01  7:47                     ` Rafael J. Wysocki
2005-10-01 10:03                       ` Rafael J. Wysocki
2005-10-02  1:08                         ` Siddha, Suresh B
2005-10-02  9:54                           ` Rafael J. Wysocki
2005-09-29 20:02 ` Andrew Morton
2005-09-29 21:35   ` Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200509300851.09327.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=discuss@x86-64.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=suresh.b.siddha@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).