mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-22 01:07:57 +00:00
revise type of 'exit_reason' and 'inst_len' in vcpu_arch
SDM 24.9.1 Volume3: - 'Exit reason' field in VMCS is 32 bits. SDM 24.9.4 in Volume3 - 'VM-exit instruction length' field in VMCS is 32 bits. This patch is to redefine the data types of above fields in 'struct vcpu_arch' and udpate the code using these two fields. Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
This commit is contained in:
@@ -1665,9 +1665,9 @@ vie_calculate_gla(enum vm_cpu_mode cpu_mode, enum vm_reg_name seg,
|
||||
}
|
||||
|
||||
void
|
||||
vie_init(struct vie *vie, const char *inst_bytes, int inst_length)
|
||||
vie_init(struct vie *vie, const char *inst_bytes, uint32_t inst_length)
|
||||
{
|
||||
ASSERT(inst_length >= 0 && inst_length <= VIE_INST_SIZE,
|
||||
ASSERT(inst_length <= VIE_INST_SIZE,
|
||||
"%s: invalid instruction length (%d)", __func__, inst_length);
|
||||
|
||||
memset(vie, 0, sizeof(struct vie));
|
||||
|
@@ -72,7 +72,7 @@ int vie_calculate_gla(enum vm_cpu_mode cpu_mode, enum vm_reg_name seg,
|
||||
struct seg_desc *desc, uint64_t off, int length, int addrsize, int prot,
|
||||
uint64_t *gla);
|
||||
|
||||
void vie_init(struct vie *vie, const char *inst_bytes, int inst_length);
|
||||
void vie_init(struct vie *vie, const char *inst_bytes, uint32_t inst_length);
|
||||
|
||||
/*
|
||||
* Decode the instruction fetched into 'vie' so it can be emulated.
|
||||
|
@@ -136,7 +136,8 @@ int create_vcpu(int cpu_id, struct vm *vm, struct vcpu **rtn_vcpu_handle)
|
||||
|
||||
int start_vcpu(struct vcpu *vcpu)
|
||||
{
|
||||
uint64_t rip, instlen;
|
||||
uint32_t instlen;
|
||||
uint64_t rip;
|
||||
struct run_context *cur_context =
|
||||
&vcpu->arch_vcpu.contexts[vcpu->arch_vcpu.cur_context];
|
||||
int64_t status = 0;
|
||||
|
Reference in New Issue
Block a user