KVM: Fix defined but not used warning in drivers/kvm/vmx.c
authorGabriel C <nix.or.die@googlemail.com>
Wed, 1 Aug 2007 14:23:10 +0000 (16:23 +0200)
committerAvi Kivity <avi@qumranet.com>
Sat, 13 Oct 2007 08:18:22 +0000 (10:18 +0200)
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>
drivers/kvm/vmx.c

index a94eb205cecd559547381a94d97f9a8d8391dcbf..3bf36508c84b07dbb3b4bff8a391a5d613ff9020 100644 (file)
@@ -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;
@@ -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