Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp49382ybc; Fri, 22 Nov 2019 01:51:43 -0800 (PST) X-Google-Smtp-Source: APXvYqxotoqmfle4GTmtyqJanmuVYr8wPRnQQpTOnlwRead7/W3gRKyHqv3MRdYen4ReKjzMhzrg X-Received: by 2002:a17:906:938d:: with SMTP id l13mr21553513ejx.74.1574416303706; Fri, 22 Nov 2019 01:51:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574416303; cv=none; d=google.com; s=arc-20160816; b=c7GPzrnLfHOnP5N9lHm6PWx9v1XJZalUiFyvd5bv8DgkQ0iDeMMFcyPElJaYKdoZz2 Z/D7YP5nmblwL6uyCVEOyv4Z/KXNWixpn0cfnHksBrgF4dZ6qXv0B/snc7KaE0LPX6bw AvrFkqVZx7MdzVcqs0T5wBuxqi6DlzXmmGyOQGSSnPsSkFclcHea8joWmUBfOaFatT9f uherdrH8t0BkfiG2DfRsehWo7wEWNiUyNVuMXIIGQ3PWvtmtn/02bDtMn4Dq1hD9bMuH yRaoy8wfb5Thc+yD1pmtXsRCBzLBs2WPjxyTQy9WtMM285o73mR2qF00HT48yPzIgjmr J1hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=4bMCSmie4xBahDbJdinovuabFdb6Cy8S8dTGqzWuLR4=; b=dqvJDtYg4vZYEMIsFDdIG9mwW5k2Ug580X/C7Qv4op5lI96H9QKhB/AYoaCb9amopk gYkMSV8K7wTPCjAQo4g4lgafQMN20LaLbnpFs01VPcF9uLzD09+/3/GeO8HNtXiYXeen dKuV6zNGHt/vyh8GUtXKJKvKkA+HGkxZjLVmRg1331Voh+MN+BcZqdXI6z0WcIn1cNlE NGu9Wc/tu1v/SErzWVbyN3Wz31NWGSfsuwqrHjhyZ1NmWFlIKJbnv9ffw+Mgp3GRWwoW 0nHmf6A59fjc2gnOpZUMSLSa2/GWedveBn9ZDCwYrHAzfgvyIkBdiH5sVYAdlcsj8gzN cjSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="Gt/m5z4e"; 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 l12si4743272edk.60.2019.11.22.01.51.13; Fri, 22 Nov 2019 01:51:43 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="Gt/m5z4e"; 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 S1726931AbfKVJqs (ORCPT + 99 others); Fri, 22 Nov 2019 04:46:48 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:52696 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726248AbfKVJqs (ORCPT ); Fri, 22 Nov 2019 04:46:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=4bMCSmie4xBahDbJdinovuabFdb6Cy8S8dTGqzWuLR4=; b=Gt/m5z4eElJMbtAzlkbsivme/p NNr7pn/ZSfiG76Nm9qhvebnfTv5LORjN3eJnB3bVavVQCX/92ySfbqprcXoxw6389Jjs4RQNafj/v LYyxUSuUanL2v1d8w7C7BK4abFwW4rsXvy+xRYox8sgg6M4WOh4pSh6qEM8ghzR2O/S15Sebtd35T 51/ZJljch/mX67diz+L9Ev/OnAhJ3wHs9YsUFC4phFCI+NmLoKoHMjdPLm2EvClM3K3TWdlMeTr/N xG2e2w2vGpSXvem8Qxr/DmqIXxaDLVyfZbrjdDUngBaQ+Ft122nSGGTJeTomWgMKfY2cAEwKcEuwg H98/X7ew==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1iY5WQ-0001gv-Lb; Fri, 22 Nov 2019 09:46:38 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 8693630705E; Fri, 22 Nov 2019 10:45:24 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id BF3EF2021C977; Fri, 22 Nov 2019 10:46:35 +0100 (CET) Date: Fri, 22 Nov 2019 10:46:35 +0100 From: Peter Zijlstra To: Andy Lutomirski Cc: Fenghua Yu , Thomas Gleixner , Ingo Molnar , Borislav Petkov , H Peter Anvin , Tony Luck , Ashok Raj , Ravi V Shankar , linux-kernel , x86 Subject: Re: [PATCH v10 4/6] x86/split_lock: Enumerate split lock detection if the IA32_CORE_CAPABILITIES MSR is not supported Message-ID: <20191122094635.GC4097@hirez.programming.kicks-ass.net> References: <20191122003754.GF199273@romley-ivt3.sc.intel.com> <5A85615E-EFFF-4DF3-A1A5-DB8532451A42@amacapital.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5A85615E-EFFF-4DF3-A1A5-DB8532451A42@amacapital.net> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 21, 2019 at 06:13:18PM -0800, Andy Lutomirski wrote: > You seem to be assuming that certain model CPUs have this feature even > if not enumerated. You need to make sure you don’t try to use it in a > VM without the hypervisor giving you an indication that it’s available > and permitted. My suggestion is to disable model-based enumeration if > HYPERVISOR is set. You should also consider probing the MSR to double > check even if you don’t think you have a hypervisor. Yep, in patch 6 this results in an unconditinoal WRMSR, which, when ran under a HV, will explode most mighty. He doesn't double check, doesn't use wrmsrl_safe()...