search for: read_cr0

Displaying 20 results from an estimated 127 matches for "read_cr0".

2012 Jun 29
0
[PATCH] linux-2.6.18/x86: improve CR0 read/write handling
...NE_PER_CPU(unsigned int, xen_x86_cr0); +EXPORT_PER_CPU_SYMBOL(xen_x86_cr0); #endif static int cachesize_override __cpuinitdata = -1; @@ -681,6 +684,7 @@ old_gdt: cpu_gdt_descr->size = GDT_SIZE - 1; cpu_gdt_descr->address = (unsigned long)gdt; #else + __get_cpu_var(xen_x86_cr0) = raw_read_cr0(); if (cpu == 0 && cpu_gdt_descr->address == 0) { gdt = (struct desc_struct *)alloc_bootmem_pages(PAGE_SIZE); /* alloc_bootmem_pages panics on failure, so no check */ --- a/arch/i386/kernel/process-xen.c +++ b/arch/i386/kernel/process-xen.c @@ -641,6 +641,8 @@ struct task_struct...
2007 Apr 18
5
[PATCH] paravirt.h
...crypto_tfm, __crt_ctx); +#ifdef CONFIG_PARAVIRT + OFFSET(PARAVIRT_irq_disable, paravirt_ops, irq_disable); + OFFSET(PARAVIRT_irq_enable, paravirt_ops, irq_enable); + OFFSET(PARAVIRT_irq_enable_sysexit, paravirt_ops, irq_enable_sysexit); + OFFSET(PARAVIRT_iret, paravirt_ops, iret); + OFFSET(PARAVIRT_read_cr0, paravirt_ops, read_cr0); +#endif } =================================================================== --- a/arch/i386/kernel/entry.S +++ b/arch/i386/kernel/entry.S @@ -76,13 +76,6 @@ NT_MASK = 0x00004000 NT_MASK = 0x00004000 VM_MASK = 0x00020000 -/* These are replaces for paravirtualizati...
2007 Apr 18
5
[PATCH] paravirt.h
...crypto_tfm, __crt_ctx); +#ifdef CONFIG_PARAVIRT + OFFSET(PARAVIRT_irq_disable, paravirt_ops, irq_disable); + OFFSET(PARAVIRT_irq_enable, paravirt_ops, irq_enable); + OFFSET(PARAVIRT_irq_enable_sysexit, paravirt_ops, irq_enable_sysexit); + OFFSET(PARAVIRT_iret, paravirt_ops, iret); + OFFSET(PARAVIRT_read_cr0, paravirt_ops, read_cr0); +#endif } =================================================================== --- a/arch/i386/kernel/entry.S +++ b/arch/i386/kernel/entry.S @@ -76,13 +76,6 @@ NT_MASK = 0x00004000 NT_MASK = 0x00004000 VM_MASK = 0x00020000 -/* These are replaces for paravirtualizati...
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 03/17] paravirt_ops - system routines
...h +++ clean-start/include/asm-x86_64/system.h @@ -65,46 +65,84 @@ extern void load_gs_index(unsigned); ".previous" \ : :"r" (value), "r" (0)) +static inline void native_clts(void) +{ + asm volatile ("clts"); +} + +static inline unsigned long native_read_cr0(void) +{ + unsigned long val; + asm volatile("movq %%cr0,%0\n\t" :"=r" (val)); + return val; +} + +static inline void native_write_cr0(unsigned long val) +{ + asm volatile("movq %0,%%cr0": :"r" (val)); +} + +static inline unsigned long native_read_cr2(void) +...
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 03/17] paravirt_ops - system routines
...h +++ clean-start/include/asm-x86_64/system.h @@ -65,46 +65,84 @@ extern void load_gs_index(unsigned); ".previous" \ : :"r" (value), "r" (0)) +static inline void native_clts(void) +{ + asm volatile ("clts"); +} + +static inline unsigned long native_read_cr0(void) +{ + unsigned long val; + asm volatile("movq %%cr0,%0\n\t" :"=r" (val)); + return val; +} + +static inline void native_write_cr0(unsigned long val) +{ + asm volatile("movq %0,%%cr0": :"r" (val)); +} + +static inline unsigned long native_read_cr2(void) +...
2007 Apr 18
0
[RFC, PATCH 13/24] i386 Vmi system header
...+85,8 @@ __asm__ __volatile__ ("movw %%dx,%1\n\t" #define savesegment(seg, value) \ asm volatile("mov %%" #seg ",%0":"=rm" (value)) -/* - * Clear and set 'TS' bit respectively - */ -#define clts() __asm__ __volatile__ ("clts") -#define read_cr0() ({ \ - unsigned int __dummy; \ - __asm__ __volatile__( \ - "movl %%cr0,%0\n\t" \ - :"=r" (__dummy)); \ - __dummy; \ -}) -#define write_cr0(x) \ - __asm__ __volatile__("movl %0,%%cr0": :"r" (x)); - -#define read_cr2() ({ \ - unsigned int __dummy; \ - __asm...
2007 Apr 18
0
[RFC, PATCH 13/24] i386 Vmi system header
...+85,8 @@ __asm__ __volatile__ ("movw %%dx,%1\n\t" #define savesegment(seg, value) \ asm volatile("mov %%" #seg ",%0":"=rm" (value)) -/* - * Clear and set 'TS' bit respectively - */ -#define clts() __asm__ __volatile__ ("clts") -#define read_cr0() ({ \ - unsigned int __dummy; \ - __asm__ __volatile__( \ - "movl %%cr0,%0\n\t" \ - :"=r" (__dummy)); \ - __dummy; \ -}) -#define write_cr0(x) \ - __asm__ __volatile__("movl %0,%%cr0": :"r" (x)); - -#define read_cr2() ({ \ - unsigned int __dummy; \ - __asm...
2007 Jul 09
1
[PATCH RFC] first cut at splitting up paravirt_ops
...AVIRT_enabled, paravirt_ops, paravirt_enabled); - OFFSET(PARAVIRT_irq_disable, paravirt_ops, irq_disable); - OFFSET(PARAVIRT_irq_enable, paravirt_ops, irq_enable); - OFFSET(PARAVIRT_irq_enable_sysexit, paravirt_ops, irq_enable_sysexit); - OFFSET(PARAVIRT_iret, paravirt_ops, iret); - OFFSET(PARAVIRT_read_cr0, paravirt_ops, read_cr0); + OFFSET(PARAVIRT_enabled, pv_info, paravirt_enabled); + OFFSET(PARAVIRT_irq_disable, pv_irq_ops, irq_disable); + OFFSET(PARAVIRT_irq_enable, pv_irq_ops, irq_enable); + OFFSET(PARAVIRT_irq_enable_sysexit, pv_cpu_ops, irq_enable_sysexit); + OFFSET(PARAVIRT_iret, pv_cpu_ops,...
2007 Jul 09
1
[PATCH RFC] first cut at splitting up paravirt_ops
...AVIRT_enabled, paravirt_ops, paravirt_enabled); - OFFSET(PARAVIRT_irq_disable, paravirt_ops, irq_disable); - OFFSET(PARAVIRT_irq_enable, paravirt_ops, irq_enable); - OFFSET(PARAVIRT_irq_enable_sysexit, paravirt_ops, irq_enable_sysexit); - OFFSET(PARAVIRT_iret, paravirt_ops, iret); - OFFSET(PARAVIRT_read_cr0, paravirt_ops, read_cr0); + OFFSET(PARAVIRT_enabled, pv_info, paravirt_enabled); + OFFSET(PARAVIRT_irq_disable, pv_irq_ops, irq_disable); + OFFSET(PARAVIRT_irq_enable, pv_irq_ops, irq_enable); + OFFSET(PARAVIRT_irq_enable_sysexit, pv_cpu_ops, irq_enable_sysexit); + OFFSET(PARAVIRT_iret, pv_cpu_ops,...
2007 Apr 18
2
[PATCH] Use correct macros in raid code, not raw asm
...a/drivers/md/raid6x86.h Thu Dec 28 16:52:54 2006 +1100 +++ b/drivers/md/raid6x86.h Fri Dec 29 10:09:38 2006 +1100 @@ -75,13 +75,14 @@ static inline unsigned long raid6_get_fp unsigned long cr0; preempt_disable(); - asm volatile("mov %%cr0,%0 ; clts" : "=r" (cr0)); + cr0 = read_cr0(); + clts(); return cr0; } static inline void raid6_put_fpu(unsigned long cr0) { - asm volatile("mov %0,%%cr0" : : "r" (cr0)); + write_cr0(cr0); preempt_enable(); }
2007 Apr 18
2
[PATCH] Use correct macros in raid code, not raw asm
...a/drivers/md/raid6x86.h Thu Dec 28 16:52:54 2006 +1100 +++ b/drivers/md/raid6x86.h Fri Dec 29 10:09:38 2006 +1100 @@ -75,13 +75,14 @@ static inline unsigned long raid6_get_fp unsigned long cr0; preempt_disable(); - asm volatile("mov %%cr0,%0 ; clts" : "=r" (cr0)); + cr0 = read_cr0(); + clts(); return cr0; } static inline void raid6_put_fpu(unsigned long cr0) { - asm volatile("mov %0,%%cr0" : : "r" (cr0)); + write_cr0(cr0); preempt_enable(); }
2012 Dec 19
1
[PATCH] x86: also print CRn register values upon double fault
...regs->r10, regs->r11); - printk("r12: %016lx r13: %016lx r14: %016lx\n", - regs->r12, regs->r13, regs->r14); - printk("r15: %016lx cs: %016lx ss: %016lx\n", - regs->r15, (long)regs->cs, (long)regs->ss); + + crs[0] = read_cr0(); + crs[2] = read_cr2(); + crs[3] = read_cr3(); + crs[4] = read_cr4(); + regs->ds = read_segment_register(ds); + regs->es = read_segment_register(es); + regs->fs = read_segment_register(fs); + regs->gs = read_segment_register(gs); + + printk("CPU: %d\n&q...
2007 Apr 18
3
[PATCH 1/2] paravirt.h header
...crypto_tfm, __crt_ctx); +#ifdef CONFIG_PARAVIRT + OFFSET(PARAVIRT_irq_disable, paravirt_ops, irq_disable); + OFFSET(PARAVIRT_irq_enable, paravirt_ops, irq_enable); + OFFSET(PARAVIRT_irq_enable_sysexit, paravirt_ops, irq_enable_sysexit); + OFFSET(PARAVIRT_iret, paravirt_ops, iret); + OFFSET(PARAVIRT_read_cr0, paravirt_ops, read_cr0); +#endif } =================================================================== --- a/arch/i386/kernel/entry.S +++ b/arch/i386/kernel/entry.S @@ -803,6 +803,15 @@ 1: INTERRUPT_RETURN .long 1b,iret_exc .previous +#ifdef CONFIG_PARAVIRT +ENTRY(nopara_iret) + iret + +ENTR...
2007 Oct 09
2
[PATCH RFC REPOST 1/2] paravirt: refactor struct paravirt_ops into smaller pv_*_ops
...AVIRT_enabled, paravirt_ops, paravirt_enabled); - OFFSET(PARAVIRT_irq_disable, paravirt_ops, irq_disable); - OFFSET(PARAVIRT_irq_enable, paravirt_ops, irq_enable); - OFFSET(PARAVIRT_irq_enable_sysexit, paravirt_ops, irq_enable_sysexit); - OFFSET(PARAVIRT_iret, paravirt_ops, iret); - OFFSET(PARAVIRT_read_cr0, paravirt_ops, read_cr0); + OFFSET(PARAVIRT_enabled, pv_info, paravirt_enabled); + OFFSET(PARAVIRT_irq_disable, paravirt_ops, pv_irq_ops.irq_disable); + OFFSET(PARAVIRT_irq_enable, paravirt_ops, pv_irq_ops.irq_enable); + OFFSET(PARAVIRT_irq_enable_sysexit, paravirt_ops, pv_cpu_ops.irq_enable_sysexi...
2007 Oct 09
2
[PATCH RFC REPOST 1/2] paravirt: refactor struct paravirt_ops into smaller pv_*_ops
...AVIRT_enabled, paravirt_ops, paravirt_enabled); - OFFSET(PARAVIRT_irq_disable, paravirt_ops, irq_disable); - OFFSET(PARAVIRT_irq_enable, paravirt_ops, irq_enable); - OFFSET(PARAVIRT_irq_enable_sysexit, paravirt_ops, irq_enable_sysexit); - OFFSET(PARAVIRT_iret, paravirt_ops, iret); - OFFSET(PARAVIRT_read_cr0, paravirt_ops, read_cr0); + OFFSET(PARAVIRT_enabled, pv_info, paravirt_enabled); + OFFSET(PARAVIRT_irq_disable, paravirt_ops, pv_irq_ops.irq_disable); + OFFSET(PARAVIRT_irq_enable, paravirt_ops, pv_irq_ops.irq_enable); + OFFSET(PARAVIRT_irq_enable_sysexit, paravirt_ops, pv_cpu_ops.irq_enable_sysexi...
2007 Sep 28
2
[PATCH RFC] paravirt_ops: refactor struct paravirt_ops into smaller pv_*_ops
...AVIRT_enabled, paravirt_ops, paravirt_enabled); - OFFSET(PARAVIRT_irq_disable, paravirt_ops, irq_disable); - OFFSET(PARAVIRT_irq_enable, paravirt_ops, irq_enable); - OFFSET(PARAVIRT_irq_enable_sysexit, paravirt_ops, irq_enable_sysexit); - OFFSET(PARAVIRT_iret, paravirt_ops, iret); - OFFSET(PARAVIRT_read_cr0, paravirt_ops, read_cr0); + OFFSET(PARAVIRT_enabled, pv_info, paravirt_enabled); + OFFSET(PARAVIRT_irq_disable, paravirt_ops, pv_irq_ops.irq_disable); + OFFSET(PARAVIRT_irq_enable, paravirt_ops, pv_irq_ops.irq_enable); + OFFSET(PARAVIRT_irq_enable_sysexit, paravirt_ops, pv_cpu_ops.irq_enable_sysexi...
2007 Sep 28
2
[PATCH RFC] paravirt_ops: refactor struct paravirt_ops into smaller pv_*_ops
...AVIRT_enabled, paravirt_ops, paravirt_enabled); - OFFSET(PARAVIRT_irq_disable, paravirt_ops, irq_disable); - OFFSET(PARAVIRT_irq_enable, paravirt_ops, irq_enable); - OFFSET(PARAVIRT_irq_enable_sysexit, paravirt_ops, irq_enable_sysexit); - OFFSET(PARAVIRT_iret, paravirt_ops, iret); - OFFSET(PARAVIRT_read_cr0, paravirt_ops, read_cr0); + OFFSET(PARAVIRT_enabled, pv_info, paravirt_enabled); + OFFSET(PARAVIRT_irq_disable, paravirt_ops, pv_irq_ops.irq_disable); + OFFSET(PARAVIRT_irq_enable, paravirt_ops, pv_irq_ops.irq_enable); + OFFSET(PARAVIRT_irq_enable_sysexit, paravirt_ops, pv_cpu_ops.irq_enable_sysexi...
2017 Sep 04
0
[PATCH] x86/paravirt: remove no longer used paravirt functions
...= native_pmd_val(pmd); diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h index 9ffc36bfe4cd..680624a13c69 100644 --- a/arch/x86/include/asm/paravirt_types.h +++ b/arch/x86/include/asm/paravirt_types.h @@ -107,7 +107,6 @@ struct pv_cpu_ops { unsigned long (*read_cr0)(void); void (*write_cr0)(unsigned long); - unsigned long (*read_cr4)(void); void (*write_cr4)(unsigned long); #ifdef CONFIG_X86_64 @@ -119,8 +118,6 @@ struct pv_cpu_ops { void (*load_tr_desc)(void); void (*load_gdt)(const struct desc_ptr *); void (*load_idt)(const struct desc_ptr *)...
2017 Sep 04
0
[PATCH] x86/paravirt: remove no longer used paravirt functions
...= native_pmd_val(pmd); diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h index 9ffc36bfe4cd..680624a13c69 100644 --- a/arch/x86/include/asm/paravirt_types.h +++ b/arch/x86/include/asm/paravirt_types.h @@ -107,7 +107,6 @@ struct pv_cpu_ops { unsigned long (*read_cr0)(void); void (*write_cr0)(unsigned long); - unsigned long (*read_cr4)(void); void (*write_cr4)(unsigned long); #ifdef CONFIG_X86_64 @@ -119,8 +118,6 @@ struct pv_cpu_ops { void (*load_tr_desc)(void); void (*load_gdt)(const struct desc_ptr *); void (*load_idt)(const struct desc_ptr *)...
2007 Apr 18
3
[PATCH 1/4] x86 paravirt_ops: create no_paravirt.h for native ops
...e <linux/bitops.h> /* for LOCK_PREFIX */ +#include <asm/paravirt.h> #ifdef __KERNEL__ @@ -82,67 +83,10 @@ __asm__ __volatile__ ("movw %%dx,%1\n\t" #define savesegment(seg, value) \ asm volatile("mov %%" #seg ",%0":"=rm" (value)) -#define read_cr0() ({ \ - unsigned int __dummy; \ - __asm__ __volatile__( \ - "movl %%cr0,%0\n\t" \ - :"=r" (__dummy)); \ - __dummy; \ -}) -#define write_cr0(x) \ - __asm__ __volatile__("movl %0,%%cr0": :"r" (x)) - -#define read_cr2() ({ \ - unsigned int __dummy; \ - __asm_...