From: Glauber de Oliveira Costa Date: Wed, 30 Jan 2008 12:33:19 +0000 (+0100) Subject: x86: puts read and write cr8 into pv_cpu_ops X-Git-Tag: v2.6.25-rc1~1143^2~242 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=4c9890c246121d070deb8cf5cf53e80caffc4dde;p=linux-2.6-omap-h63xx.git x86: puts read and write cr8 into pv_cpu_ops This patch adds room for read and write_cr8 functions back in pv_cpu_ops struct Signed-off-by: Glauber de Oliveira Costa Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner --- diff --git a/include/asm-x86/paravirt.h b/include/asm-x86/paravirt.h index c56b17a5eba..73547acbbbf 100644 --- a/include/asm-x86/paravirt.h +++ b/include/asm-x86/paravirt.h @@ -101,6 +101,11 @@ struct pv_cpu_ops { unsigned long (*read_cr4)(void); void (*write_cr4)(unsigned long); +#ifdef CONFIG_X86_64 + unsigned long (*read_cr8)(void); + void (*write_cr8)(unsigned long); +#endif + /* Segment descriptor handling */ void (*load_tr_desc)(void); void (*load_gdt)(const struct desc_ptr *); @@ -614,6 +619,16 @@ static inline void write_cr4(unsigned long x) PVOP_VCALL1(pv_cpu_ops.write_cr4, x); } +static inline unsigned long read_cr8(void) +{ + return PVOP_CALL0(unsigned long, pv_cpu_ops.read_cr8); +} + +static inline void write_cr8(unsigned long x) +{ + PVOP_VCALL1(pv_cpu_ops.write_cr8, x); +} + static inline void raw_safe_halt(void) { PVOP_VCALL0(pv_irq_ops.safe_halt);