Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp4011913ybc; Thu, 21 Nov 2019 17:56:01 -0800 (PST) X-Google-Smtp-Source: APXvYqzM4ul8F6pPhQXqHZCUjdkHxkbZ7gjGC2/G9p7BpNnj6f1hwnrM3l2cj76AAIQEC17jJxrh X-Received: by 2002:a17:906:f0c9:: with SMTP id dk9mr18382155ejb.56.1574387761161; Thu, 21 Nov 2019 17:56:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574387761; cv=none; d=google.com; s=arc-20160816; b=wcTMUf/wnkbueeOUxhD1ndyXj9MXuLR753CQ4DJnxW7FkH9K211zof5f0rxrsAkX9o i7AhXnQRaLLpu6wHZgDtX1e3ZOM4E+ETQxXnOnfGb5LJoomAWEp1ycxoGhP8D+utEdxN mVGrsyq0PrRP20qYaW8WKv3jnh+bv6YZA3WyWI7Ldp4MsCE6yDhcEEhwNrlav8A5KlUJ RM02LeH0PlqJ9LKyNfIGr7++aRbNUPoy1ZX86a/Ot3qH5OkG2i3TGRpNOjcUpQXNvcm7 Alg/ywbUy5ag9YAWs8u4+Gfw49sYOeoxAftAAWALClXsb77/jVjuWSq64kKErzcnmP3F OR0A== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Nnea41M2llBGKokQoaP4Smtkn5Iu/nLZmSZLbCHy+9k=; b=jYT1gbazE/8JeKusjgmOFTLTzh1bJd4wbv9ia7BAYlu58pk0BOphUoIGU3LIXdziOR yxGhUUwAQ+4ZmvrRQdSXq6VNqTKWc5tGiPstn4DiGiMkHqViQjKmTbV5Ie/PIyVUPgSG 3TasaOrfAbwDRxpohVigW9fT0TtwiFD1lQ5FyRJK6M7JCrUinX7xsz6MWt3PFzsnFFpL SzsHp5p34rQdFNGd4cdwUn0BKtgUl21FcoV8xWfcpYRiDO4OPHc5QC0TxT/+jCdsqjI9 KN5gYZQwHBiBbxsvkUxvGB0SCSLvzFk25k1oxiW1wAcFPLhqEgAd7hrAIFBO6cOaIbw6 qjrQ== 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 i14si3540779edr.68.2019.11.21.17.55.37; Thu, 21 Nov 2019 17:56:01 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726495AbfKVBw1 (ORCPT + 99 others); Thu, 21 Nov 2019 20:52:27 -0500 Received: from mga07.intel.com ([134.134.136.100]:61190 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726265AbfKVBw1 (ORCPT ); Thu, 21 Nov 2019 20:52:27 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Nov 2019 17:52:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,228,1571727600"; d="scan'208";a="205263047" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.41]) by fmsmga008.fm.intel.com with ESMTP; 21 Nov 2019 17:52:25 -0800 Date: Thu, 21 Nov 2019 17:52:25 -0800 From: Sean Christopherson To: Fenghua Yu Cc: Andy Lutomirski , Xiaoyao Li , "Luck, Tony" , Peter Zijlstra , Ingo Molnar , Thomas Gleixner , Ingo Molnar , Borislav Petkov , H Peter Anvin , "Raj, Ashok" , "Shankar, Ravi V" , linux-kernel , x86 Subject: Re: [PATCH v10 6/6] x86/split_lock: Enable split lock detection by kernel parameter Message-ID: <20191122015225.GG16617@linux.intel.com> References: <3908561D78D1C84285E8C5FCA982C28F7F4DC167@ORSMSX115.amr.corp.intel.com> <20191121235329.GE199273@romley-ivt3.sc.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191121235329.GE199273@romley-ivt3.sc.intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) 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 03:53:29PM -0800, Fenghua Yu wrote: > On Thu, Nov 21, 2019 at 03:18:46PM -0800, Andy Lutomirski wrote: > > > > > On Nov 21, 2019, at 2:29 PM, Luck, Tony wrote: > > > > > >> It would be really, really nice if we could pass this feature through to a VM. Can we? > > > > > > It's hard because the MSR is core scoped rather than thread scoped. So on an HT > > > enabled system a pair of logical processors gets enabled/disabled together. > > > > > > > Well that sucks. > > > > Could we pass it through if the host has no HT? Debugging is *so* much > > easier in a VM. And HT is a bit dubious these days anyway. > > I think it's doable to pass it through to KVM. The difficulty is to disable > split lock detection in KVM because that will disable split lock on the whole > core including threads for the host. Without disabling split lock in KVM, > it's doable to debug split lock in KVM. > > Sean and Xiaoyao are working on split lock for KVM (in separate patch set). > They may have insight on how to do this. Yes, with SMT off KVM could allow the guest to enable split lock #AC, but for the initial implementation we'd want to allow it if and only if split lock #AC is disabled in the host kernel. Otherwise we have to pull in the logic to control whether or not a guest can disable split lock #AC, what to do if a split lock #AC happens when it's enabled by the host but disabled by the guest, etc...