Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp554588imm; Wed, 1 Aug 2018 01:04:30 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc7WhOsgFlkHUv0MkeAIPbctWc690d9R+8ocdDgrFwnwt6kUcS4l/h+OTIFYld9qfibqcp7 X-Received: by 2002:a63:530b:: with SMTP id h11-v6mr23566843pgb.139.1533110670211; Wed, 01 Aug 2018 01:04:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533110670; cv=none; d=google.com; s=arc-20160816; b=rsgttBCEHaoQ0oGHRdR+/D7V09mnqxPG4MHkmZqVl0CI0t6uIPE3QXFpEhscdgGnxS /W5or09ubdWcHcHhE+8kPBXGnB6tdp8IVOhy+ANDKCFHFGdhxmpGuNWMkWAgiP9VVM0h 06/GDPUzeUKzIPkphraH0mNftuM21fBuP1Me2s4UOlAERarvJ4vjdxOyURgMbvYiuwzr dz3vITVs7OYRvOniWQW/x1h5oZzn1O7kUZsAq+y7UQWCK0QOtyVTZA0jqBBJt1CpoBLb xeu6BwpmAXhoeqZroX5kL5RzWyTb8wLnGGxHPoQxZVJKrB798u3l2jQ1LXD3ebLoI5wU I7Nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:arc-authentication-results; bh=8YKvOrw2TTuAhu+wpXn+c8whxNxA++2/ea4916hVnzA=; b=Cx2MzI7k2bCcomyc0WkrqEgIqRN7TJd60D62XdwhX1s9zpwRRwq7Ao8A0/vkDaW5ky VyABr9LjixasP8hUeBM8r4OCy7AojhAmiC42iS2c8KzmfjTUe4kXb6Yat4m2UbkDu/bM 6V6DdUwFnQ840zebH9fhPifz1Zj5HTR6YlEU19WooUjNaHLPtlNvhLo+C6HNKDkxdJ1o X0T8+1ENRmz8SJCcUX0j9A7wdolbFMhVw68pnxgUtuD7WihjWGd+j0xXvsvD3EBQWGmz Us0yZZoR+fQTCGFhatbFjadJCSF3pPtEsQIAg1lemzNqqyneB66bWOwfMDjMQndlx+cC NsMg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o8-v6si13877698pll.193.2018.08.01.01.04.15; Wed, 01 Aug 2018 01:04:30 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388587AbeHAJqQ convert rfc822-to-8bit (ORCPT + 99 others); Wed, 1 Aug 2018 05:46:16 -0400 Received: from mga07.intel.com ([134.134.136.100]:4897 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387673AbeHAJqQ (ORCPT ); Wed, 1 Aug 2018 05:46:16 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Aug 2018 01:01:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,431,1526367600"; d="scan'208";a="220819594" Received: from orsmsx107.amr.corp.intel.com ([10.22.240.5]) by orsmga004.jf.intel.com with ESMTP; 01 Aug 2018 01:01:49 -0700 Received: from orsmsx156.amr.corp.intel.com (10.22.240.22) by ORSMSX107.amr.corp.intel.com (10.22.240.5) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 1 Aug 2018 01:01:49 -0700 Received: from orsmsx114.amr.corp.intel.com ([169.254.8.242]) by ORSMSX156.amr.corp.intel.com ([169.254.8.221]) with mapi id 14.03.0319.002; Wed, 1 Aug 2018 01:01:48 -0700 From: "Prakhya, Sai Praneeth" To: Thomas Gleixner CC: "linux-kernel@vger.kernel.org" , "x86@kernel.org" , "Chen, Tim C" , "Hansen, Dave" , "Shankar, Ravi V" , Ingo Molnar Subject: RE: [PATCH V2] x86/speculation: Support Enhanced IBRS on future CPUs Thread-Topic: [PATCH V2] x86/speculation: Support Enhanced IBRS on future CPUs Thread-Index: AQHUKDpXeyPtJ37V00Gaz4M9pA51zKSotaGA///0qMCAAMpIgIAAI0OggACazwCAAFa4cA== Date: Wed, 1 Aug 2018 08:01:47 +0000 Message-ID: References: <1532978396-2197-1-git-send-email-sai.praneeth.prakhya@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZjI0Mzg4NzUtMjJmOC00ZGFlLTlkZDUtZGU3ZjE5NGU4NzQxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiU0tEQ0pXOWZrZVpYZlFPNE1aTEV0OGEwWFZSTDZtTDY3S0VIK2pmb29lS3BmemhaM3hpY2JzYjBreFFrRzlFXC8ifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.22.254.138] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > Yes, that makes sense. > > But on the machine, I see IBRS bit set on all cores. As you said, > > someone else might be writing the MSR. I will try to find that out and will > update the patch accordingly. > > > > I initially suspected it to be __ssb_select_mitigation() as I have > > "spec_store_bypass_disable=on" in the kernel command line, but turns out it's > not so. > > I will update you more on this. > > There are lots of places like the firmware mitigation stuff and other things which > write that MSR. And because the bit is set in x86_spec_ctrl_base it will be on at > some point and stay so. True! After a bit of experimenting with printk(), I see that it's being set by intel_set_ssb_state() during systemd initialization. > > Writing it explicitely at the point where it is set makes it independent of other > mechanisms which touch that MSR and Just Works. Yes, that makes sense. I will add an explicit wrmsrl(). Just wanted to have a better understanding of how things work. Regards, Sai