search for: lguest_pag

Displaying 20 results from an estimated 53 matches for "lguest_pag".

Did you mean: lguest_page
2007 May 09
1
[patch 4/9] lguest: the asm offsets
..." %0 " #val : : "i" (val)) @@ -116,4 +120,19 @@ void foo(void) OFFSET(PARAVIRT_iret, paravirt_ops, iret); OFFSET(PARAVIRT_read_cr0, paravirt_ops, read_cr0); #endif + +#ifdef CONFIG_LGUEST_GUEST + BLANK(); + OFFSET(LGUEST_DATA_irq_enabled, lguest_data, irq_enabled); + OFFSET(LGUEST_PAGES_host_gdt_desc, lguest_pages, state.host_gdt_desc); + OFFSET(LGUEST_PAGES_host_idt_desc, lguest_pages, state.host_idt_desc); + OFFSET(LGUEST_PAGES_host_cr3, lguest_pages, state.host_cr3); + OFFSET(LGUEST_PAGES_host_sp, lguest_pages, state.host_sp); + OFFSET(LGUEST_PAGES_guest_gdt_desc, lguest_page...
2007 May 09
1
[patch 4/9] lguest: the asm offsets
..." %0 " #val : : "i" (val)) @@ -116,4 +120,19 @@ void foo(void) OFFSET(PARAVIRT_iret, paravirt_ops, iret); OFFSET(PARAVIRT_read_cr0, paravirt_ops, read_cr0); #endif + +#ifdef CONFIG_LGUEST_GUEST + BLANK(); + OFFSET(LGUEST_DATA_irq_enabled, lguest_data, irq_enabled); + OFFSET(LGUEST_PAGES_host_gdt_desc, lguest_pages, state.host_gdt_desc); + OFFSET(LGUEST_PAGES_host_idt_desc, lguest_pages, state.host_idt_desc); + OFFSET(LGUEST_PAGES_host_cr3, lguest_pages, state.host_cr3); + OFFSET(LGUEST_PAGES_host_sp, lguest_pages, state.host_sp); + OFFSET(LGUEST_PAGES_guest_gdt_desc, lguest_page...
2007 Aug 07
1
[PATCH] Fix Malicious Guest GDT Host Crash
...ff -r 55fdd7fa62b7 drivers/lguest/core.c --- a/drivers/lguest/core.c Mon Aug 06 16:38:47 2007 +1000 +++ b/drivers/lguest/core.c Wed Aug 08 13:24:59 2007 +1000 @@ -452,6 +452,11 @@ static void run_guest_once(struct lguest /* Copy the guest-specific information into this CPU's "struct * lguest_pages". */ copy_in_guest_info(lg, pages); + + /* Set the trap number to 256 (impossible value). If we fault while + * switching to the Guest (bad segment registers or bug), this will + * cause us to abort the Guest. */ + lg->regs->trapnum = 256; /* Now: we push the "eflags&quot...
2007 Aug 07
1
[PATCH] Fix Malicious Guest GDT Host Crash
...ff -r 55fdd7fa62b7 drivers/lguest/core.c --- a/drivers/lguest/core.c Mon Aug 06 16:38:47 2007 +1000 +++ b/drivers/lguest/core.c Wed Aug 08 13:24:59 2007 +1000 @@ -452,6 +452,11 @@ static void run_guest_once(struct lguest /* Copy the guest-specific information into this CPU's "struct * lguest_pages". */ copy_in_guest_info(lg, pages); + + /* Set the trap number to 256 (impossible value). If we fault while + * switching to the Guest (bad segment registers or bug), this will + * cause us to abort the Guest. */ + lg->regs->trapnum = 256; /* Now: we push the "eflags&quot...
2007 Apr 18
0
[PATCH] lguest: Compile hypervisor.S into the lg module directly
...static void *__lguest_switch_to_guest(void) -{ - return (void *)HYPE_ADDR + HYPE_DATA_SIZE; +/* Offset from where hypervisor.S was compiled to where we've copied it */ +static unsigned long hype_offset(void) +{ + return HYPE_ADDR - (unsigned long)start_hyper_text; } /* This cpu's struct lguest_pages. */ @@ -65,9 +63,15 @@ static __init int map_hypervisor(void) static __init int map_hypervisor(void) { int i, err; - struct page **pagep = hype_page; - - for (i = 0; i < ARRAY_SIZE(hype_page); i++) { + struct page **pagep; + + hype_page = kmalloc(sizeof(hype_page[0])*TOTAL_HYPE_PAGES, GFP_...
2007 Apr 18
0
[PATCH] lguest: Compile hypervisor.S into the lg module directly
...static void *__lguest_switch_to_guest(void) -{ - return (void *)HYPE_ADDR + HYPE_DATA_SIZE; +/* Offset from where hypervisor.S was compiled to where we've copied it */ +static unsigned long hype_offset(void) +{ + return HYPE_ADDR - (unsigned long)start_hyper_text; } /* This cpu's struct lguest_pages. */ @@ -65,9 +63,15 @@ static __init int map_hypervisor(void) static __init int map_hypervisor(void) { int i, err; - struct page **pagep = hype_page; - - for (i = 0; i < ARRAY_SIZE(hype_page); i++) { + struct page **pagep; + + hype_page = kmalloc(sizeof(hype_page[0])*TOTAL_HYPE_PAGES, GFP_...
2007 May 09
1
[patch 3/9] lguest: the host code
...mic. */ +#define MAX_LGUEST_GUESTS 16 +struct lguest lguests[MAX_LGUEST_GUESTS]; + +/* Offset from where switcher.S was compiled to where we've copied it */ +static unsigned long switcher_offset(void) +{ + return SWITCHER_ADDR - (unsigned long)start_switcher_text; +} + +/* This cpu's struct lguest_pages. */ +static struct lguest_pages *lguest_pages(unsigned int cpu) +{ + return &(((struct lguest_pages *) + (SWITCHER_ADDR + SHARED_SWITCHER_PAGES*PAGE_SIZE))[cpu]); +} + +static __init int map_switcher(void) +{ + int i, err; + struct page **pagep; + + switcher_page = kmalloc(sizeof(switcher_...
2007 May 09
1
[patch 3/9] lguest: the host code
...mic. */ +#define MAX_LGUEST_GUESTS 16 +struct lguest lguests[MAX_LGUEST_GUESTS]; + +/* Offset from where switcher.S was compiled to where we've copied it */ +static unsigned long switcher_offset(void) +{ + return SWITCHER_ADDR - (unsigned long)start_switcher_text; +} + +/* This cpu's struct lguest_pages. */ +static struct lguest_pages *lguest_pages(unsigned int cpu) +{ + return &(((struct lguest_pages *) + (SWITCHER_ADDR + SHARED_SWITCHER_PAGES*PAGE_SIZE))[cpu]); +} + +static __init int map_switcher(void) +{ + int i, err; + struct page **pagep; + + switcher_page = kmalloc(sizeof(switcher_...
2007 Dec 20
5
[PATCH 0/16] lguest: introduce vcpu structure
this patch makes room for the vcpu structure in lguest, already used in this very same way at lguest64. It's the first part of our plan to have lguest and lguest64 unified too. When two dogs hang out, you don't have new puppies right in the other day. Some time has to be elapsed. They have to grow first. In this same spirit, having these patches _do not_ mean smp guests can be launched
2007 Dec 20
5
[PATCH 0/16] lguest: introduce vcpu structure
this patch makes room for the vcpu structure in lguest, already used in this very same way at lguest64. It's the first part of our plan to have lguest and lguest64 unified too. When two dogs hang out, you don't have new puppies right in the other day. Some time has to be elapsed. They have to grow first. In this same spirit, having these patches _do not_ mean smp guests can be launched
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
2009 Mar 26
1
[PATCH 3/5] lguest: avoid accidental recycling of pgdir pages
.../drivers/lguest/lg.h b/drivers/lguest/lg.h index 5faefea..363c231 100644 --- a/drivers/lguest/lg.h +++ b/drivers/lguest/lg.h @@ -174,6 +174,7 @@ void guest_set_pte(struct lg_cpu *cpu, unsigned long gpgdir, unsigned long vaddr, pte_t val); void map_switcher_in_guest(struct lg_cpu *cpu, struct lguest_pages *pages); int demand_page(struct lg_cpu *cpu, unsigned long cr2, int errcode); +void invalidate_pagetable(struct lg_cpu *cpu, unsigned long pgtable); void pin_page(struct lg_cpu *cpu, unsigned long vaddr); unsigned long guest_pa(struct lg_cpu *cpu, unsigned long vaddr); void page_table_guest_d...
2009 Mar 26
1
[PATCH 3/5] lguest: avoid accidental recycling of pgdir pages
.../drivers/lguest/lg.h b/drivers/lguest/lg.h index 5faefea..363c231 100644 --- a/drivers/lguest/lg.h +++ b/drivers/lguest/lg.h @@ -174,6 +174,7 @@ void guest_set_pte(struct lg_cpu *cpu, unsigned long gpgdir, unsigned long vaddr, pte_t val); void map_switcher_in_guest(struct lg_cpu *cpu, struct lguest_pages *pages); int demand_page(struct lg_cpu *cpu, unsigned long cr2, int errcode); +void invalidate_pagetable(struct lg_cpu *cpu, unsigned long pgtable); void pin_page(struct lg_cpu *cpu, unsigned long vaddr); unsigned long guest_pa(struct lg_cpu *cpu, unsigned long vaddr); void page_table_guest_d...
2007 Jul 12
1
[PATCH] lguest: disable SYSENTER for guests
...t/core.c +++ b/drivers/lguest/core.c @@ -338,6 +338,10 @@ int run_guest(struct lguest *lg, unsigne if (lg->ts) set_ts(); + /* Don't let Guest do SYSENTER: we can't handle it. */ + if (boot_cpu_has(X86_FEATURE_SEP)) + wrmsr(MSR_IA32_SYSENTER_CS, 0, 0); + run_guest_once(lg, lguest_pages(raw_smp_processor_id())); /* Save cr2 now if we page-faulted. */ @@ -345,6 +349,9 @@ int run_guest(struct lguest *lg, unsigne cr2 = read_cr2(); else if (lg->regs->trapnum == 7) math_state_restore(); + + if (boot_cpu_has(X86_FEATURE_SEP)) + wrmsr(MSR_IA32_SYSENTER_CS, __KE...
2007 Jul 12
1
[PATCH] lguest: disable SYSENTER for guests
...t/core.c +++ b/drivers/lguest/core.c @@ -338,6 +338,10 @@ int run_guest(struct lguest *lg, unsigne if (lg->ts) set_ts(); + /* Don't let Guest do SYSENTER: we can't handle it. */ + if (boot_cpu_has(X86_FEATURE_SEP)) + wrmsr(MSR_IA32_SYSENTER_CS, 0, 0); + run_guest_once(lg, lguest_pages(raw_smp_processor_id())); /* Save cr2 now if we page-faulted. */ @@ -345,6 +349,9 @@ int run_guest(struct lguest *lg, unsigne cr2 = read_cr2(); else if (lg->regs->trapnum == 7) math_state_restore(); + + if (boot_cpu_has(X86_FEATURE_SEP)) + wrmsr(MSR_IA32_SYSENTER_CS, __KE...
2007 Apr 30
0
[PATCH] lguest: properly kill guest userspace programs accessing kernel mem
...================================== --- a/drivers/lguest/lg.h +++ b/drivers/lguest/lg.h @@ -216,7 +216,7 @@ void guest_set_pte(struct lguest *lg, un void guest_set_pte(struct lguest *lg, unsigned long cr3, unsigned long vaddr, gpte_t val); void map_switcher_in_guest(struct lguest *lg, struct lguest_pages *pages); -int demand_page(struct lguest *info, unsigned long cr2, int write); +int demand_page(struct lguest *info, unsigned long cr2, int errcode); void pin_page(struct lguest *lg, unsigned long vaddr); /* lguest_user.c: */ ===================================================================...
2007 Apr 30
0
[PATCH] lguest: properly kill guest userspace programs accessing kernel mem
...================================== --- a/drivers/lguest/lg.h +++ b/drivers/lguest/lg.h @@ -216,7 +216,7 @@ void guest_set_pte(struct lguest *lg, un void guest_set_pte(struct lguest *lg, unsigned long cr3, unsigned long vaddr, gpte_t val); void map_switcher_in_guest(struct lguest *lg, struct lguest_pages *pages); -int demand_page(struct lguest *info, unsigned long cr2, int write); +int demand_page(struct lguest *info, unsigned long cr2, int errcode); void pin_page(struct lguest *lg, unsigned long vaddr); /* lguest_user.c: */ ===================================================================...