search for: lguest_init

Displaying 20 results from an estimated 59 matches for "lguest_init".

2007 May 06
1
[PATCH 1/3] lguest: 2.6.21-mm1 update: lguest-remove-unnecessary-gdt-load.patch
...=================== --- a/drivers/lguest/lguest.c +++ b/drivers/lguest/lguest.c @@ -409,9 +409,6 @@ static unsigned lguest_patch(u8 type, u1 memcpy(insns, lguest_insns[type].start, insn_len); return insn_len; } - -/* From head.S */ -extern struct Xgt_desc_struct early_gdt_descr; __init void lguest_init(void) { @@ -468,7 +465,6 @@ __init void lguest_init(void) /* We use top of mem for initial pagetables. */ init_pg_tables_end = __pa(pg0); - load_gdt(&early_gdt_descr); asm volatile ("mov %0, %%fs" : : "r" (__KERNEL_DS) : "memory"); reserve_top_address(...
2007 May 06
1
[PATCH 1/3] lguest: 2.6.21-mm1 update: lguest-remove-unnecessary-gdt-load.patch
...=================== --- a/drivers/lguest/lguest.c +++ b/drivers/lguest/lguest.c @@ -409,9 +409,6 @@ static unsigned lguest_patch(u8 type, u1 memcpy(insns, lguest_insns[type].start, insn_len); return insn_len; } - -/* From head.S */ -extern struct Xgt_desc_struct early_gdt_descr; __init void lguest_init(void) { @@ -468,7 +465,6 @@ __init void lguest_init(void) /* We use top of mem for initial pagetables. */ init_pg_tables_end = __pa(pg0); - load_gdt(&early_gdt_descr); asm volatile ("mov %0, %%fs" : : "r" (__KERNEL_DS) : "memory"); reserve_top_address(...
2011 Nov 03
2
[PATCH 4 of 5] virtio: avoid modulus operation
...sty Russell <rusty at rustcorp.com.au> --- drivers/virtio/virtio_ring.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c --- a/arch/x86/lguest/boot.c +++ b/arch/x86/lguest/boot.c @@ -1420,7 +1420,7 @@ __init void lguest_init(void) add_preferred_console("hvc", 0, NULL); /* Register our very early console. */ - virtio_cons_early_init(early_put_chars); +// virtio_cons_early_init(early_put_chars); /* * Last of all, we set the power management poweroff hook to point to diff --git a/drivers/virtio/virt...
2011 Nov 03
2
[PATCH 4 of 5] virtio: avoid modulus operation
...sty Russell <rusty at rustcorp.com.au> --- drivers/virtio/virtio_ring.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c --- a/arch/x86/lguest/boot.c +++ b/arch/x86/lguest/boot.c @@ -1420,7 +1420,7 @@ __init void lguest_init(void) add_preferred_console("hvc", 0, NULL); /* Register our very early console. */ - virtio_cons_early_init(early_put_chars); +// virtio_cons_early_init(early_put_chars); /* * Last of all, we set the power management poweroff hook to point to diff --git a/drivers/virtio/virt...
2007 Apr 29
1
[PATCH 1/2] lguest: fix up after pda->percpu conversion
...larations for definitions in lguest_guest.S */ @@ -406,10 +409,6 @@ static unsigned lguest_patch(u8 type, u1 memcpy(insns, lguest_insns[type].start, insn_len); return insn_len; } - -/* From head.S */ -//extern void setup_pda(void); -extern struct Xgt_desc_struct early_gdt_descr; __init void lguest_init(void) { @@ -466,10 +465,8 @@ __init void lguest_init(void) /* We use top of mem for initial pagetables. */ init_pg_tables_end = __pa(pg0); - /* set up PDA descriptor */ -// setup_pda(); - load_gdt(&early_gdt_descr); -// asm volatile ("mov %0, %%fs" : : "r" (__KERNEL_P...
2009 Sep 21
0
[PATCH 1/5] lguest: move panic notifier registration to its expected place.
...ruct notifier_block paniced = { /* Setting up memory is fairly easy. */ static __init char *lguest_memory_setup(void) { - /* We do this here and not earlier because lockcheck used to barf if we - * did it before start_kernel(). I think we fixed that, so it'd be - * nice to move it back to lguest_init. Patch welcome... */ - atomic_notifier_chain_register(&panic_notifier_list, &paniced); - /* *The Linux bootloader header contains an "e820" memory map: the * Launcher populated the first entry with our memory limit. @@ -1365,10 +1360,13 @@ __init void lguest_init(void)...
2007 Apr 29
1
[PATCH 1/2] lguest: fix up after pda->percpu conversion
...larations for definitions in lguest_guest.S */ @@ -406,10 +409,6 @@ static unsigned lguest_patch(u8 type, u1 memcpy(insns, lguest_insns[type].start, insn_len); return insn_len; } - -/* From head.S */ -//extern void setup_pda(void); -extern struct Xgt_desc_struct early_gdt_descr; __init void lguest_init(void) { @@ -466,10 +465,8 @@ __init void lguest_init(void) /* We use top of mem for initial pagetables. */ init_pg_tables_end = __pa(pg0); - /* set up PDA descriptor */ -// setup_pda(); - load_gdt(&early_gdt_descr); -// asm volatile ("mov %0, %%fs" : : "r" (__KERNEL_P...
2009 Sep 21
0
[PATCH 1/5] lguest: move panic notifier registration to its expected place.
...ruct notifier_block paniced = { /* Setting up memory is fairly easy. */ static __init char *lguest_memory_setup(void) { - /* We do this here and not earlier because lockcheck used to barf if we - * did it before start_kernel(). I think we fixed that, so it'd be - * nice to move it back to lguest_init. Patch welcome... */ - atomic_notifier_chain_register(&panic_notifier_list, &paniced); - /* *The Linux bootloader header contains an "e820" memory map: the * Launcher populated the first entry with our memory limit. @@ -1365,10 +1360,13 @@ __init void lguest_init(void)...
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 03
2
[PATCH 1/2] lguest: handle dodgy/non-existent TSC. Host code.
...================================================================= --- a/drivers/lguest/hypercalls.c +++ b/drivers/lguest/hypercalls.c @@ -132,11 +132,19 @@ static void do_async_hcalls(struct lgues static void initialize(struct lguest *lg) { + u32 tsc_speed; + if (lg->regs->eax != LHCALL_LGUEST_INIT) { kill_guest(lg, "hypercall %li before LGUEST_INIT", lg->regs->eax); return; } + + /* We only tell the guest to use the TSC if it's reliable. */ + if (boot_cpu_has(X86_FEATURE_CONSTANT_TSC) && !check_tsc_unstable()) + tsc_speed = tsc_khz; + else + tsc_s...
2007 Jul 03
2
[PATCH 1/2] lguest: handle dodgy/non-existent TSC. Host code.
...================================================================= --- a/drivers/lguest/hypercalls.c +++ b/drivers/lguest/hypercalls.c @@ -132,11 +132,19 @@ static void do_async_hcalls(struct lgues static void initialize(struct lguest *lg) { + u32 tsc_speed; + if (lg->regs->eax != LHCALL_LGUEST_INIT) { kill_guest(lg, "hypercall %li before LGUEST_INIT", lg->regs->eax); return; } + + /* We only tell the guest to use the TSC if it's reliable. */ + if (boot_cpu_has(X86_FEATURE_CONSTANT_TSC) && !check_tsc_unstable()) + tsc_speed = tsc_khz; + else + tsc_s...
2009 Mar 26
1
[PATCH 3/5] lguest: avoid accidental recycling of pgdir pages
...d when a process exits, and we're throwing away the + * page table. */ +static void lguest_pgd_free(struct mm_struct *mm, pgd_t *pgd) +{ + lazy_hcall(LHCALL_INVALIDATE_PGTABLE, __pa(pgd), 0, 0); +} + /* * The Unadvanced Programmable Interrupt Controller. * @@ -1018,6 +1046,7 @@ __init void lguest_init(void) pv_mmu_ops.lazy_mode.leave = lguest_leave_lazy_mode; pv_mmu_ops.pte_update = lguest_pte_update; pv_mmu_ops.pte_update_defer = lguest_pte_update; + pv_mmu_ops.pgd_free = lguest_pgd_free; #ifdef CONFIG_X86_LOCAL_APIC /* apic read/write intercepts */ diff --git a/drivers/lguest/lg.h b...
2009 Mar 26
1
[PATCH 3/5] lguest: avoid accidental recycling of pgdir pages
...d when a process exits, and we're throwing away the + * page table. */ +static void lguest_pgd_free(struct mm_struct *mm, pgd_t *pgd) +{ + lazy_hcall(LHCALL_INVALIDATE_PGTABLE, __pa(pgd), 0, 0); +} + /* * The Unadvanced Programmable Interrupt Controller. * @@ -1018,6 +1046,7 @@ __init void lguest_init(void) pv_mmu_ops.lazy_mode.leave = lguest_leave_lazy_mode; pv_mmu_ops.pte_update = lguest_pte_update; pv_mmu_ops.pte_update_defer = lguest_pte_update; + pv_mmu_ops.pgd_free = lguest_pgd_free; #ifdef CONFIG_X86_LOCAL_APIC /* apic read/write intercepts */ diff --git a/drivers/lguest/lg.h b...
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
2009 Mar 26
0
[PATCH 2/5] lguest: wire up pte_update/pte_update_defer
...ned long addr, pte_t *ptep, pte_t pteval) { *ptep = pteval; - lazy_hcall(LHCALL_SET_PTE, __pa(mm->pgd), addr, pteval.pte_low); + lguest_pte_update(mm, addr, ptep); } /* The Guest calls this to set a top-level entry. Again, we set the entry then @@ -1018,6 +1046,8 @@ __init void lguest_init(void) pv_mmu_ops.read_cr3 = lguest_read_cr3; pv_mmu_ops.lazy_mode.enter = paravirt_enter_lazy_mmu; pv_mmu_ops.lazy_mode.leave = lguest_leave_lazy_mode; + pv_mmu_ops.pte_update = lguest_pte_update; + pv_mmu_ops.pte_update_defer = lguest_pte_update; #ifdef CONFIG_X86_LOCAL_APIC /* apic rea...
2009 Mar 26
0
[PATCH 2/5] lguest: wire up pte_update/pte_update_defer
...ned long addr, pte_t *ptep, pte_t pteval) { *ptep = pteval; - lazy_hcall(LHCALL_SET_PTE, __pa(mm->pgd), addr, pteval.pte_low); + lguest_pte_update(mm, addr, ptep); } /* The Guest calls this to set a top-level entry. Again, we set the entry then @@ -1018,6 +1046,8 @@ __init void lguest_init(void) pv_mmu_ops.read_cr3 = lguest_read_cr3; pv_mmu_ops.lazy_mode.enter = paravirt_enter_lazy_mmu; pv_mmu_ops.lazy_mode.leave = lguest_leave_lazy_mode; + pv_mmu_ops.pte_update = lguest_pte_update; + pv_mmu_ops.pte_update_defer = lguest_pte_update; #ifdef CONFIG_X86_LOCAL_APIC /* apic rea...