Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 370977
b: refs/heads/master
c: 6b39271
h: refs/heads/master
i:
  370975: 3435612
v: v3
  • Loading branch information
Rusty Russell committed Apr 22, 2013
1 parent 103a75b commit b344637
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 17 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: 6d0cda93c0d3c8bb0a553047c10f114c88c8af89
refs/heads/master: 6b39271746de131366a14bcf04f5740cdc4abdef
6 changes: 0 additions & 6 deletions trunk/arch/x86/include/asm/lguest.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@
/* Page for Switcher text itself, then two pages per cpu */
#define TOTAL_SWITCHER_PAGES (1 + 2 * nr_cpu_ids)

/* We map at -4M (-2M for PAE) for ease of mapping (one PTE page). */
#ifdef CONFIG_X86_PAE
#define SWITCHER_ADDR 0xFFE00000
#else
#define SWITCHER_ADDR 0xFFC00000
#endif
/* Where we map the Switcher, in both Host and Guest. */
extern unsigned long switcher_addr;

Expand Down
15 changes: 5 additions & 10 deletions trunk/drivers/lguest/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,13 @@ static __init int map_switcher(void)
}
}

switcher_addr = SWITCHER_ADDR;

/*
* First we check that the Switcher won't overlap the fixmap area at
* the top of memory. It's currently nowhere near, but it could have
* very strange effects if it ever happened.
* We place the Switcher underneath the fixmap area, which is the
* highest virtual address we can get. This is important, since we
* tell the Guest it can't access this memory, so we want its ceiling
* as high as possible.
*/
if (switcher_addr + (TOTAL_SWITCHER_PAGES+1)*PAGE_SIZE > FIXADDR_START){
err = -ENOMEM;
printk("lguest: mapping switcher would thwack fixmap\n");
goto free_pages;
}
switcher_addr = FIXADDR_START - (TOTAL_SWITCHER_PAGES+1)*PAGE_SIZE;

/*
* Now we reserve the "virtual memory area" we want. We might
Expand Down

0 comments on commit b344637

Please sign in to comment.