Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5357128ybv; Tue, 11 Feb 2020 14:13:06 -0800 (PST) X-Google-Smtp-Source: APXvYqwHt9mt2V8dh8FEPG3Oc/ZStCdqUcTS5Kx8kGQoHn63V6hko94y6b+mGAnexTHoTeGu/UMJ X-Received: by 2002:aca:54cc:: with SMTP id i195mr4213703oib.126.1581459185829; Tue, 11 Feb 2020 14:13:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581459185; cv=none; d=google.com; s=arc-20160816; b=CLNhacGWG3kNKi55/ZFpQA1MInTce5fQLg+ul90hPZA0mkN/328AuGanR/aSE8fpfL eyuQMuIEcMRaoYQizzib3RgNv1oIfUrEiarmnAJErMD4d9IJ7VDVH4VJuf+LsTECOTpk IQCqP0SNP3wD3MRTP+9l8/7bQ+ElZu7+3t6evJafyG/a7hS5Z7GoeRbMM9vE+tioiqop KTG4ctpWv7BZC9RrzEFXIPepHEhKQBScfX7PXZzOnBLmh3lWWWBz8kdFERshj7ov8f4R RK6a4XlGFfRbwDPhcMKVlJM5lxyOcfwdc2azx4Qhxt3CwaUf0CDAACeHErWLL2ZRc6Ju 0bfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Qaz4zD3cVYx4xLkyHj8pBUxB+79Bv/oARYdnJXbYqtc=; b=gzH535c4DZx6F9+7PRfh/oEhYMehS2xwPdwmX5k2NA1f6Y54NJfH/aZxPCRm15cgiT Vvvh6+kYwyjQl+jPzoUMYUAV1sBHu9Yt7mwPOtVYh2cPCyqvMl3IIDnAc0cUTGqIsWQE iYG8mV75fiZM0Xkk8IGJhNb1AkUEHaCHn41Tgz5gB0pB69X/3xjpKdmFRDTmd5fxc0wt +BgkMddz1W9ggO5St6bk+UIl4GVT9AP46xYZW5kZGVXMjGqTThCqthlIeBBUgcizqcBY XWeHitvd9RbZLHxeWpo1bEQ3+t5uqJIlRTGI6qfG41/Nw4hwV20GMuKe9Skmr97xA0F+ X5VA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CIBIe+lF; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d2si2563394oth.267.2020.02.11.14.12.53; Tue, 11 Feb 2020 14:13:05 -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=@kernel.org header.s=default header.b=CIBIe+lF; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727429AbgBKWMT (ORCPT + 99 others); Tue, 11 Feb 2020 17:12:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:48442 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727041AbgBKWMS (ORCPT ); Tue, 11 Feb 2020 17:12:18 -0500 Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DFE7E20870 for ; Tue, 11 Feb 2020 22:12:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581459138; bh=yNqZod946paujAdEqMRJ1ejAWBjSCe4eeJhwXaauReA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=CIBIe+lFFTrJtJr5PAHqlakYHlpJHZ8/IxM6nu6BnvrvP7QlnGB0UYifJ+cLbPD1u h1S/MFtkHV/kfSrWKBYyT33E1VvxImKO4GN0JxCZomOMAUqT1BPCihhCIlujCDaFTm +HfJXF6DSOj/kVMp23bh1nYVKiS1eqyxL1JzNMCc= Received: by mail-wr1-f41.google.com with SMTP id z3so14535033wru.3 for ; Tue, 11 Feb 2020 14:12:17 -0800 (PST) X-Gm-Message-State: APjAAAVqzWcHausQQ32fhuvb2s11PIhcsFZjgQLbZXmFOZ8XGwct8piG 7TwUko/dkEfzbgx9Kb4xMLB6aVa/M+A1/AZqOcav7w== X-Received: by 2002:a5d:494b:: with SMTP id r11mr10779334wrs.184.1581459136232; Tue, 11 Feb 2020 14:12:16 -0800 (PST) MIME-Version: 1.0 References: <20200211135256.24617-1-joro@8bytes.org> <20200211145008.GT14914@hirez.programming.kicks-ass.net> <20200211154321.GB22063@8bytes.org> In-Reply-To: <20200211154321.GB22063@8bytes.org> From: Andy Lutomirski Date: Tue, 11 Feb 2020 14:12:04 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH 00/62] Linux as SEV-ES Guest Support To: Joerg Roedel Cc: Peter Zijlstra , X86 ML , "H. Peter Anvin" , Andy Lutomirski , Dave Hansen , Thomas Hellstrom , Jiri Slaby , Dan Williams , Tom Lendacky , Juergen Gross , Kees Cook , LKML , kvm list , Linux Virtualization , Joerg Roedel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 11, 2020 at 7:43 AM Joerg Roedel wrote: > > On Tue, Feb 11, 2020 at 03:50:08PM +0100, Peter Zijlstra wrote: > > > Oh gawd; so instead of improving the whole NMI situation, AMD went and > > made it worse still ?!? > > Well, depends on how you want to see it. Under SEV-ES an IRET will not > re-open the NMI window, but the guest has to tell the hypervisor > explicitly when it is ready to receive new NMIs via the NMI_COMPLETE > message. NMIs stay blocked even when an exception happens in the > handler, so this could also be seen as a (slight) improvement. > I don't get it. VT-x has a VMCS bit "Interruptibility state"."Blocking by NMI" that tracks the NMI masking state. Would it have killed AMD to solve the problem they same way to retain architectural behavior inside a SEV-ES VM? --Andy