|
@@ -527,6 +527,7 @@ static unsigned long seg_base(struct x86_emulate_ctxt *ctxt, int seg)
|
|
|
static int emulate_exception(struct x86_emulate_ctxt *ctxt, int vec,
|
|
|
u32 error, bool valid)
|
|
|
{
|
|
|
+ WARN_ON(vec > 0x1f);
|
|
|
ctxt->exception.vector = vec;
|
|
|
ctxt->exception.error_code = error;
|
|
|
ctxt->exception.error_code_valid = valid;
|
|
@@ -4827,8 +4828,10 @@ writeback:
|
|
|
ctxt->eip = ctxt->_eip;
|
|
|
|
|
|
done:
|
|
|
- if (rc == X86EMUL_PROPAGATE_FAULT)
|
|
|
+ if (rc == X86EMUL_PROPAGATE_FAULT) {
|
|
|
+ WARN_ON(ctxt->exception.vector > 0x1f);
|
|
|
ctxt->have_exception = true;
|
|
|
+ }
|
|
|
if (rc == X86EMUL_INTERCEPTED)
|
|
|
return EMULATION_INTERCEPTED;
|
|
|
|