From patchwork Wed Feb 19 08:12:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 11390633 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 40C8C92A for ; Wed, 19 Feb 2020 08:14:25 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 275252176D for ; Wed, 19 Feb 2020 08:14:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 275252176D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1j4KTX-0000GN-Pf; Wed, 19 Feb 2020 08:12:55 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1j4KTW-0000G1-IF for xen-devel@lists.xenproject.org; Wed, 19 Feb 2020 08:12:54 +0000 X-Inumbo-ID: 9eaa7428-52ef-11ea-8307-12813bfff9fa Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 9eaa7428-52ef-11ea-8307-12813bfff9fa; Wed, 19 Feb 2020 08:12:50 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id CFD5AB25F; Wed, 19 Feb 2020 08:12:49 +0000 (UTC) To: "xen-devel@lists.xenproject.org" From: Jan Beulich Message-ID: <1e00dc93-e711-9070-1da0-1d4243753a8e@suse.com> Date: Wed, 19 Feb 2020 09:12:50 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 Content-Language: en-US Subject: [Xen-devel] [PATCH] x86: "spec-ctrl=no-xen" should also disable branch hardening X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Andrew Cooper , Jin Nan Wang , Wei Liu , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" This is controlling Xen behavior alone, after all. Reported-by: Jin Nan Wang Signed-off-by: Jan Beulich Acked-by: Andrew Cooper --- a/xen/arch/x86/spec_ctrl.c +++ b/xen/arch/x86/spec_ctrl.c @@ -98,8 +98,6 @@ static int __init parse_spec_ctrl(const if ( opt_pv_l1tf_domu < 0 ) opt_pv_l1tf_domu = 0; - opt_branch_harden = false; - if ( opt_tsx == -1 ) opt_tsx = -3; @@ -114,6 +112,7 @@ static int __init parse_spec_ctrl(const opt_ibpb = false; opt_ssbd = false; opt_l1d_flush = 0; + opt_branch_harden = false; } else if ( val > 0 ) rc = -EINVAL;