From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E973BECAAA1 for ; Mon, 5 Sep 2022 07:18:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235537AbiIEHSW (ORCPT ); Mon, 5 Sep 2022 03:18:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237082AbiIEHSF (ORCPT ); Mon, 5 Sep 2022 03:18:05 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2B8A4BA77 for ; Mon, 5 Sep 2022 00:12:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662361961; x=1693897961; h=date:from:to:cc:subject:message-id:mime-version; bh=H/iXAAs8mnEE66yvwKyYZQFcE4TdfZeIBOZR8Aven2w=; b=kc0aQZryh3JIIQhisxCLiRoLqB+sngMEeOFH/HMZ74Lx6SfopipDquAT rxNJnjj219v/4Yd2fJjZe8laf39AR5h50pGWFgfeh/CW12Fj5BV79XBHR PPKB9ag+6JE3odF5rtFAuEBo9CgEMNx38BzEN28OUJQKCne2AbsrHRx/Q kpk9C0iIlnhXpJz2s6i+P2DDSy7YyUadIJb9I8rxjYx8d1sQ594vTubZa VSdttxH4+x0SyNLzTPeAbiySleK7O46czlpcxf5cH+jGs8SlWJy/ATMPm ixO55oCd6pMQPTFBndEQVs+fO9ngPm3oXEXrYtmnf/6xNM7PA9uM3Qr2X w==; X-IronPort-AV: E=McAfee;i="6500,9779,10460"; a="296328532" X-IronPort-AV: E=Sophos;i="5.93,290,1654585200"; d="scan'208";a="296328532" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Sep 2022 00:10:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,290,1654585200"; d="scan'208";a="681965602" Received: from lkp-server02.sh.intel.com (HELO 95dfd251caa2) ([10.239.97.151]) by fmsmga004.fm.intel.com with ESMTP; 05 Sep 2022 00:10:22 -0700 Received: from kbuild by 95dfd251caa2 with local (Exim 4.96) (envelope-from ) id 1oV6FS-0003v7-0Q; Mon, 05 Sep 2022 07:10:22 +0000 Date: Mon, 5 Sep 2022 15:10:15 +0800 From: kernel test robot To: Sean Christopherson Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, Paolo Bonzini Subject: arch/x86/kvm/mmu/paging_tmpl.h:106:24: sparse: sparse: cast truncates bits from constant value (ffffffffff000 becomes fffff000) Message-ID: <202209051509.RDisCzFu-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sean, FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant. tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 7e18e42e4b280c85b76967a9106a13ca61c16179 commit: 70e41c31bc7776b262cd9f524df3dfc2b5869a0a KVM: x86/mmu: Use common logic for computing the 32/64-bit base PA mask date: 3 months ago config: i386-randconfig-s001-20220905 (https://download.01.org/0day-ci/archive/20220905/202209051509.RDisCzFu-lkp@intel.com/config) compiler: gcc-11 (Debian 11.3.0-5) 11.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.4-39-gce1a6720-dirty # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=70e41c31bc7776b262cd9f524df3dfc2b5869a0a git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout 70e41c31bc7776b262cd9f524df3dfc2b5869a0a # save the config file mkdir build_dir && cp config build_dir/.config make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash arch/x86/kvm/ If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) arch/x86/kvm/mmu/mmu.c:2550:9: sparse: sparse: context imbalance in 'mmu_try_to_unsync_pages' - different lock contexts for basic block arch/x86/kvm/mmu/mmu.c: note: in included file: >> arch/x86/kvm/mmu/paging_tmpl.h:106:24: sparse: sparse: cast truncates bits from constant value (ffffffffff000 becomes fffff000) arch/x86/kvm/mmu/paging_tmpl.h:426:24: sparse: sparse: cast truncates bits from constant value (ffffffffff000 becomes fffff000) arch/x86/kvm/mmu/mmu.c:4618:57: sparse: sparse: cast truncates bits from constant value (ffffff33 becomes 33) arch/x86/kvm/mmu/mmu.c:4620:56: sparse: sparse: cast truncates bits from constant value (ffffff0f becomes f) arch/x86/kvm/mmu/mmu.c:4622:57: sparse: sparse: cast truncates bits from constant value (ffffff55 becomes 55) vim +106 arch/x86/kvm/mmu/paging_tmpl.h b3fcdb04a98035 arch/x86/kvm/mmu/paging_tmpl.h Sean Christopherson 2022-06-14 103 e04da980c35d75 arch/x86/kvm/paging_tmpl.h Joerg Roedel 2009-07-27 104 static gfn_t gpte_to_gfn_lvl(pt_element_t gpte, int lvl) 5fb07ddb183eb4 drivers/kvm/paging_tmpl.h Avi Kivity 2007-11-21 105 { e04da980c35d75 arch/x86/kvm/paging_tmpl.h Joerg Roedel 2009-07-27 @106 return (gpte & PT_LVL_ADDR_MASK(lvl)) >> PAGE_SHIFT; 5fb07ddb183eb4 drivers/kvm/paging_tmpl.h Avi Kivity 2007-11-21 107 } 5fb07ddb183eb4 drivers/kvm/paging_tmpl.h Avi Kivity 2007-11-21 108 :::::: The code at line 106 was first introduced by commit :::::: e04da980c35d75fa050ba4009ad99025432d8d7d KVM: MMU: make page walker aware of mapping levels :::::: TO: Joerg Roedel :::::: CC: Avi Kivity -- 0-DAY CI Kernel Test Service https://01.org/lkp