Skip to content

Commit

Permalink
KVM: Fix defined but not used warning in drivers/kvm/vmx.c
Browse files Browse the repository at this point in the history
move_msr_up() is used only on X86_64 and generates a warning on !X86_64

Signed-off-by: Gabriel Craciunescu <nix.or.die@googlemail.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
  • Loading branch information
Gabriel C authored and Avi Kivity committed Oct 13, 2007
1 parent 37c0005 commit 54e11fa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/kvm/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,7 @@ static void vmx_inject_gp(struct kvm_vcpu *vcpu, unsigned error_code)
/*
* Swap MSR entry in host/guest MSR entry array.
*/
#ifdef CONFIG_X86_64
static void move_msr_up(struct vcpu_vmx *vmx, int from, int to)
{
struct kvm_msr_entry tmp;
Expand All @@ -555,6 +556,7 @@ static void move_msr_up(struct vcpu_vmx *vmx, int from, int to)
vmx->host_msrs[to] = vmx->host_msrs[from];
vmx->host_msrs[from] = tmp;
}
#endif

/*
* Set up the vmcs to automatically save and restore system
Expand Down

0 comments on commit 54e11fa

Please sign in to comment.