Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1074215ybl; Fri, 31 Jan 2020 13:34:28 -0800 (PST) X-Google-Smtp-Source: APXvYqxuBPLLXPXrW7I3Mdba+kR10oWPEAFNOYJ4W3yJbrG+U/xHGYP+3aL5KBcaRNsvbgHzcHim X-Received: by 2002:a54:4117:: with SMTP id l23mr7455919oic.140.1580506467992; Fri, 31 Jan 2020 13:34:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580506467; cv=none; d=google.com; s=arc-20160816; b=cn1BELQZfHePquQaomGAMPEDjSMJ4ZbCDzPrHvYYCVC3cNXavqfCCwJDSoE+i9bNRJ IaKRj6EQn5z5YvGFW7WoiQet5wPCyJdMVWJc+nxwO7IVb7IQq2C1phzeyMFHFne/HlfJ tuyJ09mjTEmedoLmbQ3+lMmUb80uCK8xcXvfY0YuyJFUqMOhlFl2D3jgwtEXk5Wc4PDZ 7lVStS+evhpG160Y77EJ6FMri+SNWgwSRZEi4NaNK7BBQiEaEIgvXBFHEHehZ6u6aZSV P+mCeRUcMvl6him3KRRdQSHEDIhHIX1jRNpJ87zRxDL28FAM6tBeh1z/TYNRWPeO9YIv p8pg== 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=v0cY8r600PZeMMg003zbfyKoArFu5BkniPYK/6FLwIM=; b=XpuUBZJqPATtn0kS34OqWmZryB3zNqBpy8uquv+1cIHXxhe6KpoMVOLQdGSs4pR+Il 5QazChZU9+sOXbZ9FnRpcuD5c4FC1usy9p8smv3xRH/PXFt/S/PoiQ5yuFc6X3mOAcTt W0CdTmvl39nq9qb90ib4oSlu1kRd6h8m0rIlhW53+5xbjyy0F3upaSIVskTKM+O8NcCp w/Fd1kuCeCiCpwpjDNGEgLZZ+aUlAgkIU1/7HnNxTTHlcf+KOE/a2C9/Vb7aORODRslz B6mpAL6IMzyMfc1Edm62IK6m8CudxPLHMVoNY/vbAAmE3mlSJLynodGgb3g8ce4lj5Oy jgmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=DB34FYS0; 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 i23si5228531oto.206.2020.01.31.13.34.15; Fri, 31 Jan 2020 13:34:27 -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=DB34FYS0; 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 S1726322AbgAaVdX (ORCPT + 99 others); Fri, 31 Jan 2020 16:33:23 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:35747 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726138AbgAaVdW (ORCPT ); Fri, 31 Jan 2020 16:33:22 -0500 Received: by mail-pl1-f196.google.com with SMTP id g6so3262744plt.2 for ; Fri, 31 Jan 2020 13:33:22 -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=v0cY8r600PZeMMg003zbfyKoArFu5BkniPYK/6FLwIM=; b=DB34FYS0GbdREz9MgbfN6GuhgdDTZlKITxD0isHLtPED+4N8iQRLPGGtlunQ0K4Ob+ NWPbi9TxN1YqENBQKIifltqOpSzi4F+U6/mEVXYtuKxZlh0U/eL6omVSAS9R98bOTolz yg0XC8KBPGgb6NZcpOiEpVi/9NALs3R97S4//yxss0Lnb/6RPxcy4a14Hv0R/Crsxhg+ Fma29ZkKatlSvg/biTbuUo/sPAvkwG8Xm0NHuhbDEZDzRoOXXkYMtshnPho8eF7fyuRy r824XGik5cjUwfxU/DsZkZGwtO98sb30s8v3UprW8aUPV/HQud1sPFWrAmQHjlPbnMoP J/XA== 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=v0cY8r600PZeMMg003zbfyKoArFu5BkniPYK/6FLwIM=; b=hKCECc8kh+wTyGky3i8wXfB6+3ik8D4bolYJvhqFbA3iD0k1cYzUDH63MvCopdTLGT vAjIv1aYfglamM9b4pXM3+G5m9KyhfSpIcd8OxrRX0nEYvnAiLROH6D0ex5XGw/7zc8L +i1TZOl4wcYdOkLvn92kbbTyhjWSAw60KLtA/nMHQ8n6nAzK1SdYQYY4xwP0ibbiu+tV x898BUPvAcJvamwdriMHuTZDh27aXiyKnS8XQXamO/aROsCLcApGUAWNVwRT0BeiiSVa WdrJckz6l6mnhJf+IN9Tdfloggij2QmVHJ7vns+TbiYLOEm7tgPCLaRDT0lGf0Rgg7oG D+ig== X-Gm-Message-State: APjAAAXHhyHueO5kpp1r/jp9wYcHiwZRsj2BH200FDi4KS7tHNnioVEH OxYk8REwlFgr6U6NvWjLD4zC7g== X-Received: by 2002:a17:902:bd90:: with SMTP id q16mr12159154pls.34.1580506402075; Fri, 31 Jan 2020 13:33:22 -0800 (PST) Received: from ?IPv6:2600:1010:b010:9631:69c2:3ecc:ab84:f45c? ([2600:1010:b010:9631:69c2:3ecc:ab84:f45c]) by smtp.gmail.com with ESMTPSA id m22sm12003610pgn.8.2020.01.31.13.33.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 31 Jan 2020 13:33:21 -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 2/2] KVM: VMX: Extend VMX's #AC handding Date: Fri, 31 Jan 2020 13:33:17 -0800 Message-Id: References: <20200131210424.GG18946@linux.intel.com> Cc: Xiaoyao Li , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Paolo Bonzini , x86@kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org In-Reply-To: <20200131210424.GG18946@linux.intel.com> To: Sean Christopherson X-Mailer: iPhone Mail (17C54) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Jan 31, 2020, at 1:04 PM, Sean Christopherson wrote: >=20 > =EF=BB=BFOn Fri, Jan 31, 2020 at 12:57:51PM -0800, Andy Lutomirski wrote: >>=20 >>>> On Jan 31, 2020, at 12:18 PM, Sean Christopherson wrote: >>>=20 >>> This is essentially what I proposed a while back. KVM would allow enabl= ing >>> split-lock #AC in the guest if and only if SMT is disabled or the enable= bit >>> is per-thread, *or* the host is in "warn" mode (can live with split-lock= #AC >>> being randomly disabled/enabled) and userspace has communicated to KVM t= hat >>> it is pinning vCPUs. >>=20 >> How about covering the actual sensible case: host is set to fatal? In th= is >> mode, the guest gets split lock detection whether it wants it or not. How= do >> we communicate this to the guest? >=20 > KVM doesn't advertise split-lock #AC to the guest and returns -EFAULT to t= he > userspace VMM if the guest triggers a split-lock #AC. >=20 > Effectively the same behavior as any other userspace process, just that KV= M > explicitly returns -EFAULT instead of the process getting a SIGBUS. Which helps how if the guest is actually SLD-aware? I suppose we could make the argument that, if an SLD-aware guest gets #AC at= CPL0, it=E2=80=99s a bug, but it still seems rather nicer to forward the #A= C to the guest instead of summarily killing it. ISTM, on an SLD-fatal host with an SLD-aware guest, the host should tell the= guest =E2=80=9Chey, you may not do split locks =E2=80=94 SLD is forced on=E2= =80=9D and the guest should somehow acknowledge it so that it sees the archi= tectural behavior instead of something we made up. Hence my suggestion.=