Displaying 20 results from an estimated 293 matches for "pgd_t".
2009 Apr 16
1
NULL pointer dereference at __switch_to() ( __unlazy_fpu ) with lguest PAE patch
...pu, args->arg1);
break;
diff --git a/drivers/lguest/lg.h b/drivers/lguest/lg.h
index ac8a4a3..514a6c0 100644
--- a/drivers/lguest/lg.h
+++ b/drivers/lguest/lg.h
@@ -18,7 +18,7 @@ int init_pagetables(struct page **switcher_page, unsigned int pages);
struct pgdir
{
- unsigned long gpgdir;
+ pgd_t *gpgdir;
pgd_t *pgdir;
};
@@ -137,6 +137,8 @@ int run_guest(struct lg_cpu *cpu, unsigned long __user *user);
* in the kernel. */
#define pgd_flags(x) (pgd_val(x) & ~PAGE_MASK)
#define pgd_pfn(x) (pgd_val(x) >> PAGE_SHIFT)
+#define pmd_flags(x) (pmd_val(x) & ~PAGE_MASK)
+#d...
2009 Apr 16
1
NULL pointer dereference at __switch_to() ( __unlazy_fpu ) with lguest PAE patch
...pu, args->arg1);
break;
diff --git a/drivers/lguest/lg.h b/drivers/lguest/lg.h
index ac8a4a3..514a6c0 100644
--- a/drivers/lguest/lg.h
+++ b/drivers/lguest/lg.h
@@ -18,7 +18,7 @@ int init_pagetables(struct page **switcher_page, unsigned int pages);
struct pgdir
{
- unsigned long gpgdir;
+ pgd_t *gpgdir;
pgd_t *pgdir;
};
@@ -137,6 +137,8 @@ int run_guest(struct lg_cpu *cpu, unsigned long __user *user);
* in the kernel. */
#define pgd_flags(x) (pgd_val(x) & ~PAGE_MASK)
#define pgd_pfn(x) (pgd_val(x) >> PAGE_SHIFT)
+#define pmd_flags(x) (pmd_val(x) & ~PAGE_MASK)
+#d...
2010 Sep 14
2
[PATCH 1/4] x86: remove cast from void*
...ent.
Signed-off-by: matt mooney <mfm at muteddisk.com>
---
arch/x86/xen/mmu.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
index 42086ac..7436283 100644
--- a/arch/x86/xen/mmu.c
+++ b/arch/x86/xen/mmu.c
@@ -737,7 +737,7 @@ pgd_t *xen_get_user_pgd(pgd_t *pgd)
if (offset < pgd_index(USER_LIMIT)) {
struct page *page = virt_to_page(pgd_page);
- user_ptr = (pgd_t *)page->private;
+ user_ptr = page->private;
if (user_ptr)
user_ptr += offset;
}
--
1.7.2.1
2010 Sep 14
2
[PATCH 1/4] x86: remove cast from void*
...ent.
Signed-off-by: matt mooney <mfm at muteddisk.com>
---
arch/x86/xen/mmu.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
index 42086ac..7436283 100644
--- a/arch/x86/xen/mmu.c
+++ b/arch/x86/xen/mmu.c
@@ -737,7 +737,7 @@ pgd_t *xen_get_user_pgd(pgd_t *pgd)
if (offset < pgd_index(USER_LIMIT)) {
struct page *page = virt_to_page(pgd_page);
- user_ptr = (pgd_t *)page->private;
+ user_ptr = page->private;
if (user_ptr)
user_ptr += offset;
}
--
1.7.2.1
2010 Sep 14
2
[PATCH 1/4] x86: remove cast from void*
...ent.
Signed-off-by: matt mooney <mfm at muteddisk.com>
---
arch/x86/xen/mmu.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
index 42086ac..7436283 100644
--- a/arch/x86/xen/mmu.c
+++ b/arch/x86/xen/mmu.c
@@ -737,7 +737,7 @@ pgd_t *xen_get_user_pgd(pgd_t *pgd)
if (offset < pgd_index(USER_LIMIT)) {
struct page *page = virt_to_page(pgd_page);
- user_ptr = (pgd_t *)page->private;
+ user_ptr = page->private;
if (user_ptr)
user_ptr += offset;
}
--
1.7.2.1
2009 Jun 05
1
[PATCH] lguest: PAE support
...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 CPU, and we don't want this
* CPU's guest to see the pages of any other CPU. */
@@ -73,23 +84,58 @@ static pgd_t *spgd_addr(struct lg_cpu *cpu, u32 i, unsigned long vaddr)
{
unsigned int index = pgd_index(vaddr);
+#ifndef CONFIG_X86_PAE
/* We kill any Guest trying to touch the Switcher addresses. */
if (index >= SWITCHER_PGD_INDEX) {
kill_guest(cpu, "attempt to access switcher pages")...
2009 Jun 05
1
[PATCH] lguest: PAE support
...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 CPU, and we don't want this
* CPU's guest to see the pages of any other CPU. */
@@ -73,23 +84,58 @@ static pgd_t *spgd_addr(struct lg_cpu *cpu, u32 i, unsigned long vaddr)
{
unsigned int index = pgd_index(vaddr);
+#ifndef CONFIG_X86_PAE
/* We kill any Guest trying to touch the Switcher addresses. */
if (index >= SWITCHER_PGD_INDEX) {
kill_guest(cpu, "attempt to access switcher pages")...
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 01/17] paravirt_ops - core changes
..._dt_entry(dt, entrynum, low, high);
+}
+
+static void native_load_rsp0(struct tss_struct *tss,
+ struct thread_struct *thread)
+{
+ tss->rsp0 = thread->rsp0;
+}
+
+static void native_io_delay(void)
+{
+ asm volatile("outb %al,$0x80");
+}
+
+void native_pagetable_setup_start(pgd_t *base)
+{
+ int i;
+
+ /*
+ * Init entries of the first-level page table to the
+ * zero page, if they haven't already been set up.
+ *
+ * In a normal native boot, we'll be running on a
+ * pagetable rooted in swapper_pg_dir, but not in PAE
+ * mode, so this will end up clobbering th...
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 01/17] paravirt_ops - core changes
..._dt_entry(dt, entrynum, low, high);
+}
+
+static void native_load_rsp0(struct tss_struct *tss,
+ struct thread_struct *thread)
+{
+ tss->rsp0 = thread->rsp0;
+}
+
+static void native_io_delay(void)
+{
+ asm volatile("outb %al,$0x80");
+}
+
+void native_pagetable_setup_start(pgd_t *base)
+{
+ int i;
+
+ /*
+ * Init entries of the first-level page table to the
+ * zero page, if they haven't already been set up.
+ *
+ * In a normal native boot, we'll be running on a
+ * pagetable rooted in swapper_pg_dir, but not in PAE
+ * mode, so this will end up clobbering th...
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 08/17] paravirt_ops - memory managment
...===========================================================
--- clean-start.orig/arch/x86_64/mm/fault.c
+++ clean-start/arch/x86_64/mm/fault.c
@@ -180,7 +180,7 @@ void dump_pagetable(unsigned long addres
pmd_t *pmd;
pte_t *pte;
- asm("movq %%cr3,%0" : "=r" (pgd));
+ pgd = (pgd_t *)read_cr3();
pgd = __va((unsigned long)pgd & PHYSICAL_PAGE_MASK);
pgd += pgd_index(address);
@@ -347,7 +347,7 @@ asmlinkage void __kprobes do_page_fault(
prefetchw(&mm->mmap_sem);
/* get the address */
- __asm__("movq %%cr2,%0":"=r" (address));
+ address...
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 08/17] paravirt_ops - memory managment
...===========================================================
--- clean-start.orig/arch/x86_64/mm/fault.c
+++ clean-start/arch/x86_64/mm/fault.c
@@ -180,7 +180,7 @@ void dump_pagetable(unsigned long addres
pmd_t *pmd;
pte_t *pte;
- asm("movq %%cr3,%0" : "=r" (pgd));
+ pgd = (pgd_t *)read_cr3();
pgd = __va((unsigned long)pgd & PHYSICAL_PAGE_MASK);
pgd += pgd_index(address);
@@ -347,7 +347,7 @@ asmlinkage void __kprobes do_page_fault(
prefetchw(&mm->mmap_sem);
/* get the address */
- __asm__("movq %%cr2,%0":"=r" (address));
+ address...
2012 Nov 16
1
[PATCH v4] x86/xen: Use __pa_symbol instead of __pa on C visible symbols
...ruct mm_struct *mm)
if (user_pgd != NULL) {
user_pgd[pgd_index(VSYSCALL_START)] =
- __pgd(__pa(level3_user_vsyscall) | _PAGE_TABLE);
+ __pgd(__pa_symbol(level3_user_vsyscall) |
+ _PAGE_TABLE);
ret = 0;
}
@@ -1958,10 +1959,10 @@ void __init xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn)
* pgd.
*/
if (xen_feature(XENFEAT_writable_page_tables)) {
- native_write_cr3(__pa(init_level4_pgt));
+ native_write_cr3(__pa_symbol(init_level4_pgt));
} else {
xen_mc_batch();
- __xen_write_cr3(true, __pa(init_level4_pgt));
+ __xen_write_cr3(true, __pa...
2012 Nov 16
1
[PATCH v4] x86/xen: Use __pa_symbol instead of __pa on C visible symbols
...ruct mm_struct *mm)
if (user_pgd != NULL) {
user_pgd[pgd_index(VSYSCALL_START)] =
- __pgd(__pa(level3_user_vsyscall) | _PAGE_TABLE);
+ __pgd(__pa_symbol(level3_user_vsyscall) |
+ _PAGE_TABLE);
ret = 0;
}
@@ -1958,10 +1959,10 @@ void __init xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn)
* pgd.
*/
if (xen_feature(XENFEAT_writable_page_tables)) {
- native_write_cr3(__pa(init_level4_pgt));
+ native_write_cr3(__pa_symbol(init_level4_pgt));
} else {
xen_mc_batch();
- __xen_write_cr3(true, __pa(init_level4_pgt));
+ __xen_write_cr3(true, __pa...
2007 Apr 18
0
[PATCH 1/5] Paravirt page alloc.patch
...list_add(&kpte_page->lru, &df_list);
revert_page(kpte_page, address);
}
===================================================================
--- a/arch/i386/mm/pgtable.c
+++ b/arch/i386/mm/pgtable.c
@@ -245,8 +245,14 @@ void pgd_ctor(void *pgd, kmem_cache_t *c
clone_pgd_range((pgd_t *)pgd + USER_PTRS_PER_PGD,
swapper_pg_dir + USER_PTRS_PER_PGD,
KERNEL_PGD_PTRS);
+
if (PTRS_PER_PMD > 1)
return;
+
+ /* must happen under lock */
+ paravirt_alloc_pd_clone(__pa(pgd) >> PAGE_SHIFT,
+ __pa(swapper_pg_dir) >> PAGE_SHIFT,
+ USER_PTRS_PER_PGD, PTRS_PER_PG...
2007 Apr 18
0
[PATCH 1/5] Paravirt page alloc.patch
...list_add(&kpte_page->lru, &df_list);
revert_page(kpte_page, address);
}
===================================================================
--- a/arch/i386/mm/pgtable.c
+++ b/arch/i386/mm/pgtable.c
@@ -245,8 +245,14 @@ void pgd_ctor(void *pgd, kmem_cache_t *c
clone_pgd_range((pgd_t *)pgd + USER_PTRS_PER_PGD,
swapper_pg_dir + USER_PTRS_PER_PGD,
KERNEL_PGD_PTRS);
+
if (PTRS_PER_PMD > 1)
return;
+
+ /* must happen under lock */
+ paravirt_alloc_pd_clone(__pa(pgd) >> PAGE_SHIFT,
+ __pa(swapper_pg_dir) >> PAGE_SHIFT,
+ USER_PTRS_PER_PGD, PTRS_PER_PG...
2007 Oct 12
10
[PATCH 00/10] REVIEW: Xen patches for 2.6.24
This is my current set of updates to Xen for 2.6.24. This is largely
a bugfix set, and a couple of them are also relevent to 2.6.23.
These are in the pre-x86 merge form; I'll update them once the merge
goes into git.
Quick overview:
- remove some dead code in arch/i386/mm/init.c
- clean up some duplicate includes
- when sending an IPI, yield the vcpu if the destination doesn't have
2007 Oct 12
10
[PATCH 00/10] REVIEW: Xen patches for 2.6.24
This is my current set of updates to Xen for 2.6.24. This is largely
a bugfix set, and a couple of them are also relevent to 2.6.23.
These are in the pre-x86 merge form; I'll update them once the merge
goes into git.
Quick overview:
- remove some dead code in arch/i386/mm/init.c
- clean up some duplicate includes
- when sending an IPI, yield the vcpu if the destination doesn't have
2007 Oct 12
10
[PATCH 00/10] REVIEW: Xen patches for 2.6.24
This is my current set of updates to Xen for 2.6.24. This is largely
a bugfix set, and a couple of them are also relevent to 2.6.23.
These are in the pre-x86 merge form; I'll update them once the merge
goes into git.
Quick overview:
- remove some dead code in arch/i386/mm/init.c
- clean up some duplicate includes
- when sending an IPI, yield the vcpu if the destination doesn't have
2007 Apr 18
2
[PATCH] x86_64 paravirt_ops port
...============
--- linux-2.6.19-quilt.orig/arch/x86_64/kernel/head64.c
+++ linux-2.6.19-quilt/arch/x86_64/kernel/head64.c
@@ -70,7 +70,7 @@ void __init x86_64_start_kernel(char * r
* switch to init_level4_pgt from boot_level4_pgt
*/
memcpy(init_level4_pgt, boot_level4_pgt, PTRS_PER_PGD*sizeof(pgd_t));
- asm volatile("movq %0,%%cr3" :: "r" (__pa_symbol(&init_level4_pgt)));
+ write_cr3(__pa_symbol(&init_level4_pgt));
for (i = 0; i < NR_CPUS; i++)
cpu_pda(i) = &boot_cpu_pda[i];
Index: linux-2.6.19-quilt/arch/x86_64/kernel/i8259.c
======================...
2007 Apr 18
2
[PATCH] x86_64 paravirt_ops port
...============
--- linux-2.6.19-quilt.orig/arch/x86_64/kernel/head64.c
+++ linux-2.6.19-quilt/arch/x86_64/kernel/head64.c
@@ -70,7 +70,7 @@ void __init x86_64_start_kernel(char * r
* switch to init_level4_pgt from boot_level4_pgt
*/
memcpy(init_level4_pgt, boot_level4_pgt, PTRS_PER_PGD*sizeof(pgd_t));
- asm volatile("movq %0,%%cr3" :: "r" (__pa_symbol(&init_level4_pgt)));
+ write_cr3(__pa_symbol(&init_level4_pgt));
for (i = 0; i < NR_CPUS; i++)
cpu_pda(i) = &boot_cpu_pda[i];
Index: linux-2.6.19-quilt/arch/x86_64/kernel/i8259.c
======================...