diff options
author | Avi Kivity <avi@redhat.com> | 2009-10-29 11:00:16 +0200 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-12-03 09:32:23 +0200 |
commit | 92c0d900159a4fa582e1c8ebcc1c4a8020defff5 (patch) | |
tree | 2162cdabb8b4adb825c68cd30107dce6c574ac9c /arch/x86 | |
parent | 5f5c35aad5ccaa8f1bd5d9e12f9f5251f3180093 (diff) |
KVM: VMX: Remove vmx->msr_offset_efer
This variable is used to communicate between a caller and a callee; switch
to a function argument instead.
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kvm/vmx.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index a5f3f3ec69e..c9cc9596e1a 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -101,7 +101,6 @@ struct vcpu_vmx { struct shared_msr_entry *guest_msrs; int nmsrs; int save_nmsrs; - int msr_offset_efer; #ifdef CONFIG_X86_64 u64 msr_host_kernel_gs_base; u64 msr_guest_kernel_gs_base; @@ -584,14 +583,11 @@ static void reload_tss(void) load_TR_desc(); } -static bool update_transition_efer(struct vcpu_vmx *vmx) +static bool update_transition_efer(struct vcpu_vmx *vmx, int efer_offset) { - int efer_offset = vmx->msr_offset_efer; u64 guest_efer; u64 ignore_bits; - if (efer_offset < 0) - return false; guest_efer = vmx->vcpu.arch.shadow_efer; /* @@ -926,8 +922,8 @@ static void setup_msrs(struct vcpu_vmx *vmx) move_msr_up(vmx, index, save_nmsrs++); } #endif - vmx->msr_offset_efer = index = __find_msr_index(vmx, MSR_EFER); - if (index >= 0 && update_transition_efer(vmx)) + index = __find_msr_index(vmx, MSR_EFER); + if (index >= 0 && update_transition_efer(vmx, index)) move_msr_up(vmx, index, save_nmsrs++); vmx->save_nmsrs = save_nmsrs; |