RE: [kvm:queue 4/47] arch/x86/kvm/vmx/vmx.c:503:10: warning: cast from pointer to integer of different size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Vitaly:
	I just worked out a patch to fix the issue and hasn't send out yet.  It's up to you to remove or fix 😊

diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index ed8056049070..d0c45c9f5fc5 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -499,19 +499,18 @@ static int hv_enable_direct_tlbflush(struct kvm_vcpu *vcpu)
                *p_hv_pa_pg = kzalloc(PAGE_SIZE, GFP_KERNEL);
                if (!*p_hv_pa_pg)
                        return -ENOMEM;
-               pr_debug("KVM: Hyper-V: allocated PA_PG for %llx\n",
-                      (u64)&vcpu->kvm);
+               pr_debug("KVM: Hyper-V: allocated PA_PG for %lx\n",
+                        (unsigned long)&vcpu->kvm);
        }

        evmcs = (struct hv_enlightened_vmcs *)to_vmx(vcpu)->loaded_vmcs->vmcs;
-
        evmcs->partition_assist_page =
                __pa(*p_hv_pa_pg);
-       evmcs->hv_vm_id = (u64)vcpu->kvm;
+       evmcs->hv_vm_id = (unsigned long)vcpu->kvm;
        evmcs->hv_enlightenments_control.nested_flush_hypercall = 1;

-       pr_debug("KVM: Hyper-V: enabled DIRECT flush for %llx\n",
-                (u64)vcpu->kvm);
+       pr_debug("KVM: Hyper-V: enabled DIRECT flush for %lx\n",
+                (unsigned long)&vcpu->kvm);
        return 0;
 }


-----Original Message-----
From: Vitaly Kuznetsov <vkuznets@xxxxxxxxxx> 
Sent: Wednesday, September 25, 2019 4:31 PM
To: kvm@xxxxxxxxxxxxxxx
Cc: kbuild-all@xxxxxx; kbuild test robot <lkp@xxxxxxxxx>; Robert Hu <robert.hu@xxxxxxxxx>; Farrah Chen <farrah.chen@xxxxxxxxx>; Danmei Wei <danmei.wei@xxxxxxxxx>; Paolo Bonzini <pbonzini@xxxxxxxxxx>; Tianyu Lan <Tianyu.Lan@xxxxxxxxxxxxx>
Subject: Re: [kvm:queue 4/47] arch/x86/kvm/vmx/vmx.c:503:10: warning: cast from pointer to integer of different size

kbuild test robot <lkp@xxxxxxxxx> writes:

>  > 502			pr_debug("KVM: Hyper-V: allocated PA_PG for %llx\n",
>  > 503			       (u64)&vcpu->kvm);

(as a matter of fact, this wasn't in my original patch :-)

I'm not quite sure what this info is useful for, let's just remove it. I'll send a patch.

--
Vitaly




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux