mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 09:47:44 +00:00
hv: Add API to set vcpu register
set_vcpu_regs function is added to set vcpu registers. Tracked-On: #1231 Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
This commit is contained in:
@@ -62,6 +62,16 @@
|
||||
exec_vmwrite32(SEG_NAME##_ATTR, (seg).attr); \
|
||||
}
|
||||
|
||||
/* Define segments constants for guest */
|
||||
#define REAL_MODE_BSP_INIT_CODE_SEL (0xf000U)
|
||||
#define REAL_MODE_DATA_SEG_AR (0x0093U)
|
||||
#define REAL_MODE_CODE_SEG_AR (0x009fU)
|
||||
#define PROTECTED_MODE_DATA_SEG_AR (0xc093U)
|
||||
#define PROTECTED_MODE_CODE_SEG_AR (0xc09bU)
|
||||
#define DR7_INIT_VALUE (0x400UL)
|
||||
#define LDTR_AR (0x0082U) /* LDT, type must be 2, refer to SDM Vol3 26.3.1.2 */
|
||||
#define TR_AR (0x008bU) /* TSS (busy), refer to SDM Vol3 26.3.1.2 */
|
||||
|
||||
struct e820_mem_params {
|
||||
uint64_t mem_bottom;
|
||||
uint64_t mem_top;
|
||||
|
@@ -286,6 +286,7 @@ uint64_t vcpu_get_cr4(struct vcpu *vcpu);
|
||||
void vcpu_set_cr4(struct vcpu *vcpu, uint64_t val);
|
||||
uint64_t vcpu_get_pat_ext(struct vcpu *vcpu);
|
||||
void vcpu_set_pat_ext(struct vcpu *vcpu, uint64_t val);
|
||||
void set_vcpu_regs(struct vcpu *vcpu, struct acrn_vcpu_regs *vcpu_regs);
|
||||
|
||||
struct vcpu* get_ever_run_vcpu(uint16_t pcpu_id);
|
||||
int create_vcpu(uint16_t pcpu_id, struct vm *vm, struct vcpu **rtn_vcpu_handle);
|
||||
|
Reference in New Issue
Block a user