KVM: x86 emulator: Use emulator_write_emulated and not emulator_write_std
authorAmit Shah <amit.shah@qumranet.com>
Sun, 18 Nov 2007 16:55:40 +0000 (22:25 +0530)
committerAvi Kivity <avi@qumranet.com>
Tue, 27 Nov 2007 13:28:29 +0000 (15:28 +0200)
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>
drivers/kvm/x86_emulate.c

index 6c1413f9e9c375e7d33daa3f67289654a203bb87..bd46de6bf891e795ce94835893dc9b82b063ff97 100644 (file)
@@ -1146,7 +1146,7 @@ done_prefixes:
                        }
                        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)