KVM: emulator: remove code duplication in register_address{,_increment}
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 19 Nov 2014 17:25:08 +0000 (18:25 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 19 Nov 2014 17:27:27 +0000 (18:27 +0100)
commit01485a2230540c0dacd146e9927ea3d87dcb0fd8
tree015b49a4a7bed3fbb13eb8367f0c5adb8658f61d
parent31ff64881bed80456c5d37df905bdb66cdf29abe
KVM: emulator: remove code duplication in register_address{,_increment}

register_address has been a duplicate of address_mask ever since the
ancestor of __linearize was born in 90de84f50b42 (KVM: x86 emulator:
preserve an operand's segment identity, 2010-11-17).

However, we can put it to a better use by including the call to reg_read
in register_address.  Similarly, the call to reg_rmw can be moved to
register_address_increment.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/emulate.c