search for: lguest_vcpu

Displaying 10 results from an estimated 10 matches for "lguest_vcpu".

2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 04/13] Useful debugging
..., lgdebug_print_buf); + spin_unlock_irqrestore(&lgdebug_print_lock, flags); +} + +void lgdebug_print(const char *fmt, ...) +{ + va_list ap; + + if (!lguest_debug) + return; + + /* irq save? */ + va_start(ap, fmt); + lgdebug_vprint(fmt, ap); + va_end(ap); +} + +void lguest_dump_vcpu_regs(struct lguest_vcpu *vcpu) +{ + struct lguest_regs *regs = &vcpu->regs; + + printk("Printing VCPU %d regs cr3: %016llx\n", vcpu->id, regs->cr3); + printk("RIP: %04llx: ", regs->cs & 0xffff); + lguest_print_address(vcpu, regs->rip); + printk("RSP: %04llx:%016llx EFLAGS:...
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 04/13] Useful debugging
..., lgdebug_print_buf); + spin_unlock_irqrestore(&lgdebug_print_lock, flags); +} + +void lgdebug_print(const char *fmt, ...) +{ + va_list ap; + + if (!lguest_debug) + return; + + /* irq save? */ + va_start(ap, fmt); + lgdebug_vprint(fmt, ap); + va_end(ap); +} + +void lguest_dump_vcpu_regs(struct lguest_vcpu *vcpu) +{ + struct lguest_regs *regs = &vcpu->regs; + + printk("Printing VCPU %d regs cr3: %016llx\n", vcpu->id, regs->cr3); + printk("RIP: %04llx: ", regs->cs & 0xffff); + lguest_print_address(vcpu, regs->rip); + printk("RSP: %04llx:%016llx EFLAGS:...
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
...irt.h> +#include <asm/hv_vm.h> +#include <asm/uaccess.h> +#include <asm/i387.h> +#include "lguest.h" + +#define HV_OFFSET(x) (typeof(x))((unsigned long)(x)+lguest_hv_offset) + +unsigned long lguest_hv_addr; +unsigned long lguest_hv_offset; +int lguest_hv_pages; + +int lguest_vcpu_pages; +int lguest_vcpu_order; + +DEFINE_MUTEX(lguest_lock); + +int lguest_address_ok(const struct lguest_guest_info *linfo, u64 addr) +{ + return addr / PAGE_SIZE < linfo->pfn_limit; +} + +u8 lhread_u8(struct lguest_vcpu *vcpu, u64 addr) +{ + u8 val = 0; + + if (!lguest_address_ok(vcpu->g...
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
...irt.h> +#include <asm/hv_vm.h> +#include <asm/uaccess.h> +#include <asm/i387.h> +#include "lguest.h" + +#define HV_OFFSET(x) (typeof(x))((unsigned long)(x)+lguest_hv_offset) + +unsigned long lguest_hv_addr; +unsigned long lguest_hv_offset; +int lguest_hv_pages; + +int lguest_vcpu_pages; +int lguest_vcpu_order; + +DEFINE_MUTEX(lguest_lock); + +int lguest_address_ok(const struct lguest_guest_info *linfo, u64 addr) +{ + return addr / PAGE_SIZE < linfo->pfn_limit; +} + +u8 lhread_u8(struct lguest_vcpu *vcpu, u64 addr) +{ + u8 val = 0; + + if (!lguest_address_ok(vcpu->g...
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 05/13] asm-offsets update
...sm/lguest.h> +#endif #define DEFINE(sym, val) \ asm volatile("\n->" #sym " %0 " #val : : "i" (val)) @@ -89,5 +92,51 @@ int main(void) ENTRY(read_cr2); ENTRY(swapgs); #endif + +#ifdef CONFIG_LGUEST_GUEST +#undef ENTRY +#define ENTRY(entry) DEFINE(LGUEST_VCPU_ ##entry, offsetof(struct lguest_vcpu, entry)) + ENTRY(vcpu); + ENTRY(debug); + ENTRY(magic); + ENTRY(guest_syscall); + ENTRY(host_stack); + ENTRY(host_cr3); + ENTRY(host_gs_a); + ENTRY(host_gs_d); + ENTRY(host_proc_gs_a); + ENTRY(host_proc_gs_d); + ENTRY(guest_gs_a); + ENTRY(guest_gs_d); + ENTRY(g...
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 05/13] asm-offsets update
...sm/lguest.h> +#endif #define DEFINE(sym, val) \ asm volatile("\n->" #sym " %0 " #val : : "i" (val)) @@ -89,5 +92,51 @@ int main(void) ENTRY(read_cr2); ENTRY(swapgs); #endif + +#ifdef CONFIG_LGUEST_GUEST +#undef ENTRY +#define ENTRY(entry) DEFINE(LGUEST_VCPU_ ##entry, offsetof(struct lguest_vcpu, entry)) + ENTRY(vcpu); + ENTRY(debug); + ENTRY(magic); + ENTRY(guest_syscall); + ENTRY(host_stack); + ENTRY(host_cr3); + ENTRY(host_gs_a); + ENTRY(host_gs_d); + ENTRY(host_proc_gs_a); + ENTRY(host_proc_gs_d); + ENTRY(guest_gs_a); + ENTRY(guest_gs_d); + ENTRY(g...
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 Apr 18
1
[RFC/PATCH LGUEST X86_64 00/13] Lguest for the x86_64
...st. The guest permissions for this area will obviously be restricted to DPL 0 only (guest runs in PL 3). Now what about guest data. Well, as suppose to the i386 code, we don't put any data in the hypervisor.S. All data will be put into a guest shared data structure. This structure is called lguest_vcpu. So each guest (and eventually, each guest cpu) will have it's own lguest_vcpu, and this structure will be mapped into this HV FIXMAP area for both the host and the guest in the same location. What's also nice about this, is that the host can see all the guest vcpu shared data, but each g...
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 00/13] Lguest for the x86_64
...st. The guest permissions for this area will obviously be restricted to DPL 0 only (guest runs in PL 3). Now what about guest data. Well, as suppose to the i386 code, we don't put any data in the hypervisor.S. All data will be put into a guest shared data structure. This structure is called lguest_vcpu. So each guest (and eventually, each guest cpu) will have it's own lguest_vcpu, and this structure will be mapped into this HV FIXMAP area for both the host and the guest in the same location. What's also nice about this, is that the host can see all the guest vcpu shared data, but each g...