提交 592f0858 编写于 作者: P Paolo Bonzini

KVM: emulate: do not return X86EMUL_PROPAGATE_FAULT explicitly

Always get it through emulate_exception or emulate_ts.  This
ensures that the ctxt->exception fields have been populated.
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 d27aa7f1
...@@ -1549,8 +1549,7 @@ static int __load_segment_descriptor(struct x86_emulate_ctxt *ctxt, ...@@ -1549,8 +1549,7 @@ static int __load_segment_descriptor(struct x86_emulate_ctxt *ctxt,
ctxt->ops->set_segment(ctxt, selector, &seg_desc, base3, seg); ctxt->ops->set_segment(ctxt, selector, &seg_desc, base3, seg);
return X86EMUL_CONTINUE; return X86EMUL_CONTINUE;
exception: exception:
emulate_exception(ctxt, err_vec, err_code, true); return emulate_exception(ctxt, err_vec, err_code, true);
return X86EMUL_PROPAGATE_FAULT;
} }
static int load_segment_descriptor(struct x86_emulate_ctxt *ctxt, static int load_segment_descriptor(struct x86_emulate_ctxt *ctxt,
...@@ -2723,8 +2722,7 @@ static int emulator_do_task_switch(struct x86_emulate_ctxt *ctxt, ...@@ -2723,8 +2722,7 @@ static int emulator_do_task_switch(struct x86_emulate_ctxt *ctxt,
if (!next_tss_desc.p || if (!next_tss_desc.p ||
((desc_limit < 0x67 && (next_tss_desc.type & 8)) || ((desc_limit < 0x67 && (next_tss_desc.type & 8)) ||
desc_limit < 0x2b)) { desc_limit < 0x2b)) {
emulate_ts(ctxt, tss_selector & 0xfffc); return emulate_ts(ctxt, tss_selector & 0xfffc);
return X86EMUL_PROPAGATE_FAULT;
} }
if (reason == TASK_SWITCH_IRET || reason == TASK_SWITCH_JMP) { if (reason == TASK_SWITCH_IRET || reason == TASK_SWITCH_JMP) {
...@@ -3016,7 +3014,7 @@ static int em_movbe(struct x86_emulate_ctxt *ctxt) ...@@ -3016,7 +3014,7 @@ static int em_movbe(struct x86_emulate_ctxt *ctxt)
ctxt->dst.val = swab64(ctxt->src.val); ctxt->dst.val = swab64(ctxt->src.val);
break; break;
default: default:
return X86EMUL_PROPAGATE_FAULT; BUG();
} }
return X86EMUL_CONTINUE; return X86EMUL_CONTINUE;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册