search for: cpu_gdt

Displaying 18 results from an estimated 18 matches for "cpu_gdt".

2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 07/17] paravirt_ops - descriptor changes.
...ber de Oliveira Costa <gcosta@redhat.com> Index: clean-start/include/asm-x86_64/desc.h =================================================================== --- clean-start.orig/include/asm-x86_64/desc.h +++ clean-start/include/asm-x86_64/desc.h @@ -16,9 +16,8 @@ extern struct desc_struct cpu_gdt_table[GDT_ENTRIES]; -#define load_TR_desc() asm volatile("ltr %w0"::"r" (GDT_ENTRY_TSS*8)) -#define load_LDT_desc() asm volatile("lldt %w0"::"r" (GDT_ENTRY_LDT*8)) -#define clear_LDT() asm volatile("lldt %w0"::"r" (0)) +/* the cpu gdt a...
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 07/17] paravirt_ops - descriptor changes.
...ber de Oliveira Costa <gcosta@redhat.com> Index: clean-start/include/asm-x86_64/desc.h =================================================================== --- clean-start.orig/include/asm-x86_64/desc.h +++ clean-start/include/asm-x86_64/desc.h @@ -16,9 +16,8 @@ extern struct desc_struct cpu_gdt_table[GDT_ENTRIES]; -#define load_TR_desc() asm volatile("ltr %w0"::"r" (GDT_ENTRY_TSS*8)) -#define load_LDT_desc() asm volatile("lldt %w0"::"r" (GDT_ENTRY_LDT*8)) -#define clear_LDT() asm volatile("lldt %w0"::"r" (0)) +/* the cpu gdt a...
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 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) -
2007 Apr 18
2
[PATCH] x86_64 paravirt_ops port
...IC_ICR ) & APIC_ICR_BUSY) Index: linux-2.6.19-quilt/include/asm-x86_64/desc.h =================================================================== --- linux-2.6.19-quilt.orig/include/asm-x86_64/desc.h +++ linux-2.6.19-quilt/include/asm-x86_64/desc.h @@ -16,9 +16,8 @@ extern struct desc_struct cpu_gdt_table[GDT_ENTRIES]; -#define load_TR_desc() asm volatile("ltr %w0"::"r" (GDT_ENTRY_TSS*8)) -#define load_LDT_desc() asm volatile("lldt %w0"::"r" (GDT_ENTRY_LDT*8)) -#define clear_LDT() asm volatile("lldt %w0"::"r" (0)) +/* the cpu gdt a...
2007 Apr 18
2
[PATCH] x86_64 paravirt_ops port
...IC_ICR ) & APIC_ICR_BUSY) Index: linux-2.6.19-quilt/include/asm-x86_64/desc.h =================================================================== --- linux-2.6.19-quilt.orig/include/asm-x86_64/desc.h +++ linux-2.6.19-quilt/include/asm-x86_64/desc.h @@ -16,9 +16,8 @@ extern struct desc_struct cpu_gdt_table[GDT_ENTRIES]; -#define load_TR_desc() asm volatile("ltr %w0"::"r" (GDT_ENTRY_TSS*8)) -#define load_LDT_desc() asm volatile("lldt %w0"::"r" (GDT_ENTRY_LDT*8)) -#define clear_LDT() asm volatile("lldt %w0"::"r" (0)) +/* the cpu gdt a...
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 10/17] paravirt_ops - boot changes
...<linux/string.h> #include <linux/percpu.h> +#include <linux/module.h> #include <asm/processor.h> #include <asm/proto.h> @@ -20,6 +21,9 @@ #include <asm/pgtable.h> #include <asm/sections.h> +/* Virtualized guests may want to use it */ +EXPORT_SYMBOL(cpu_gdt_descr); + /* Don't add a printk in there. printk relies on the PDA which is not initialized yet. */ static void __init clear_bss(void) @@ -62,7 +66,7 @@ void __init x86_64_start_kernel(char * r for (i = 0; i < IDT_ENTRIES; i++) set_intr_gate(i, early_idt_handler); - asm volatil...
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 10/17] paravirt_ops - boot changes
...<linux/string.h> #include <linux/percpu.h> +#include <linux/module.h> #include <asm/processor.h> #include <asm/proto.h> @@ -20,6 +21,9 @@ #include <asm/pgtable.h> #include <asm/sections.h> +/* Virtualized guests may want to use it */ +EXPORT_SYMBOL(cpu_gdt_descr); + /* Don't add a printk in there. printk relies on the PDA which is not initialized yet. */ static void __init clear_bss(void) @@ -62,7 +66,7 @@ void __init x86_64_start_kernel(char * r for (i = 0; i < IDT_ENTRIES; i++) set_intr_gate(i, early_idt_handler); - asm volatil...
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
2007 Apr 18
0
[PATCH] paravirt_ops x86_64 , take 2
...t rip. */ wrmsrl(MSR_STAR, ((u64)__USER32_CS)<<48 | ((u64)__KERNEL_CS)<<32); - wrmsrl(MSR_LSTAR, system_call); + wrmsrl(MSR_LSTAR, (u64)system_call); #ifdef CONFIG_IA32_EMULATION syscall32_cpu_init (); @@ -223,8 +223,8 @@ void __cpuinit cpu_init (void) memcpy(cpu_gdt(cpu), cpu_gdt_table, GDT_SIZE); cpu_gdt_descr[cpu].size = GDT_SIZE; - asm volatile("lgdt %0" :: "m" (cpu_gdt_descr[cpu])); - asm volatile("lidt %0" :: "m" (idt_descr)); + load_gdt((const struct desc_struct *)&cpu_gdt_descr[cpu]); + load_idt((const str...
2007 Apr 18
0
[PATCH] paravirt_ops x86_64 , take 2
...t rip. */ wrmsrl(MSR_STAR, ((u64)__USER32_CS)<<48 | ((u64)__KERNEL_CS)<<32); - wrmsrl(MSR_LSTAR, system_call); + wrmsrl(MSR_LSTAR, (u64)system_call); #ifdef CONFIG_IA32_EMULATION syscall32_cpu_init (); @@ -223,8 +223,8 @@ void __cpuinit cpu_init (void) memcpy(cpu_gdt(cpu), cpu_gdt_table, GDT_SIZE); cpu_gdt_descr[cpu].size = GDT_SIZE; - asm volatile("lgdt %0" :: "m" (cpu_gdt_descr[cpu])); - asm volatile("lidt %0" :: "m" (idt_descr)); + load_gdt((const struct desc_struct *)&cpu_gdt_descr[cpu]); + load_idt((const str...
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 01/17] paravirt_ops - core changes
...ptr *dtr) +{ + asm ("sidt %w0":"=m" (*dtr)); +} + +static unsigned long native_store_tr(void) +{ + unsigned long tr; + asm ("str %w0":"=r" (tr)); + return tr; +} + +static void native_load_tls(struct thread_struct *t, unsigned int cpu) +{ + u64 *gdt = (u64 *)(cpu_gdt(cpu) + GDT_ENTRY_TLS_MIN); + gdt[0] = t->tls_array[0]; + gdt[1] = t->tls_array[1]; + gdt[2] = t->tls_array[2]; +} + +static inline void native_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] = ent...
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 01/17] paravirt_ops - core changes
...ptr *dtr) +{ + asm ("sidt %w0":"=m" (*dtr)); +} + +static unsigned long native_store_tr(void) +{ + unsigned long tr; + asm ("str %w0":"=r" (tr)); + return tr; +} + +static void native_load_tls(struct thread_struct *t, unsigned int cpu) +{ + u64 *gdt = (u64 *)(cpu_gdt(cpu) + GDT_ENTRY_TLS_MIN); + gdt[0] = t->tls_array[0]; + gdt[1] = t->tls_array[1]; + gdt[2] = t->tls_array[2]; +} + +static inline void native_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] = ent...
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
...return -EINTR; + + maybe_do_interrupt(vcpu); + + try_to_freeze(); + + if (linfo->dead) + return -1; + + + local_irq_disable(); + + /* + * keep a pointer to the host GDT tss address. + * Do this after disabling interrupts to make sure we + * are on the same CPU. + */ + gdt_table = cpu_gdt(smp_processor_id()); + vcpu->host_gdt_ptr = (unsigned long)gdt_table; + asm volatile ("sidt %0" : "=m"(vcpu->host_idt)); + + /* Even if *we* don't want FPU trap, guest might... */ + if (vcpu->ts) + stts(); + + run_guest_once(vcpu); + + if (regs->trapnum =...
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
...return -EINTR; + + maybe_do_interrupt(vcpu); + + try_to_freeze(); + + if (linfo->dead) + return -1; + + + local_irq_disable(); + + /* + * keep a pointer to the host GDT tss address. + * Do this after disabling interrupts to make sure we + * are on the same CPU. + */ + gdt_table = cpu_gdt(smp_processor_id()); + vcpu->host_gdt_ptr = (unsigned long)gdt_table; + asm volatile ("sidt %0" : "=m"(vcpu->host_idt)); + + /* Even if *we* don't want FPU trap, guest might... */ + if (vcpu->ts) + stts(); + + run_guest_once(vcpu); + + if (regs->trapnum =...