search for: run_guest_once

Displaying 19 results from an estimated 19 matches for "run_guest_once".

2007 Jul 12
1
[PATCH] lguest: disable SYSENTER for guests
...--- a/drivers/lguest/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_SY...
2007 Jul 12
1
[PATCH] lguest: disable SYSENTER for guests
...--- a/drivers/lguest/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_SY...
2007 May 09
1
[patch 3/9] lguest: the host code
...irect trap entries. */ + if (lg->changed & CHANGED_IDT) + copy_traps(lg, pages->state.guest_idt, default_idt_entries); + + /* Copy all GDT entries but the TSS. */ + if (lg->changed & CHANGED_GDT) + copy_gdt(lg, pages->state.guest_gdt); + + lg->changed = 0; +} + +static void run_guest_once(struct lguest *lg, struct lguest_pages *pages) +{ + unsigned int clobber; + + copy_in_guest_info(lg, pages); + + /* Put eflags on stack, lcall does rest: suitable for iret return. */ + asm volatile("pushf; lcall *lguest_entry" + : "=a"(clobber), "=b"(clobber) +...
2007 May 09
1
[patch 3/9] lguest: the host code
...irect trap entries. */ + if (lg->changed & CHANGED_IDT) + copy_traps(lg, pages->state.guest_idt, default_idt_entries); + + /* Copy all GDT entries but the TSS. */ + if (lg->changed & CHANGED_GDT) + copy_gdt(lg, pages->state.guest_gdt); + + lg->changed = 0; +} + +static void run_guest_once(struct lguest *lg, struct lguest_pages *pages) +{ + unsigned int clobber; + + copy_in_guest_info(lg, pages); + + /* Put eflags on stack, lcall does rest: suitable for iret return. */ + asm volatile("pushf; lcall *lguest_entry" + : "=a"(clobber), "=b"(clobber) +...
2007 Aug 07
1
[PATCH] Fix Malicious Guest GDT Host Crash
...9;s not using segments when it changes them. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> diff -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 + * ca...
2007 Aug 07
1
[PATCH] Fix Malicious Guest GDT Host Crash
...9;s not using segments when it changes them. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> diff -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 + * ca...
2007 May 10
4
[PATCH 0/5] lguest feedback tidyups
Hi all, Gratefully-received recent feedback from CC'd was applied to excellent effect (and the advice from Matt Mackall about my personal appearance is best unrequited). The patch is split in 5 parts to correspond with the 9 parts Andrew sent out before, but here's the summary: 1) Sparse (thanks Christoph Hellwig): - lguest_const can be static now - lguest.c should include
2007 May 10
4
[PATCH 0/5] lguest feedback tidyups
Hi all, Gratefully-received recent feedback from CC'd was applied to excellent effect (and the advice from Matt Mackall about my personal appearance is best unrequited). The patch is split in 5 parts to correspond with the 9 parts Andrew sent out before, but here's the summary: 1) Sparse (thanks Christoph Hellwig): - lguest_const can be static now - lguest.c should include
2007 May 14
5
[PATCH 1/6] lguest: host code tidyups
...t_address_ok(lg, addr, bytes) || copy_to_user((void __user *)addr, b, bytes) != 0) - kill_guest(lg, "bad write address %u len %u", addr, bytes); + kill_guest(lg, "bad write address %#lx len %u", addr, bytes); } static void set_ts(void) @@ -294,7 +295,7 @@ static void run_guest_once(struct lguest : "memory", "%edx", "%ecx", "%edi", "%esi"); } -int run_guest(struct lguest *lg, char *__user user) +int run_guest(struct lguest *lg, unsigned long __user *user) { while (!lg->dead) { unsigned int cr2 = 0; /* Damn g...
2007 May 14
5
[PATCH 1/6] lguest: host code tidyups
...t_address_ok(lg, addr, bytes) || copy_to_user((void __user *)addr, b, bytes) != 0) - kill_guest(lg, "bad write address %u len %u", addr, bytes); + kill_guest(lg, "bad write address %#lx len %u", addr, bytes); } static void set_ts(void) @@ -294,7 +295,7 @@ static void run_guest_once(struct lguest : "memory", "%edx", "%ecx", "%edi", "%esi"); } -int run_guest(struct lguest *lg, char *__user user) +int run_guest(struct lguest *lg, unsigned long __user *user) { while (!lg->dead) { unsigned int cr2 = 0; /* Damn g...
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
...s a 16 or 32 bit access */ + if (insn & 0x1) + vcpu->regs.rax = 0xFFFFFFFF; + else + vcpu->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;...
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
...s a 16 or 32 bit access */ + if (insn & 0x1) + vcpu->regs.rax = 0xFFFFFFFF; + else + vcpu->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;...
2020 Jul 22
34
[RFC PATCH v1 00/34] VM introspection - EPT Views and Virtualization Exceptions
This patch series is based on the VM introspection patches (https://lore.kernel.org/kvm/20200721210922.7646-1-alazar at bitdefender.com/), extending the introspection API with EPT Views and Virtualization Exceptions (#VE) support. The purpose of this series is to get an initial feedback and to see if we are on the right track, especially because the changes made to add the EPT views are not small
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 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