KVM
|
#include <linux/bits.h>
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/nospec.h>
#include <linux/kvm_host.h>
#include <linux/module.h>
#include <linux/stddef.h>
#include <linux/string.h>
#include <linux/vmalloc.h>
#include <linux/fs.h>
#include <kvm/arm_hypercalls.h>
#include <asm/cputype.h>
#include <linux/uaccess.h>
#include <asm/fpsimd.h>
#include <asm/kvm.h>
#include <asm/kvm_emulate.h>
#include <asm/kvm_nested.h>
#include <asm/sigcontext.h>
#include "trace.h"
Go to the source code of this file.
Classes | |
struct | sve_state_reg_region |
Macros | |
#define | vq_word(vq) (((vq) - SVE_VQ_MIN) / 64) |
#define | vq_mask(vq) ((u64)1 << ((vq) - SVE_VQ_MIN) % 64) |
#define | vq_present(vqs, vq) (!!((vqs)[vq_word(vq)] & vq_mask(vq))) |
#define | SVE_REG_SLICE_SHIFT 0 |
#define | SVE_REG_SLICE_BITS 5 |
#define | SVE_REG_ID_SHIFT (SVE_REG_SLICE_SHIFT + SVE_REG_SLICE_BITS) |
#define | SVE_REG_ID_BITS 5 |
#define | SVE_REG_SLICE_MASK |
#define | SVE_REG_ID_MASK GENMASK(SVE_REG_ID_SHIFT + SVE_REG_ID_BITS - 1, SVE_REG_ID_SHIFT) |
#define | SVE_NUM_SLICES (1 << SVE_REG_SLICE_BITS) |
#define | KVM_SVE_ZREG_SIZE KVM_REG_SIZE(KVM_REG_ARM64_SVE_ZREG(0, 0)) |
#define | KVM_SVE_PREG_SIZE KVM_REG_SIZE(KVM_REG_ARM64_SVE_PREG(0, 0)) |
#define | vcpu_sve_slices(vcpu) 1 |
#define | NUM_TIMER_REGS ARRAY_SIZE(timer_reg_list) |
Functions | |
static bool | core_reg_offset_is_vreg (u64 off) |
static u64 | core_reg_offset_from_id (u64 id) |
static int | core_reg_size_from_offset (const struct kvm_vcpu *vcpu, u64 off) |
static void * | core_reg_addr (struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg) |
static int | get_core_reg (struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg) |
static int | set_core_reg (struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg) |
static int | get_sve_vls (struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg) |
static int | set_sve_vls (struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg) |
static int | sve_reg_to_region (struct sve_state_reg_region *region, struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg) |
static int | get_sve_reg (struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg) |
static int | set_sve_reg (struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg) |
int | kvm_arch_vcpu_ioctl_get_regs (struct kvm_vcpu *vcpu, struct kvm_regs *regs) |
int | kvm_arch_vcpu_ioctl_set_regs (struct kvm_vcpu *vcpu, struct kvm_regs *regs) |
static int | copy_core_reg_indices (const struct kvm_vcpu *vcpu, u64 __user *uindices) |
static unsigned long | num_core_regs (const struct kvm_vcpu *vcpu) |
static bool | is_timer_reg (u64 index) |
static int | copy_timer_indices (struct kvm_vcpu *vcpu, u64 __user *uindices) |
static int | set_timer_reg (struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg) |
static int | get_timer_reg (struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg) |
static unsigned long | num_sve_regs (const struct kvm_vcpu *vcpu) |
static int | copy_sve_reg_indices (const struct kvm_vcpu *vcpu, u64 __user *uindices) |
unsigned long | kvm_arm_num_regs (struct kvm_vcpu *vcpu) |
int | kvm_arm_copy_reg_indices (struct kvm_vcpu *vcpu, u64 __user *uindices) |
int | kvm_arm_get_reg (struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg) |
int | kvm_arm_set_reg (struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg) |
int | kvm_arch_vcpu_ioctl_get_sregs (struct kvm_vcpu *vcpu, struct kvm_sregs *sregs) |
int | kvm_arch_vcpu_ioctl_set_sregs (struct kvm_vcpu *vcpu, struct kvm_sregs *sregs) |
int | __kvm_arm_vcpu_get_events (struct kvm_vcpu *vcpu, struct kvm_vcpu_events *events) |
int | __kvm_arm_vcpu_set_events (struct kvm_vcpu *vcpu, struct kvm_vcpu_events *events) |
u32 __attribute_const__ | kvm_target_cpu (void) |
int | kvm_arch_vcpu_ioctl_get_fpu (struct kvm_vcpu *vcpu, struct kvm_fpu *fpu) |
int | kvm_arch_vcpu_ioctl_set_fpu (struct kvm_vcpu *vcpu, struct kvm_fpu *fpu) |
int | kvm_arch_vcpu_ioctl_translate (struct kvm_vcpu *vcpu, struct kvm_translation *tr) |
int | kvm_arch_vcpu_ioctl_set_guest_debug (struct kvm_vcpu *vcpu, struct kvm_guest_debug *dbg) |
int | kvm_arm_vcpu_arch_set_attr (struct kvm_vcpu *vcpu, struct kvm_device_attr *attr) |
int | kvm_arm_vcpu_arch_get_attr (struct kvm_vcpu *vcpu, struct kvm_device_attr *attr) |
int | kvm_arm_vcpu_arch_has_attr (struct kvm_vcpu *vcpu, struct kvm_device_attr *attr) |
int | kvm_vm_ioctl_mte_copy_tags (struct kvm *kvm, struct kvm_arm_copy_mte_tags *copy_tags) |
Variables | |
const struct _kvm_stats_desc | kvm_vm_stats_desc [] |
const struct kvm_stats_header | kvm_vm_stats_header |
const struct _kvm_stats_desc | kvm_vcpu_stats_desc [] |
const struct kvm_stats_header | kvm_vcpu_stats_header |
static const u64 | timer_reg_list [] |
#define KVM_SVE_PREG_SIZE KVM_REG_SIZE(KVM_REG_ARM64_SVE_PREG(0, 0)) |
#define KVM_SVE_ZREG_SIZE KVM_REG_SIZE(KVM_REG_ARM64_SVE_ZREG(0, 0)) |
#define NUM_TIMER_REGS ARRAY_SIZE(timer_reg_list) |
#define SVE_NUM_SLICES (1 << SVE_REG_SLICE_BITS) |
#define SVE_REG_ID_MASK GENMASK(SVE_REG_ID_SHIFT + SVE_REG_ID_BITS - 1, SVE_REG_ID_SHIFT) |
#define SVE_REG_ID_SHIFT (SVE_REG_SLICE_SHIFT + SVE_REG_SLICE_BITS) |
#define SVE_REG_SLICE_MASK |
int __kvm_arm_vcpu_get_events | ( | struct kvm_vcpu * | vcpu, |
struct kvm_vcpu_events * | events | ||
) |
int __kvm_arm_vcpu_set_events | ( | struct kvm_vcpu * | vcpu, |
struct kvm_vcpu_events * | events | ||
) |
Definition at line 832 of file guest.c.
|
static |
Definition at line 545 of file guest.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 186 of file guest.c.
|
static |
Definition at line 484 of file guest.c.
|
static |
|
static |
Definition at line 642 of file guest.c.
|
static |
int kvm_arch_vcpu_ioctl_get_fpu | ( | struct kvm_vcpu * | vcpu, |
struct kvm_fpu * | fpu | ||
) |
int kvm_arch_vcpu_ioctl_get_regs | ( | struct kvm_vcpu * | vcpu, |
struct kvm_regs * | regs | ||
) |
int kvm_arch_vcpu_ioctl_get_sregs | ( | struct kvm_vcpu * | vcpu, |
struct kvm_sregs * | sregs | ||
) |
int kvm_arch_vcpu_ioctl_set_fpu | ( | struct kvm_vcpu * | vcpu, |
struct kvm_fpu * | fpu | ||
) |
int kvm_arch_vcpu_ioctl_set_guest_debug | ( | struct kvm_vcpu * | vcpu, |
struct kvm_guest_debug * | dbg | ||
) |
kvm_arch_vcpu_ioctl_set_guest_debug - set up guest debugging @kvm: pointer to the KVM struct @kvm_guest_debug: the ioctl data buffer
This sets up and enables the VM for guest debugging. Userspace passes in a control flag to enable different debug types and potentially other architecture specific information in the rest of the structure.
Definition at line 913 of file guest.c.
int kvm_arch_vcpu_ioctl_set_regs | ( | struct kvm_vcpu * | vcpu, |
struct kvm_regs * | regs | ||
) |
int kvm_arch_vcpu_ioctl_set_sregs | ( | struct kvm_vcpu * | vcpu, |
struct kvm_sregs * | sregs | ||
) |
int kvm_arch_vcpu_ioctl_translate | ( | struct kvm_vcpu * | vcpu, |
struct kvm_translation * | tr | ||
) |
int kvm_arm_copy_reg_indices | ( | struct kvm_vcpu * | vcpu, |
u64 __user * | uindices | ||
) |
kvm_arm_copy_reg_indices - get indices of all registers.
We do core registers right here, then we append system regs.
Definition at line 735 of file guest.c.
int kvm_arm_get_reg | ( | struct kvm_vcpu * | vcpu, |
const struct kvm_one_reg * | reg | ||
) |
Definition at line 762 of file guest.c.
unsigned long kvm_arm_num_regs | ( | struct kvm_vcpu * | vcpu | ) |
kvm_arm_num_regs - how many registers do we present via KVM_GET_ONE_REG
This is for all registers.
Definition at line 717 of file guest.c.
int kvm_arm_set_reg | ( | struct kvm_vcpu * | vcpu, |
const struct kvm_one_reg * | reg | ||
) |
Definition at line 782 of file guest.c.
int kvm_arm_vcpu_arch_get_attr | ( | struct kvm_vcpu * | vcpu, |
struct kvm_device_attr * | attr | ||
) |
Definition at line 968 of file guest.c.
int kvm_arm_vcpu_arch_has_attr | ( | struct kvm_vcpu * | vcpu, |
struct kvm_device_attr * | attr | ||
) |
Definition at line 991 of file guest.c.
int kvm_arm_vcpu_arch_set_attr | ( | struct kvm_vcpu * | vcpu, |
struct kvm_device_attr * | attr | ||
) |
Definition at line 943 of file guest.c.
u32 __attribute_const__ kvm_target_cpu | ( | void | ) |
int kvm_vm_ioctl_mte_copy_tags | ( | struct kvm * | kvm, |
struct kvm_arm_copy_mte_tags * | copy_tags | ||
) |
Definition at line 1014 of file guest.c.
|
static |
|
static |
|
static |
|
static |
Definition at line 510 of file guest.c.
|
static |
|
static |
Definition at line 629 of file guest.c.
|
static |
const struct _kvm_stats_desc kvm_vcpu_stats_desc[] |
const struct kvm_stats_header kvm_vcpu_stats_header |
const struct _kvm_stats_desc kvm_vm_stats_desc[] |
const struct kvm_stats_header kvm_vm_stats_header |