Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp8610444ybl; Thu, 16 Jan 2020 20:52:20 -0800 (PST) X-Google-Smtp-Source: APXvYqxRyv2R6KHycY8UcistQ7TiKycyC8RdQY1esNIcTUQI7A8xCLDqKm16waHAejMddEFB3+In X-Received: by 2002:aca:1c0d:: with SMTP id c13mr2038303oic.44.1579236740491; Thu, 16 Jan 2020 20:52:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579236740; cv=none; d=google.com; s=arc-20160816; b=J5Dy7blRTlWvZlIg+b3gwrhzDiiLqmrvWpBy/LygSRsk3Wiuoy+FJ6wpisJlDAGqqo dHxdwDijCC8EdCWqBAkoMU7ZSbUdmRUeGfddzXyG1gjjEDnioiQOpXV9Ir/oIRTxYL9F CqTFlFqLVL4qp5TT83cdF4qVr0Imyz5pyWwYy84YsiMIWegvroYkYH4/3lmoXQdTsDh4 9Tf2onqIpIAAgLAUun18T41Z0OdzMvwxyn3vNawG3utj1r4gzN5csj8CkIXmR8i2YM86 CzCrsdW1J2o90HLrITVyhlV8GkWH+tAc76YRF1Ebme3ptgKWBUQzgzwDxxag/qQpgtWJ F1Pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=pGw8oYAT9KZvwSKWFzC3SBprqS2d4Ak8/QnkE8/4Uq0=; b=MJQk48+/4N328Fap6oGspIK/nlfbNHX69uFgZgD4UNgZ3UqlCwO2BxE+lxbjvWI1eW mGc57twAIXHj/1YIkdENPjmmHnL18N8K3Ag5oWh9u3nvtJ8HIdLSc2I8TFaRSnCuhIi5 5aJmgT2r5aYSnBst0UPdq1vDWozMVHr63zfCdSqQxvzchXTWOJa/wq1C10SFlLZf72K8 2m536vZTOjug3GmW7kVkWGywappkVL6TyhjmAolgsikKXtyvxiGT1Bx+24y1SRszrJ1r lanvPILyyIpfJqmA+jxXw9GA9ATTk00m2TJ9YFS5btooxIL9fGhmDPfHya4c7h6MAaiC RcmA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s13si13639266otd.186.2020.01.16.20.52.09; Thu, 16 Jan 2020 20:52:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388580AbgAQCYO (ORCPT + 99 others); Thu, 16 Jan 2020 21:24:14 -0500 Received: from ZXSHCAS2.zhaoxin.com ([203.148.12.82]:30419 "EHLO ZXSHCAS2.zhaoxin.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2388334AbgAQCYL (ORCPT ); Thu, 16 Jan 2020 21:24:11 -0500 Received: from zxbjmbx1.zhaoxin.com (10.29.252.163) by ZXSHCAS2.zhaoxin.com (10.28.252.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1261.35; Fri, 17 Jan 2020 10:24:08 +0800 Received: from tony-HX002EA.zhaoxin.com (10.32.64.11) by zxbjmbx1.zhaoxin.com (10.29.252.163) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1261.35; Fri, 17 Jan 2020 10:24:06 +0800 From: Tony W Wang-oc To: , , , , , , , , , , CC: , , , Subject: [PATCH v1 2/2] x86/speculation/swapgs: Exclude Zhaoxin CPUs from SWAPGS Date: Fri, 17 Jan 2020 10:24:32 +0800 Message-ID: <1579227872-26972-3-git-send-email-TonyWWang-oc@zhaoxin.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1579227872-26972-1-git-send-email-TonyWWang-oc@zhaoxin.com> References: <1579227872-26972-1-git-send-email-TonyWWang-oc@zhaoxin.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.32.64.11] X-ClientProxiedBy: zxbjmbx1.zhaoxin.com (10.29.252.163) To zxbjmbx1.zhaoxin.com (10.29.252.163) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org New Zhaoxin family 7 CPUs are not affected by SWAPGS. So add these CPUs to the cpu vulnerability whitelist. Signed-off-by: Tony W Wang-oc --- arch/x86/kernel/cpu/common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 6048bd3..ca4a0d2 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -1087,8 +1087,8 @@ static const __initconst struct x86_cpu_id cpu_vuln_whitelist[] = { VULNWL_HYGON(X86_FAMILY_ANY, NO_MELTDOWN | NO_L1TF | NO_MDS | NO_SWAPGS | NO_ITLB_MULTIHIT), /* Zhaoxin Family 7 */ - VULNWL(CENTAUR, 7, X86_MODEL_ANY, NO_SPECTRE_V2), - VULNWL(ZHAOXIN, 7, X86_MODEL_ANY, NO_SPECTRE_V2), + VULNWL(CENTAUR, 7, X86_MODEL_ANY, NO_SPECTRE_V2 | NO_SWAPGS), + VULNWL(ZHAOXIN, 7, X86_MODEL_ANY, NO_SPECTRE_V2 | NO_SWAPGS), {} }; -- 2.7.4