mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-24 14:33:38 +00:00
instr_emul: remove vm_restart_instruction and use VCPU_RETAIN_RIP
there is no need to use wrap function vm_restart_instruction, we can use VCPU_RETAIN_RIP directly Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
This commit is contained in:
parent
0d6218f980
commit
48de7efa26
@ -759,7 +759,7 @@ emulate_movs(struct vcpu *vcpu, __unused uint64_t gpa, struct vie *vie,
|
|||||||
* Repeat the instruction if the count register is not zero.
|
* Repeat the instruction if the count register is not zero.
|
||||||
*/
|
*/
|
||||||
if ((rcx & vie_size2mask(vie->addrsize)) != 0)
|
if ((rcx & vie_size2mask(vie->addrsize)) != 0)
|
||||||
vm_restart_instruction(vcpu);
|
VCPU_RETAIN_RIP(vcpu);
|
||||||
}
|
}
|
||||||
done:
|
done:
|
||||||
ASSERT(error == 0, "%s: unexpected error %d", __func__, error);
|
ASSERT(error == 0, "%s: unexpected error %d", __func__, error);
|
||||||
@ -823,7 +823,7 @@ emulate_stos(struct vcpu *vcpu, uint64_t gpa, struct vie *vie,
|
|||||||
* Repeat the instruction if the count register is not zero.
|
* Repeat the instruction if the count register is not zero.
|
||||||
*/
|
*/
|
||||||
if ((rcx & vie_size2mask(vie->addrsize)) != 0)
|
if ((rcx & vie_size2mask(vie->addrsize)) != 0)
|
||||||
vm_restart_instruction(vcpu);
|
VCPU_RETAIN_RIP(vcpu);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -115,15 +115,6 @@ int vm_get_seg_desc(struct vcpu *vcpu, int seg, struct seg_desc *desc)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int vm_restart_instruction(struct vcpu *vcpu)
|
|
||||||
{
|
|
||||||
if (!vcpu)
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
VCPU_RETAIN_RIP(vcpu);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool is_descriptor_table(int reg)
|
static bool is_descriptor_table(int reg)
|
||||||
{
|
{
|
||||||
switch (reg) {
|
switch (reg) {
|
||||||
|
@ -193,5 +193,4 @@ int vm_get_seg_desc(struct vcpu *vcpu, int reg,
|
|||||||
struct seg_desc *ret_desc);
|
struct seg_desc *ret_desc);
|
||||||
int vm_set_seg_desc(struct vcpu *vcpu, int reg,
|
int vm_set_seg_desc(struct vcpu *vcpu, int reg,
|
||||||
struct seg_desc *desc);
|
struct seg_desc *desc);
|
||||||
int vm_restart_instruction(struct vcpu *vcpu);
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user