2018-03-07 20:57:14 +08:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2018 Intel Corporation. All rights reserved.
|
|
|
|
*
|
2018-05-26 01:49:13 +08:00
|
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
2018-03-07 20:57:14 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _VCPU_H_
|
|
|
|
#define _VCPU_H_
|
|
|
|
|
2018-07-17 14:16:06 +08:00
|
|
|
#define ACRN_VCPU_MMIO_COMPLETE (0U)
|
2018-03-07 20:57:14 +08:00
|
|
|
|
|
|
|
/* Size of various elements within the VCPU structure */
|
|
|
|
#define REG_SIZE 8
|
|
|
|
|
|
|
|
/* Number of GPRs saved / restored for guest in VCPU structure */
|
2018-07-24 18:50:37 +08:00
|
|
|
#define NUM_GPRS 16U
|
2018-03-07 20:57:14 +08:00
|
|
|
#define GUEST_STATE_AREA_SIZE 512
|
|
|
|
|
2018-07-06 13:05:10 +08:00
|
|
|
#define CPU_CONTEXT_OFFSET_RAX 0U
|
2018-07-24 18:50:37 +08:00
|
|
|
#define CPU_CONTEXT_OFFSET_RCX 8U
|
|
|
|
#define CPU_CONTEXT_OFFSET_RDX 16U
|
|
|
|
#define CPU_CONTEXT_OFFSET_RBX 24U
|
|
|
|
#define CPU_CONTEXT_OFFSET_RSP 32U
|
|
|
|
#define CPU_CONTEXT_OFFSET_RBP 40U
|
|
|
|
#define CPU_CONTEXT_OFFSET_RSI 48U
|
|
|
|
#define CPU_CONTEXT_OFFSET_RDI 56U
|
|
|
|
#define CPU_CONTEXT_OFFSET_R8 64U
|
|
|
|
#define CPU_CONTEXT_OFFSET_R9 72U
|
|
|
|
#define CPU_CONTEXT_OFFSET_R10 80U
|
|
|
|
#define CPU_CONTEXT_OFFSET_R11 88U
|
|
|
|
#define CPU_CONTEXT_OFFSET_R12 96U
|
|
|
|
#define CPU_CONTEXT_OFFSET_R13 104U
|
|
|
|
#define CPU_CONTEXT_OFFSET_R14 112U
|
|
|
|
#define CPU_CONTEXT_OFFSET_R15 120U
|
|
|
|
#define CPU_CONTEXT_OFFSET_CR0 128U
|
|
|
|
#define CPU_CONTEXT_OFFSET_CR2 136U
|
2018-07-29 16:05:37 +08:00
|
|
|
#define CPU_CONTEXT_OFFSET_CR4 144U
|
|
|
|
#define CPU_CONTEXT_OFFSET_RIP 152U
|
|
|
|
#define CPU_CONTEXT_OFFSET_RFLAGS 160U
|
|
|
|
#define CPU_CONTEXT_OFFSET_IA32_SPEC_CTRL 168U
|
|
|
|
#define CPU_CONTEXT_OFFSET_IA32_EFER 176U
|
|
|
|
#define CPU_CONTEXT_OFFSET_EXTCTX_START 184U
|
|
|
|
#define CPU_CONTEXT_OFFSET_CR3 184U
|
|
|
|
#define CPU_CONTEXT_OFFSET_IDTR 192U
|
|
|
|
#define CPU_CONTEXT_OFFSET_LDTR 216U
|
2018-03-07 20:57:14 +08:00
|
|
|
|
|
|
|
/*sizes of various registers within the VCPU data structure */
|
|
|
|
#define VMX_CPU_S_FXSAVE_GUEST_AREA_SIZE GUEST_STATE_AREA_SIZE
|
|
|
|
|
|
|
|
#ifndef ASSEMBLER
|
|
|
|
|
2018-07-13 17:11:27 +08:00
|
|
|
#include <guest.h>
|
2018-07-28 22:08:29 +08:00
|
|
|
#include <gpr.h>
|
2018-07-13 17:11:27 +08:00
|
|
|
|
2018-03-07 20:57:14 +08:00
|
|
|
enum vcpu_state {
|
|
|
|
VCPU_INIT,
|
|
|
|
VCPU_RUNNING,
|
|
|
|
VCPU_PAUSED,
|
|
|
|
VCPU_ZOMBIE,
|
|
|
|
VCPU_UNKNOWN_STATE,
|
|
|
|
};
|
|
|
|
|
2018-07-12 11:47:49 +08:00
|
|
|
enum vm_cpu_mode {
|
|
|
|
CPU_MODE_REAL,
|
|
|
|
CPU_MODE_PROTECTED,
|
|
|
|
CPU_MODE_COMPATIBILITY, /* IA-32E mode (CS.L = 0) */
|
|
|
|
CPU_MODE_64BIT, /* IA-32E mode (CS.L = 1) */
|
|
|
|
};
|
|
|
|
|
2018-07-27 16:20:58 +08:00
|
|
|
struct segment_sel {
|
2018-07-16 15:43:25 +08:00
|
|
|
uint16_t selector;
|
2018-03-07 20:57:14 +08:00
|
|
|
uint64_t base;
|
2018-07-16 15:43:25 +08:00
|
|
|
uint32_t limit;
|
|
|
|
uint32_t attr;
|
2018-03-07 20:57:14 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct run_context {
|
|
|
|
/* Contains the guest register set.
|
|
|
|
* NOTE: This must be the first element in the structure, so that the offsets
|
|
|
|
* in vmx_asm.S match
|
|
|
|
*/
|
|
|
|
union {
|
2018-07-24 18:50:37 +08:00
|
|
|
struct cpu_gp_regs regs;
|
2018-03-07 20:57:14 +08:00
|
|
|
uint64_t longs[NUM_GPRS];
|
|
|
|
} guest_cpu_regs;
|
|
|
|
|
|
|
|
/** The guests CR registers 0, 2, 3 and 4. */
|
|
|
|
uint64_t cr0;
|
|
|
|
|
2018-07-29 16:05:37 +08:00
|
|
|
/* CPU_CONTEXT_OFFSET_CR2 =
|
|
|
|
* offsetof(struct run_context, cr2) = 136
|
2018-03-07 20:57:14 +08:00
|
|
|
*/
|
|
|
|
uint64_t cr2;
|
|
|
|
uint64_t cr4;
|
|
|
|
|
|
|
|
uint64_t rip;
|
|
|
|
uint64_t rflags;
|
|
|
|
|
2018-07-29 16:05:37 +08:00
|
|
|
/* CPU_CONTEXT_OFFSET_IA32_SPEC_CTRL =
|
|
|
|
* offsetof(struct run_context, ia32_spec_ctrl) = 168
|
2018-03-07 20:57:14 +08:00
|
|
|
*/
|
|
|
|
uint64_t ia32_spec_ctrl;
|
2018-07-29 16:05:37 +08:00
|
|
|
uint64_t ia32_efer;
|
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
* extended context does not save/restore during vm exity/entry, it's mainly
|
|
|
|
* used in trusty world switch
|
|
|
|
*/
|
|
|
|
struct ext_context {
|
|
|
|
uint64_t cr3;
|
|
|
|
|
|
|
|
/* segment registers */
|
|
|
|
struct segment_sel idtr;
|
|
|
|
struct segment_sel ldtr;
|
|
|
|
struct segment_sel gdtr;
|
|
|
|
struct segment_sel tr;
|
|
|
|
struct segment_sel cs;
|
|
|
|
struct segment_sel ss;
|
|
|
|
struct segment_sel ds;
|
|
|
|
struct segment_sel es;
|
|
|
|
struct segment_sel fs;
|
|
|
|
struct segment_sel gs;
|
|
|
|
|
2018-03-07 20:57:14 +08:00
|
|
|
uint64_t ia32_star;
|
|
|
|
uint64_t ia32_lstar;
|
|
|
|
uint64_t ia32_fmask;
|
|
|
|
uint64_t ia32_kernel_gs_base;
|
|
|
|
|
|
|
|
uint64_t ia32_pat;
|
2018-06-22 07:51:21 +08:00
|
|
|
uint64_t vmx_ia32_pat;
|
2018-07-16 15:43:25 +08:00
|
|
|
uint32_t ia32_sysenter_cs;
|
2018-03-07 20:57:14 +08:00
|
|
|
uint64_t ia32_sysenter_esp;
|
|
|
|
uint64_t ia32_sysenter_eip;
|
|
|
|
uint64_t ia32_debugctl;
|
|
|
|
|
2018-07-29 16:05:37 +08:00
|
|
|
uint64_t dr7;
|
|
|
|
uint64_t tsc_offset;
|
|
|
|
|
2018-06-16 14:46:51 +08:00
|
|
|
uint64_t vmx_cr0;
|
|
|
|
uint64_t vmx_cr4;
|
2018-07-29 16:05:37 +08:00
|
|
|
uint64_t vmx_cr0_read_shadow;
|
|
|
|
uint64_t vmx_cr4_read_shadow;
|
2018-03-07 20:57:14 +08:00
|
|
|
|
|
|
|
/* The 512 bytes area to save the FPU/MMX/SSE states for the guest */
|
|
|
|
uint64_t
|
|
|
|
fxstore_guest_area[VMX_CPU_S_FXSAVE_GUEST_AREA_SIZE / sizeof(uint64_t)]
|
|
|
|
__aligned(16);
|
|
|
|
};
|
|
|
|
|
|
|
|
/* 2 worlds: 0 for Normal World, 1 for Secure World */
|
|
|
|
#define NR_WORLD 2
|
|
|
|
#define NORMAL_WORLD 0
|
|
|
|
#define SECURE_WORLD 1
|
|
|
|
|
2018-02-28 19:33:13 +08:00
|
|
|
struct event_injection_info {
|
|
|
|
uint32_t intr_info;
|
|
|
|
uint32_t error_code;
|
|
|
|
};
|
|
|
|
|
2018-07-29 16:05:37 +08:00
|
|
|
struct cpu_context {
|
|
|
|
struct run_context run_ctx;
|
|
|
|
struct ext_context ext_ctx;
|
|
|
|
};
|
|
|
|
|
2018-03-07 20:57:14 +08:00
|
|
|
struct vcpu_arch {
|
|
|
|
int cur_context;
|
2018-07-29 16:05:37 +08:00
|
|
|
struct cpu_context contexts[NR_WORLD];
|
2018-03-07 20:57:14 +08:00
|
|
|
|
|
|
|
/* A pointer to the VMCS for this CPU. */
|
|
|
|
void *vmcs;
|
HV:treewide:Add 16-bit atomic operations and update vpid type
There are some integer type conversions reported by static
analysis tool for vcpu id, number of created vcpus, and
vpid, to reduce these type conversions, redesign vcpu id,
number of created vcpus, and vpid type as uint16_t as per
their usage, related 16-bit atomic operations shall be
added in HV.
MISRA C requires that all unsigned constants should have the suffix 'U'
(e.g. 0xffU), but the assembler may not accept such C-style constants.
Add 16-bit atomic add/dec/store operations;
Update temporary variables type and parameters type of
related caller;
Update vpid type as uint16_t;
Replace Macro with constant value for CPU_PAGE_SIZE.
Note: According to SDM A.10, there are some bits defined
in the IA32_VMX_EPT_VPID_CAP MSR to support the INVVPID
instruction, these bits don't mean actual VPID, so
the vpid field in the data struct vmx_capability doesn't
be updated.
V1--V2:
update comments for assembly code as per coding style;
Signed-off-by: Xiangyang Wu <xiangyang.wu@intel.com>
2018-07-11 11:09:10 +08:00
|
|
|
uint16_t vpid;
|
2018-03-07 20:57:14 +08:00
|
|
|
|
|
|
|
/* Holds the information needed for IRQ/exception handling. */
|
|
|
|
struct {
|
|
|
|
/* The number of the exception to raise. */
|
2018-06-08 20:53:59 +08:00
|
|
|
uint32_t exception;
|
2018-03-07 20:57:14 +08:00
|
|
|
|
|
|
|
/* The error number for the exception. */
|
2018-07-12 11:47:49 +08:00
|
|
|
uint32_t error;
|
2018-03-07 20:57:14 +08:00
|
|
|
} exception_info;
|
|
|
|
|
|
|
|
uint8_t lapic_mask;
|
|
|
|
uint32_t irq_window_enabled;
|
|
|
|
uint32_t nrexits;
|
|
|
|
|
|
|
|
/* Auxiliary TSC value */
|
|
|
|
uint64_t msr_tsc_aux;
|
|
|
|
|
|
|
|
/* VCPU context state information */
|
2018-04-16 23:15:31 +08:00
|
|
|
uint32_t exit_reason;
|
2018-04-17 21:11:54 +08:00
|
|
|
uint32_t idt_vectoring_info;
|
2018-03-07 20:57:14 +08:00
|
|
|
uint64_t exit_qualification;
|
2018-04-16 23:15:31 +08:00
|
|
|
uint32_t inst_len;
|
2018-03-07 20:57:14 +08:00
|
|
|
|
|
|
|
/* Information related to secondary / AP VCPU start-up */
|
2018-07-13 17:11:27 +08:00
|
|
|
enum vm_cpu_mode cpu_mode;
|
2018-03-07 20:57:14 +08:00
|
|
|
uint8_t nr_sipi;
|
|
|
|
uint32_t sipi_vector;
|
|
|
|
|
|
|
|
/* interrupt injection information */
|
2018-05-25 12:29:00 +08:00
|
|
|
uint64_t pending_req;
|
2018-02-28 19:33:13 +08:00
|
|
|
bool inject_event_pending;
|
|
|
|
struct event_injection_info inject_info;
|
2018-03-07 20:57:14 +08:00
|
|
|
|
|
|
|
/* per vcpu lapic */
|
|
|
|
void *vlapic;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct vm;
|
|
|
|
struct vcpu {
|
2018-07-03 16:41:54 +08:00
|
|
|
uint16_t pcpu_id; /* Physical CPU ID of this VCPU */
|
|
|
|
uint16_t vcpu_id; /* virtual identifier for VCPU */
|
2018-03-07 20:57:14 +08:00
|
|
|
struct vcpu_arch arch_vcpu;
|
|
|
|
/* Architecture specific definitions for this VCPU */
|
|
|
|
struct vm *vm; /* Reference to the VM this VCPU belongs to */
|
|
|
|
void *entry_addr; /* Entry address for this VCPU when first started */
|
|
|
|
|
|
|
|
/* State of this VCPU before suspend */
|
|
|
|
volatile enum vcpu_state prev_state;
|
|
|
|
volatile enum vcpu_state state; /* State of this VCPU */
|
|
|
|
/* State of debug request for this VCPU */
|
|
|
|
volatile enum vcpu_state dbg_req_state;
|
2018-06-29 14:29:34 +08:00
|
|
|
uint64_t sync; /*hold the bit events*/
|
2018-07-26 14:46:26 +08:00
|
|
|
struct acrn_vlapic *vlapic; /* per vCPU virtualized LAPIC */
|
2018-03-07 20:57:14 +08:00
|
|
|
|
|
|
|
struct list_head run_list; /* inserted to schedule runqueue */
|
2018-06-29 14:29:34 +08:00
|
|
|
uint64_t pending_pre_work; /* any pre work pending? */
|
2018-03-07 20:57:14 +08:00
|
|
|
bool launched; /* Whether the vcpu is launched on target pcpu */
|
2018-06-29 14:29:34 +08:00
|
|
|
uint32_t paused_cnt; /* how many times vcpu is paused */
|
2018-07-18 13:36:41 +08:00
|
|
|
uint32_t running; /* vcpu is picked up and run? */
|
2018-03-07 20:57:14 +08:00
|
|
|
|
2018-07-24 19:05:47 +08:00
|
|
|
struct io_request req; /* used by io/ept emulation */
|
2018-03-07 20:57:14 +08:00
|
|
|
|
|
|
|
/* save guest msr tsc aux register.
|
|
|
|
* Before VMENTRY, save guest MSR_TSC_AUX to this fields.
|
|
|
|
* After VMEXIT, restore this fields to guest MSR_TSC_AUX.
|
|
|
|
* This is only temperary workaround. Once MSR emulation
|
|
|
|
* is enabled, we should remove this fields and related
|
|
|
|
* code.
|
|
|
|
*/
|
|
|
|
uint64_t msr_tsc_aux_guest;
|
2018-08-24 16:21:59 +08:00
|
|
|
uint64_t guest_msrs[IDX_MAX_MSR];
|
2018-05-30 08:41:52 +08:00
|
|
|
#ifdef CONFIG_MTRR_ENABLED
|
|
|
|
struct mtrr_state mtrr;
|
|
|
|
#endif
|
vcpu: add get/set register APIs
there will be 3 types of vcpu runtime contexts:
- runtime contexts always saved/restored during VM exit/entry, which
include general registers rax/rcx/rdx/rbx/rbp/rsi/rdi/r8~r15, cr2 and
msr for spectre control (ia32_spec_ctrl)
- runtime contexts on-demand cached/updated during VM exit/entry, which
include frequently used registers rsp, rip, efer, rflags, cr0 and cr4
- runtime contexts always read/write from/to VMCS, which include left
registers not in above
this patch add get/set register APIs for vcpu runtime contexts, and unified
the save/restore method for them according to above description.
v3:
- update vcpu_get/set_cr0/4 as unified interface to get/set guest cr0/cr4,
use on-demand cache for reading, but always write to VMCS for writing.
v2:
- use reg_cached/reg_updated for on-demand runtime contexts
- always read/write cr3 from/to VMCS
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-07-26 14:56:47 +08:00
|
|
|
uint64_t reg_cached;
|
|
|
|
uint64_t reg_updated;
|
2018-03-07 20:57:14 +08:00
|
|
|
};
|
|
|
|
|
2018-08-08 11:43:06 +08:00
|
|
|
struct vcpu_dump {
|
|
|
|
struct vcpu *vcpu;
|
|
|
|
char *str;
|
|
|
|
int str_max;
|
|
|
|
};
|
|
|
|
|
2018-08-02 15:17:41 +08:00
|
|
|
#define is_vcpu_bsp(vcpu) ((vcpu)->vcpu_id == BOOT_CPU_ID)
|
2018-03-07 20:57:14 +08:00
|
|
|
/* do not update Guest RIP for next VM Enter */
|
2018-06-23 06:44:48 +08:00
|
|
|
static inline void vcpu_retain_rip(struct vcpu *vcpu)
|
|
|
|
{
|
2018-07-10 19:07:46 +08:00
|
|
|
(vcpu)->arch_vcpu.inst_len = 0U;
|
2018-06-23 06:44:48 +08:00
|
|
|
}
|
2018-03-07 20:57:14 +08:00
|
|
|
|
|
|
|
/* External Interfaces */
|
vcpu: add get/set register APIs
there will be 3 types of vcpu runtime contexts:
- runtime contexts always saved/restored during VM exit/entry, which
include general registers rax/rcx/rdx/rbx/rbp/rsi/rdi/r8~r15, cr2 and
msr for spectre control (ia32_spec_ctrl)
- runtime contexts on-demand cached/updated during VM exit/entry, which
include frequently used registers rsp, rip, efer, rflags, cr0 and cr4
- runtime contexts always read/write from/to VMCS, which include left
registers not in above
this patch add get/set register APIs for vcpu runtime contexts, and unified
the save/restore method for them according to above description.
v3:
- update vcpu_get/set_cr0/4 as unified interface to get/set guest cr0/cr4,
use on-demand cache for reading, but always write to VMCS for writing.
v2:
- use reg_cached/reg_updated for on-demand runtime contexts
- always read/write cr3 from/to VMCS
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-07-26 14:56:47 +08:00
|
|
|
uint64_t vcpu_get_gpreg(struct vcpu *vcpu, uint32_t reg);
|
|
|
|
void vcpu_set_gpreg(struct vcpu *vcpu, uint32_t reg, uint64_t val);
|
|
|
|
uint64_t vcpu_get_rip(struct vcpu *vcpu);
|
|
|
|
void vcpu_set_rip(struct vcpu *vcpu, uint64_t val);
|
|
|
|
uint64_t vcpu_get_rsp(struct vcpu *vcpu);
|
|
|
|
void vcpu_set_rsp(struct vcpu *vcpu, uint64_t val);
|
|
|
|
uint64_t vcpu_get_efer(struct vcpu *vcpu);
|
|
|
|
void vcpu_set_efer(struct vcpu *vcpu, uint64_t val);
|
|
|
|
uint64_t vcpu_get_rflags(struct vcpu *vcpu);
|
|
|
|
void vcpu_set_rflags(struct vcpu *vcpu, uint64_t val);
|
|
|
|
uint64_t vcpu_get_cr0(struct vcpu *vcpu);
|
2018-08-22 11:12:37 +08:00
|
|
|
void vcpu_set_cr0(struct vcpu *vcpu, uint64_t val);
|
vcpu: add get/set register APIs
there will be 3 types of vcpu runtime contexts:
- runtime contexts always saved/restored during VM exit/entry, which
include general registers rax/rcx/rdx/rbx/rbp/rsi/rdi/r8~r15, cr2 and
msr for spectre control (ia32_spec_ctrl)
- runtime contexts on-demand cached/updated during VM exit/entry, which
include frequently used registers rsp, rip, efer, rflags, cr0 and cr4
- runtime contexts always read/write from/to VMCS, which include left
registers not in above
this patch add get/set register APIs for vcpu runtime contexts, and unified
the save/restore method for them according to above description.
v3:
- update vcpu_get/set_cr0/4 as unified interface to get/set guest cr0/cr4,
use on-demand cache for reading, but always write to VMCS for writing.
v2:
- use reg_cached/reg_updated for on-demand runtime contexts
- always read/write cr3 from/to VMCS
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-07-26 14:56:47 +08:00
|
|
|
uint64_t vcpu_get_cr2(struct vcpu *vcpu);
|
|
|
|
void vcpu_set_cr2(struct vcpu *vcpu, uint64_t val);
|
|
|
|
uint64_t vcpu_get_cr4(struct vcpu *vcpu);
|
2018-08-22 11:12:37 +08:00
|
|
|
void vcpu_set_cr4(struct vcpu *vcpu, uint64_t val);
|
vcpu: add get/set register APIs
there will be 3 types of vcpu runtime contexts:
- runtime contexts always saved/restored during VM exit/entry, which
include general registers rax/rcx/rdx/rbx/rbp/rsi/rdi/r8~r15, cr2 and
msr for spectre control (ia32_spec_ctrl)
- runtime contexts on-demand cached/updated during VM exit/entry, which
include frequently used registers rsp, rip, efer, rflags, cr0 and cr4
- runtime contexts always read/write from/to VMCS, which include left
registers not in above
this patch add get/set register APIs for vcpu runtime contexts, and unified
the save/restore method for them according to above description.
v3:
- update vcpu_get/set_cr0/4 as unified interface to get/set guest cr0/cr4,
use on-demand cache for reading, but always write to VMCS for writing.
v2:
- use reg_cached/reg_updated for on-demand runtime contexts
- always read/write cr3 from/to VMCS
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-07-26 14:56:47 +08:00
|
|
|
uint64_t vcpu_get_pat_ext(struct vcpu *vcpu);
|
|
|
|
void vcpu_set_pat_ext(struct vcpu *vcpu, uint64_t val);
|
|
|
|
|
2018-06-20 15:42:52 +08:00
|
|
|
struct vcpu* get_ever_run_vcpu(uint16_t pcpu_id);
|
2018-07-04 10:37:43 +08:00
|
|
|
int create_vcpu(uint16_t pcpu_id, struct vm *vm, struct vcpu **rtn_vcpu_handle);
|
2018-03-07 20:57:14 +08:00
|
|
|
int start_vcpu(struct vcpu *vcpu);
|
|
|
|
int shutdown_vcpu(struct vcpu *vcpu);
|
2018-06-19 10:15:48 +08:00
|
|
|
void destroy_vcpu(struct vcpu *vcpu);
|
2018-03-07 20:57:14 +08:00
|
|
|
|
|
|
|
void reset_vcpu(struct vcpu *vcpu);
|
|
|
|
void pause_vcpu(struct vcpu *vcpu, enum vcpu_state new_state);
|
|
|
|
void resume_vcpu(struct vcpu *vcpu);
|
|
|
|
void schedule_vcpu(struct vcpu *vcpu);
|
2018-06-20 15:42:52 +08:00
|
|
|
int prepare_vcpu(struct vm *vm, uint16_t pcpu_id);
|
2018-03-07 20:57:14 +08:00
|
|
|
|
2018-06-30 00:17:34 +08:00
|
|
|
void request_vcpu_pre_work(struct vcpu *vcpu, uint16_t pre_work_id);
|
2018-03-07 20:57:14 +08:00
|
|
|
|
2018-08-08 11:43:06 +08:00
|
|
|
void vcpu_dumpreg(void *data);
|
2018-03-07 20:57:14 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|