diff options
author | James Hogan <james.hogan@imgtec.com> | 2016-07-08 06:53:29 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-08-01 12:42:26 -0400 |
commit | 8296963e6e8c656c4d91dfa7245e49672aa9675e (patch) | |
tree | 2318d0ae22622bfa9b5ae81960c4fc7b0859edfa | |
parent | 172e02d1474d5c37a8728ccdfdc731c118366144 (diff) |
MIPS: KVM: Fix ptr->int cast via KVM_GUEST_KSEGX()
kvm_mips_trans_replace() passes a pointer to KVM_GUEST_KSEGX(). This
breaks on 64-bit builds due to the cast of that 64-bit pointer to a
different sized 32-bit int. Cast the pointer argument to an unsigned
long to work around the warning.
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Radim Krčmář" <rkrcmar@redhat.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: kvm@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | arch/mips/kvm/dyntrans.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/kvm/dyntrans.c b/arch/mips/kvm/dyntrans.c index c793ff19a8a8..d280894915ed 100644 --- a/arch/mips/kvm/dyntrans.c +++ b/arch/mips/kvm/dyntrans.c | |||
@@ -33,7 +33,7 @@ static int kvm_mips_trans_replace(struct kvm_vcpu *vcpu, u32 *opc, | |||
33 | unsigned long paddr, flags; | 33 | unsigned long paddr, flags; |
34 | void *vaddr; | 34 | void *vaddr; |
35 | 35 | ||
36 | if (KVM_GUEST_KSEGX(opc) == KVM_GUEST_KSEG0) { | 36 | if (KVM_GUEST_KSEGX((unsigned long)opc) == KVM_GUEST_KSEG0) { |
37 | paddr = kvm_mips_translate_guest_kseg0_to_hpa(vcpu, | 37 | paddr = kvm_mips_translate_guest_kseg0_to_hpa(vcpu, |
38 | (unsigned long)opc); | 38 | (unsigned long)opc); |
39 | vaddr = kmap_atomic(pfn_to_page(PHYS_PFN(paddr))); | 39 | vaddr = kmap_atomic(pfn_to_page(PHYS_PFN(paddr))); |