search for: lguest_write_gdt_entry

Displaying 20 results from an estimated 29 matches for "lguest_write_gdt_entry".

2007 Apr 18
0
someone screwed something up
...er type > arch/i386/lguest/lguest.c:497: warning: assignment from incompatible pointer type > arch/i386/lguest/lguest.c:498: warning: assignment from incompatible pointer type > > paravirt_ops.write_ldt_entry = lguest_write_ldt_entry; > paravirt_ops.write_gdt_entry = lguest_write_gdt_entry; > paravirt_ops.write_idt_entry = lguest_write_idt_entry; And here it is: == The prototype for paravirt_ops write_lgt_entry, write_gdt_entry and write_idt_entry was type-corrected, so change lguest to match. We can also use the "write_dt_entry" which was exported by that same...
2007 Apr 18
0
someone screwed something up
...er type > arch/i386/lguest/lguest.c:497: warning: assignment from incompatible pointer type > arch/i386/lguest/lguest.c:498: warning: assignment from incompatible pointer type > > paravirt_ops.write_ldt_entry = lguest_write_ldt_entry; > paravirt_ops.write_gdt_entry = lguest_write_gdt_entry; > paravirt_ops.write_idt_entry = lguest_write_idt_entry; And here it is: == The prototype for paravirt_ops write_lgt_entry, write_gdt_entry and write_idt_entry was type-corrected, so change lguest to match. We can also use the "write_dt_entry" which was exported by that same...
2007 May 09
1
[patch 2/9] lguest: the guest code
...(i = 0; i < (desc->size+1)/8; i++) + hcall(LHCALL_LOAD_IDT_ENTRY, i, idt[i].a, idt[i].b); +} + +static void lguest_load_gdt(const struct Xgt_desc_struct *desc) +{ + BUG_ON((desc->size+1)/8 != GDT_ENTRIES); + hcall(LHCALL_LOAD_GDT, __pa(desc->address), GDT_ENTRIES, 0); +} + +static void lguest_write_gdt_entry(struct desc_struct *dt, + int entrynum, u32 low, u32 high) +{ + write_dt_entry(dt, entrynum, low, high); + hcall(LHCALL_LOAD_GDT, __pa(dt), GDT_ENTRIES, 0); +} + +static void lguest_load_tls(struct thread_struct *t, unsigned int cpu) +{ + lazy_hcall(LHCALL_LOAD_TLS, __pa(&t->tls_array)...
2007 May 09
1
[patch 2/9] lguest: the guest code
...(i = 0; i < (desc->size+1)/8; i++) + hcall(LHCALL_LOAD_IDT_ENTRY, i, idt[i].a, idt[i].b); +} + +static void lguest_load_gdt(const struct Xgt_desc_struct *desc) +{ + BUG_ON((desc->size+1)/8 != GDT_ENTRIES); + hcall(LHCALL_LOAD_GDT, __pa(desc->address), GDT_ENTRIES, 0); +} + +static void lguest_write_gdt_entry(struct desc_struct *dt, + int entrynum, u32 low, u32 high) +{ + write_dt_entry(dt, entrynum, low, high); + hcall(LHCALL_LOAD_GDT, __pa(dt), GDT_ENTRIES, 0); +} + +static void lguest_load_tls(struct thread_struct *t, unsigned int cpu) +{ + lazy_hcall(LHCALL_LOAD_TLS, __pa(&t->tls_array)...
2007 Apr 18
1
[PATCH 0/8] lguest
As promised to Andrew, and with much thanks to Andi Kleen for feedback, this is the new series of lguest patches. Main change is the move to drivers/lguest (for future non-i386 expansion), but lots of cleanups driven by Andi's feedback and the documentation effort (which made me examine every line of code). It's not perfect, but it's definitely useful. Cheers, Rusty. List of
2007 Apr 18
1
[PATCH 0/8] lguest
As promised to Andrew, and with much thanks to Andi Kleen for feedback, this is the new series of lguest patches. Main change is the move to drivers/lguest (for future non-i386 expansion), but lots of cleanups driven by Andi's feedback and the documentation effort (which made me examine every line of code). It's not perfect, but it's definitely useful. Cheers, Rusty. List of
2007 Aug 07
1
[PATCH] Fix Malicious Guest GDT Host Crash
...)); + set_guest_interrupt(lg, lg->idt[num].a, lg->idt[num].b, has_err(num)); return 1; } diff -r 55fdd7fa62b7 drivers/lguest/lguest.c --- a/drivers/lguest/lguest.c Mon Aug 06 16:38:47 2007 +1000 +++ b/drivers/lguest/lguest.c Wed Aug 08 13:27:58 2007 +1000 @@ -323,9 +323,12 @@ static void lguest_write_gdt_entry(struc * __thread variables). So we have a hypercall specifically for this case. */ static void lguest_load_tls(struct thread_struct *t, unsigned int cpu) { + /* There's one problem which normal hardware doesn't have: the Host + * can't handle us removing entries we're currentl...
2007 Aug 07
1
[PATCH] Fix Malicious Guest GDT Host Crash
...)); + set_guest_interrupt(lg, lg->idt[num].a, lg->idt[num].b, has_err(num)); return 1; } diff -r 55fdd7fa62b7 drivers/lguest/lguest.c --- a/drivers/lguest/lguest.c Mon Aug 06 16:38:47 2007 +1000 +++ b/drivers/lguest/lguest.c Wed Aug 08 13:27:58 2007 +1000 @@ -323,9 +323,12 @@ static void lguest_write_gdt_entry(struc * __thread variables). So we have a hypercall specifically for this case. */ static void lguest_load_tls(struct thread_struct *t, unsigned int cpu) { + /* There's one problem which normal hardware doesn't have: the Host + * can't handle us removing entries we're currentl...
2009 Apr 19
0
[PULL] lguest & virtio fixes
...unsigned int i; + struct desc_struct *gdt = (void *)desc->address; + + for (i = 0; i < (desc->size+1)/8; i++) + kvm_hypercall3(LHCALL_LOAD_GDT_ENTRY, i, gdt[i].a, gdt[i].b); } /* For a single GDT entry which changes, we do the lazy thing: alter our GDT, @@ -291,7 +291,9 @@ static void lguest_write_gdt_entry(struct desc_struct *dt, int entrynum, const void *desc, int type) { native_write_gdt_entry(dt, entrynum, desc, type); - kvm_hypercall2(LHCALL_LOAD_GDT, __pa(dt), GDT_ENTRIES); + /* Tell Host about this new entry. */ + kvm_hypercall3(LHCALL_LOAD_GDT_ENTRY, entrynum, + dt[entrynum]...
2009 Apr 19
0
[PULL] lguest & virtio fixes
...unsigned int i; + struct desc_struct *gdt = (void *)desc->address; + + for (i = 0; i < (desc->size+1)/8; i++) + kvm_hypercall3(LHCALL_LOAD_GDT_ENTRY, i, gdt[i].a, gdt[i].b); } /* For a single GDT entry which changes, we do the lazy thing: alter our GDT, @@ -291,7 +291,9 @@ static void lguest_write_gdt_entry(struct desc_struct *dt, int entrynum, const void *desc, int type) { native_write_gdt_entry(dt, entrynum, desc, type); - kvm_hypercall2(LHCALL_LOAD_GDT, __pa(dt), GDT_ENTRIES); + /* Tell Host about this new entry. */ + kvm_hypercall3(LHCALL_LOAD_GDT_ENTRY, entrynum, + dt[entrynum]...
2007 Jul 20
2
[PATCH 1/7] lguest: documentation pt I: Preparation
The netfilter code had very good documentation: the Netfilter Hacking HOWTO. Noone ever read it. So this time I'm trying something different, using a bit of Knuthiness. Start with drivers/lguest/README. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> --- Documentation/lguest/extract | 58 +++++++++++++++++++++++++++++++++ Documentation/lguest/lguest.c | 9
2007 Jul 20
2
[PATCH 1/7] lguest: documentation pt I: Preparation
The netfilter code had very good documentation: the Netfilter Hacking HOWTO. Noone ever read it. So this time I'm trying something different, using a bit of Knuthiness. Start with drivers/lguest/README. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> --- Documentation/lguest/extract | 58 +++++++++++++++++++++++++++++++++ Documentation/lguest/lguest.c | 9
2007 Jun 07
2
[PATCH 1/7] lguest documentation: infrastructure and Chapter I
The netfilter code had very good documentation: the Netfilter Hacking HOWTO. Noone ever read it. So this time I'm trying something different, using a bit of Knuthiness. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> --- Documentation/lguest/extract | 58 +++++++++++++++++++++++++++++++++ Documentation/lguest/lguest.c | 9 +++-- drivers/lguest/Makefile
2007 Jun 07
2
[PATCH 1/7] lguest documentation: infrastructure and Chapter I
The netfilter code had very good documentation: the Netfilter Hacking HOWTO. Noone ever read it. So this time I'm trying something different, using a bit of Knuthiness. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> --- Documentation/lguest/extract | 58 +++++++++++++++++++++++++++++++++ Documentation/lguest/lguest.c | 9 +++-- drivers/lguest/Makefile
2007 Jul 09
1
[PATCH RFC] first cut at splitting up paravirt_ops
...cr0; - paravirt_ops.write_cr0 = lguest_write_cr0; - paravirt_ops.init_IRQ = lguest_init_IRQ; - paravirt_ops.read_cr2 = lguest_read_cr2; - paravirt_ops.read_cr3 = lguest_read_cr3; - paravirt_ops.read_cr4 = lguest_read_cr4; - paravirt_ops.write_cr4 = lguest_write_cr4; - paravirt_ops.write_gdt_entry = lguest_write_gdt_entry; - paravirt_ops.write_idt_entry = lguest_write_idt_entry; - paravirt_ops.patch = lguest_patch; - paravirt_ops.safe_halt = lguest_safe_halt; - paravirt_ops.get_wallclock = lguest_get_wallclock; - paravirt_ops.time_init = lguest_time_init; - paravirt_ops.set_lazy_mode = lguest_lazy_mode; - paravirt_o...
2007 Jul 09
1
[PATCH RFC] first cut at splitting up paravirt_ops
...cr0; - paravirt_ops.write_cr0 = lguest_write_cr0; - paravirt_ops.init_IRQ = lguest_init_IRQ; - paravirt_ops.read_cr2 = lguest_read_cr2; - paravirt_ops.read_cr3 = lguest_read_cr3; - paravirt_ops.read_cr4 = lguest_read_cr4; - paravirt_ops.write_cr4 = lguest_write_cr4; - paravirt_ops.write_gdt_entry = lguest_write_gdt_entry; - paravirt_ops.write_idt_entry = lguest_write_idt_entry; - paravirt_ops.patch = lguest_patch; - paravirt_ops.safe_halt = lguest_safe_halt; - paravirt_ops.get_wallclock = lguest_get_wallclock; - paravirt_ops.time_init = lguest_time_init; - paravirt_ops.set_lazy_mode = lguest_lazy_mode; - paravirt_o...
2007 Oct 15
13
[PATCH 00/12] xen/paravirt_ops patches for 2.6.24
Hi Linus, Here's a set of patches to update paravirt_ops and Xen for 2.6.24 A quick overview of the patchset: paravirt_ops: Remove the monolithic paravirt_ops structure, and replace it with smaller structures of related functions. Also, clean up the handling of lazy mode to make it easier to implement. x86/mm/init.c: remove a chunk of dead code Xen: - remove duplicate includes -
2007 Oct 15
13
[PATCH 00/12] xen/paravirt_ops patches for 2.6.24
Hi Linus, Here's a set of patches to update paravirt_ops and Xen for 2.6.24 A quick overview of the patchset: paravirt_ops: Remove the monolithic paravirt_ops structure, and replace it with smaller structures of related functions. Also, clean up the handling of lazy mode to make it easier to implement. x86/mm/init.c: remove a chunk of dead code Xen: - remove duplicate includes -
2007 Oct 15
13
[PATCH 00/12] xen/paravirt_ops patches for 2.6.24
Hi Linus, Here's a set of patches to update paravirt_ops and Xen for 2.6.24 A quick overview of the patchset: paravirt_ops: Remove the monolithic paravirt_ops structure, and replace it with smaller structures of related functions. Also, clean up the handling of lazy mode to make it easier to implement. x86/mm/init.c: remove a chunk of dead code Xen: - remove duplicate includes -
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
...ve_write_dt_entry(void *dt, int entry, u32 entry_low, u32 entry_high) +{ + u32 *lp = (u32 *)((char *)dt + entry*8); + lp[0] = entry_low; + lp[1] = entry_high; +} + +static void lguest_write_ldt_entry(void *dt, int entrynum, u32 low, u32 high) +{ + /* FIXME: Allow this. */ + BUG(); +} + +static void lguest_write_gdt_entry(void *dt, int entrynum, + u32 low, u32 high) +{ + native_write_dt_entry(dt, entrynum, low, high); + hcall(LHCALL_LOAD_GDT, __pa(dt), GDT_ENTRIES, 0); +} + +static void lguest_write_idt_entry(void *dt, int entrynum, + u32 low, u32 high) +{ + native_write_dt_entry(dt, entrynum, low, hig...