Changeset View
Changeset View
Standalone View
Standalone View
sys/xen/interface/vm_event.h
Show All 23 Lines | |||||
* DEALINGS IN THE SOFTWARE. | * DEALINGS IN THE SOFTWARE. | ||||
*/ | */ | ||||
#ifndef _XEN_PUBLIC_VM_EVENT_H | #ifndef _XEN_PUBLIC_VM_EVENT_H | ||||
#define _XEN_PUBLIC_VM_EVENT_H | #define _XEN_PUBLIC_VM_EVENT_H | ||||
#include "xen.h" | #include "xen.h" | ||||
#define VM_EVENT_INTERFACE_VERSION 0x00000006 | #define VM_EVENT_INTERFACE_VERSION 0x00000007 | ||||
#if defined(__XEN__) || defined(__XEN_TOOLS__) | #if defined(__XEN__) || defined(__XEN_TOOLS__) | ||||
#include "io/ring.h" | #include "io/ring.h" | ||||
/* | /* | ||||
* Memory event flags | * Memory event flags | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 73 Lines • ▼ Show 20 Lines | |||||
* Execute fast singlestepping on vm_event response. | * Execute fast singlestepping on vm_event response. | ||||
* Requires the vCPU to be paused already (synchronous events only). | * Requires the vCPU to be paused already (synchronous events only). | ||||
* | * | ||||
* On a response requires setting the p2midx field of fast_singlestep to which | * On a response requires setting the p2midx field of fast_singlestep to which | ||||
* Xen will switch the vCPU to on the occurance of the first singlestep, after | * Xen will switch the vCPU to on the occurance of the first singlestep, after | ||||
* which singlestep gets automatically disabled. | * which singlestep gets automatically disabled. | ||||
*/ | */ | ||||
#define VM_EVENT_FLAG_FAST_SINGLESTEP (1 << 11) | #define VM_EVENT_FLAG_FAST_SINGLESTEP (1 << 11) | ||||
/* | |||||
* Set if the event comes from a nested VM and thus npt_base is valid. | |||||
*/ | |||||
#define VM_EVENT_FLAG_NESTED_P2M (1 << 12) | |||||
/* | |||||
* Reset the vmtrace buffer (if vmtrace is enabled) | |||||
*/ | |||||
#define VM_EVENT_FLAG_RESET_VMTRACE (1 << 13) | |||||
/* | /* | ||||
* Reasons for the vm event request | * Reasons for the vm event request | ||||
*/ | */ | ||||
/* Default case */ | /* Default case */ | ||||
#define VM_EVENT_REASON_UNKNOWN 0 | #define VM_EVENT_REASON_UNKNOWN 0 | ||||
/* Memory access violation */ | /* Memory access violation */ | ||||
▲ Show 20 Lines • Show All 73 Lines • ▼ Show 20 Lines | struct vm_event_regs_x86 { | ||||
uint64_t cr4; | uint64_t cr4; | ||||
uint64_t sysenter_cs; | uint64_t sysenter_cs; | ||||
uint64_t sysenter_esp; | uint64_t sysenter_esp; | ||||
uint64_t sysenter_eip; | uint64_t sysenter_eip; | ||||
uint64_t msr_efer; | uint64_t msr_efer; | ||||
uint64_t msr_star; | uint64_t msr_star; | ||||
uint64_t msr_lstar; | uint64_t msr_lstar; | ||||
uint64_t gdtr_base; | uint64_t gdtr_base; | ||||
/* | |||||
* When VM_EVENT_FLAG_NESTED_P2M is set, this event comes from a nested | |||||
* VM. npt_base is the guest physical address of the L1 hypervisors | |||||
* EPT/NPT tables for the nested guest. | |||||
* | |||||
* All bits outside of architectural address ranges are reserved for | |||||
* future metadata. | |||||
*/ | |||||
uint64_t npt_base; | |||||
/* | |||||
* Current position in the vmtrace buffer, or ~0 if vmtrace is not active. | |||||
* | |||||
* For Intel Processor Trace, it is the upper half of MSR_RTIT_OUTPUT_MASK. | |||||
*/ | |||||
uint64_t vmtrace_pos; | |||||
uint32_t cs_base; | uint32_t cs_base; | ||||
uint32_t ss_base; | uint32_t ss_base; | ||||
uint32_t ds_base; | uint32_t ds_base; | ||||
uint32_t es_base; | uint32_t es_base; | ||||
uint64_t fs_base; | uint64_t fs_base; | ||||
uint64_t gs_base; | uint64_t gs_base; | ||||
struct vm_event_x86_selector_reg cs; | struct vm_event_x86_selector_reg cs; | ||||
struct vm_event_x86_selector_reg ss; | struct vm_event_x86_selector_reg ss; | ||||
Show All 16 Lines | |||||
* Only the register 'pc' can be set on a vm_event response using the | * Only the register 'pc' can be set on a vm_event response using the | ||||
* VM_EVENT_FLAG_SET_REGISTERS flag. | * VM_EVENT_FLAG_SET_REGISTERS flag. | ||||
*/ | */ | ||||
struct vm_event_regs_arm { | struct vm_event_regs_arm { | ||||
uint64_t ttbr0; | uint64_t ttbr0; | ||||
uint64_t ttbr1; | uint64_t ttbr1; | ||||
uint64_t ttbcr; | uint64_t ttbcr; | ||||
uint64_t pc; | uint64_t pc; | ||||
uint32_t cpsr; | uint64_t cpsr; | ||||
uint32_t _pad; | |||||
}; | }; | ||||
/* | /* | ||||
* mem_access flag definitions | * mem_access flag definitions | ||||
* | * | ||||
* These flags are set only as part of a mem_event request. | * These flags are set only as part of a mem_event request. | ||||
* | * | ||||
* R/W/X: Defines the type of violation that has triggered the event | * R/W/X: Defines the type of violation that has triggered the event | ||||
▲ Show 20 Lines • Show All 163 Lines • Show Last 20 Lines |