Skip to content

Commit

Permalink
KVM: x86 emulator: Use emulator_write_emulated and not emulator_write…
Browse files Browse the repository at this point in the history
…_std

emulator_write_std() is not implemented, and calling write_emulated should
work just as well in place of write_std.

Fixes emulator failures with the push r/m instruction.

Signed-off-by: Amit Shah <amit.shah@qumranet.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
  • Loading branch information
Amit Shah authored and Avi Kivity committed Nov 27, 2007
1 parent 2a738e2 commit 00b2ef4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/kvm/x86_emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1146,7 +1146,7 @@ x86_emulate_memop(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops)
}
register_address_increment(_regs[VCPU_REGS_RSP],
-dst.bytes);
if ((rc = ops->write_std(
if ((rc = ops->write_emulated(
register_address(ctxt->ss_base,
_regs[VCPU_REGS_RSP]),
&dst.val, dst.bytes, ctxt->vcpu)) != 0)
Expand Down

0 comments on commit 00b2ef4

Please sign in to comment.