mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-18 11:47:30 +00:00
hv: retain rip if the fault is injected to guest
According to SDM 6.5 exception classification, if the fault happens, the CPU will return to the faulting instruction. So we shouldn't change rip to the next instruction if inject fault to guest. Tracked-On: #1473 Signed-off-by: Yin Fengwei <fengwei.yin@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
348e2ba168
commit
eb328d78ea
@ -261,6 +261,9 @@ static void vcpu_inject_exception(struct vcpu *vcpu, uint32_t vector)
|
||||
(exception_type[vector] << 8U) | (vector & 0xFFU));
|
||||
|
||||
vcpu->arch_vcpu.exception_info.exception = VECTOR_INVALID;
|
||||
|
||||
/* retain rip for exception injection */
|
||||
vcpu_retain_rip(vcpu);
|
||||
}
|
||||
|
||||
static int vcpu_inject_hi_exception(struct vcpu *vcpu)
|
||||
|
Loading…
Reference in New Issue
Block a user