Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp248570lqs; Tue, 5 Mar 2024 00:13:26 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXngdDchUp2pPoxfKUCdNPliCEowuf8OknLmKQSQt7RucirKu0eaVVtnwnI5Dbcvol1KwoUrPEYbcjfD4hslcl5KY9vrPVYRf8drlZqjQ== X-Google-Smtp-Source: AGHT+IFO4YVGSe225LjJhJrdMnGxJ+vw+uLr5SVHVsaTr20X6/7B3Plc3g5Er1YPAk7uxTC6kwE3 X-Received: by 2002:a17:902:d2c6:b0:1dc:91a1:8dbb with SMTP id n6-20020a170902d2c600b001dc91a18dbbmr1262675plc.57.1709626406245; Tue, 05 Mar 2024 00:13:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709626406; cv=pass; d=google.com; s=arc-20160816; b=skhm5hDtTRHWp6jAkYlgghfuikDNpG9T/HUeu/6RnqZ3eCMbC7qd4DVFrxybbRDlbp BEXNv9Q8i2WckSXMFWKPk2m7qXzYLIkPpMF2CT0Of+19TYq29OdlRFgnBuLI2zEs61vl ifUBZZf3fAT57Xk0eXNjfk32i2RY2DtkvczhBJuPf7pf7p6ALVzo6OXxwg/SD2nLoHcv ngxJ8dTq1/09G0EnjV7RyaGGFW/FTiNolJYYGCawbR5K0JeuwWhnjGUqK7LGn/4iu+6u apXvo1uuMbRV71t5BKNjrlQQyDTFo2vXkhvBiOziMplmKB6ps+Q66R41nTfZBIbliRq1 1q7Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=jgC1jJO6p79Uezhiw7At0m3ZA3HpAGgTFsgC746OLnY=; fh=EHUyX5GYp1UjXNoGARx2RtQJEB+zROekuAKXlbT9mu8=; b=H79tlDnC8gjm940iJ4l9731ryt6ynBQHK77pir0eIEiswsqVcoMxnXCfZp5tMdcLal 3PkykHZ2Hjwej01K7pPJWkwCFNmIE9UdE9K/timA/7AKKGmb02Q/nt7Eoo7nQ3Ezy5ZY 2ykdTxOZfeB+Bq2AQCN7FzMfk7q7Q9RQ/4UZWIq8+t9YwPHf5mXu+j8yJndUL5ky0b99 IwluumbEC21VWEMXjxwgmcCSYStqkN09m3ypSQUSi426Pb5t9Ovgfcx5Mr3BwPY46F4F keMCIOanbwYRKEE5gfL4mYZFkcFKE7fI2Pg9svaSHBCRAxp+qCyCMul+kXqoQSGMkExS xpKA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ADOCVDV7; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-91873-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91873-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id k18-20020a170902c41200b001dccdf3aeedsi9802016plk.601.2024.03.05.00.13.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 00:13:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-91873-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ADOCVDV7; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-91873-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91873-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id C499C282FCC for ; Tue, 5 Mar 2024 08:13:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 431698004F; Tue, 5 Mar 2024 08:12:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="ADOCVDV7" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 67EB67F7E9; Tue, 5 Mar 2024 08:12:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709626342; cv=none; b=I19bnlvUgCXg1dWdcLn0SrJg5oIgjwR+QiagQCw68Zhm9iqc+Mugf5ZIM9Y2rmfN55l1MwZUuXo5Uzh3Qm34n0tvSdrV3hxAMibZAlp5sIxrVHGmshkusrdq2y1GhxRpV2YWNEwe6r8cO2cpTWuErCVL9BwHfip66zsoQ2GTYyU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709626342; c=relaxed/simple; bh=88ek+UxDG050RNVEu9EGg8jJALfsBYFXgvNa3kzC4ho=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ekTUIuQXF90w9Az2Vuu55OThOa2SBT1/8a8lzhd4uwMJwOm+nF57TN1DAIKj7mVa0naGpVjuYgpeBtsSpVcmEl2A+sCIB+FGkP7RqxVMgOsmHbutN/KVyQxayIA5Xq3nVEbEehGd0n7GWZyYwTB8sJpgiFtfEptoDm/iOBeYwS4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=ADOCVDV7; arc=none smtp.client-ip=198.175.65.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709626341; x=1741162341; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=88ek+UxDG050RNVEu9EGg8jJALfsBYFXgvNa3kzC4ho=; b=ADOCVDV7aBjjxuj/jiZ5MIIlaFElcJMl0tBO7YGlhinF30bODbaBOONi CUMqpa+aZ7a5WTKOWiZj41E/tdAN4dSg3y0tXBX9f0TJ7YRs1Tp8UC+Jf /6/GCPReFn+9num0pSP+Hgk1XH8FMn3OJEO09sx8mtn4stV3rV8WYC8iP A9cEHFjUKwcO4qHtedvNBekaFQ42AMuQDeNssusIDnRw0dlAzsOXR2Jk5 s7tBQsH9BtfH1NPq7U44FPXg3/4SnY9C6Cb9zydzzRnHR9dcAuNdIL93a OgzPEig739DR/UVlmNs3lBydQb5X+cbFV+PFN6OPfa7q3oyR7vznlzU+P w==; X-IronPort-AV: E=McAfee;i="6600,9927,11003"; a="14743767" X-IronPort-AV: E=Sophos;i="6.06,205,1705392000"; d="scan'208";a="14743767" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Mar 2024 00:12:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,205,1705392000"; d="scan'208";a="40282761" Received: from ls.sc.intel.com (HELO localhost) ([172.25.112.31]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Mar 2024 00:12:19 -0800 Date: Tue, 5 Mar 2024 00:12:19 -0800 From: Isaku Yamahata To: "Kirill A. Shutemov" Cc: "Huang, Kai" , isaku.yamahata@intel.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, isaku.yamahata@gmail.com, Paolo Bonzini , erdemaktas@google.com, Sean Christopherson , Sagi Shahar , chen.bo@intel.com, hang.yuan@intel.com, tina.zhang@intel.com, isaku.yamahata@linux.intel.com Subject: Re: [PATCH v19 008/130] x86/tdx: Warning with 32bit build shift-count-overflow Message-ID: <20240305081219.GC10568@ls.amr.corp.intel.com> References: <2f6897c0-1b57-45b3-a1f1-9862b0e4c884@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: On Fri, Mar 01, 2024 at 01:36:43PM +0200, "Kirill A. Shutemov" wrote: > On Thu, Feb 29, 2024 at 11:49:13AM +1300, Huang, Kai wrote: > > > > > > On 26/02/2024 9:25 pm, isaku.yamahata@intel.com wrote: > > > From: Isaku Yamahata > > > > > > This patch fixes the following warnings. > > > > > > In file included from arch/x86/kernel/asm-offsets.c:22: > > > arch/x86/include/asm/tdx.h:92:87: warning: shift count >= width of type [-Wshift-count-overflow] > > > arch/x86/include/asm/tdx.h:20:21: note: expanded from macro 'TDX_ERROR' > > > #define TDX_ERROR _BITUL(63) > > > > > > ^~~~~~~~~~ > > > > > I think you trim the warning message. I don't see the actual user of the > define. Define itself will not generate the warning. You need to actually > use it outside of preprocessor. I don't understand who would use it in > 32-bit code. Maybe fixing it this way masking other issue. > > That said, I don't object the change itself. We just need to understand > the context more. v18 used it as stub function. v19 dropped it as the stub was not needed. -- Isaku Yamahata