KVM: emulator: Use linearize() when fetching instructions
authorNelson Elhage <nelhage@ksplice.com>
Mon, 18 Apr 2011 16:05:53 +0000 (12:05 -0400)
committerAvi Kivity <avi@redhat.com>
Wed, 11 May 2011 11:57:10 +0000 (07:57 -0400)
commit3d9b938eefb7d91a1ae13e425931bd5ac103b762
tree96ecffc81c09cc5578a5375cb357895084b552fa
parent7c4c0f4fd5c3e82234c0ab61c7e7ffdb8f3af07b
KVM: emulator: Use linearize() when fetching instructions

Since segments need to be handled slightly differently when fetching
instructions, we add a __linearize helper that accepts a new 'fetch' boolean.

[avi: fix oops caused by wrong segmented_address initialization order]

Signed-off-by: Nelson Elhage <nelhage@ksplice.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/include/asm/kvm_emulate.h
arch/x86/kvm/emulate.c