hv: inject invalid opcode if decode instruction fails
We inject invalid opcode if instruction decode fails. We don't support many instruction. If new type guest hit the invalid opcode and it's necessary to emulate that instruction, we could add new instruction then. Signed-off-by: Yin Fengwei <fengwei.yin@intel.com> Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
parent
1a00d6c943
commit
fa9fec50e9
|
@ -2287,7 +2287,8 @@ int decode_instruction(struct vcpu *vcpu)
|
|||
if (retval != 0) {
|
||||
pr_err("decode instruction failed @ 0x%016llx:",
|
||||
vcpu_get_rip(vcpu));
|
||||
return -EINVAL;
|
||||
vcpu_inject_ud(vcpu);
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
return emul_ctxt->vie.opsize;
|
||||
|
|
Loading…
Reference in New Issue