All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@novell.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] i386 linux: make 32-bit PAE kernel work when built with newer gcc
Date: Mon, 13 Mar 2006 17:40:12 +0100	[thread overview]
Message-ID: <4415AE7C.76F0.0078.0@novell.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 249 bytes --]

The compiler isn't required to order the two stores ptep_get_and_clear_full() in any particular way, and we saw cases
where the upper 32 bits get stored before the lower ones, which causes the access to fail (page-fault propagated out of
Xen).

Jan

[-- Attachment #2: xenlinux-i386-pae-ptep_get_and_clear_full.patch --]
[-- Type: text/plain, Size: 775 bytes --]

Index: head-2006-03-13/include/asm-i386/mach-xen/asm/pgtable.h
===================================================================
--- head-2006-03-13.orig/include/asm-i386/mach-xen/asm/pgtable.h	2006-03-13 10:22:14.000000000 +0100
+++ head-2006-03-13/include/asm-i386/mach-xen/asm/pgtable.h	2006-03-13 15:25:53.000000000 +0100
@@ -272,7 +272,15 @@ static inline pte_t ptep_get_and_clear_f
 	pte_t pte;
 	if (full) {
 		pte = *ptep;
+#ifdef CONFIG_X86_PAE
+		/* Cannot do this in a single step, as the compiler may
+		   issue the two stores in either order, but the hypervisor
+		   must not see the high part before the low one. */
+		ptep->pte_low = 0;
+		ptep->pte_high = 0;
+#else
 		*ptep = __pte(0);
+#endif
 	} else {
 		pte = ptep_get_and_clear(mm, addr, ptep);
 	}

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

             reply	other threads:[~2006-03-13 16:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-13 16:40 Jan Beulich [this message]
2006-03-14 10:09 ` [PATCH] i386 linux: make 32-bit PAE kernel work when built with newer gcc Keir Fraser
2006-03-14 10:40   ` Jan Beulich
2006-03-14 11:53     ` Keir Fraser
2006-03-14 12:40       ` Jan Beulich
2006-03-14 14:06         ` Keir Fraser
2006-03-14 14:31           ` Jan Beulich
2006-03-14 14:39             ` Keir Fraser
2006-03-17 10:19 ` Keir Fraser
2006-03-17 11:35   ` Jan Beulich
2006-03-17 11:51     ` Keir Fraser
2006-03-17 12:28       ` Jan Beulich
2006-03-17 13:24         ` Keir Fraser
2006-03-17 13:37           ` Jan Beulich
  -- strict thread matches above, loose matches on Subject: below --
2006-03-14 12:15 Petersson, Mats

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=4415AE7C.76F0.0078.0@novell.com \
    --to=jbeulich@novell.com \
    --cc=xen-devel@lists.xensource.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.