Skip to contentSkip to conversation

This adds a patch for the vanilla kernel, to be pushed upstream some

Xen-changelog Rik van Riel 3 participants 4 messages Jul 12, 2005 – Jul 13, 2005 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

linux-2.6-xen-sparse/arch/xen/i386/mm/pgtable.c

Quoted 11 lines · Xen patchbot -unstable
linux-2.6-xen-sparse/arch/xen/i386/mm/pgtable.c +5 -0
 
 	if (PTRS_PER_PMD == 1 || !pgd)
 		return pgd;
 
+	if (!HAVE_SHARED_KERNEL_PMD) {
+		/* alloc and copy kernel pmd */
+		unsigned long flags;
+		pgd_t *copy_pgd = pgd_offset_k(PAGE_OFFSET);
+		pud_t *copy_pud = pud_offset(copy_pgd, PAGE_OFFSET);

I don't understand how the code inside this if condition ever gets to run. Surely the previous test should catch the non-PAE case already ?

Or is this code a preparation for non-3:1 splits ?

Signature · 3 lines
The Theory of Escalating Commitment: "The cost of continuing mistakes is
borne by others, while the cost of admitting mistakes is borne by yourself."
  -- Joseph Stiglitz, Nobel Laureate in Economics
#3 lore raw
In reply to Keir Fraser
Quoted 10 lines · Keir Fraser
Quoted 5 lines · Rik van Riel

I don't understand how the code inside this if condition ever gets to run. Surely the previous test should catch the non-PAE case already ?

Or is this code a preparation for non-3:1 splits ?

That code path would get executed by native pae builds (ie. non-xen pae builds).

Makes sense. There are non-3:1 splits in native PAE builds.

Signature · 3 lines
The Theory of Escalating Commitment: "The cost of continuing mistakes is
borne by others, while the cost of admitting mistakes is borne by yourself."
  -- Joseph Stiglitz, Nobel Laureate in Economics
#2 lore raw
In reply to Rik van Riel
Quoted 5 lines · Rik van Riel

I don't understand how the code inside this if condition ever gets to run. Surely the previous test should catch the non-PAE case already ?

Or is this code a preparation for non-3:1 splits ?

That code path would get executed by native pae builds (ie. non-xen pae builds).

It's a dead path on xen/i386 but we keep it around to keep the diff vs i386 small.

-- Keir

#4 lore raw
In reply to Rik van Riel
Quoted 8 lines · Rik van Riel
Quoted 6 lines · Xen patchbot -unstable
linux-2.6-xen-sparse/arch/xen/i386/mm/pgtable.c +0 -0
 
 	if (PTRS_PER_PMD == 1 || !pgd)
 		return pgd;
Quoted 9 lines

linux-2.6-xen-sparse/arch/xen/i386/mm/pgtable.c

Quoted 5 lines
linux-2.6-xen-sparse/arch/xen/i386/mm/pgtable.c +5 -0
+	if (!HAVE_SHARED_KERNEL_PMD) {
+		/* alloc and copy kernel pmd */
+		unsigned long flags;
+		pgd_t *copy_pgd = pgd_offset_k(PAGE_OFFSET);
+		pud_t *copy_pud = pud_offset(copy_pgd, PAGE_OFFSET);

I don't understand how the code inside this if condition ever gets to run. Surely the previous test should catch the non-PAE case already ?

It's about PAE mode. xenlinux in PAE mode does _not_ have a shared PMD for the kernel address space.

Gerd

Signature · 1 line
panic("it works"); /* avoid being flooded with debug messages */