Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1862587ybl; Thu, 30 Jan 2020 07:19:49 -0800 (PST) X-Google-Smtp-Source: APXvYqxM97Bc4pCFeGGmPPAtfFiZCiSjoBNpb0NyOX7AETkYuKlodWmWolU9+hzkO8Nq050A9CgK X-Received: by 2002:a9d:7501:: with SMTP id r1mr3890016otk.307.1580397589265; Thu, 30 Jan 2020 07:19:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580397589; cv=none; d=google.com; s=arc-20160816; b=bwoEHCftr56orHQfFWGTjIpAmg8rwZT1fy7kTyEkzickAc4Vcq23lYwSnLF0X1n39g E8/DGUHz17xYhSJHcGOohVLKTB6EKY++PJEYi09hfknMMCjWJ1PDW6lmlhLRRjQ+R/73 UioIZmHIFg/2mDPJt83CbCly9kTU79qHU88m0HJAgKv0X6phuUa4iyG9eMrp51857Dxz d1nwlCwCZOVJZNE1HfNnPuKLBIrt7AA+M7hDeHkLJF/vlVXik8sqXzNPV9fqLBqRBFh6 mOOxeaEn7ecIJPquq2s4UaAAccGs9a2++ZAEupo/O4dsYp5fgPNhp2JCkw1RCNu7zzhr 3WFA== 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=NYvbh0EvDO+JJUvHI1Kw+aCj5n6f6RUisMfv+jrEqPU=; b=S5Ms6VgpsfpKTcXMxv8iQmMtXhGnVEKMXJBzaU4VQEZlaE+p1nUgAkyGYiPslVGhuO XskwwII9+DtqA+7tbX6979+tsdIfbg+iNceKGirJomrC/TOOaeDHjDvrmTKeyLqOXpwA rUE/ERD7hsWq+MUOi0np7U8WzuERseVOghz1mP8837GvvxCo8ZhrIXaWpRoM5nfCTDcI 0SO87QgQ0J0xikItFd4ZGMIxmIPdLEMZIIknf6N73UHcy2QBP6oy6lGpDNHwp9O4+9GT 0qjdgqc8OIWQyuGFRczbTCdXh1zcmVHt7JoIY1P4SMEfhqstk16Ba7PDAeuw5F1CKOda DzbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=WabDaQ+i; 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 e25si3394038otk.62.2020.01.30.07.19.36; Thu, 30 Jan 2020 07:19:49 -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=WabDaQ+i; 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 S1727322AbgA3PSR (ORCPT + 99 others); Thu, 30 Jan 2020 10:18:17 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:42108 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727238AbgA3PSQ (ORCPT ); Thu, 30 Jan 2020 10:18:16 -0500 Received: by mail-pl1-f195.google.com with SMTP id p9so1457704plk.9 for ; Thu, 30 Jan 2020 07:18:16 -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=NYvbh0EvDO+JJUvHI1Kw+aCj5n6f6RUisMfv+jrEqPU=; b=WabDaQ+i0RWv0Cv6UvHJUcz0N1WP3aMfcbUfawCRo720OvcWhiTwJ1iVBH8k5ZcLWG eSzvtnXN/BqZfpwZqxKXCFlDRK8BZLClNies16bvwsrJypJ5oNX1AIyBZJWzALHLeLfd 6Sl8NYgZjlUBvSBzdjjXoFrCKqvByMgT+dhZGAfVEX8bSlZsFIiO5VxOmN7gFFRujZ/B 3znM/7sck+3nTrm8vcuIQCeGZqnGRKfbkHajiQXkYquAMFLbdNvLsQqrF0/qGLV0WMQF CTdaAJXRegwy9gIPcl4BuI1W2PmEd5oTNb5Aqi4848b4H3S5lh8SuInCe1vJRd/x+tk7 MxkA== 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=NYvbh0EvDO+JJUvHI1Kw+aCj5n6f6RUisMfv+jrEqPU=; b=BIfFLXLhy14vPSU6Z+bdevj9U2Chv0uvfm3ZGNzTTcqESPYUnnChAX8C451Wo0+33m F9tHBWsk5VUhqbZwz7/iynkt7N9LHbmNJmidpH66gicJbGXuA6yV5Yqq27LWytwwv9NK qDqtC3mUBTqOyp1lDINzRAhRjOPwU+jVTPJqlb0VJhZiVKcTcpFATXJYTvbExlRIdIPb 6EcVC/pPihcOxozHKdsXVMSmQb8j8fYPJwX6Gi/gqesYndTXOnWVVCGLxNsPqrRLokHR WjqGv+a/I1L9PAX4z1tX4Fed+Jx0OJ1Ebeal1lUm443pkR9l56VjkrreaP/K9Eij99DQ zT4w== X-Gm-Message-State: APjAAAXa4DbrUNRrN7qbTYNVPZMRz4VHyoC0GqN6aeB2VfcV2mULDGVB yp3ESMl9rwXYdPmnn3jinaYQug== X-Received: by 2002:a17:902:9a8c:: with SMTP id w12mr5176857plp.149.1580397496102; Thu, 30 Jan 2020 07:18:16 -0800 (PST) Received: from ?IPv6:2601:646:c200:1ef2:51ac:4d36:2f8d:8208? ([2601:646:c200:1ef2:51ac:4d36:2f8d:8208]) by smtp.gmail.com with ESMTPSA id d22sm6733429pgg.52.2020.01.30.07.18.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 30 Jan 2020 07:18:15 -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: Thu, 30 Jan 2020 07:18:14 -0800 Message-Id: <4A8E14B3-1914-4D0C-A43A-234717179408@amacapital.net> References: <20200130121939.22383-3-xiaoyao.li@intel.com> Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Paolo Bonzini , Sean Christopherson , x86@kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org In-Reply-To: <20200130121939.22383-3-xiaoyao.li@intel.com> To: Xiaoyao Li 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 30, 2020, at 4:24 AM, Xiaoyao Li wrote: >=20 > =EF=BB=BFThere are two types of #AC can be generated in Intel CPUs: > 1. legacy alignment check #AC; > 2. split lock #AC; >=20 > Legacy alignment check #AC can be injected to guest if guest has enabled > alignemnet check. >=20 > When host enables split lock detection, i.e., split_lock_detect!=3Doff, > guest will receive an unexpected #AC when there is a split_lock happens in= > guest since KVM doesn't virtualize this feature to guest. >=20 > Since the old guests lack split_lock #AC handler and may have split lock > buges. To make guest survive from split lock, applying the similar policy > as host's split lock detect configuration: > - host split lock detect is sld_warn: > warning the split lock happened in guest, and disabling split lock > detect around VM-enter; > - host split lock detect is sld_fatal: > forwarding #AC to userspace. (Usually userspace dump the #AC > exception and kill the guest). A correct userspace implementation should, with a modern guest kernel, forwa= rd the exception. Otherwise you=E2=80=99re introducing a DoS into the guest i= f the guest kernel is fine but guest userspace is buggy. What=E2=80=99s the intended behavior here?=