303
303
#ifdef CONFIG_PARAVIRT
304
304
#include <asm/paravirt.h>
306
#define read_cr0() (native_read_cr0())
307
#define write_cr0(x) (native_write_cr0(x))
308
#define read_cr2() (native_read_cr2())
309
#define write_cr2(x) (native_write_cr2(x))
310
#define read_cr3() (native_read_cr3())
311
#define write_cr3(x) (native_write_cr3(x))
312
#define read_cr4() (native_read_cr4())
313
#define read_cr4_safe() (native_read_cr4_safe())
314
#define write_cr4(x) (native_write_cr4(x))
315
#define wbinvd() (native_wbinvd())
307
static inline unsigned long read_cr0(void)
309
return native_read_cr0();
312
static inline void write_cr0(unsigned long x)
317
static inline unsigned long read_cr2(void)
319
return native_read_cr2();
322
static inline void write_cr2(unsigned long x)
327
static inline unsigned long read_cr3(void)
329
return native_read_cr3();
332
static inline void write_cr3(unsigned long x)
337
static inline unsigned long read_cr4(void)
339
return native_read_cr4();
342
static inline unsigned long read_cr4_safe(void)
344
return native_read_cr4_safe();
347
static inline void write_cr4(unsigned long x)
352
static inline void wbinvd(void)
316
357
#ifdef CONFIG_X86_64
317
#define read_cr8() (native_read_cr8())
318
#define write_cr8(x) (native_write_cr8(x))
319
#define load_gs_index native_load_gs_index
359
static inline unsigned long read_cr8(void)
361
return native_read_cr8();
364
static inline void write_cr8(unsigned long x)
369
static inline void load_gs_index(unsigned selector)
371
native_load_gs_index(selector);
322
376
/* Clear the 'TS' bit */
323
#define clts() (native_clts())
377
static inline void clts(void)
325
382
#endif/* CONFIG_PARAVIRT */