KVM: x86 emulator: Make emulate_push() store the value directly
authorTakuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Tue, 12 Apr 2011 15:29:09 +0000 (00:29 +0900)
committerAvi Kivity <avi@redhat.com>
Wed, 11 May 2011 11:57:08 +0000 (07:57 -0400)
commit4179bb02fd3e87183e5f698495dfcb80df187889
tree8e896121d38dc7dc6d7eb6acd6c5cb762cabd2c6
parent575e7c1417d41dd72ddf2a49965f833ce9352e92
KVM: x86 emulator: Make emulate_push() store the value directly

PUSH emulation stores the value by calling writeback() after setting
the dst operand appropriately in emulate_push().

This writeback() using dst is not needed at all because we know the
target is the stack.  So this patch makes emulate_push() call, newly
introduced, segmented_write() directly.

By this, many inlined writeback()'s are removed.

Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/emulate.c