Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1171958rbb; Mon, 26 Feb 2024 00:30:49 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXkybHNDOelmTQ+2pRO7NTc1DfvmkHxKhTflUjGaAq+oBBy6gBeC0OFDxmJDQ+MX0KYsdU75G2IQP4ybCbPa69oIfLeroLTP4E7lDlEIA== X-Google-Smtp-Source: AGHT+IE1b3WjvEFKSVjet4ABn/7Yjvo3V9C7E/u8NdodZqnfxL35jWt2rFqf3aUMABbyL0+kQ+Q6 X-Received: by 2002:ac2:46e4:0:b0:512:f5a7:e45b with SMTP id q4-20020ac246e4000000b00512f5a7e45bmr2482314lfo.27.1708936249225; Mon, 26 Feb 2024 00:30:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708936249; cv=pass; d=google.com; s=arc-20160816; b=fhBhdk9/HNpS9qoACPo8cMO8nOiq/Ikjgvmrgm7c2gYiMofEEkfh+Mq1OI5QQnRGMi CYY3rNk9nmQCfpIfLYbZwBcyKbNWARnGLgUhQTTFt9c6jL0pRqevMYp38aKDU6LchuWl srnDKkOL868sudyyUYzsy+ErOdtAJLti13N+SujZXyAguRkdF7KcKSjcIsF0RlqNkiqd 5hHldO7qiWbMuulx8aIFogE8Hf55/eaDrwXDIcXNig3ABq2gF/5q1tXtJQ1SBlg18jTs f6inEdR/Anc+wshH0Lr4MmA67lN7w4IFOIU2Hwb4l1emZSqN1iatMVnxw4nmxuzmEygJ xr1A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=T+ZcJzXjW7zJ/W6gngLLnSRCfU0cBr14GqiqNogUozs=; fh=Itbyk7CEvizIrzGEESCqq3I2tZgG1kc/GkVOa3S7Hsg=; b=OjFqsexBz+zIFE9vnCpHuQBLgk9uZRh0vPL9r4TO4PK6pKO3RUltD2N+RnHfk36/4y sMvxR0pfv8um4H1v23Pg4H0AwiRptm6WQAQKha7ki1ScCSAY2u/MP8xmTHzlEt5TT/FJ 2YK+Qbzr+IcMVKRcQz8uGzOHBfw/VKCfM+Ndi1svnUQakDhEDQ6FaPF6sBPNgPk7GCaI BI25nsb3uJ95Raa15XceH1nQF2UAyL5VEBL+uN5agbtvjxoYTVdW5ceMVtleIq2FmtYf i8iRv/MswUPbHLVOR7XbwyCH8S176WX0nqPnTPbVe3sdA4ZQO2z4fmgif4Ftg0G08K09 ic1Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=WGwzpJXw; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-80769-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80769-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id di24-20020a056402319800b00564d9e59a3esi1898415edb.135.2024.02.26.00.30.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 00:30:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-80769-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=WGwzpJXw; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-80769-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80769-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 am.mirrors.kernel.org (Postfix) with ESMTPS id D95011F242E8 for ; Mon, 26 Feb 2024 08:30:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 830A84CE0F; Mon, 26 Feb 2024 08:27:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="WGwzpJXw" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) (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 3C2A72576D; Mon, 26 Feb 2024 08:27:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708936063; cv=none; b=O+AE/ZpQ1xouLjRqgScAyXtpI20QTAl9//cEnfXY8Th+5vplYerD8GqjvQin4HFJ0JMpqKrKCGtv5/yfAt+rwXHs3UfDkMRsi58CMjOATvjwC1gnSDOeG5dRphW/Mc23XfSdWU0RqkC3fC7DyRvUy2mbV8AzReUB5P1GI28pn9c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708936063; c=relaxed/simple; bh=xIS0IEpU4jLV8PiHi+HchMYIeNnm0fFPNPHfNFUxmaM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=UEhwOwvOd/UgI7Hs3zJ7AFzlYt/bM+/NJnzqRqJgFx0EiELstCuGiGtGTXNIL6Fn/fpSmDSt9B2SjkOS27lKvyG7etXX5qXR2plQ/R6dPuZZrQDrAj4Yk4FZlYyh65TuUoW0sEPamtiDQq2y4aoMk9eSdzjODDfqcQ5rW6ociD8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=WGwzpJXw; arc=none smtp.client-ip=192.198.163.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=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=1708936061; x=1740472061; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=xIS0IEpU4jLV8PiHi+HchMYIeNnm0fFPNPHfNFUxmaM=; b=WGwzpJXwqFrom4jDm3BFVTCqX7uiDXqoq3mIwbVakbW6l008gXz/RNix BjCZzENr5zbRYZSarOCuEeMpH2DMa70c66bMVCLEn8xReOwqwqo6xJHAF R9NUK9bug+GKGKhcT9xQNyUJZgj6QWQtONP91mCBUyaA9q4WqcP0T4bRq CwhXLzMyizBc+12weAZyofPl98hrEDGzrkld3wb2utTQrYbDsWFEXlUXo S4fUrNx8zIYnHXDiyJFl19/OJ8dGHuSQWQ8uvruMzWg0yw+/g78iHc0mX d4I9nzkgEaULD9vjkPmfnAVAkV151qVeAw3+TPff69H+5M5NejDwLSsU9 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10995"; a="28631456" X-IronPort-AV: E=Sophos;i="6.06,185,1705392000"; d="scan'208";a="28631456" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Feb 2024 00:27:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,185,1705392000"; d="scan'208";a="6474311" Received: from ls.sc.intel.com (HELO localhost) ([172.25.112.31]) by fmviesa007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Feb 2024 00:27:39 -0800 From: isaku.yamahata@intel.com To: kvm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: isaku.yamahata@intel.com, isaku.yamahata@gmail.com, Paolo Bonzini , erdemaktas@google.com, Sean Christopherson , Sagi Shahar , Kai Huang , chen.bo@intel.com, hang.yuan@intel.com, tina.zhang@intel.com Subject: [PATCH v19 008/130] x86/tdx: Warning with 32bit build shift-count-overflow Date: Mon, 26 Feb 2024 00:25:10 -0800 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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) ^~~~~~~~~~ Also consistently use ULL for TDX_SEAMCALL_VMFAILINVALID. Fixes: 527a534c7326 ("x86/tdx: Provide common base for SEAMCALL and TDCALL C wrappers") Signed-off-by: Isaku Yamahata --- arch/x86/include/asm/tdx.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/tdx.h b/arch/x86/include/asm/tdx.h index 16be3a1e4916..1e9dcdf9912b 100644 --- a/arch/x86/include/asm/tdx.h +++ b/arch/x86/include/asm/tdx.h @@ -17,9 +17,9 @@ * Bits 47:40 == 0xFF indicate Reserved status code class that never used by * TDX module. */ -#define TDX_ERROR _BITUL(63) +#define TDX_ERROR _BITULL(63) #define TDX_SW_ERROR (TDX_ERROR | GENMASK_ULL(47, 40)) -#define TDX_SEAMCALL_VMFAILINVALID (TDX_SW_ERROR | _UL(0xFFFF0000)) +#define TDX_SEAMCALL_VMFAILINVALID (TDX_SW_ERROR | _ULL(0xFFFF0000)) #define TDX_SEAMCALL_GP (TDX_SW_ERROR | X86_TRAP_GP) #define TDX_SEAMCALL_UD (TDX_SW_ERROR | X86_TRAP_UD) -- 2.25.1