KVM: x86 emulator: Don't write-back cpu-state on X86EMUL_INTERCEPTED
This patch prevents the changed CPU state to be written back when the emulator detected that the instruction was intercepted by the guest. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
parent
3c6e276f22
commit
775fde8648
3 changed files with 7 additions and 0 deletions
|
@ -3592,6 +3592,9 @@ writeback:
|
|||
done:
|
||||
if (rc == X86EMUL_PROPAGATE_FAULT)
|
||||
ctxt->have_exception = true;
|
||||
if (rc == X86EMUL_INTERCEPTED)
|
||||
return EMULATION_INTERCEPTED;
|
||||
|
||||
return (rc == X86EMUL_UNHANDLEABLE) ? EMULATION_FAILED : EMULATION_OK;
|
||||
|
||||
twobyte_insn:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue