search for: switch_to_guest

Displaying 14 results from an estimated 14 matches for "switch_to_guest".

2007 Apr 18
0
[PATCH] lguest: Compile hypervisor.S into the lg module directly
...17 +19,21 @@ #include <asm/i387.h> #include "lg.h" -/* This is our hypervisor, compiled from hypervisor.S. */ -static char __initdata hypervisor_blob[] = { -#include "hypervisor-blob.c" -}; +/* Found in hypervisor.S */ +extern char start_hyper_text[], end_hyper_text[], switch_to_guest[]; +extern unsigned long default_idt_entries[]; /* Every guest maps the core hypervisor blob. */ -#define SHARED_HYPERVISOR_PAGES DIV_ROUND_UP(sizeof(hypervisor_blob),PAGE_SIZE) +#define SHARED_HYPERVISOR_PAGES \ + DIV_ROUND_UP(end_hyper_text - start_hyper_text, PAGE_SIZE) +/* Pages for hypervis...
2007 Apr 18
0
[PATCH] lguest: Compile hypervisor.S into the lg module directly
...17 +19,21 @@ #include <asm/i387.h> #include "lg.h" -/* This is our hypervisor, compiled from hypervisor.S. */ -static char __initdata hypervisor_blob[] = { -#include "hypervisor-blob.c" -}; +/* Found in hypervisor.S */ +extern char start_hyper_text[], end_hyper_text[], switch_to_guest[]; +extern unsigned long default_idt_entries[]; /* Every guest maps the core hypervisor blob. */ -#define SHARED_HYPERVISOR_PAGES DIV_ROUND_UP(sizeof(hypervisor_blob),PAGE_SIZE) +#define SHARED_HYPERVISOR_PAGES \ + DIV_ROUND_UP(end_hyper_text - start_hyper_text, PAGE_SIZE) +/* Pages for hypervis...
2007 Aug 07
1
[PATCH] Fix Malicious Guest GDT Host Crash
...ss: the message will be "unhandled trap 256". */ static void fixup_gdt_table(struct lguest *lg, unsigned start, unsigned end) { unsigned int i; @@ -111,16 +69,6 @@ static void fixup_gdt_table(struct lgues * they say */ if (ignored_gdt(i)) continue; - - /* We could fault in switch_to_guest if they are using - * a removed segment. */ - if (!segment_present(&lg->gdt[i])) { - check_segment_use(lg, i); - continue; - } - - if (!desc_ok(&lg->gdt[i])) - kill_guest(lg, "Bad GDT descriptor %i", i); /* Segment descriptors contain a privilege level: the G...
2007 Aug 07
1
[PATCH] Fix Malicious Guest GDT Host Crash
...ss: the message will be "unhandled trap 256". */ static void fixup_gdt_table(struct lguest *lg, unsigned start, unsigned end) { unsigned int i; @@ -111,16 +69,6 @@ static void fixup_gdt_table(struct lgues * they say */ if (ignored_gdt(i)) continue; - - /* We could fault in switch_to_guest if they are using - * a removed segment. */ - if (!segment_present(&lg->gdt[i])) { - check_segment_use(lg, i); - continue; - } - - if (!desc_ok(&lg->gdt[i])) - kill_guest(lg, "Bad GDT descriptor %i", i); /* Segment descriptors contain a privilege level: the G...
2007 May 09
1
[patch 3/9] lguest: the host code
...nclude <asm/pgtable.h> +#include <asm/uaccess.h> +#include <asm/poll.h> +#include <asm/highmem.h> +#include <asm/asm-offsets.h> +#include <asm/i387.h> +#include "lg.h" + +/* Found in switcher.S */ +extern char start_switcher_text[], end_switcher_text[], switch_to_guest[]; +extern unsigned long default_idt_entries[]; + +/* Every guest maps the core switcher code. */ +#define SHARED_SWITCHER_PAGES \ + DIV_ROUND_UP(end_switcher_text - start_switcher_text, PAGE_SIZE) +/* Pages for switcher itself, then two pages per cpu */ +#define TOTAL_SWITCHER_PAGES (SHARED_SWITCH...
2007 May 09
1
[patch 3/9] lguest: the host code
...nclude <asm/pgtable.h> +#include <asm/uaccess.h> +#include <asm/poll.h> +#include <asm/highmem.h> +#include <asm/asm-offsets.h> +#include <asm/i387.h> +#include "lg.h" + +/* Found in switcher.S */ +extern char start_switcher_text[], end_switcher_text[], switch_to_guest[]; +extern unsigned long default_idt_entries[]; + +/* Every guest maps the core switcher code. */ +#define SHARED_SWITCHER_PAGES \ + DIV_ROUND_UP(end_switcher_text - start_switcher_text, PAGE_SIZE) +/* Pages for switcher itself, then two pages per cpu */ +#define TOTAL_SWITCHER_PAGES (SHARED_SWITCH...
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
...->regs.rax |= (0xFFFF << shift); + } + vcpu->regs.rip += insnlen; + return 1; +} + +#define SAVE_CR2(cr2) asm volatile ("movq %%cr2, %0" : "=r" (cr2)) + +static void run_guest_once(struct lguest_vcpu *vcpu) +{ + void (*sw_guest)(struct lguest_vcpu *) = HV_OFFSET(&switch_to_guest); + unsigned long foo, bar; + + BUG_ON(!vcpu->regs.cr3); + BUG_ON(!vcpu->pgdir); + BUG_ON(!vcpu->pgdir->pgdir); + asm volatile ("pushq %2; pushq %%rsp; pushfq; pushq %3; call *%6;" + /* The stack we pushed is off by 8, due to the previous pushq */ + "addq $8...
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
...->regs.rax |= (0xFFFF << shift); + } + vcpu->regs.rip += insnlen; + return 1; +} + +#define SAVE_CR2(cr2) asm volatile ("movq %%cr2, %0" : "=r" (cr2)) + +static void run_guest_once(struct lguest_vcpu *vcpu) +{ + void (*sw_guest)(struct lguest_vcpu *) = HV_OFFSET(&switch_to_guest); + unsigned long foo, bar; + + BUG_ON(!vcpu->regs.cr3); + BUG_ON(!vcpu->pgdir); + BUG_ON(!vcpu->pgdir->pgdir); + asm volatile ("pushq %2; pushq %%rsp; pushfq; pushq %3; call *%6;" + /* The stack we pushed is off by 8, due to the previous pushq */ + "addq $8...
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 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 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