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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 25B58CA0EE4 for ; Sun, 17 Aug 2025 08:24:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=VrXzY5pRQG+6YAEHW1e0Hgne9m0J88mgutren8r6lQU=; b=ngACn09cfDh2eX V3XwRwHPOOd+302u4Ea+OjLF7EpkMBvavXASaryPSR1NxuyiLcbJKAsBy2ERMc5oVWX0/J+JT+SPt n6qMqG2GDVK/bIPWwLqeDowAebae3KKUDyOHq5fHP/4OuKFDhorsVDSxluAaUawSKEBlqu6xOExcJ aaHv42Jbx4a//J8Bnaj52hmli7fLybDe9Y4z83N/HsFfgF7+aRpEnV3FsT9ANl568kP4Y+RSM44Aj 6yHN8lU/401fp8WRj+lfaUlsQeYwdjgLLJAVneSj+P6FFZO0sdQqX1a1869HAZO0GD2/SGd9yzJBi su8x8CA1BsOqxjZZIG9w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1unYgM-00000005Twz-40ld; Sun, 17 Aug 2025 08:24:02 +0000 Received: from mgamail.intel.com ([192.198.163.10]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1unYgJ-00000005TvS-0zDs; Sun, 17 Aug 2025 08:24:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1755419039; x=1786955039; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=RZAnz7L85Wfz24qIoBnlsJGnPIYsmf8V4ssxmCvYkzI=; b=brwESoGStzpZjW5gDFQf22yQE9E1N4aUNrlaBbSC9jRGqklC6KijcQkX Y+bJ0zGlG+G4CeaRkJXXi/1Jf64cYLV7UoCrVIXWlhbG3Jm1GcK0XRc1s Vpyqp+yrux+0N4MM9GsOjGTR20R+xW6auMNAQKIKWSsTLQUuh/ju/bDSl 2e35wlj/fq6m7lqBD60eQVQV4obJE6uyxpDF7k68h23WqhcDClkkk/KSe KZQkZRs9aK2J+JfvbXerPV/19cgdacO0C41MC8aZ8JWf3P9FR5jd7kbeK 4bTjm2DF9OzfOOyFjLWnGn2Tc7ksWfBqzGMwv8CE81BnCYzuHoLIQ9fXT g==; X-CSE-ConnectionGUID: fnM4GZ/yRluSRdCuRtiuaA== X-CSE-MsgGUID: sPvanEhGR0uZmRrQu7XvYQ== X-IronPort-AV: E=McAfee;i="6800,10657,11524"; a="69041019" X-IronPort-AV: E=Sophos;i="6.17,293,1747724400"; d="scan'208";a="69041019" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Aug 2025 01:23:51 -0700 X-CSE-ConnectionGUID: bjJLIwlUSRmjcf8/bTZHlg== X-CSE-MsgGUID: 7anPUwZpTUSNNe2QAQ62FQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.17,293,1747724400"; d="scan'208";a="168147451" Received: from lkp-server02.sh.intel.com (HELO 4ea60e6ab079) ([10.239.97.151]) by fmviesa010.fm.intel.com with ESMTP; 17 Aug 2025 01:23:47 -0700 Received: from kbuild by 4ea60e6ab079 with local (Exim 4.96) (envelope-from ) id 1unYg5-000DQN-0O; Sun, 17 Aug 2025 08:23:45 +0000 Date: Sun, 17 Aug 2025 16:22:50 +0800 From: kernel test robot To: fangyu.yu@linux.alibaba.com, anup@brainfault.org, atish.patra@linux.dev, paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, alex@ghiti.fr Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, guoren@linux.alibaba.com, guoren@kernel.org, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Fangyu Yu Subject: Re: [PATCH] RISC-V: KVM: Write hgatp register with valid mode bits Message-ID: <202508171655.76Ifmphq-lkp@intel.com> References: <20250816073234.77646-1-fangyu.yu@linux.alibaba.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20250816073234.77646-1-fangyu.yu@linux.alibaba.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250817_012359_285607_87F49A63 X-CRM114-Status: GOOD ( 10.03 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Hi, kernel test robot noticed the following build warnings: [auto build test WARNING on kvm/queue] [also build test WARNING on kvm/next mst-vhost/linux-next linus/master v6.17-rc1 next-20250815] [cannot apply to kvm/linux-next] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/fangyu-yu-linux-alibaba-com/RISC-V-KVM-Write-hgatp-register-with-valid-mode-bits/20250816-153513 base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue patch link: https://lore.kernel.org/r/20250816073234.77646-1-fangyu.yu%40linux.alibaba.com patch subject: [PATCH] RISC-V: KVM: Write hgatp register with valid mode bits config: riscv-allyesconfig (https://download.01.org/0day-ci/archive/20250817/202508171655.76Ifmphq-lkp@intel.com/config) compiler: clang version 16.0.6 (https://github.com/llvm/llvm-project 7cbf1a2591520c2491aa35339f227775f4d3adf6) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250817/202508171655.76Ifmphq-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202508171655.76Ifmphq-lkp@intel.com/ All warnings (new ones prefixed by >>): arch/riscv/kvm/vmid.c:31:24: error: call to undeclared function 'kvm_riscv_gstage_mode'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] csr_write(CSR_HGATP, (kvm_riscv_gstage_mode() << HGATP_MODE_SHIFT) | HGATP_VMID); ^ >> arch/riscv/kvm/vmid.c:31:48: warning: shift count >= width of type [-Wshift-count-overflow] csr_write(CSR_HGATP, (kvm_riscv_gstage_mode() << HGATP_MODE_SHIFT) | HGATP_VMID); ^ ~~~~~~~~~~~~~~~~ arch/riscv/include/asm/csr.h:538:38: note: expanded from macro 'csr_write' unsigned long __v = (unsigned long)(val); \ ^~~ 1 warning and 1 error generated. vim +31 arch/riscv/kvm/vmid.c 24 25 void __init kvm_riscv_gstage_vmid_detect(void) 26 { 27 unsigned long old; 28 29 /* Figure-out number of VMID bits in HW */ 30 old = csr_read(CSR_HGATP); > 31 csr_write(CSR_HGATP, (kvm_riscv_gstage_mode() << HGATP_MODE_SHIFT) | HGATP_VMID); 32 vmid_bits = csr_read(CSR_HGATP); 33 vmid_bits = (vmid_bits & HGATP_VMID) >> HGATP_VMID_SHIFT; 34 vmid_bits = fls_long(vmid_bits); 35 csr_write(CSR_HGATP, old); 36 37 /* We polluted local TLB so flush all guest TLB */ 38 kvm_riscv_local_hfence_gvma_all(); 39 40 /* We don't use VMID bits if they are not sufficient */ 41 if ((1UL << vmid_bits) < num_possible_cpus()) 42 vmid_bits = 0; 43 } 44 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv