Displaying 8 results from an estimated 8 matches for "lguest_guest_info".
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 09/13] lguest64 devices
...t;linux/mm.h>
+#include <linux/highmem.h>
+#include <linux/uaccess.h>
+#include <asm/lguest.h>
+#include <asm/lguest_user.h>
+#include "lguest.h"
+
+static struct list_head dma_hash[64];
+
+/* FIXME: allow multi-page lengths. */
+static int check_dma_list(struct lguest_guest_info *linfo,
+ const struct lguest_dma *dma)
+{
+ unsigned int i;
+
+ for (i = 0; i < LGUEST_MAX_DMA_SECTIONS; i++) {
+ if (!dma->len[i])
+ return 1;
+ if (!lguest_address_ok(linfo, dma->addr[i]))
+ goto kill;
+ if (dma->len[i] > PAGE_SIZE)
+ goto kill;
+ /* We could do over...
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 09/13] lguest64 devices
...t;linux/mm.h>
+#include <linux/highmem.h>
+#include <linux/uaccess.h>
+#include <asm/lguest.h>
+#include <asm/lguest_user.h>
+#include "lguest.h"
+
+static struct list_head dma_hash[64];
+
+/* FIXME: allow multi-page lengths. */
+static int check_dma_list(struct lguest_guest_info *linfo,
+ const struct lguest_dma *dma)
+{
+ unsigned int i;
+
+ for (i = 0; i < LGUEST_MAX_DMA_SECTIONS; i++) {
+ if (!dma->len[i])
+ return 1;
+ if (!lguest_address_ok(linfo, dma->addr[i]))
+ goto kill;
+ if (dma->len[i] > PAGE_SIZE)
+ goto kill;
+ /* We could do over...
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
..."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->guest, addr)
+ || get_user(val, (u8 __user *)addr) != 0)
+ kill_guest_dump(vcpu, "bad read address %llx&quo...
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
..."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->guest, addr)
+ || get_user(val, (u8 __user *)addr) != 0)
+ kill_guest_dump(vcpu, "bad read address %llx&quo...
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 04/13] Useful debugging
...;trapnum);
+
+ lguest_dump_trace(vcpu, regs);
+}
+
+struct guest_ksym_stuff {
+ unsigned long *addresses;
+ unsigned long num_syms;
+ u8 *names;
+ u8 *token_table;
+ u16 *token_index;
+ unsigned long *markers;
+};
+
+static struct lguest_text_ptr *get_text_segs(struct lguest_vcpu *vcpu)
+{
+ struct lguest_guest_info *linfo = vcpu->guest;
+ struct lguest_text_ptr *segs, **p;
+ struct lguest_text_ptr *g;
+ unsigned long addr;
+ int i;
+
+ if (!linfo->lguest_data)
+ return NULL;
+
+ addr = lhread_u64(vcpu, (u64)&linfo->lguest_data->text);
+ if (!addr)
+ return NULL;
+
+ g = (struct lguest_text_p...
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 04/13] Useful debugging
...;trapnum);
+
+ lguest_dump_trace(vcpu, regs);
+}
+
+struct guest_ksym_stuff {
+ unsigned long *addresses;
+ unsigned long num_syms;
+ u8 *names;
+ u8 *token_table;
+ u16 *token_index;
+ unsigned long *markers;
+};
+
+static struct lguest_text_ptr *get_text_segs(struct lguest_vcpu *vcpu)
+{
+ struct lguest_guest_info *linfo = vcpu->guest;
+ struct lguest_text_ptr *segs, **p;
+ struct lguest_text_ptr *g;
+ unsigned long addr;
+ int i;
+
+ if (!linfo->lguest_data)
+ return NULL;
+
+ addr = lhread_u64(vcpu, (u64)&linfo->lguest_data->text);
+ if (!addr)
+ return NULL;
+
+ g = (struct lguest_text_p...
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 00/13] Lguest for the x86_64
...cpu shared data, but each guest will only have access to
their own, and only while running in dpl 0.
These vcpu structures holds lots of data, from the hosts current
gdt and idt pointer, to the cr3's (both guest and host), an
NMI trampoline section, and lots more.
Each guest also has a unique lguest_guest_info structure that stores
generic data for the guest, but nothing that would be needed for
running a specific VCPU.
Loading the hypervisor:
----------------------
As opposed to compiling a hypervisor.c blob, we build instead the
hypervisor itself into the lg.o module. We snap shot it with
start and...
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 00/13] Lguest for the x86_64
...cpu shared data, but each guest will only have access to
their own, and only while running in dpl 0.
These vcpu structures holds lots of data, from the hosts current
gdt and idt pointer, to the cr3's (both guest and host), an
NMI trampoline section, and lots more.
Each guest also has a unique lguest_guest_info structure that stores
generic data for the guest, but nothing that would be needed for
running a specific VCPU.
Loading the hypervisor:
----------------------
As opposed to compiling a hypervisor.c blob, we build instead the
hypervisor itself into the lg.o module. We snap shot it with
start and...