Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp399010lqg; Fri, 1 Mar 2024 08:26:17 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXZkKYii4d4comB8+dX7RFYirBOxY+DcRxJ+YOo4j6aeEBt7Hwj8kdIBn4iEt8r1VwehOYAHEzmglASXlgsAyuOIjNVqq/7vzYj4PoilA== X-Google-Smtp-Source: AGHT+IGan1Ys/IJCD+MC3GrnfS1IHpMB8XrqUqSn3jcMJ0yZ4u9+1SMx3H60OyXi60YUWchTPrYA X-Received: by 2002:a05:6a00:27a3:b0:6e5:3dea:bf51 with SMTP id bd35-20020a056a0027a300b006e53deabf51mr3449251pfb.7.1709310377176; Fri, 01 Mar 2024 08:26:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709310377; cv=pass; d=google.com; s=arc-20160816; b=nhYm2JXr862/tlrPKn88RS3U+gFT62YUpygmUH/TNkPPn8e4CRVUe3wc/5RrL3STnw pxoa20CP9teq/s5GhSKsa/HK/UBeCj3bzRIMKDcBjLGPPyzWhsthKUpol9BMTRj7cbbp gB8/wbcEBnpfranwQfZXZIfU8z1jz27cvMt4ZTZt4tFeGGBd7X5ZN2ERQvTtFLtFc5Hy gkrKjRegbeeWU9REwvBu7P1vV/fkFs6WUy1SDvpXXg8NFPIhSM0P1r3dveznbReV6AER J6oXlb0kqhbLYV6++sBhSpoK7G5nvXIHdt5NobXfRkfAygRgmU+ePDkCxW568GGvu/rK 0AkQ== 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=tmchNfF9CN1adlzNryNnssFGNWubaSOzt0UCfnoW3R8=; fh=lcrs/9zeOZQv7F12S42FN/DgZYxyeBJpDS7pUwvge8E=; b=VGg2EnVYtp/Auehv7/qbbqfXjzYspdkJTLV44cbr92w4HVum0ZK4/zM64SNxbzJY8j D+ky/bp+cenfoPUsV+wkHKFI8vucbHOiTKt/+6IdxojUiSeVRkGD25E61v270rRY0B8j fB8iZr2nMOco11EVH2WTPzDoTyGvW9InYMGn+OwGdNlyrPcy8thu/xh3EThv9sCXtaRq mKX0085ukuM0RdCSebD8vBUqvKGJ5xzymPHERX4zYU+70NsGIXU4RHg07gjFDlK8havb +9i7YAMuo6yQF9HnQaGhK8zk/UEkvXGx5jMeTpDwFLnuO5/t4o2rCkt+vbDoafLTBVAL Io7Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QVzUIz6x; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-88364-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88364-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 e23-20020a63d957000000b005e437941b3dsi3824013pgj.874.2024.03.01.08.26.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 08:26:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-88364-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=QVzUIz6x; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-88364-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88364-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 98EBE28D200 for ; Fri, 1 Mar 2024 11:37:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D29586D1C1; Fri, 1 Mar 2024 11:36:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="QVzUIz6x" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) (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 4568D6BFC9; Fri, 1 Mar 2024 11:36:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709293010; cv=none; b=PwQmFfHNpWfY90SfWUfmtAKnLASMRXrRn7vYHmNWFB8sJXykbubCdib2CwPHgnPJy1tFkf3c5ommoBhIqbszMvQ+cLXy/rR1OpQ5EIte2Cq3G/EwatGo1TzuIrrMaKcQNsZdTV/zWxpbIK3eRxiTp05V6WgaR3w9mi3S+eXpj3c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709293010; c=relaxed/simple; bh=VmuLKrIiPvi0d1zugpUUZmB0Q+nwGsD8HuFFE2t/am4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HIdJWOs0rH38VuMIvo7GAUuP5uQN2jWU0ME+KIV9M5qIonUtEIHOHGZHT5Y6XjEugRTc2vw7bSB6PSmJ62yKob3nQJA9FGKP6iBsucRzjbFOG21UZO6dO7RJD3YhIG58ddZ+H5xnrYDnD+qh+I+f9yOSHGyDfOzEHHq08/vEwi4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=QVzUIz6x; arc=none smtp.client-ip=192.198.163.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709293008; x=1740829008; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=VmuLKrIiPvi0d1zugpUUZmB0Q+nwGsD8HuFFE2t/am4=; b=QVzUIz6xWYgsyl68cfOKEBv0o1zzUu//hfk+PTP2RaJvJn9Ab7v5dV6x hv1uQdDRuKwniprGUCVRMhBYPLJ33K5S4JppTM7gmufLVjnJl008anzKx 9QHA8VYxzjp93ydzoPFi4Ax2xtYDrVZxNJkGQrFmZ9lDakOku2tqHutX+ ExO6o6BuXSlS4gA9jNQMZyFY7bvlTXZ7SyES1XT3OVHwWtQt316O95u6d gfeCJlgm933PMDgLvKGuZb05MB+/s++7qd5XJ75kO7yzzAJBwelvYo34s d1542xcTP0p7d+LMGs3iYoqIq2kVNh82R3R9TONoPx0cJMKzUTsqmEF3F A==; X-IronPort-AV: E=McAfee;i="6600,9927,10999"; a="3688283" X-IronPort-AV: E=Sophos;i="6.06,196,1705392000"; d="scan'208";a="3688283" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2024 03:36:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10999"; a="937037589" X-IronPort-AV: E=Sophos;i="6.06,196,1705392000"; d="scan'208";a="937037589" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 01 Mar 2024 03:36:44 -0800 Received: by black.fi.intel.com (Postfix, from userid 1000) id 621B93BC; Fri, 1 Mar 2024 13:36:43 +0200 (EET) Date: Fri, 1 Mar 2024 13:36:43 +0200 From: "Kirill A. Shutemov" To: "Huang, Kai" Cc: 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 Subject: Re: [PATCH v19 008/130] x86/tdx: Warning with 32bit build shift-count-overflow Message-ID: 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=us-ascii Content-Disposition: inline In-Reply-To: <2f6897c0-1b57-45b3-a1f1-9862b0e4c884@intel.com> 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. -- Kiryl Shutsemau / Kirill A. Shutemov