Commit e4a727ad authored by Vikram Narayanan's avatar Vikram Narayanan

merge/v4.8/lcd: Sync with kernel definitions

vmcs and resolve.c
Signed-off-by: Vikram Narayanan's avatarVikram Narayanan <vikram186@gmail.com>
parent 237e19b1
......@@ -51,31 +51,40 @@ static inline void vmcs_load(struct lcd_arch_vmcs *vmcs)
LCD_ERR("vmptrld %p/%llx failed\n", vmcs, hpa);
}
static __always_inline unsigned long vmcs_readl(unsigned long field)
static __always_inline unsigned long __vmcs_readl(unsigned long field)
{
unsigned long value;
asm volatile (ASM_VMX_VMREAD_RDX_RAX
: "=a"(value) : "d"(field) : "cc");
: "=a"(value) : "d"(field) : "cc");
return value;
}
static __always_inline u16 vmcs_read16(unsigned long field)
{
return vmcs_readl(field);
return __vmcs_readl(field);
}
static __always_inline u32 vmcs_read32(unsigned long field)
{
return vmcs_readl(field);
return __vmcs_readl(field);
}
static __always_inline u64 vmcs_read64(unsigned long field)
{
return vmcs_readl(field);
#ifdef CONFIG_X86_64
return __vmcs_readl(field);
#else
return __vmcs_readl(field) | ((u64)__vmcs_readl(field+1) << 32);
#endif
}
static __always_inline unsigned long vmcs_readl(unsigned long field)
{
return __vmcs_readl(field);
}
static inline void vmcs_writel(unsigned long field, unsigned long value)
static inline void __vmcs_writel(unsigned long field, unsigned long value)
{
u8 error;
......@@ -88,20 +97,30 @@ static inline void vmcs_writel(unsigned long field, unsigned long value)
}
}
static inline void vmcs_write16(unsigned long field, u16 value)
static __always_inline void vmcs_write16(unsigned long field, u16 value)
{
vmcs_writel(field, value);
__vmcs_writel(field, value);
}
static inline void vmcs_write32(unsigned long field, u32 value)
static __always_inline void vmcs_write32(unsigned long field, u32 value)
{
vmcs_writel(field, value);
__vmcs_writel(field, value);
}
static inline void vmcs_write64(unsigned long field, u64 value)
static __always_inline void vmcs_write64(unsigned long field, u64 value)
{
vmcs_writel(field, value);
__vmcs_writel(field, value);
#ifndef CONFIG_X86_64
asm volatile ("");
__vmcs_writel(field+1, value >> 32);
#endif
}
static __always_inline void vmcs_writel(unsigned long field, unsigned long value)
{
__vmcs_writel(field, value);
}
/**
* Loads t on the calling cpu.
*
......
......@@ -3,7 +3,7 @@
#include <linux/compiler.h>
#include <linux/spinlock_types.h>
#include <linux/ftrace_event.h>
#include <linux/ring_buffer.h>
#include <linux/perf_event.h>
#include <liblcd/liblcd.h>
......@@ -38,7 +38,7 @@ void warn_slowpath_null(const char *file, int line)
file, line);
}
void perf_tp_event(u64 addr, u64 count, void *record,
void perf_tp_event(u16 event_type, u64 count, void *record,
int entry_size, struct pt_regs *regs,
struct hlist_head *head, int rctx,
struct task_struct *task)
......
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