Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp1714959ioo; Mon, 23 May 2022 01:16:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJN3gQW6w1lL3HEmz6qaeZhP/76yl9YA3f3Ubt1NzELv1OwhlWwcFqc9wixmgeCxftF5Jg X-Received: by 2002:a17:90b:180b:b0:1df:b2ac:fafc with SMTP id lw11-20020a17090b180b00b001dfb2acfafcmr25714982pjb.101.1653293799487; Mon, 23 May 2022 01:16:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653293799; cv=none; d=google.com; s=arc-20160816; b=EMWzzerwPTAj8mOGYkbm924ANvrON/j5I87jcNbX/MlTtduzwAUfhZKFW7BdSkFe6i gDIpkBpFwpanqbwNBeCYP+Th+OKduekrhDIgUhcCJQF7XjyZFS28aTcPJ5EFLS94lx97 LyAQU2rFpQFh+I55u0uZz7JABdo/zwpaYOy2hu50rPTr07Gw4GRif2lJ+Bqh2cKQ4hj1 LInyDE9L27FXEgb2As77Y1XEi73VJnUEYNmA5B+17b4y4YF5QMIviylkaDDcT1jBoDrs JL6+4/yz7w1nxVjjRaRAZvOEm/21YavIu8j5vW44g+z0eV9tpIjj8ncvFEWYUopfNsb/ LRgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:references:in-reply-to:subject:cc:to:from:date :dkim-signature; bh=SyQ0q/1cfv9Dr9N4yrSfFi2vvZn6zBLKl1GWo7CSuOw=; b=qGgsKTY9PUVWVts9FVVOsnR2uJe9BUtQSz/g2Wh0iT4wl7fI6Xd8IX0p8zFEVAZ0KX bEKatMZqtvKgBz3o8rKVvDdWr+lcPrsR5thTjjyAEwFTnmMo/27c6EPUe1LR8OeF9DH/ ldR2TE/wzNN9D938JmNOR2BK/VHIcuGi0cePXZqJR3jSFXgV4AichNoa8uaDcfRWAWbA 06xrDPLdg3ljuy3kQgLYldPV3JFFuhgTjZKhFA+5vaMLSmN6SM6Ze6M653ACKH014BKl hOdp1HfiH9F1faQpsYWp9e41CFYqbbSDCB7PlkU+3T4Zxd/y965KQMvE1NALt5Btkt+Y W70g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=I5PjK5BC; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id x7-20020a1709027c0700b00156bc537059si8744751pll.17.2022.05.23.01.16.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 01:16:39 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=I5PjK5BC; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EE8EC2ED44; Mon, 23 May 2022 00:10:31 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231728AbiEWFyX (ORCPT + 99 others); Mon, 23 May 2022 01:54:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229515AbiEWFyO (ORCPT ); Mon, 23 May 2022 01:54:14 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DEE4A3122C for ; Sun, 22 May 2022 22:54:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1653285251; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SyQ0q/1cfv9Dr9N4yrSfFi2vvZn6zBLKl1GWo7CSuOw=; b=I5PjK5BCz7IvbSaXJPnJvRgV7AgmtgQwp4sdD1G1JU8Bj59oxtT3Mnj6d2ofKGNO8fFS49 /ZK/3qtc5dg/aPzbwmeey2PwaLGsURTJ/0rJWOqSgkFMtC8O1jOAtuubli8B6ncG1JwIXv cqzi7TXcF5tT1BiIEXQCtmnosqyxDgc= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-528-4wnOw8F3Plyy17JyipZ8zQ-1; Mon, 23 May 2022 01:54:09 -0400 X-MC-Unique: 4wnOw8F3Plyy17JyipZ8zQ-1 Received: by mail-ed1-f72.google.com with SMTP id r8-20020a056402018800b00428b43999feso9974613edv.5 for ; Sun, 22 May 2022 22:54:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:references :message-id:mime-version:content-transfer-encoding; bh=SyQ0q/1cfv9Dr9N4yrSfFi2vvZn6zBLKl1GWo7CSuOw=; b=JOkF3JaoZYKW8+gtd4e0yZ21Cfysk91PWhMC4h4/Gmf2o5Q0TeKZMF/npJvcJBB3qC H0RGjmopu9H2r7TahaJvnj75aN+u7neMkVGLKjkQOxR+ZIKWTPQKDzni4R3Euu6dO1jz ThEcFwTHpzPVY3B0QcbwQx3OGJIEhQ5s5fuGwSK/ljB6TiKkGrudMqfN95L0kpdB2Z0a jyHIm3HhD5vDdqgN6IqaMHVNhQPq2wfmeixaqcJsRLlSAYSlGqRBCCwK4MsPn9MN7MUh NfMzZ55yyYtw5y21jSE4aRCRs11RWfVGW6raV64nXZo5pZbqrU5JrAEf0VNkhTLvNyQ7 QqWg== X-Gm-Message-State: AOAM530Z1cESpghY4opfip4Oz05aUrKZ3Lyy9IGaEOLSMpZTm/K/maxB QKGVyVqODKsYVSZcTIQfLfANa69tcK/DXGHqH41IX2KHeBO0aGSv5hzKLef63avtS5QhtmVSKq6 1F82rsYriLFk3ZMbIQOMjaUBJ X-Received: by 2002:a05:6402:34c2:b0:42b:66d3:7b07 with SMTP id w2-20020a05640234c200b0042b66d37b07mr4193951edc.275.1653285248593; Sun, 22 May 2022 22:54:08 -0700 (PDT) X-Received: by 2002:a05:6402:34c2:b0:42b:66d3:7b07 with SMTP id w2-20020a05640234c200b0042b66d37b07mr4193941edc.275.1653285248330; Sun, 22 May 2022 22:54:08 -0700 (PDT) Received: from [127.0.0.1] (93-55-6-57.ip261.fastwebnet.it. [93.55.6.57]) by smtp.gmail.com with ESMTPSA id 1-20020a170906100100b006f506ed0b42sm5650794ejm.48.2022.05.22.22.54.07 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 May 2022 22:54:07 -0700 (PDT) Date: Mon, 23 May 2022 07:54:01 +0200 From: Paolo Bonzini To: Naresh Kamboju , Nathan Chancellor , Vitaly Kuznetsov , Yury Norov CC: kernel test robot , llvm@lists.linux.dev, kbuild-all@lists.01.org, Linux Memory Management List , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Ingo Molnar , Jim Mattson , Joerg Roedel , Sean Christopherson , Thomas Gleixner , Wanpeng Li , kvm list , open list , X86 ML , lkft-triage@lists.linaro.org Subject: =?US-ASCII?Q?Re=3A_=5Blinux-next=3Amaster_12308/12886=5D_arch/x86/kvm/hyp?= =?US-ASCII?Q?erv=2Ec=3A1983=3A22=3A_warning=3A_sh?= =?US-ASCII?Q?ift_count_=3E=3D_width_of_type?= In-Reply-To: References: <202205201624.A4IhDdYX-lkp@intel.com> Message-ID: <3A8C8235-7FC0-4FDF-921A-E53B57096256@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The patch is already merged in 5=2E18=2E Paolo Il 23 maggio 2022 07:49:42 CEST, Naresh Kamboju ha scritto: >On Fri, 20 May 2022 at 21:18, Nathan Chancellor wro= te: >> >> Hi Yury, >> >> On Fri, May 20, 2022 at 04:24:32PM +0800, kernel test robot wrote: >> > tree: https://git=2Ekernel=2Eorg/pub/scm/linux/kernel/git/next/linu= x-next=2Egit master >> > head: 21498d01d045c5b95b93e0a0625ae965b4330ebe >> > commit: 81db71a60292e9a40ae8f6ef137b17f2aaa15a52 [12308/12886] KVM: x= 86: hyper-v: replace bitmap_weight() with hweight64() >> > config: i386-randconfig-a011 (https://download=2E01=2Eorg/0day-ci/arc= hive/20220520/202205201624=2EA4IhDdYX-lkp@intel=2Ecom/config) >> > compiler: clang version 15=2E0=2E0 (https://github=2Ecom/llvm/llvm-pr= oject e00cbbec06c08dc616a0d52a20f678b8fbd4e304) >> > reproduce (this is a W=3D1 build): >> > wget https://raw=2Egithubusercontent=2Ecom/intel/lkp-tests/ma= ster/sbin/make=2Ecross -O ~/bin/make=2Ecross >> > chmod +x ~/bin/make=2Ecross >> > # https://git=2Ekernel=2Eorg/pub/scm/linux/kernel/git/next/li= nux-next=2Egit/commit/?id=3D81db71a60292e9a40ae8f6ef137b17f2aaa15a52 >> > git remote add linux-next https://git=2Ekernel=2Eorg/pub/scm/= linux/kernel/git/next/linux-next=2Egit >> > git fetch --no-tags linux-next master >> > git checkout 81db71a60292e9a40ae8f6ef137b17f2aaa15a52 >> > # save the config file >> > mkdir build_dir && cp config build_dir/=2Econfig >> > COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dclang make=2Ecr= oss W=3D1 O=3Dbuild_dir ARCH=3Di386 SHELL=3D/bin/bash >> > >> > If you fix the issue, kindly add following tag as appropriate >> > Reported-by: kernel test robot >> > >> > All warnings (new ones prefixed by >>): >> > >> > >> arch/x86/kvm/hyperv=2Ec:1983:22: warning: shift count >=3D width o= f type [-Wshift-count-overflow] >> > if (hc->var_cnt !=3D hweight64(valid_bank_mask)) >> > ^~~~~~~~~~~~~~~~~~~~~~~~~~ >> > include/asm-generic/bitops/const_hweight=2Eh:29:49: note: expanded= from macro 'hweight64' >> > #define hweight64(w) (__builtin_constant_p(w) ? __const_hweight64(= w) : __arch_hweight64(w)) >> > ^~~~~~~~~~~~~~~~~~= ~~ >> > include/asm-generic/bitops/const_hweight=2Eh:21:76: note: expanded= from macro '__const_hweight64' >> > #define __const_hweight64(w) (__const_hweight32(w) + __const_hweig= ht32((w) >> 32)) >> > = ^ ~~ >> > include/asm-generic/bitops/const_hweight=2Eh:20:49: note: expanded= from macro '__const_hweight32' >> > #define __const_hweight32(w) (__const_hweight16(w) + __const_hweig= ht16((w) >> 16)) >> > ^ >> > note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-l= imit=3D0 to see all) >> > include/asm-generic/bitops/const_hweight=2Eh:10:9: note: expanded = from macro '__const_hweight8' >> > ((!!((w) & (1ULL << 0))) + \ >> > ^ >> > include/linux/compiler=2Eh:56:47: note: expanded from macro 'if' >> > #define if(cond, =2E=2E=2E) if ( __trace_if_var( !!(cond , ## __VA= _ARGS__) ) ) >> > ^~~~ >> > include/linux/compiler=2Eh:58:52: note: expanded from macro '__tra= ce_if_var' >> > #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) = : __trace_if_value(cond)) >> > ^~~~ > >LKFT build system found these build warnings / errors on Linux next-20220= 520=2E > >> I think this is the proper fix, as valid_bank_mask is only assigned u64 >> values=2E Could you fold it into that patch to clear this warning up? > >The proposed patch below was tested and it fixed the reported problem on = 32-bit > >> Cheers, >> Nathan >> >> diff --git a/arch/x86/kvm/hyperv=2Ec b/arch/x86/kvm/hyperv=2Ec >> index b652b856df2b=2E=2Ee2e95a6fccfd 100644 >> --- a/arch/x86/kvm/hyperv=2Ec >> +++ b/arch/x86/kvm/hyperv=2Ec >> @@ -1914,7 +1914,7 @@ static u64 kvm_hv_send_ipi(struct kvm_vcpu *vcpu,= struct kvm_hv_hcall *hc) >> struct hv_send_ipi_ex send_ipi_ex; >> struct hv_send_ipi send_ipi; >> DECLARE_BITMAP(vcpu_mask, KVM_MAX_VCPUS); >> - unsigned long valid_bank_mask; >> + u64 valid_bank_mask; >> u64 sparse_banks[KVM_HV_MAX_SPARSE_VCPU_SET_BITS]; >> u32 vector; >> bool all_cpus; > >Reported-by: Linux Kernel Functional Testing >Tested-by: Linux Kernel Functional Testing > >-- >Linaro LKFT >https://lkft=2Elinaro=2Eorg >