search for: pin_stack_pages

Displaying 12 results from an estimated 12 matches for "pin_stack_pages".

2007 Apr 27
0
[PATCH] lguest simplification: don't pin guest trap handlers
...eletions(-) =================================================================== --- a/drivers/lguest/interrupts_and_traps.c +++ b/drivers/lguest/interrupts_and_traps.c @@ -138,31 +138,12 @@ static int direct_trap(const struct lgue return idt_type(trap->a, trap->b) == 0xF; } -static void pin_stack_pages(struct lguest *lg) +void pin_stack_pages(struct lguest *lg) { unsigned int i; for (i = 0; i < lg->stack_pages; i++) pin_page(lg, lg->esp1 - i * PAGE_SIZE); -} - -/* We need to ensure all the direct trap pages are mapped after we - * clear shadow mappings. */ -void pin_trap_pages(...
2007 Apr 27
0
[PATCH] lguest simplification: don't pin guest trap handlers
...eletions(-) =================================================================== --- a/drivers/lguest/interrupts_and_traps.c +++ b/drivers/lguest/interrupts_and_traps.c @@ -138,31 +138,12 @@ static int direct_trap(const struct lgue return idt_type(trap->a, trap->b) == 0xF; } -static void pin_stack_pages(struct lguest *lg) +void pin_stack_pages(struct lguest *lg) { unsigned int i; for (i = 0; i < lg->stack_pages; i++) pin_page(lg, lg->esp1 - i * PAGE_SIZE); -} - -/* We need to ensure all the direct trap pages are mapped after we - * clear shadow mappings. */ -void pin_trap_pages(...
2009 Mar 26
1
[PATCH 3/5] lguest: avoid accidental recycling of pgdir pages
...est_data_init(struct lg_cpu *cpu); diff --git a/drivers/lguest/page_tables.c b/drivers/lguest/page_tables.c index 81d0c60..fd3e1f5 100644 --- a/drivers/lguest/page_tables.c +++ b/drivers/lguest/page_tables.c @@ -448,6 +571,22 @@ void guest_new_pagetable(struct lg_cpu *cpu, unsigned long pgtable) pin_stack_pages(cpu); } +/* The Guest tells us when a page is no longer being used as a pagetable. + * Without this there can be a subtle bug where the same page gets re-used + * for a different process, and we think it's the same one as the one we have + * in our little pgdir cache. */ +void invalidate_pag...
2009 Mar 26
1
[PATCH 3/5] lguest: avoid accidental recycling of pgdir pages
...est_data_init(struct lg_cpu *cpu); diff --git a/drivers/lguest/page_tables.c b/drivers/lguest/page_tables.c index 81d0c60..fd3e1f5 100644 --- a/drivers/lguest/page_tables.c +++ b/drivers/lguest/page_tables.c @@ -448,6 +571,22 @@ void guest_new_pagetable(struct lg_cpu *cpu, unsigned long pgtable) pin_stack_pages(cpu); } +/* The Guest tells us when a page is no longer being used as a pagetable. + * Without this there can be a subtle bug where the same page gets re-used + * for a different process, and we think it's the same one as the one we have + * in our little pgdir cache. */ +void invalidate_pag...
2007 May 09
1
[patch 3/9] lguest: the host code
...(in/out emulation) and device not + available (TS handling), and hypercall */ + if (num == 14 || num == 13 || num == 7 || num == LGUEST_TRAP_ENTRY) + return 0; + + /* Interrupt gates (0xE) or not present (0x0) can't go direct. */ + return idt_type(trap->a, trap->b) == 0xF; +} + +void pin_stack_pages(struct lguest *lg) +{ + unsigned int i; + + for (i = 0; i < lg->stack_pages; i++) + pin_page(lg, lg->esp1 - i * PAGE_SIZE); +} + +void guest_set_stack(struct lguest *lg, u32 seg, u32 esp, unsigned int pages) +{ + /* You cannot have a stack segment with priv level 0. */ + if ((seg & 0x...
2007 May 09
1
[patch 3/9] lguest: the host code
...(in/out emulation) and device not + available (TS handling), and hypercall */ + if (num == 14 || num == 13 || num == 7 || num == LGUEST_TRAP_ENTRY) + return 0; + + /* Interrupt gates (0xE) or not present (0x0) can't go direct. */ + return idt_type(trap->a, trap->b) == 0xF; +} + +void pin_stack_pages(struct lguest *lg) +{ + unsigned int i; + + for (i = 0; i < lg->stack_pages; i++) + pin_page(lg, lg->esp1 - i * PAGE_SIZE); +} + +void guest_set_stack(struct lguest *lg, u32 seg, u32 esp, unsigned int pages) +{ + /* You cannot have a stack segment with priv level 0. */ + if ((seg & 0x...
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 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
...st_set_stack(struct lguest_vcpu *vcpu, + u64 rsp, unsigned int pages) +{ + /* You cannot have a stack segment with priv level 0. */ + if (pages > 2) + kill_guest_dump(vcpu, "bad stack pages %u", pages); + vcpu->tss.rsp2 = rsp; + /* FIXME */ +// lg->stack_pages = pages; +// pin_stack_pages(lg); +} + +static DEFINE_MUTEX(hcall_print_lock); +#define HCALL_PRINT_SIZ 1024 +static char hcall_print_buf[HCALL_PRINT_SIZ]; + +/* Return true if DMA to host userspace now pending. */ +static int do_hcall(struct lguest_vcpu *vcpu) +{ + struct lguest_regs *regs = &vcpu->regs; + struct lgues...
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
...st_set_stack(struct lguest_vcpu *vcpu, + u64 rsp, unsigned int pages) +{ + /* You cannot have a stack segment with priv level 0. */ + if (pages > 2) + kill_guest_dump(vcpu, "bad stack pages %u", pages); + vcpu->tss.rsp2 = rsp; + /* FIXME */ +// lg->stack_pages = pages; +// pin_stack_pages(lg); +} + +static DEFINE_MUTEX(hcall_print_lock); +#define HCALL_PRINT_SIZ 1024 +static char hcall_print_buf[HCALL_PRINT_SIZ]; + +/* Return true if DMA to host userspace now pending. */ +static int do_hcall(struct lguest_vcpu *vcpu) +{ + struct lguest_regs *regs = &vcpu->regs; + struct lgues...