Displaying 20 results from an estimated 64 matches for "pmd_index".
2007 Apr 18
2
2.6.19-rc5-mm2: paravirt X86_PAE=y compile error
On Thu, 16 Nov 2006 00:16:26 +0100
Adrian Bunk <bunk@stusta.de> wrote:
> Paravirt breaks CONFIG_X86_PAE=y compilation:
>
> <-- snip -->
>
> ...
> CC init/main.o
> In file included from include2/asm/pgtable.h:245,
> from
> /home/bunk/linux/kernel-2.6/linux-2.6.19-rc5-mm2/include/linux/mm.h:40,
> from
>
2007 Apr 18
2
2.6.19-rc5-mm2: paravirt X86_PAE=y compile error
On Thu, 16 Nov 2006 00:16:26 +0100
Adrian Bunk <bunk@stusta.de> wrote:
> Paravirt breaks CONFIG_X86_PAE=y compilation:
>
> <-- snip -->
>
> ...
> CC init/main.o
> In file included from include2/asm/pgtable.h:245,
> from
> /home/bunk/linux/kernel-2.6/linux-2.6.19-rc5-mm2/include/linux/mm.h:40,
> from
>
2007 Apr 18
0
[PATCH 4/4] Pte simplify ops.patch
...asm-i386/pgtable-3level.h
--- a/include/asm-i386/pgtable-3level.h Wed Apr 11 18:23:44 2007 -0700
+++ b/include/asm-i386/pgtable-3level.h Wed Apr 11 18:23:49 2007 -0700
@@ -139,16 +139,6 @@ static inline void pud_clear (pud_t * pu
#define pmd_offset(pud, address) ((pmd_t *) pud_page(*(pud)) + \
pmd_index(address))
-/* local pte updates need not use xchg for locking */
-static inline pte_t native_local_ptep_get_and_clear(pte_t *ptep)
-{
- pte_t res;
-
- res = *ptep;
- native_pte_clear(NULL, 0, ptep);
- return res;
-}
-
#ifdef CONFIG_SMP
static inline pte_t native_ptep_get_and_clear(pte_t *ptep)...
2007 Apr 18
0
[PATCH 4/4] Pte simplify ops.patch
...asm-i386/pgtable-3level.h
--- a/include/asm-i386/pgtable-3level.h Wed Apr 11 18:23:44 2007 -0700
+++ b/include/asm-i386/pgtable-3level.h Wed Apr 11 18:23:49 2007 -0700
@@ -139,16 +139,6 @@ static inline void pud_clear (pud_t * pu
#define pmd_offset(pud, address) ((pmd_t *) pud_page(*(pud)) + \
pmd_index(address))
-/* local pte updates need not use xchg for locking */
-static inline pte_t native_local_ptep_get_and_clear(pte_t *ptep)
-{
- pte_t res;
-
- res = *ptep;
- native_pte_clear(NULL, 0, ptep);
- return res;
-}
-
#ifdef CONFIG_SMP
static inline pte_t native_ptep_get_and_clear(pte_t *ptep)...
2007 Apr 18
1
[PATCH 3/4] Pte xchg optimization.patch
...asm-i386/pgtable-3level.h
--- a/include/asm-i386/pgtable-3level.h Wed Apr 11 18:23:01 2007 -0700
+++ b/include/asm-i386/pgtable-3level.h Wed Apr 11 18:23:05 2007 -0700
@@ -139,6 +139,17 @@ static inline void pud_clear (pud_t * pu
#define pmd_offset(pud, address) ((pmd_t *) pud_page(*(pud)) + \
pmd_index(address))
+/* local pte updates need not use xchg for locking */
+static inline pte_t native_local_ptep_get_and_clear(pte_t *ptep)
+{
+ pte_t res;
+
+ res = *ptep;
+ native_pte_clear(NULL, 0, ptep);
+ return res;
+}
+
+#ifdef CONFIG_SMP
static inline pte_t native_ptep_get_and_clear(pte_t *ptep)...
2007 Apr 18
1
[PATCH 3/4] Pte xchg optimization.patch
...asm-i386/pgtable-3level.h
--- a/include/asm-i386/pgtable-3level.h Wed Apr 11 18:23:01 2007 -0700
+++ b/include/asm-i386/pgtable-3level.h Wed Apr 11 18:23:05 2007 -0700
@@ -139,6 +139,17 @@ static inline void pud_clear (pud_t * pu
#define pmd_offset(pud, address) ((pmd_t *) pud_page(*(pud)) + \
pmd_index(address))
+/* local pte updates need not use xchg for locking */
+static inline pte_t native_local_ptep_get_and_clear(pte_t *ptep)
+{
+ pte_t res;
+
+ res = *ptep;
+ native_pte_clear(NULL, 0, ptep);
+ return res;
+}
+
+#ifdef CONFIG_SMP
static inline pte_t native_ptep_get_and_clear(pte_t *ptep)...
2009 Jun 05
1
[PATCH] lguest: PAE support
...age_tables.c
+++ b/drivers/lguest/page_tables.c
@@ -53,6 +53,17 @@
* page. */
#define SWITCHER_PGD_INDEX (PTRS_PER_PGD - 1)
+/* For PAE we need the PMD index as well. We use the last 2MB, so we
+ * will need the last pmd entry of the last pmd page. */
+#ifdef CONFIG_X86_PAE
+#define SWITCHER_PMD_INDEX (PTRS_PER_PMD - 1)
+#define RESERVE_MEM 2U
+#define CHECK_GPGD_MASK _PAGE_PRESENT
+#else
+#define RESERVE_MEM 4U
+#define CHECK_GPGD_MASK _PAGE_TABLE
+#endif
+
/* We actually need a separate PTE page for each CPU. Remember that after the
* Switcher code itself comes two pages for each CP...
2009 Jun 05
1
[PATCH] lguest: PAE support
...age_tables.c
+++ b/drivers/lguest/page_tables.c
@@ -53,6 +53,17 @@
* page. */
#define SWITCHER_PGD_INDEX (PTRS_PER_PGD - 1)
+/* For PAE we need the PMD index as well. We use the last 2MB, so we
+ * will need the last pmd entry of the last pmd page. */
+#ifdef CONFIG_X86_PAE
+#define SWITCHER_PMD_INDEX (PTRS_PER_PMD - 1)
+#define RESERVE_MEM 2U
+#define CHECK_GPGD_MASK _PAGE_PRESENT
+#else
+#define RESERVE_MEM 4U
+#define CHECK_GPGD_MASK _PAGE_TABLE
+#endif
+
/* We actually need a separate PTE page for each CPU. Remember that after the
* Switcher code itself comes two pages for each CP...
2009 Apr 16
1
NULL pointer dereference at __switch_to() ( __unlazy_fpu ) with lguest PAE patch
...ly placed at the top 4MB, so it uses a separate, complete PTE
* page. */
#define SWITCHER_PGD_INDEX (PTRS_PER_PGD - 1)
+/* For PAE we need the PMD index as well. We can use the last 2MB, so we
+ * will need the last pmd entry of the last pmd page. */
+#ifdef CONFIG_X86_PAE
+
+#define SWITCHER_PMD_INDEX (PTRS_PER_PMD - 1)
+#endif
+
/* We actually need a separate PTE page for each CPU. Remember that after the
* Switcher code itself comes two pages for each CPU, and we don't want this
* CPU's guest to see the pages of any other CPU. */
@@ -73,39 +81,90 @@ static pgd_t *spgd_addr(struct...
2009 Apr 16
1
NULL pointer dereference at __switch_to() ( __unlazy_fpu ) with lguest PAE patch
...ly placed at the top 4MB, so it uses a separate, complete PTE
* page. */
#define SWITCHER_PGD_INDEX (PTRS_PER_PGD - 1)
+/* For PAE we need the PMD index as well. We can use the last 2MB, so we
+ * will need the last pmd entry of the last pmd page. */
+#ifdef CONFIG_X86_PAE
+
+#define SWITCHER_PMD_INDEX (PTRS_PER_PMD - 1)
+#endif
+
/* We actually need a separate PTE page for each CPU. Remember that after the
* Switcher code itself comes two pages for each CPU, and we don't want this
* CPU's guest to see the pages of any other CPU. */
@@ -73,39 +81,90 @@ static pgd_t *spgd_addr(struct...
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 08/17] paravirt_ops - memory managment
...|= pgprot_val(pgprot);
- pte_val(pte) &= __supported_pte_mask;
- return pte;
+ unsigned long pte;
+ pte = (page_nr << PAGE_SHIFT);
+ pte |= pgprot_val(pgprot);
+ pte &= __supported_pte_mask;
+ return __pte(pte);
}
/*
@@ -345,7 +356,6 @@ static inline int pmd_large(pmd_t pte) {
pmd_index(address))
#define pmd_none(x) (!pmd_val(x))
#define pmd_present(x) (pmd_val(x) & _PAGE_PRESENT)
-#define pmd_clear(xp) do { set_pmd(xp, __pmd(0)); } while (0)
#define pfn_pmd(nr,prot) (__pmd(((nr) << PAGE_SHIFT) | pgprot_val(prot)))
#define pmd_pfn(x) ((pmd_val(x) & __PHYSICAL_MA...
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 08/17] paravirt_ops - memory managment
...|= pgprot_val(pgprot);
- pte_val(pte) &= __supported_pte_mask;
- return pte;
+ unsigned long pte;
+ pte = (page_nr << PAGE_SHIFT);
+ pte |= pgprot_val(pgprot);
+ pte &= __supported_pte_mask;
+ return __pte(pte);
}
/*
@@ -345,7 +356,6 @@ static inline int pmd_large(pmd_t pte) {
pmd_index(address))
#define pmd_none(x) (!pmd_val(x))
#define pmd_present(x) (pmd_val(x) & _PAGE_PRESENT)
-#define pmd_clear(xp) do { set_pmd(xp, __pmd(0)); } while (0)
#define pfn_pmd(nr,prot) (__pmd(((nr) << PAGE_SHIFT) | pgprot_val(prot)))
#define pmd_pfn(x) ((pmd_val(x) & __PHYSICAL_MA...
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
...dir = find_pgd(linfo, cr3);
+
+ pgd_idx = pgd_index(vaddr);
+ pgd = pgdir->pgdir[pgd_idx];
+ if (!(pgd & _PAGE_PRESENT))
+ goto out;
+
+ pud_idx = pud_index(vaddr);
+ pudpage = __va(pgd & PTE_MASK);
+ pud = pudpage[pud_idx];
+
+ if (!(pud & _PAGE_PRESENT))
+ goto out;
+
+ pmd_idx = pmd_index(vaddr);
+ pmdpage = __va(pud & PTE_MASK);
+ pmd = pmdpage[pmd_idx];
+
+ if (!(pmd & _PAGE_PRESENT))
+ goto out;
+
+ idx = pte_index(vaddr);
+ ptepage = __va(pmd & PTE_MASK);
+ pte = ptepage[idx];
+
+ if (!(pte & _PAGE_PRESENT))
+ goto out;
+
+ /* If the guest is trying to touch HV...
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
...dir = find_pgd(linfo, cr3);
+
+ pgd_idx = pgd_index(vaddr);
+ pgd = pgdir->pgdir[pgd_idx];
+ if (!(pgd & _PAGE_PRESENT))
+ goto out;
+
+ pud_idx = pud_index(vaddr);
+ pudpage = __va(pgd & PTE_MASK);
+ pud = pudpage[pud_idx];
+
+ if (!(pud & _PAGE_PRESENT))
+ goto out;
+
+ pmd_idx = pmd_index(vaddr);
+ pmdpage = __va(pud & PTE_MASK);
+ pmd = pmdpage[pmd_idx];
+
+ if (!(pmd & _PAGE_PRESENT))
+ goto out;
+
+ idx = pte_index(vaddr);
+ ptepage = __va(pmd & PTE_MASK);
+ pte = ptepage[idx];
+
+ if (!(pte & _PAGE_PRESENT))
+ goto out;
+
+ /* If the guest is trying to touch HV...
2007 Oct 31
5
[PATCH 0/7] (Re-)introducing pvops for x86_64 - Real pvops work part
Hey folks,
This is the part-of-pvops-implementation-that-is-not-exactly-a-merge. Neat,
uh? This is the majority of the work.
The first patch in the series does not really belong here. It was already
sent to lkml separetedly before, but I'm including it again, for a very
simple reason: Try to test the paravirt patches without it, and you'll fail
miserably ;-) (and it was not yet
2007 Oct 31
5
[PATCH 0/7] (Re-)introducing pvops for x86_64 - Real pvops work part
Hey folks,
This is the part-of-pvops-implementation-that-is-not-exactly-a-merge. Neat,
uh? This is the majority of the work.
The first patch in the series does not really belong here. It was already
sent to lkml separetedly before, but I'm including it again, for a very
simple reason: Try to test the paravirt patches without it, and you'll fail
miserably ;-) (and it was not yet
2007 Aug 10
9
[PATCH 0/25 -v2] paravirt_ops for x86_64, second round
Here is an slightly updated version of the paravirt_ops patch.
If your comments and criticism were welcome before, now it's even more!
There are some issues that are _not_ addressed in this revision, and here
are the causes:
* split debugreg into multiple functions, suggested by Andi:
- Me and jsfg agree that introducing more pvops (specially 14!) is
not worthwhile. So, although we do
2007 Aug 10
9
[PATCH 0/25 -v2] paravirt_ops for x86_64, second round
Here is an slightly updated version of the paravirt_ops patch.
If your comments and criticism were welcome before, now it's even more!
There are some issues that are _not_ addressed in this revision, and here
are the causes:
* split debugreg into multiple functions, suggested by Andi:
- Me and jsfg agree that introducing more pvops (specially 14!) is
not worthwhile. So, although we do
2007 Nov 09
11
[PATCH 0/24] paravirt_ops for unified x86 - that's me again!
Hey folks,
Here's a new spin of the pvops64 patch series.
We didn't get that many comments from the last time,
so it should be probably almost ready to get in. Heya!
>From the last version, the most notable changes are:
* consolidation of system.h, merging jeremy's comments about ordering
concerns
* consolidation of smp functions that goes through smp_ops. They're sharing
2007 Nov 09
11
[PATCH 0/24] paravirt_ops for unified x86 - that's me again!
Hey folks,
Here's a new spin of the pvops64 patch series.
We didn't get that many comments from the last time,
so it should be probably almost ready to get in. Heya!
>From the last version, the most notable changes are:
* consolidation of system.h, merging jeremy's comments about ordering
concerns
* consolidation of smp functions that goes through smp_ops. They're sharing