From patchwork Mon Mar 4 10:12:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 209490 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:fa17:b0:10a:f01:a869 with SMTP id ju23csp1329641dyc; Mon, 4 Mar 2024 02:22:43 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU1MnBHruVOmIDORBFJQ6gL6dXwxOApooJ4eC03MfhocVz2ISqc19D3Efz7WrxoMU1dpI0OXlGUJBeeV14tfNc3xtueiw== X-Google-Smtp-Source: AGHT+IHr/Yj9LSk3JSayjfDGHCPvH8bsYlyEu3vH+v0WCvUxiM5TeSUQTvHk21Grxj8jPI9pUTok X-Received: by 2002:aca:d04:0:b0:3c1:eb85:f478 with SMTP id 4-20020aca0d04000000b003c1eb85f478mr3091128oin.51.1709547763058; Mon, 04 Mar 2024 02:22:43 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709547763; cv=pass; d=google.com; s=arc-20160816; b=XEj1gr5yT9Ufzzb8IHOV6OoGsseI5bSfT/GbFVGkzVfDkG2xSqyqVZ+GR56RYDZf9n R9ARfkP+ROelOiEIAwZVVLV3V9IqBwoKSpWhUWifBsMwqCmKGocizYrykALBLbs3/P4+ VUKfw4bCQumpYvSeBigExM7jKBczUMqfhwJb3jOe1hkAH+rOpD//HzFvhs8GdAt3KeQp 6XtYw7bXyVQhTwpVzDrPPKBvmwE6Zf+9sCRkV+NcmS+6zjfKy6mGCBTCWtTJU1LoVOOu OqgBMJJj/jQa5TkpRTMhe8QlIRae9+UiZPcewDrReotQJkYDtI3VNaQ0Jl/6IZG+hACY is3Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=date:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:subject:cc:to:from:dkim-signature :dkim-signature:message-id; bh=6Jgk9G7c0E4dzMxbvaTsjGPBA2bcPCPscX5bks01Uro=; fh=XPJs5ZGCvlB7w9yfpC1hED1EJsKLDZjsVhRhMNCPkns=; b=uBLMKOFeRV/AuinIWPzJ9kJfLnR0dQdytzndykWScNzZbTN8HSEIvWPpSRO4exXIeH 7Ab2QULCi+JIbCjsovNiamdTh4v2uCZrOCEQ7yyjR3Bx0GayYKzDejV1uycTTQzV10U4 1XZVgK1/ZwLcEJ2Kdtwh89DL/tRWdl/Vhhk6t+Fh7ux4Zjx8B9b1vsYPA5uAmvliyx4W uB4DmPbrvpBoROd0dGDEmiGpke2j8WcDXrA/ViqZGF2aIaE6PsjcoeKoEhqnethWipGr tQuzptDe2OI0NnoaJureF+9LQitBttS/3Ocat7MXGQceYB0MwhhPTW8wUZXBUAtgjMtl XIgQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=NO8lSC7k; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=90m2Rl2o; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-90397-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90397-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id l13-20020a635b4d000000b005d8b8ca425esi8095158pgm.308.2024.03.04.02.22.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 02:22:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-90397-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=NO8lSC7k; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=90m2Rl2o; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-90397-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90397-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id CE445B225AE for ; Mon, 4 Mar 2024 10:16:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DCD833D386; Mon, 4 Mar 2024 10:12:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="NO8lSC7k"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="90m2Rl2o" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 C9CC53C087; Mon, 4 Mar 2024 10:12:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709547151; cv=none; b=FFcSC3gQpa3js+0yrT9kSpacicZ8nvQ9sVe+waCzdl9PXGc0QL5wht0cjrN69NXsDX6y27zoX8khZxZZ2skuxFEFWman18ePOTxk7m+DJJx3IHYtruCvwYOvwMM0vzGax/fGF5pMX7sHYriDRO7HevHGKbhPpU1Xgs7z5QanjR0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709547151; c=relaxed/simple; bh=0nwFi0bkuZGiGtiI8Nsx6zeMClnjEJolxPelJmGOFdM=; h=Message-ID:From:To:Cc:Subject:References:MIME-Version: Content-Type:Date; b=IaRpnAnzaTz4hMHTdrwgmYMf99MVy0xUZ9v+3pb37Ynu+LMIKmq6ZWOyCpffqhJL0HVmSBiiToKkZT3yXkBuAJZR2KbF+jv6GF448zZRyAKDXX4xaPxF7OpsT+UoED7un2adCz5J8pU9PnoFUbhBrblAGTp6Uosa43946PQ2gXM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=NO8lSC7k; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=90m2Rl2o; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Message-ID: <20240304005104.787173239@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1709547148; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=6Jgk9G7c0E4dzMxbvaTsjGPBA2bcPCPscX5bks01Uro=; b=NO8lSC7k+xuFTRyI7RDoRaIx57KuVWWkTdO69WoHfx1l4s6SvALgnsdiH23XFiV0Lku7FA dFs+/vfPDCaI0i1XKSKbxrncJHkGUG05L4tLpLOp6m+ZmZbTGgPCfhhZBBiF+bFA544pCJ Ife3C4CeGfrygHWbseJHDp0S/ETIf5JYa8SsWTqBXc7skRZPoSESnlEuD2kdgubT1R9EVT 6RYMVtbvOrj7448mWylKQrOXulwXNdxrP4LOE7RMFBBkhpZMVcm1Im0N0ll3765Z99m+h3 9z3xbVIDoOFuwpd4eNp0ZoYCgCoNyerplkqIAKvbbAcpY1A4F76T8u5cyx9Fvg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1709547148; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=6Jgk9G7c0E4dzMxbvaTsjGPBA2bcPCPscX5bks01Uro=; b=90m2Rl2oJgJFtAWub/kQ/ti4ooEu+pBEJZ8iuepWmfQWR/jnE01Sl2VKRtNiOwEbOQEsbP MKVHn8eclKAYCPAQ== From: Thomas Gleixner To: LKML Cc: x86@kernel.org, Linus Torvalds , Uros Bizjak , linux-sparse@vger.kernel.org, lkp@intel.com, oe-kbuild-all@lists.linux.dev Subject: [patch 8/9] x86/cpu: Provide a declaration for itlb_multihit_kvm_mitigation References: <20240303235029.555787150@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Date: Mon, 4 Mar 2024 11:12:28 +0100 (CET) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792590755026982711 X-GMAIL-MSGID: 1792590755026982711 sparse complains rightfully about the missing declaration which has been placed sloppily into the usage site: bugs.c:2223:6: sparse: warning: symbol 'itlb_multihit_kvm_mitigation' was not declared. Should it be static? Add it to spec-ctrl.h where it belongs and remove the one in the kvm code. Signed-off-by: Thomas Gleixner --- arch/x86/include/asm/spec-ctrl.h | 2 ++ arch/x86/kvm/mmu/mmu.c | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) --- a/arch/x86/include/asm/spec-ctrl.h +++ b/arch/x86/include/asm/spec-ctrl.h @@ -96,4 +96,6 @@ static inline void speculative_store_byp extern void speculation_ctrl_update(unsigned long tif); extern void speculation_ctrl_update_current(void); +extern bool itlb_multihit_kvm_mitigation; + #endif --- a/arch/x86/kvm/mmu/mmu.c +++ b/arch/x86/kvm/mmu/mmu.c @@ -53,12 +53,11 @@ #include #include #include +#include #include #include "trace.h" -extern bool itlb_multihit_kvm_mitigation; - static bool nx_hugepage_mitigation_hard_disabled; int __read_mostly nx_huge_pages = -1;