search for: switcher_pgd_index

Displaying 18 results from an estimated 18 matches for "switcher_pgd_index".

2009 Jun 05
1
[PATCH] lguest: PAE support
...r(struct lg_cpu *cpu); void guest_set_pte(struct lg_cpu *cpu, unsigned long gpgdir, diff --git a/drivers/lguest/page_tables.c b/drivers/lguest/page_tables.c index 8a3c3a5..a03b74b 100644 --- a/drivers/lguest/page_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 +#def...
2009 Jun 05
1
[PATCH] lguest: PAE support
...r(struct lg_cpu *cpu); void guest_set_pte(struct lg_cpu *cpu, unsigned long gpgdir, diff --git a/drivers/lguest/page_tables.c b/drivers/lguest/page_tables.c index 8a3c3a5..a03b74b 100644 --- a/drivers/lguest/page_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 +#def...
2009 Apr 16
1
NULL pointer dereference at __switch_to() ( __unlazy_fpu ) with lguest PAE patch
...2 +47,20 @@ * (vii) Setting up the page tables initially. :*/ +void guest_pagetable_clear_all(struct lg_cpu *cpu); /* 1024 entries in a page table page maps 1024 pages: 4MB. The Switcher is * conveniently 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...
2009 Apr 16
1
NULL pointer dereference at __switch_to() ( __unlazy_fpu ) with lguest PAE patch
...2 +47,20 @@ * (vii) Setting up the page tables initially. :*/ +void guest_pagetable_clear_all(struct lg_cpu *cpu); /* 1024 entries in a page table page maps 1024 pages: 4MB. The Switcher is * conveniently 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...
2009 Sep 21
1
[PATCH 2/5] lguest: use set_pte/set_pmd uniformly for real page table entries
...cher_pmd = pfn_pmd(__pa(switcher_pte_page) >> PAGE_SHIFT, + PAGE_KERNEL_EXEC); /* Figure out where the pmd page is, by reading the PGD, and converting * it to a virtual address. */ @@ -1157,7 +1154,7 @@ void map_switcher_in_guest(struct lg_cpu pgdirs[cpu->cpu_pgd].pgdir[SWITCHER_PGD_INDEX]) << PAGE_SHIFT); /* Now write it into the shadow page table. */ - native_set_pmd(&pmd_table[SWITCHER_PMD_INDEX], switcher_pmd); + set_pmd(&pmd_table[SWITCHER_PMD_INDEX], switcher_pmd); #else pgd_t switcher_pgd; @@ -1179,10 +1176,8 @@ void map_switcher_in_guest(struct...
2009 Sep 21
1
[PATCH 2/5] lguest: use set_pte/set_pmd uniformly for real page table entries
...cher_pmd = pfn_pmd(__pa(switcher_pte_page) >> PAGE_SHIFT, + PAGE_KERNEL_EXEC); /* Figure out where the pmd page is, by reading the PGD, and converting * it to a virtual address. */ @@ -1157,7 +1154,7 @@ void map_switcher_in_guest(struct lg_cpu pgdirs[cpu->cpu_pgd].pgdir[SWITCHER_PGD_INDEX]) << PAGE_SHIFT); /* Now write it into the shadow page table. */ - native_set_pmd(&pmd_table[SWITCHER_PMD_INDEX], switcher_pmd); + set_pmd(&pmd_table[SWITCHER_PMD_INDEX], switcher_pmd); #else pgd_t switcher_pgd; @@ -1179,10 +1176,8 @@ void map_switcher_in_guest(struct...
2007 May 09
1
[patch 3/9] lguest: the host code
...m.h> +#include <linux/types.h> +#include <linux/spinlock.h> +#include <linux/random.h> +#include <linux/percpu.h> +#include <asm/tlbflush.h> +#include "lg.h" + +#define PTES_PER_PAGE_SHIFT 10 +#define PTES_PER_PAGE (1 << PTES_PER_PAGE_SHIFT) +#define SWITCHER_PGD_INDEX (PTES_PER_PAGE - 1) + +static DEFINE_PER_CPU(spte_t *, switcher_pte_pages) = { NULL }; +#define switcher_pte_page(cpu) per_cpu(switcher_pte_pages, cpu) + +static unsigned vaddr_to_pgd_index(unsigned long vaddr) +{ + return vaddr >> (PAGE_SHIFT + PTES_PER_PAGE_SHIFT); +} + +/* These access the...
2007 May 09
1
[patch 3/9] lguest: the host code
...m.h> +#include <linux/types.h> +#include <linux/spinlock.h> +#include <linux/random.h> +#include <linux/percpu.h> +#include <asm/tlbflush.h> +#include "lg.h" + +#define PTES_PER_PAGE_SHIFT 10 +#define PTES_PER_PAGE (1 << PTES_PER_PAGE_SHIFT) +#define SWITCHER_PGD_INDEX (PTES_PER_PAGE - 1) + +static DEFINE_PER_CPU(spte_t *, switcher_pte_pages) = { NULL }; +#define switcher_pte_page(cpu) per_cpu(switcher_pte_pages, cpu) + +static unsigned vaddr_to_pgd_index(unsigned long vaddr) +{ + return vaddr >> (PAGE_SHIFT + PTES_PER_PAGE_SHIFT); +} + +/* These access the...
2007 May 10
4
[PATCH 0/5] lguest feedback tidyups
Hi all, Gratefully-received recent feedback from CC'd was applied to excellent effect (and the advice from Matt Mackall about my personal appearance is best unrequited). The patch is split in 5 parts to correspond with the 9 parts Andrew sent out before, but here's the summary: 1) Sparse (thanks Christoph Hellwig): - lguest_const can be static now - lguest.c should include
2007 May 10
4
[PATCH 0/5] lguest feedback tidyups
Hi all, Gratefully-received recent feedback from CC'd was applied to excellent effect (and the advice from Matt Mackall about my personal appearance is best unrequited). The patch is split in 5 parts to correspond with the 9 parts Andrew sent out before, but here's the summary: 1) Sparse (thanks Christoph Hellwig): - lguest_const can be static now - lguest.c should include
2007 May 14
5
[PATCH 1/6] lguest: host code tidyups
...ned long __user *)user); } /* Take: pfnlimit, pgdir, start, pageoffset. */ =================================================================== --- a/drivers/lguest/page_tables.c +++ b/drivers/lguest/page_tables.c @@ -13,7 +13,7 @@ #define PTES_PER_PAGE (1 << PTES_PER_PAGE_SHIFT) #define SWITCHER_PGD_INDEX (PTES_PER_PAGE - 1) -static DEFINE_PER_CPU(spte_t *, switcher_pte_pages) = { NULL }; +static DEFINE_PER_CPU(spte_t *, switcher_pte_pages); #define switcher_pte_page(cpu) per_cpu(switcher_pte_pages, cpu) static unsigned vaddr_to_pgd_index(unsigned long vaddr) ==================================...
2007 May 14
5
[PATCH 1/6] lguest: host code tidyups
...ned long __user *)user); } /* Take: pfnlimit, pgdir, start, pageoffset. */ =================================================================== --- a/drivers/lguest/page_tables.c +++ b/drivers/lguest/page_tables.c @@ -13,7 +13,7 @@ #define PTES_PER_PAGE (1 << PTES_PER_PAGE_SHIFT) #define SWITCHER_PGD_INDEX (PTES_PER_PAGE - 1) -static DEFINE_PER_CPU(spte_t *, switcher_pte_pages) = { NULL }; +static DEFINE_PER_CPU(spte_t *, switcher_pte_pages); #define switcher_pte_page(cpu) per_cpu(switcher_pte_pages, cpu) static unsigned vaddr_to_pgd_index(unsigned long vaddr) ==================================...
2007 Aug 08
13
[PATCH 0/7] Modify lguest32 to make room for lguest64
Hi all, I've been working on lguest64 and in order to do this, I had to move a lot of the i386 specific out of the way. Well, the lguest64 port is still not ready to display, but before Rusty makes too many changes I would like this in upstream so I don't have to keep repeating my changes :-) So this patch series moves lguest32 out of the way for other archs. -- Steve
2007 Aug 08
13
[PATCH 0/7] Modify lguest32 to make room for lguest64
Hi all, I've been working on lguest64 and in order to do this, I had to move a lot of the i386 specific out of the way. Well, the lguest64 port is still not ready to display, but before Rusty makes too many changes I would like this in upstream so I don't have to keep repeating my changes :-) So this patch series moves lguest32 out of the way for other archs. -- Steve
2007 Aug 08
7
[PATCH 0/5 -v2] Modify lguest32 to make room for lguest64 (version 2)
[ Changes since last version. - Move lg.h to include/asm instead (suggested by Rusty Russel) - All steps of the series compiles (suggested by Stephen Rothwell) - Better ifdef header naming (suggested by Stephen Rothwell) - Added Andi Kleen to CC (forgot to on V1) ] Hi all, I've been working on lguest64 and in order to do this, I had to move a lot of the i386 specific out of the
2007 Aug 08
7
[PATCH 0/5 -v2] Modify lguest32 to make room for lguest64 (version 2)
[ Changes since last version. - Move lg.h to include/asm instead (suggested by Rusty Russel) - All steps of the series compiles (suggested by Stephen Rothwell) - Better ifdef header naming (suggested by Stephen Rothwell) - Added Andi Kleen to CC (forgot to on V1) ] Hi all, I've been working on lguest64 and in order to do this, I had to move a lot of the i386 specific out of the
2007 Sep 25
50
[patch 00/43] lguest: Patches for 2.6.24 (and patchbomb test)
Hi all, These are the patches I'm planning to submit for 2.6.24. Comments gratefully accepted. Along with the usual cleanups and improvements are Jes' de-i386-ification patches, and a new "virtio" mechanism designed to be shared with KVM (and hopefully other hypervisors). Cheers, Rusty. Documentation/lguest/Makefile | 30 Documentation/lguest/lguest.c
2007 Sep 25
50
[patch 00/43] lguest: Patches for 2.6.24 (and patchbomb test)
Hi all, These are the patches I'm planning to submit for 2.6.24. Comments gratefully accepted. Along with the usual cleanups and improvements are Jes' de-i386-ification patches, and a new "virtio" mechanism designed to be shared with KVM (and hopefully other hypervisors). Cheers, Rusty. Documentation/lguest/Makefile | 30 Documentation/lguest/lguest.c