All of lore.kernel.org
 help / color / mirror / Atom feed
* [arm-platforms:kvm-arm64/vcpu-xarray 39/49] arch/x86/kvm/x86.c:9047:59: error: passing argument 1 of 'kvm_x86_ops->get_enable_apicv' from incompatible pointer type
@ 2019-11-13 15:50 ` kbuild test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kbuild test robot @ 2019-11-13 15:50 UTC (permalink / raw)
  To: Sean Christopherson; +Cc: Marc Zyngier, kbuild-all, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 4639 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git kvm-arm64/vcpu-xarray
head:   148748099363327d8cb56aafd386b70ac8c68837
commit: 22e7451dbd028be98afd0dcad8b761c330ea5a5f [39/49] KVM: x86: Move all vcpu init code into kvm_arch_vcpu_create()
config: x86_64-lkp (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
        git checkout 22e7451dbd028be98afd0dcad8b761c330ea5a5f
        # save the attached .config to linux build tree
        make ARCH=x86_64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   arch/x86/kvm/x86.c: In function 'kvm_arch_vcpu_create':
>> arch/x86/kvm/x86.c:9047:59: error: passing argument 1 of 'kvm_x86_ops->get_enable_apicv' from incompatible pointer type [-Werror=incompatible-pointer-types]
      vcpu->arch.apicv_active = kvm_x86_ops->get_enable_apicv(vcpu->kvm);
                                                              ^~~~
   arch/x86/kvm/x86.c:9047:59: note: expected 'struct kvm_vcpu *' but argument is of type 'struct kvm *'
   cc1: some warnings being treated as errors

vim +9047 arch/x86/kvm/x86.c

  9028	
  9029	int kvm_arch_vcpu_create(struct kvm_vcpu *vcpu)
  9030	{
  9031		struct page *page;
  9032		int r;
  9033	
  9034		vcpu->arch.emulate_ctxt.ops = &emulate_ops;
  9035		if (!irqchip_in_kernel(vcpu->kvm) || kvm_vcpu_is_reset_bsp(vcpu))
  9036			vcpu->arch.mp_state = KVM_MP_STATE_RUNNABLE;
  9037		else
  9038			vcpu->arch.mp_state = KVM_MP_STATE_UNINITIALIZED;
  9039	
  9040		kvm_set_tsc_khz(vcpu, max_tsc_khz);
  9041	
  9042		r = kvm_mmu_create(vcpu);
  9043		if (r < 0)
  9044			return r;
  9045	
  9046		if (irqchip_in_kernel(vcpu->kvm)) {
> 9047			vcpu->arch.apicv_active = kvm_x86_ops->get_enable_apicv(vcpu->kvm);
  9048			r = kvm_create_lapic(vcpu, lapic_timer_advance_ns);
  9049			if (r < 0)
  9050				goto fail_mmu_destroy;
  9051		} else
  9052			static_key_slow_inc(&kvm_no_apic_vcpu);
  9053	
  9054		r = -ENOMEM;
  9055	
  9056		page = alloc_page(GFP_KERNEL | __GFP_ZERO);
  9057		if (!page)
  9058			goto fail_free_lapic;
  9059		vcpu->arch.pio_data = page_address(page);
  9060	
  9061		vcpu->arch.mce_banks = kzalloc(KVM_MAX_MCE_BANKS * sizeof(u64) * 4,
  9062					       GFP_KERNEL_ACCOUNT);
  9063		if (!vcpu->arch.mce_banks)
  9064			goto fail_free_pio_data;
  9065		vcpu->arch.mcg_cap = KVM_MAX_MCE_BANKS;
  9066	
  9067		if (!zalloc_cpumask_var(&vcpu->arch.wbinvd_dirty_mask,
  9068					GFP_KERNEL_ACCOUNT))
  9069			goto fail_free_mce_banks;
  9070	
  9071		vcpu->arch.user_fpu = kmem_cache_zalloc(x86_fpu_cache,
  9072							GFP_KERNEL_ACCOUNT);
  9073		if (!vcpu->arch.user_fpu) {
  9074			pr_err("kvm: failed to allocate userspace's fpu\n");
  9075			goto free_wbinvd_dirty_mask;
  9076		}
  9077	
  9078		vcpu->arch.guest_fpu = kmem_cache_zalloc(x86_fpu_cache,
  9079							 GFP_KERNEL_ACCOUNT);
  9080		if (!vcpu->arch.guest_fpu) {
  9081			pr_err("kvm: failed to allocate vcpu's fpu\n");
  9082			goto free_user_fpu;
  9083		}
  9084		fx_init(vcpu);
  9085	
  9086		vcpu->arch.guest_xstate_size = XSAVE_HDR_SIZE + XSAVE_HDR_OFFSET;
  9087	
  9088		vcpu->arch.maxphyaddr = cpuid_query_maxphyaddr(vcpu);
  9089	
  9090		vcpu->arch.pat = MSR_IA32_CR_PAT_DEFAULT;
  9091	
  9092		kvm_async_pf_hash_reset(vcpu);
  9093		kvm_pmu_init(vcpu);
  9094	
  9095		vcpu->arch.pending_external_vector = -1;
  9096		vcpu->arch.preempted_in_kernel = false;
  9097	
  9098		kvm_hv_vcpu_init(vcpu);
  9099	
  9100		r = kvm_x86_ops->vcpu_create(vcpu);
  9101		if (r)
  9102			goto free_guest_fpu;
  9103	
  9104		vcpu->arch.arch_capabilities = kvm_get_arch_capabilities();
  9105		vcpu->arch.msr_platform_info = MSR_PLATFORM_INFO_CPUID_FAULT;
  9106		kvm_vcpu_mtrr_init(vcpu);
  9107		vcpu_load(vcpu);
  9108		kvm_vcpu_reset(vcpu, false);
  9109		kvm_init_mmu(vcpu, false);
  9110		vcpu_put(vcpu);
  9111		return 0;
  9112	
  9113	free_guest_fpu:
  9114		kmem_cache_free(x86_fpu_cache, vcpu->arch.guest_fpu);
  9115	free_user_fpu:
  9116		kmem_cache_free(x86_fpu_cache, vcpu->arch.user_fpu);
  9117	free_wbinvd_dirty_mask:
  9118		free_cpumask_var(vcpu->arch.wbinvd_dirty_mask);
  9119	fail_free_mce_banks:
  9120		kfree(vcpu->arch.mce_banks);
  9121	fail_free_pio_data:
  9122		free_page((unsigned long)vcpu->arch.pio_data);
  9123	fail_free_lapic:
  9124		kvm_free_lapic(vcpu);
  9125	fail_mmu_destroy:
  9126		kvm_mmu_destroy(vcpu);
  9127		return r;
  9128	}
  9129	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28715 bytes --]

[-- Attachment #3: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [arm-platforms:kvm-arm64/vcpu-xarray 39/49] arch/x86/kvm/x86.c:9047:59: error: passing argument 1 of 'kvm_x86_ops->get_enable_apicv' from incompatible pointer type
@ 2019-11-13 15:50 ` kbuild test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kbuild test robot @ 2019-11-13 15:50 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 4771 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git kvm-arm64/vcpu-xarray
head:   148748099363327d8cb56aafd386b70ac8c68837
commit: 22e7451dbd028be98afd0dcad8b761c330ea5a5f [39/49] KVM: x86: Move all vcpu init code into kvm_arch_vcpu_create()
config: x86_64-lkp (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
        git checkout 22e7451dbd028be98afd0dcad8b761c330ea5a5f
        # save the attached .config to linux build tree
        make ARCH=x86_64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   arch/x86/kvm/x86.c: In function 'kvm_arch_vcpu_create':
>> arch/x86/kvm/x86.c:9047:59: error: passing argument 1 of 'kvm_x86_ops->get_enable_apicv' from incompatible pointer type [-Werror=incompatible-pointer-types]
      vcpu->arch.apicv_active = kvm_x86_ops->get_enable_apicv(vcpu->kvm);
                                                              ^~~~
   arch/x86/kvm/x86.c:9047:59: note: expected 'struct kvm_vcpu *' but argument is of type 'struct kvm *'
   cc1: some warnings being treated as errors

vim +9047 arch/x86/kvm/x86.c

  9028	
  9029	int kvm_arch_vcpu_create(struct kvm_vcpu *vcpu)
  9030	{
  9031		struct page *page;
  9032		int r;
  9033	
  9034		vcpu->arch.emulate_ctxt.ops = &emulate_ops;
  9035		if (!irqchip_in_kernel(vcpu->kvm) || kvm_vcpu_is_reset_bsp(vcpu))
  9036			vcpu->arch.mp_state = KVM_MP_STATE_RUNNABLE;
  9037		else
  9038			vcpu->arch.mp_state = KVM_MP_STATE_UNINITIALIZED;
  9039	
  9040		kvm_set_tsc_khz(vcpu, max_tsc_khz);
  9041	
  9042		r = kvm_mmu_create(vcpu);
  9043		if (r < 0)
  9044			return r;
  9045	
  9046		if (irqchip_in_kernel(vcpu->kvm)) {
> 9047			vcpu->arch.apicv_active = kvm_x86_ops->get_enable_apicv(vcpu->kvm);
  9048			r = kvm_create_lapic(vcpu, lapic_timer_advance_ns);
  9049			if (r < 0)
  9050				goto fail_mmu_destroy;
  9051		} else
  9052			static_key_slow_inc(&kvm_no_apic_vcpu);
  9053	
  9054		r = -ENOMEM;
  9055	
  9056		page = alloc_page(GFP_KERNEL | __GFP_ZERO);
  9057		if (!page)
  9058			goto fail_free_lapic;
  9059		vcpu->arch.pio_data = page_address(page);
  9060	
  9061		vcpu->arch.mce_banks = kzalloc(KVM_MAX_MCE_BANKS * sizeof(u64) * 4,
  9062					       GFP_KERNEL_ACCOUNT);
  9063		if (!vcpu->arch.mce_banks)
  9064			goto fail_free_pio_data;
  9065		vcpu->arch.mcg_cap = KVM_MAX_MCE_BANKS;
  9066	
  9067		if (!zalloc_cpumask_var(&vcpu->arch.wbinvd_dirty_mask,
  9068					GFP_KERNEL_ACCOUNT))
  9069			goto fail_free_mce_banks;
  9070	
  9071		vcpu->arch.user_fpu = kmem_cache_zalloc(x86_fpu_cache,
  9072							GFP_KERNEL_ACCOUNT);
  9073		if (!vcpu->arch.user_fpu) {
  9074			pr_err("kvm: failed to allocate userspace's fpu\n");
  9075			goto free_wbinvd_dirty_mask;
  9076		}
  9077	
  9078		vcpu->arch.guest_fpu = kmem_cache_zalloc(x86_fpu_cache,
  9079							 GFP_KERNEL_ACCOUNT);
  9080		if (!vcpu->arch.guest_fpu) {
  9081			pr_err("kvm: failed to allocate vcpu's fpu\n");
  9082			goto free_user_fpu;
  9083		}
  9084		fx_init(vcpu);
  9085	
  9086		vcpu->arch.guest_xstate_size = XSAVE_HDR_SIZE + XSAVE_HDR_OFFSET;
  9087	
  9088		vcpu->arch.maxphyaddr = cpuid_query_maxphyaddr(vcpu);
  9089	
  9090		vcpu->arch.pat = MSR_IA32_CR_PAT_DEFAULT;
  9091	
  9092		kvm_async_pf_hash_reset(vcpu);
  9093		kvm_pmu_init(vcpu);
  9094	
  9095		vcpu->arch.pending_external_vector = -1;
  9096		vcpu->arch.preempted_in_kernel = false;
  9097	
  9098		kvm_hv_vcpu_init(vcpu);
  9099	
  9100		r = kvm_x86_ops->vcpu_create(vcpu);
  9101		if (r)
  9102			goto free_guest_fpu;
  9103	
  9104		vcpu->arch.arch_capabilities = kvm_get_arch_capabilities();
  9105		vcpu->arch.msr_platform_info = MSR_PLATFORM_INFO_CPUID_FAULT;
  9106		kvm_vcpu_mtrr_init(vcpu);
  9107		vcpu_load(vcpu);
  9108		kvm_vcpu_reset(vcpu, false);
  9109		kvm_init_mmu(vcpu, false);
  9110		vcpu_put(vcpu);
  9111		return 0;
  9112	
  9113	free_guest_fpu:
  9114		kmem_cache_free(x86_fpu_cache, vcpu->arch.guest_fpu);
  9115	free_user_fpu:
  9116		kmem_cache_free(x86_fpu_cache, vcpu->arch.user_fpu);
  9117	free_wbinvd_dirty_mask:
  9118		free_cpumask_var(vcpu->arch.wbinvd_dirty_mask);
  9119	fail_free_mce_banks:
  9120		kfree(vcpu->arch.mce_banks);
  9121	fail_free_pio_data:
  9122		free_page((unsigned long)vcpu->arch.pio_data);
  9123	fail_free_lapic:
  9124		kvm_free_lapic(vcpu);
  9125	fail_mmu_destroy:
  9126		kvm_mmu_destroy(vcpu);
  9127		return r;
  9128	}
  9129	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 28715 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-11-13 16:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-13 15:50 [arm-platforms:kvm-arm64/vcpu-xarray 39/49] arch/x86/kvm/x86.c:9047:59: error: passing argument 1 of 'kvm_x86_ops->get_enable_apicv' from incompatible pointer type kbuild test robot
2019-11-13 15:50 ` kbuild test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.