KVM
|
#include <linux/bsearch.h>
Go to the source code of this file.
Classes | |
struct | sys_reg_params |
struct | sys_reg_desc |
Macros | |
#define | reg_to_encoding(x) |
#define | encoding_to_params(reg) |
#define | esr_sys64_to_params(esr) |
#define | esr_cp1x_32_to_params(esr) |
#define | REG_HIDDEN (1 << 0) /* hidden from userspace and guest */ |
#define | REG_HIDDEN_USER (1 << 1) /* hidden from userspace only */ |
#define | REG_RAZ (1 << 2) /* RAZ from userspace and guest */ |
#define | REG_USER_WI (1 << 3) /* WI from userspace only */ |
#define | AA32(_x) .aarch32_map = AA32_##_x |
#define | Op0(_x) .Op0 = _x |
#define | Op1(_x) .Op1 = _x |
#define | CRn(_x) .CRn = _x |
#define | CRm(_x) .CRm = _x |
#define | Op2(_x) .Op2 = _x |
#define | SYS_DESC(reg) |
Functions | |
static | __printf (2, 3) inline void print_sys_reg_msg(const struct sys_reg_params *p |
static char | va_start (va, fmt) |
kvm_pr_unimpl ("%pV { Op0(%2u), Op1(%2u), CRn(%2u), CRm(%2u), Op2(%2u), func_%s },\n", &(struct va_format){ fmt, &va }, p->Op0, p->Op1, p->CRn, p->CRm, p->Op2, p->is_write ? "write" :"read") | |
va_end (va) | |
static void | print_sys_reg_instr (const struct sys_reg_params *p) |
static bool | ignore_write (struct kvm_vcpu *vcpu, const struct sys_reg_params *p) |
static bool | read_zero (struct kvm_vcpu *vcpu, struct sys_reg_params *p) |
static u64 | reset_unknown (struct kvm_vcpu *vcpu, const struct sys_reg_desc *r) |
static u64 | reset_val (struct kvm_vcpu *vcpu, const struct sys_reg_desc *r) |
static unsigned int | sysreg_visibility (const struct kvm_vcpu *vcpu, const struct sys_reg_desc *r) |
static bool | sysreg_hidden (const struct kvm_vcpu *vcpu, const struct sys_reg_desc *r) |
static bool | sysreg_hidden_user (const struct kvm_vcpu *vcpu, const struct sys_reg_desc *r) |
static bool | sysreg_visible_as_raz (const struct kvm_vcpu *vcpu, const struct sys_reg_desc *r) |
static bool | sysreg_user_write_ignore (const struct kvm_vcpu *vcpu, const struct sys_reg_desc *r) |
static int | cmp_sys_reg (const struct sys_reg_desc *i1, const struct sys_reg_desc *i2) |
static int | match_sys_reg (const void *key, const void *elt) |
static const struct sys_reg_desc * | find_reg (const struct sys_reg_params *params, const struct sys_reg_desc table[], unsigned int num) |
const struct sys_reg_desc * | get_reg_by_id (u64 id, const struct sys_reg_desc table[], unsigned int num) |
int | kvm_arm_sys_reg_get_reg (struct kvm_vcpu *vcpu, const struct kvm_one_reg *) |
int | kvm_arm_sys_reg_set_reg (struct kvm_vcpu *vcpu, const struct kvm_one_reg *) |
int | kvm_sys_reg_get_user (struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg, const struct sys_reg_desc table[], unsigned int num) |
int | kvm_sys_reg_set_user (struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg, const struct sys_reg_desc table[], unsigned int num) |
Variables | |
static char * | fmt |
#define AA32 | ( | _x | ) | .aarch32_map = AA32_##_x |
Definition at line 236 of file sys_regs.h.
#define CRm | ( | _x | ) | .CRm = _x |
Definition at line 240 of file sys_regs.h.
#define CRn | ( | _x | ) | .CRn = _x |
Definition at line 239 of file sys_regs.h.
#define encoding_to_params | ( | reg | ) |
Definition at line 30 of file sys_regs.h.
#define esr_cp1x_32_to_params | ( | esr | ) |
Definition at line 45 of file sys_regs.h.
#define esr_sys64_to_params | ( | esr | ) |
Definition at line 37 of file sys_regs.h.
#define Op0 | ( | _x | ) | .Op0 = _x |
Definition at line 237 of file sys_regs.h.
#define Op1 | ( | _x | ) | .Op1 = _x |
Definition at line 238 of file sys_regs.h.
#define Op2 | ( | _x | ) | .Op2 = _x |
Definition at line 241 of file sys_regs.h.
#define REG_HIDDEN (1 << 0) /* hidden from userspace and guest */ |
Definition at line 97 of file sys_regs.h.
#define REG_HIDDEN_USER (1 << 1) /* hidden from userspace only */ |
Definition at line 98 of file sys_regs.h.
#define REG_RAZ (1 << 2) /* RAZ from userspace and guest */ |
Definition at line 99 of file sys_regs.h.
#define reg_to_encoding | ( | x | ) |
Definition at line 16 of file sys_regs.h.
#define REG_USER_WI (1 << 3) /* WI from userspace only */ |
Definition at line 100 of file sys_regs.h.
#define SYS_DESC | ( | reg | ) |
Definition at line 243 of file sys_regs.h.
|
static |
|
inlinestatic |
|
inlinestatic |
Definition at line 217 of file sys_regs.h.
const struct sys_reg_desc* get_reg_by_id | ( | u64 | id, |
const struct sys_reg_desc | table[], | ||
unsigned int | num | ||
) |
Definition at line 3528 of file sys_regs.c.
|
inlinestatic |
int kvm_arm_sys_reg_get_reg | ( | struct kvm_vcpu * | vcpu, |
const struct kvm_one_reg * | reg | ||
) |
Definition at line 3705 of file sys_regs.c.
int kvm_arm_sys_reg_set_reg | ( | struct kvm_vcpu * | vcpu, |
const struct kvm_one_reg * | reg | ||
) |
Definition at line 3749 of file sys_regs.c.
kvm_pr_unimpl | ( | "%pV { Op0(%2u), Op1(%2u), CRn(%2u), CRm(%2u), Op2(%2u), func_%s } | , |
\n" | , | ||
&(struct va_format){ fmt, &va } | , | ||
p-> | Op0, | ||
p-> | Op1, | ||
p-> | CRn, | ||
p-> | CRm, | ||
p-> | Op2, | ||
p->is_write ? "write" :"read" | |||
) |
int kvm_sys_reg_get_user | ( | struct kvm_vcpu * | vcpu, |
const struct kvm_one_reg * | reg, | ||
const struct sys_reg_desc | table[], | ||
unsigned int | num | ||
) |
Definition at line 3680 of file sys_regs.c.
int kvm_sys_reg_set_user | ( | struct kvm_vcpu * | vcpu, |
const struct kvm_one_reg * | reg, | ||
const struct sys_reg_desc | table[], | ||
unsigned int | num | ||
) |
Definition at line 3721 of file sys_regs.c.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Definition at line 162 of file sys_regs.h.
|
inlinestatic |
Definition at line 168 of file sys_regs.h.
|
inlinestatic |
Definition at line 183 of file sys_regs.h.
|
inlinestatic |
|
inlinestatic |
Definition at line 177 of file sys_regs.h.
va_end | ( | va | ) |
static char va_start | ( | va | , |
fmt | |||
) |
char* fmt |
Definition at line 104 of file sys_regs.h.