KVM: Separate emulation context initialization in a separate function
authorMohammed Gamal <m.gamal005@gmail.com>
Sun, 15 Aug 2010 21:47:01 +0000 (00:47 +0300)
committerAvi Kivity <avi@redhat.com>
Sun, 24 Oct 2010 08:51:04 +0000 (10:51 +0200)
commit8ec4722dd2aab9b69befb919549ea0a5bfc9e670
tree27001682b43f02ebc5a151d4cbfdc7ef1fb23f71
parentd9574a25afc3cd7ccd6a0bc05252bb84189e4021
KVM: Separate emulation context initialization in a separate function

The code for initializing the emulation context is duplicated at two
locations (emulate_instruction() and kvm_task_switch()). Separate it
in a separate function and call it from there.

Signed-off-by: Mohammed Gamal <m.gamal005@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/x86.c