Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 80922
b: refs/heads/master
c: 934faab
h: refs/heads/master
v: v3
  • Loading branch information
Glauber de Oliveira Costa authored and Rusty Russell committed Jan 30, 2008
1 parent f6e9b78 commit c876b38
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ae3749dcd8c31dcfbab14ea28c68a944c93f418f
refs/heads/master: 934faab464c6a26ed1a226b6cf7111b35405dde1
7 changes: 3 additions & 4 deletions trunk/drivers/lguest/page_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,7 @@ static unsigned long gpgd_addr(struct lg_cpu *cpu, unsigned long vaddr)
return cpu->lg->pgdirs[cpu->cpu_pgd].gpgdir + index * sizeof(pgd_t);
}

static unsigned long gpte_addr(struct lguest *lg,
pgd_t gpgd, unsigned long vaddr)
static unsigned long gpte_addr(pgd_t gpgd, unsigned long vaddr)
{
unsigned long gpage = pgd_pfn(gpgd) << PAGE_SHIFT;
BUG_ON(!(pgd_flags(gpgd) & _PAGE_PRESENT));
Expand Down Expand Up @@ -235,7 +234,7 @@ int demand_page(struct lg_cpu *cpu, unsigned long vaddr, int errcode)

/* OK, now we look at the lower level in the Guest page table: keep its
* address, because we might update it later. */
gpte_ptr = gpte_addr(lg, gpgd, vaddr);
gpte_ptr = gpte_addr(gpgd, vaddr);
gpte = lgread(lg, gpte_ptr, pte_t);

/* If this page isn't in the Guest page tables, we can't page it in. */
Expand Down Expand Up @@ -378,7 +377,7 @@ unsigned long guest_pa(struct lg_cpu *cpu, unsigned long vaddr)
if (!(pgd_flags(gpgd) & _PAGE_PRESENT))
kill_guest(cpu->lg, "Bad address %#lx", vaddr);

gpte = lgread(cpu->lg, gpte_addr(cpu->lg, gpgd, vaddr), pte_t);
gpte = lgread(cpu->lg, gpte_addr(gpgd, vaddr), pte_t);
if (!(pte_flags(gpte) & _PAGE_PRESENT))
kill_guest(cpu->lg, "Bad address %#lx", vaddr);

Expand Down

0 comments on commit c876b38

Please sign in to comment.