Displaying 17 results from an estimated 17 matches for "ptepage".
Did you mean:
pte_page
2009 Sep 21
1
[PATCH 2/5] lguest: use set_pte/set_pmd uniformly for real page table entries
...c
--- a/drivers/lguest/page_tables.c
+++ b/drivers/lguest/page_tables.c
@@ -380,7 +380,7 @@ bool demand_page(struct lg_cpu *cpu, uns
* And we copy the flags to the shadow PMD entry. The page
* number in the shadow PMD is the page we just allocated.
*/
- native_set_pmd(spmd, __pmd(__pa(ptepage) | pmd_flags(gpmd)));
+ set_pmd(spmd, __pmd(__pa(ptepage) | pmd_flags(gpmd)));
}
/*
@@ -447,7 +447,7 @@ bool demand_page(struct lg_cpu *cpu, uns
* we will come back here when a write does actually occur, so
* we can update the Guest's _PAGE_DIRTY flag.
*/
- native_set_pte(sp...
2009 Sep 21
1
[PATCH 2/5] lguest: use set_pte/set_pmd uniformly for real page table entries
...c
--- a/drivers/lguest/page_tables.c
+++ b/drivers/lguest/page_tables.c
@@ -380,7 +380,7 @@ bool demand_page(struct lg_cpu *cpu, uns
* And we copy the flags to the shadow PMD entry. The page
* number in the shadow PMD is the page we just allocated.
*/
- native_set_pmd(spmd, __pmd(__pa(ptepage) | pmd_flags(gpmd)));
+ set_pmd(spmd, __pmd(__pa(ptepage) | pmd_flags(gpmd)));
}
/*
@@ -447,7 +447,7 @@ bool demand_page(struct lg_cpu *cpu, uns
* we will come back here when a write does actually occur, so
* we can update the Guest's _PAGE_DIRTY flag.
*/
- native_set_pte(sp...
2009 Jun 05
1
[PATCH] lguest: PAE support
...t? We can't map it in. */
@@ -228,12 +309,40 @@ bool demand_page(struct lg_cpu *cpu, unsigned long vaddr, int errcode)
check_gpgd(cpu, gpgd);
/* And we copy the flags to the shadow PGD entry. The page
* number in the shadow PGD is the page we just allocated. */
- *spgd = __pgd(__pa(ptepage) | pgd_flags(gpgd));
+ set_pgd(spgd, __pgd(__pa(ptepage) | pgd_flags(gpgd)));
}
+#ifdef CONFIG_X86_PAE
+ gpmd = lgread(cpu, gpmd_addr(gpgd, vaddr), pmd_t);
+ /* middle level not present? We can't map it in. */
+ if (!(pmd_flags(gpmd) & _PAGE_PRESENT))
+ return false;
+
+ /* Now look...
2009 Jun 05
1
[PATCH] lguest: PAE support
...t? We can't map it in. */
@@ -228,12 +309,40 @@ bool demand_page(struct lg_cpu *cpu, unsigned long vaddr, int errcode)
check_gpgd(cpu, gpgd);
/* And we copy the flags to the shadow PGD entry. The page
* number in the shadow PGD is the page we just allocated. */
- *spgd = __pgd(__pa(ptepage) | pgd_flags(gpgd));
+ set_pgd(spgd, __pgd(__pa(ptepage) | pgd_flags(gpgd)));
}
+#ifdef CONFIG_X86_PAE
+ gpmd = lgread(cpu, gpmd_addr(gpgd, vaddr), pmd_t);
+ /* middle level not present? We can't map it in. */
+ if (!(pmd_flags(gpmd) & _PAGE_PRESENT))
+ return false;
+
+ /* Now look...
2009 Apr 16
1
NULL pointer dereference at __switch_to() ( __unlazy_fpu ) with lguest PAE patch
...gpgd = lgread(cpu, (unsigned long) gpgd_addr(cpu, vaddr), pgd_t);
+
/* Toplevel not present? We can't map it in. */
if (!(pgd_flags(gpgd) & _PAGE_PRESENT))
return false;
@@ -231,9 +309,38 @@ bool demand_page(struct lg_cpu *cpu, unsigned long vaddr, int errcode)
*spgd = __pgd(__pa(ptepage) | pgd_flags(gpgd));
}
+#ifdef CONFIG_X86_PAE
+ gpmd = lgread(cpu, (unsigned long) gpmd_addr(gpgd, vaddr), pmd_t);
+ /* middle level not present? We can't map it in. */
+ if (!(pmd_flags(gpmd) & _PAGE_PRESENT))
+ return 0;
+
+ /* Now look at the matching shadow entry. */
+ spmd = spmd...
2009 Apr 16
1
NULL pointer dereference at __switch_to() ( __unlazy_fpu ) with lguest PAE patch
...gpgd = lgread(cpu, (unsigned long) gpgd_addr(cpu, vaddr), pgd_t);
+
/* Toplevel not present? We can't map it in. */
if (!(pgd_flags(gpgd) & _PAGE_PRESENT))
return false;
@@ -231,9 +309,38 @@ bool demand_page(struct lg_cpu *cpu, unsigned long vaddr, int errcode)
*spgd = __pgd(__pa(ptepage) | pgd_flags(gpgd));
}
+#ifdef CONFIG_X86_PAE
+ gpmd = lgread(cpu, (unsigned long) gpmd_addr(gpgd, vaddr), pmd_t);
+ /* middle level not present? We can't map it in. */
+ if (!(pmd_flags(gpmd) & _PAGE_PRESENT))
+ return 0;
+
+ /* Now look at the matching shadow entry. */
+ spmd = spmd...
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
...VM_START + HV_VIRT_SIZE));
+}
+
+static void release_pte(u64 pte)
+{
+ if (pte & _PAGE_PRESENT)
+ put_page(pfn_to_page(pte >> PAGE_SHIFT));
+}
+
+static int release_pmd(int pgd_idx, int pud_idx, u64 *pmd, int idx)
+{
+ int save = 0;
+ if (pmd[idx] & _PAGE_PRESENT) {
+ int i;
+ u64 *ptepage = __va(pmd[idx] & PTE_MASK);
+ for (i=0; i < PTRS_PER_PMD; i++)
+ if (is_hv_page(pgd_idx, pud_idx, idx, i))
+ save = 1;
+ else
+ release_pte(ptepage[i]);
+ /* never free the HV pmds */
+ if (!save) {
+ free_page((unsigned long)ptepage);
+ pmd[idx] = 0;
+ }
+ }
+ return save...
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
...VM_START + HV_VIRT_SIZE));
+}
+
+static void release_pte(u64 pte)
+{
+ if (pte & _PAGE_PRESENT)
+ put_page(pfn_to_page(pte >> PAGE_SHIFT));
+}
+
+static int release_pmd(int pgd_idx, int pud_idx, u64 *pmd, int idx)
+{
+ int save = 0;
+ if (pmd[idx] & _PAGE_PRESENT) {
+ int i;
+ u64 *ptepage = __va(pmd[idx] & PTE_MASK);
+ for (i=0; i < PTRS_PER_PMD; i++)
+ if (is_hv_page(pgd_idx, pud_idx, idx, i))
+ save = 1;
+ else
+ release_pte(ptepage[i]);
+ /* never free the HV pmds */
+ if (!save) {
+ free_page((unsigned long)ptepage);
+ pmd[idx] = 0;
+ }
+ }
+ return save...
2007 May 09
1
[patch 3/9] lguest: the host code
...te_ptr;
+ gpte_t gpte;
+ spte_t *spte;
+
+ gpgd = mkgpgd(lgread_u32(lg, gpgd_addr(lg, vaddr)));
+ if (!(gpgd.flags & _PAGE_PRESENT))
+ return 0;
+
+ spgd = spgd_addr(lg, lg->pgdidx, vaddr);
+ if (!(spgd->flags & _PAGE_PRESENT)) {
+ /* Get a page of PTEs for them. */
+ unsigned long ptepage = get_zeroed_page(GFP_KERNEL);
+ /* FIXME: Steal from self in this case? */
+ if (!ptepage) {
+ kill_guest(lg, "out of memory allocating pte page");
+ return 0;
+ }
+ check_gpgd(lg, gpgd);
+ spgd->raw.val = (__pa(ptepage) | gpgd.flags);
+ }
+
+ gpte_ptr = gpte_addr(lg, gpgd, v...
2007 May 09
1
[patch 3/9] lguest: the host code
...te_ptr;
+ gpte_t gpte;
+ spte_t *spte;
+
+ gpgd = mkgpgd(lgread_u32(lg, gpgd_addr(lg, vaddr)));
+ if (!(gpgd.flags & _PAGE_PRESENT))
+ return 0;
+
+ spgd = spgd_addr(lg, lg->pgdidx, vaddr);
+ if (!(spgd->flags & _PAGE_PRESENT)) {
+ /* Get a page of PTEs for them. */
+ unsigned long ptepage = get_zeroed_page(GFP_KERNEL);
+ /* FIXME: Steal from self in this case? */
+ if (!ptepage) {
+ kill_guest(lg, "out of memory allocating pte page");
+ return 0;
+ }
+ check_gpgd(lg, gpgd);
+ spgd->raw.val = (__pa(ptepage) | gpgd.flags);
+ }
+
+ gpte_ptr = gpte_addr(lg, gpgd, v...
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
2006 Mar 14
12
[RFC] VMI for Xen?
I''m sure everyone has seen the drop of VMI patches for Linux at this
point, but just in case, the link is included below.
I''ve read this version of the VMI spec and have made my way through most
of the patches. While I wasn''t really that impressed with the first
spec wrt Xen, the second version seems to be much more palatable.
Specifically, the code inlining and
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