Displaying 18 results from an estimated 18 matches for "gpgd".
Did you mean:
gpg
2009 Apr 16
1
NULL pointer dereference at __switch_to() ( __unlazy_fpu ) with lguest PAE patch
...ockevent(cpu, 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) & ~PAG...
2009 Apr 16
1
NULL pointer dereference at __switch_to() ( __unlazy_fpu ) with lguest PAE patch
...ockevent(cpu, 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) & ~PAG...
2009 Jun 05
1
[PATCH] lguest: PAE support
...ts_and_traps.c: */
void maybe_do_interrupt(struct lg_cpu *cpu);
@@ -169,6 +171,9 @@ int init_guest_pagetable(struct lguest *lg);
void free_guest_pagetable(struct lguest *lg);
void guest_new_pagetable(struct lg_cpu *cpu, unsigned long pgtable);
void guest_set_pgd(struct lguest *lg, unsigned long gpgdir, u32 i);
+#ifdef CONFIG_X86_PAE
+void guest_set_pmd(struct lguest *lg, unsigned long gpgdir, u32 i);
+#endif
void guest_pagetable_clear_all(struct lg_cpu *cpu);
void guest_pagetable_flush_user(struct lg_cpu *cpu);
void guest_set_pte(struct lg_cpu *cpu, unsigned long gpgdir,
diff --git a/driver...
2009 Jun 05
1
[PATCH] lguest: PAE support
...ts_and_traps.c: */
void maybe_do_interrupt(struct lg_cpu *cpu);
@@ -169,6 +171,9 @@ int init_guest_pagetable(struct lguest *lg);
void free_guest_pagetable(struct lguest *lg);
void guest_new_pagetable(struct lg_cpu *cpu, unsigned long pgtable);
void guest_set_pgd(struct lguest *lg, unsigned long gpgdir, u32 i);
+#ifdef CONFIG_X86_PAE
+void guest_set_pmd(struct lguest *lg, unsigned long gpgdir, u32 i);
+#endif
void guest_pagetable_clear_all(struct lg_cpu *cpu);
void guest_pagetable_flush_user(struct lg_cpu *cpu);
void guest_set_pte(struct lg_cpu *cpu, unsigned long gpgdir,
diff --git a/driver...
2007 Apr 18
1
[PATCH] Lguest32, use guest page tables to find paddr for emulated instructions
...====================
--- linux-2.6.21-rc5-mm2.orig/drivers/lguest/page_tables.c
+++ linux-2.6.21-rc5-mm2/drivers/lguest/page_tables.c
@@ -105,6 +105,25 @@ static spte_t gpte_to_spte(struct lguest
return spte;
}
+unsigned long lguest_find_guest_paddr(struct lguest *lg, unsigned long vaddr)
+{
+ gpgd_t gpgd;
+ gpte_t gpte;
+ unsigned long gpte_ptr;
+
+ gpgd = mkgpgd(lgread_u32(lg, gpgd_addr(lg, vaddr)));
+ if (!(gpgd.flags & _PAGE_PRESENT))
+ return -1;
+
+ gpte_ptr = gpte_addr(lg, gpgd, vaddr);
+ gpte = mkgpte(lgread_u32(lg, gpte_ptr));
+
+ if (!(gpte.flags & _PAGE_PRESENT))
+ return...
2007 Apr 18
1
[PATCH] Lguest32, use guest page tables to find paddr for emulated instructions
...====================
--- linux-2.6.21-rc5-mm2.orig/drivers/lguest/page_tables.c
+++ linux-2.6.21-rc5-mm2/drivers/lguest/page_tables.c
@@ -105,6 +105,25 @@ static spte_t gpte_to_spte(struct lguest
return spte;
}
+unsigned long lguest_find_guest_paddr(struct lguest *lg, unsigned long vaddr)
+{
+ gpgd_t gpgd;
+ gpte_t gpte;
+ unsigned long gpte_ptr;
+
+ gpgd = mkgpgd(lgread_u32(lg, gpgd_addr(lg, vaddr)));
+ if (!(gpgd.flags & _PAGE_PRESENT))
+ return -1;
+
+ gpte_ptr = gpte_addr(lg, gpgd, vaddr);
+ gpte = mkgpte(lgread_u32(lg, gpte_ptr));
+
+ if (!(gpte.flags & _PAGE_PRESENT))
+ return...
2007 May 09
1
[patch 3/9] lguest: the host code
...nion {
+ struct { unsigned flags:12, pfn:20; };
+ struct { unsigned long val; } raw;
+} spgd_t;
+typedef union {
+ struct { unsigned flags:12, pfn:20; };
+ struct { unsigned long val; } raw;
+} spte_t;
+typedef union {
+ struct { unsigned flags:12, pfn:20; };
+ struct { unsigned long val; } raw;
+} gpgd_t;
+typedef union {
+ struct { unsigned flags:12, pfn:20; };
+ struct { unsigned long val; } raw;
+} gpte_t;
+#define mkgpte(_val) ((gpte_t){.raw.val = _val})
+#define mkgpgd(_val) ((gpgd_t){.raw.val = _val})
+
+struct pgdir
+{
+ unsigned long cr3;
+ spgd_t *pgdir;
+};
+
+/* This is a guest-specifi...
2007 May 09
1
[patch 3/9] lguest: the host code
...nion {
+ struct { unsigned flags:12, pfn:20; };
+ struct { unsigned long val; } raw;
+} spgd_t;
+typedef union {
+ struct { unsigned flags:12, pfn:20; };
+ struct { unsigned long val; } raw;
+} spte_t;
+typedef union {
+ struct { unsigned flags:12, pfn:20; };
+ struct { unsigned long val; } raw;
+} gpgd_t;
+typedef union {
+ struct { unsigned flags:12, pfn:20; };
+ struct { unsigned long val; } raw;
+} gpte_t;
+#define mkgpte(_val) ((gpte_t){.raw.val = _val})
+#define mkgpgd(_val) ((gpgd_t){.raw.val = _val})
+
+struct pgdir
+{
+ unsigned long cr3;
+ spgd_t *pgdir;
+};
+
+/* This is a guest-specifi...
2007 Apr 30
0
[PATCH] lguest: properly kill guest userspace programs accessing kernel mem
...est *info, unsigned long cr2, int errcode);
void pin_page(struct lguest *lg, unsigned long vaddr);
/* lguest_user.c: */
===================================================================
--- a/drivers/lguest/page_tables.c
+++ b/drivers/lguest/page_tables.c
@@ -109,7 +109,7 @@ static void check_gpgd(struct lguest *lg
/* We fault pages in, which allows us to update accessed/dirty bits.
* Return true if we got page. */
-int demand_page(struct lguest *lg, unsigned long vaddr, int write)
+int demand_page(struct lguest *lg, unsigned long vaddr, int errcode)
{
gpgd_t gpgd;
spgd_t *spgd;
@@...
2007 Apr 30
0
[PATCH] lguest: properly kill guest userspace programs accessing kernel mem
...est *info, unsigned long cr2, int errcode);
void pin_page(struct lguest *lg, unsigned long vaddr);
/* lguest_user.c: */
===================================================================
--- a/drivers/lguest/page_tables.c
+++ b/drivers/lguest/page_tables.c
@@ -109,7 +109,7 @@ static void check_gpgd(struct lguest *lg
/* We fault pages in, which allows us to update accessed/dirty bits.
* Return true if we got page. */
-int demand_page(struct lguest *lg, unsigned long vaddr, int write)
+int demand_page(struct lguest *lg, unsigned long vaddr, int errcode)
{
gpgd_t gpgd;
spgd_t *spgd;
@@...
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
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
...accessed/dirty bits.
+ * Return 0 if failed, 1 if good */
+static int page_in(struct lguest_vcpu *vcpu, u64 vaddr, pgprot_t prot)
+{
+ struct lguest_guest_info *linfo = vcpu->guest;
+ struct lguest_pud *pudir;
+ struct lguest_pmd *pmdir;
+ struct lguest_pte *ptedir;
+ u64 val;
+ u64 paddr;
+ u64 gpgd, gpud, gpmd, gpte;
+ u64 flags = pgprot_val(prot);
+ int write;
+ int ret;
+
+ gpgd = gtoplev(vcpu, vaddr);
+ val = lhread_u64(vcpu, gpgd);
+ if (!(val & _PAGE_PRESENT)) {
+ printk("pgd not present pgd:%llx vaddr:%llx val:%llx\n", gpgd, vaddr, val);
+ return 0;
+ }
+
+ gpud = val &a...
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
...accessed/dirty bits.
+ * Return 0 if failed, 1 if good */
+static int page_in(struct lguest_vcpu *vcpu, u64 vaddr, pgprot_t prot)
+{
+ struct lguest_guest_info *linfo = vcpu->guest;
+ struct lguest_pud *pudir;
+ struct lguest_pmd *pmdir;
+ struct lguest_pte *ptedir;
+ u64 val;
+ u64 paddr;
+ u64 gpgd, gpud, gpmd, gpte;
+ u64 flags = pgprot_val(prot);
+ int write;
+ int ret;
+
+ gpgd = gtoplev(vcpu, vaddr);
+ val = lhread_u64(vcpu, gpgd);
+ if (!(val & _PAGE_PRESENT)) {
+ printk("pgd not present pgd:%llx vaddr:%llx val:%llx\n", gpgd, vaddr, val);
+ return 0;
+ }
+
+ gpud = val &a...