search for: early_gdt_descr

Displaying 20 results from an estimated 39 matches for "early_gdt_descr".

2007 Aug 19
4
[PATCH] Xen i386 xen-head.S fix sections mixup
Xen i386 xen-head.S fix sections mixup xen-head.S does not come back to the data section, leaving the text section as current section. It causes problems with a slightly enhanced DEBUG_RODATA that supports CONFIG_HOTPLUG and bringing a CPU up after the text has been marked read-only: reference to early_gdt_descr causes a page fault. It applies on 2.6.22-rc2-mm2. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> CC: jeremy@xensource.com CC: chrisw@sous-sol.org CC: virtualization@lists.osdl.org CC: xen-devel@lists.xensource.com --- arch/i386/xen/xen-head.S | 2 ++ 1 file changed, 2...
2007 Aug 19
4
[PATCH] Xen i386 xen-head.S fix sections mixup
Xen i386 xen-head.S fix sections mixup xen-head.S does not come back to the data section, leaving the text section as current section. It causes problems with a slightly enhanced DEBUG_RODATA that supports CONFIG_HOTPLUG and bringing a CPU up after the text has been marked read-only: reference to early_gdt_descr causes a page fault. It applies on 2.6.22-rc2-mm2. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> CC: jeremy@xensource.com CC: chrisw@sous-sol.org CC: virtualization@lists.osdl.org CC: xen-devel@lists.xensource.com --- arch/i386/xen/xen-head.S | 2 ++ 1 file changed, 2...
2007 Aug 19
4
[PATCH] Xen i386 xen-head.S fix sections mixup
Xen i386 xen-head.S fix sections mixup xen-head.S does not come back to the data section, leaving the text section as current section. It causes problems with a slightly enhanced DEBUG_RODATA that supports CONFIG_HOTPLUG and bringing a CPU up after the text has been marked read-only: reference to early_gdt_descr causes a page fault. It applies on 2.6.22-rc2-mm2. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> CC: jeremy@xensource.com CC: chrisw@sous-sol.org CC: virtualization@lists.osdl.org CC: xen-devel@lists.xensource.com --- arch/i386/xen/xen-head.S | 2 ++ 1 file changed, 2...
2020 Jul 24
0
[PATCH v5 31/75] x86/head/64: Load GDT after switch to virtual addresses
...* We must switch to a new descriptor in kernel space for the GDT + * because soon the kernel won't have access anymore to the userspace + * addresses where we're currently running on. We have to do that here + * because in 32bit we couldn't load a 64bit linear address. + */ + lgdt early_gdt_descr(%rip) + /* Check if nx is implemented */ movl $0x80000001, %eax cpuid @@ -193,14 +201,6 @@ SYM_CODE_START(secondary_startup_64) pushq $0 popfq - /* - * We must switch to a new descriptor in kernel space for the GDT - * because soon the kernel won't have access anymore to the users...
2007 Apr 29
1
[PATCH 1/2] lguest: fix up after pda->percpu conversion
...lude <asm/mce.h> /* Declarations 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" :...
2007 Apr 29
1
[PATCH 1/2] lguest: fix up after pda->percpu conversion
...lude <asm/mce.h> /* Declarations 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" :...
2007 Apr 18
5
[patch 0/5] i386-gdt-pda i386 gdt and pda updates
Hi Andrew, This patch series adds to the end of the existing i386-gdt-cleanups patches: allow-per-cpu-variables-to-be-page-aligned.patch i386-gdt-cleanups-use-per-cpu-variables-for-gdt-pda.patch i386-gdt-cleanups-use-per-cpu-gdt-immediately-upon-boot.patch i386-gdt-cleanups-use-per-cpu-gdt-immediately-upon-boot-fix.patch i386-gdt-cleanups-clean-up-cpu_init.patch
2007 Apr 18
5
[patch 0/5] i386-gdt-pda i386 gdt and pda updates
Hi Andrew, This patch series adds to the end of the existing i386-gdt-cleanups patches: allow-per-cpu-variables-to-be-page-aligned.patch i386-gdt-cleanups-use-per-cpu-variables-for-gdt-pda.patch i386-gdt-cleanups-use-per-cpu-gdt-immediately-upon-boot.patch i386-gdt-cleanups-use-per-cpu-gdt-immediately-upon-boot-fix.patch i386-gdt-cleanups-clean-up-cpu_init.patch
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&quot...
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&quot...
2020 Jul 24
0
[PATCH v5 32/75] x86/head/64: Load segment registers earlier
...----- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S index f958d4e4ee08..057c7bd3eeb6 100644 --- a/arch/x86/kernel/head_64.S +++ b/arch/x86/kernel/head_64.S @@ -174,6 +174,32 @@ SYM_CODE_START(secondary_startup_64) */ lgdt early_gdt_descr(%rip) + /* set up data segments */ + xorl %eax,%eax + movl %eax,%ds + movl %eax,%ss + movl %eax,%es + + /* + * We don't really need to load %fs or %gs, but load them anyway + * to kill any stale realmode selectors. This allows execution + * under VT hardware. + */ + movl %eax,%fs + movl...
2007 Apr 28
3
[PATCH] i386: introduce voyager smp_ops, fix voyager build
...(u32 *)&gdt[GDT_ENTRY_PERCPU].a, - (u32 *)&gdt[GDT_ENTRY_PERCPU].b, - __per_cpu_offset[cpu], 0xFFFFF, - 0x80 | DESCTYPE_S | 0x2, 0x8); - - per_cpu(this_cpu_off, cpu) = __per_cpu_offset[cpu]; - per_cpu(cpu_number, cpu) = cpu; -} - /* Defined in head.S */ extern struct Xgt_desc_struct early_gdt_descr; =================================================================== --- /dev/null +++ b/arch/i386/kernel/smpcommon.c @@ -0,0 +1,79 @@ +/* + * SMP stuff which is common to all sub-architectures. + */ +#include <linux/module.h> +#include <asm/smp.h> + +DEFINE_PER_CPU(unsigned long, thi...
2007 Apr 28
3
[PATCH] i386: introduce voyager smp_ops, fix voyager build
...(u32 *)&gdt[GDT_ENTRY_PERCPU].a, - (u32 *)&gdt[GDT_ENTRY_PERCPU].b, - __per_cpu_offset[cpu], 0xFFFFF, - 0x80 | DESCTYPE_S | 0x2, 0x8); - - per_cpu(this_cpu_off, cpu) = __per_cpu_offset[cpu]; - per_cpu(cpu_number, cpu) = cpu; -} - /* Defined in head.S */ extern struct Xgt_desc_struct early_gdt_descr; =================================================================== --- /dev/null +++ b/arch/i386/kernel/smpcommon.c @@ -0,0 +1,79 @@ +/* + * SMP stuff which is common to all sub-architectures. + */ +#include <linux/module.h> +#include <asm/smp.h> + +DEFINE_PER_CPU(unsigned long, thi...
2007 Apr 18
8
[patch 0/6] i386 gdt and percpu cleanups
Hi Andi, This is a series of patches based on your latest queue (as of the other day, at least). It includes: - the most recent patch to compute the appropriate amount of percpu space to allocate, using a separate reservation for modules where needed. - make the percpu sections page-aligned, so that percpu variables can be page aligned if needed (which is used by gdt_page) -
2007 Apr 18
8
[patch 0/6] i386 gdt and percpu cleanups
Hi Andi, This is a series of patches based on your latest queue (as of the other day, at least). It includes: - the most recent patch to compute the appropriate amount of percpu space to allocate, using a separate reservation for modules where needed. - make the percpu sections page-aligned, so that percpu variables can be page aligned if needed (which is used by gdt_page) -
2020 Aug 24
0
[PATCH v6 70/76] x86/smpboot: Setup TSS for starting AP
...45,3 +545,14 @@ void __head startup_64_setup_env(unsigned long physbase) gsbase = (unsigned long)fixup_pointer((void *)initial_gs, physbase); __wrmsr(MSR_GS_BASE, (u32)gsbase, (u32)(gsbase >> 32)); } + +void __head early_load_tss(void) +{ + struct desc_struct *gdt = (struct desc_struct *)early_gdt_descr.address; + tss_desc tss; + + /* Load TSS only if entry in GDT is marked present */ + memcpy(&tss, &gdt[GDT_ENTRY_TSS], sizeof(tss_desc)); + if (tss.p) + asm volatile("ltr %w0"::"q" (GDT_ENTRY_TSS*8)); +} diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S...
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 Apr 18
31
[PATCH 00/28] Updates for firstfloor paravirt-ops patches
Hi Andi, This is a set of updates for the firstfloor patch queue. Quick rundown: revert-mm-x86_64-mm-account-for-module-percpu-space-separately-from-kernel-percpu.patch separate-module-percpu-space.patch Update the module percpu accounting patch fix-ff-allow-percpu-variables-to-be-page-aligned.patch Make sure the percpu memory allocation is page-aligned
2007 Apr 18
31
[PATCH 00/28] Updates for firstfloor paravirt-ops patches
Hi Andi, This is a set of updates for the firstfloor patch queue. Quick rundown: revert-mm-x86_64-mm-account-for-module-percpu-space-separately-from-kernel-percpu.patch separate-module-percpu-space.patch Update the module percpu accounting patch fix-ff-allow-percpu-variables-to-be-page-aligned.patch Make sure the percpu memory allocation is page-aligned