hv: add function to reset vcpu registers

This reset_vcpu_regs function will reset the vcpu registers to
default value: realmode with entry 0xFFFFFFF0

Make call to reset_vcpu_regs during create_vcpu and reset_vcpu

Tracked-On: #1231
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Yin Fengwei
2018-09-29 20:45:46 +08:00
committed by wenlingz
parent b2dc13d763
commit f7b11c8341
2 changed files with 27 additions and 0 deletions

View File

@@ -286,6 +286,7 @@ 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);
void reset_vcpu_regs(struct vcpu *vcpu);
static inline bool is_long_mode(struct vcpu *vcpu)
{