Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp4036758ybc; Thu, 21 Nov 2019 18:25:44 -0800 (PST) X-Google-Smtp-Source: APXvYqxpsj7udp58jU2+D3sJ4BOP8bDflKnLnd4+hNT/HuOrTPEB90Ws07Bvu8mCWi9EejoKnrjY X-Received: by 2002:a17:906:3ec8:: with SMTP id d8mr18793959ejj.55.1574389544053; Thu, 21 Nov 2019 18:25:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574389544; cv=none; d=google.com; s=arc-20160816; b=CIuIYLVFF/9SultrU+zqfzbfo8gTAfMiN9Ds2N3cQwj+Z9RSiKfuDrH70y8hXvW8Gf 27AzwRi8v0ajzGfPYwVbRz6z4Ox7HJ7xiE2iivf5e+sDLOB+m68WkUfGwIaoJRrwrNu0 GX6H1xrNvWMLWYyOjjfiuAi/nTVqepTNSGl1aZSgCrcyIoFXCE+oZDH6EDH6LxTN1pSM Ye1Et60xssP6s4u+d2wYanvxoUbcItXQ+ExdJ3gWIZpWmgbhEuRqv73nQiChBohxQ57u L0vAphSfyRn85eZ0s+Nd61v6ARKMSdjvqt/x4LxcGJVFKnlPB4fOlw2yiJ7+KcwlB1f3 2cpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:in-reply-to:cc:references:message-id :date:subject:mime-version:from:content-transfer-encoding :dkim-signature; bh=2Y9eO3Yb3+HdxO8v8hLVbBr0Cjg6GQipkleKftryi7Q=; b=FyaI9/WiG7uw4LYZ+Ah44RkTbGbzs9ULfLItkwCGoDTtECwDjEtdabtpPLHnlfcNQ4 g4ZvBenMZh6xx5qSoAMurYZitbVYaHxzcqfUPEPrccD0xPtgPrJKCdCgNwqL1CLKU2gB b9dwTs75ei0ObS3LZVPeyJrlbk1lINjtYRfvRGpVNUf3EWLVy9iazMR7Qy7qXPbI8skR 0m0qeOUEp/u8Ui+OwTf3JtUt+DbR65vvC2ztfCQ/l+1Nj0VpyHu9jEnQccpge5iFwV9n mKeorpS61V6M+KdGSqz5Y2gP9Cgd96fTWT5YAMx6Gd7c/6QQPjK3G83qt31GqtancpH4 5YDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=kg+BFRLr; 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 j26si1859671edq.389.2019.11.21.18.25.19; Thu, 21 Nov 2019 18:25:44 -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=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=kg+BFRLr; 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 S1726725AbfKVCVY (ORCPT + 99 others); Thu, 21 Nov 2019 21:21:24 -0500 Received: from mail-pj1-f66.google.com ([209.85.216.66]:39806 "EHLO mail-pj1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726270AbfKVCVY (ORCPT ); Thu, 21 Nov 2019 21:21:24 -0500 Received: by mail-pj1-f66.google.com with SMTP id t103so2367424pjb.6 for ; Thu, 21 Nov 2019 18:21:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=2Y9eO3Yb3+HdxO8v8hLVbBr0Cjg6GQipkleKftryi7Q=; b=kg+BFRLriNvhauNKWsV4sIQVWAlyPIv2wOPLZFiypxprc3qD/WMtaJZwjMKB7DbATN zxcSpKC63UvArsP9Aqdx9AOK99/udPsHpIimWJ1qFMnyPiiifcEu+Akj4qcfNibfr4ZO OwTYFnjWv2XmVIyLOlgkHrc7AlAy4pIJDGB1yXBpETJ3EPqKgd+b/L8X62Tby9iNXFlz AJYB76I6gk0UZJih+WfAje/BYsIjQa7NEX97GhGbpSi2C5jgODYMqBeRdDLt6lyNqrif BVHH0O45rWlEPUgA4O1PknCxC2jFi5A09cwaJ3UeXd8gK6ui5Y5RInTOX+xNPk1ttyX+ exdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=2Y9eO3Yb3+HdxO8v8hLVbBr0Cjg6GQipkleKftryi7Q=; b=mkeQpqQtGUGKS5IaVU/Rj55+emMa6PZkJAONSR8Q8otpo2OZvieUGlDhmY8O+D/ID4 2NgdfyU5aOmhxKtpcxC4iYrBQq/pBfYKPd3TwuIOC7TVx0Uy1XfFL+c/sxJ5DGSKU8Bc 7w7Hvkn1Z2AJRXp8XQBzdWN7J+5SbtNysUbj9qh0jzqRtnE1HWOLOhSgawhn+3QfNgpQ Yh502L9dCeQmiDOz6cT/HuE7F0B0FEhNPn/nq66Xl53VFYcHwWxUeSa/lN/jJEYYxWer cXR7q5WE/LzthFBelMy1+MsQ8ism1KHp5N90s3E33sGKgSEGelpW7KrIkNO4hzFZEqDI rwpg== X-Gm-Message-State: APjAAAXwc5ZS6I1WTOOzljy3adQ0R2IR96cug3ToE6FIrfn1imHJnZm1 huCULSvOvFxwFrlttaOdtuaYTQ== X-Received: by 2002:a17:902:a408:: with SMTP id p8mr12082431plq.266.1574389283326; Thu, 21 Nov 2019 18:21:23 -0800 (PST) Received: from [100.111.14.2] (50.sub-174-194-197.myvzw.com. [174.194.197.50]) by smtp.gmail.com with ESMTPSA id 81sm4981095pfx.142.2019.11.21.18.21.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 21 Nov 2019 18:21:22 -0800 (PST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Andy Lutomirski Mime-Version: 1.0 (1.0) Subject: Re: [PATCH v10 6/6] x86/split_lock: Enable split lock detection by kernel parameter Date: Thu, 21 Nov 2019 18:21:20 -0800 Message-Id: <81CEB9B7-79EA-4B02-A79C-C9113331A28A@amacapital.net> References: <20191122015225.GG16617@linux.intel.com> Cc: Fenghua Yu , 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 In-Reply-To: <20191122015225.GG16617@linux.intel.com> To: Sean Christopherson X-Mailer: iPhone Mail (17A878) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Nov 21, 2019, at 5:52 PM, Sean Christopherson wrote: >=20 > =EF=BB=BFOn 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: >>>=20 >>>> On Nov 21, 2019, at 2:29 PM, Luck, Tony wrote: >>>>=20 >>>>> It would be really, really nice if we could pass this feature through t= o a VM. Can we? >>>>=20 >>>> 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 toget= her. >>>>=20 >>>=20 >>> Well that sucks. >>>=20 >>> 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. >>=20 >> I think it's doable to pass it through to KVM. The difficulty is to disab= le >> split lock detection in KVM because that will disable split lock on the w= hole >> core including threads for the host. Without disabling split lock in KVM,= >> it's doable to debug split lock in KVM. >>=20 >> Sean and Xiaoyao are working on split lock for KVM (in separate patch set= ). >> They may have insight on how to do this. >=20 > 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... What=E2=80=99s the actual issue? There=E2=80=99s a window around entry and e= xit when a split lock in the host might not give #AC, but as long as no user= code is run, this doesn=E2=80=99t seem like a big problem.=