Commit 4c9890c2 authored by Glauber de Oliveira Costa's avatar Glauber de Oliveira Costa Committed by Ingo Molnar

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: default avatarGlauber de Oliveira Costa <gcosta@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 04662713
...@@ -101,6 +101,11 @@ struct pv_cpu_ops { ...@@ -101,6 +101,11 @@ struct pv_cpu_ops {
unsigned long (*read_cr4)(void); unsigned long (*read_cr4)(void);
void (*write_cr4)(unsigned long); void (*write_cr4)(unsigned long);
#ifdef CONFIG_X86_64
unsigned long (*read_cr8)(void);
void (*write_cr8)(unsigned long);
#endif
/* Segment descriptor handling */ /* Segment descriptor handling */
void (*load_tr_desc)(void); void (*load_tr_desc)(void);
void (*load_gdt)(const struct desc_ptr *); void (*load_gdt)(const struct desc_ptr *);
...@@ -614,6 +619,16 @@ static inline void write_cr4(unsigned long x) ...@@ -614,6 +619,16 @@ static inline void write_cr4(unsigned long x)
PVOP_VCALL1(pv_cpu_ops.write_cr4, 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) static inline void raw_safe_halt(void)
{ {
PVOP_VCALL0(pv_irq_ops.safe_halt); PVOP_VCALL0(pv_irq_ops.safe_halt);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment