Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp315696ybh; Wed, 15 Jul 2020 02:44:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynfD4J895SaPRzYb3o8bAMEHkznIiWgIPAWDwS8fENRZoyA12m8/Tj1amiwHhDCrkv+Xz5 X-Received: by 2002:a50:c044:: with SMTP id u4mr2319308edd.366.1594806248486; Wed, 15 Jul 2020 02:44:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594806248; cv=none; d=google.com; s=arc-20160816; b=f3+u5Y4PVEth1/QbVnsmQBFgClLeq7UNXuE5i8HdXGromiOCEs8KySBZVPYDP3aCxF 8KWjTiOb4kLad5wf4z5orMWdiTO9yIqga2qD4oIq1PYddFk+9YAMhg4WH6tjz4WF5yPP Sq8eemdsTdKdl2GAvsz4GU/mwslwHrIkbBQWEpc8j+6+RRwbN8/vovKxF00iymtfmBPx f7iOuPbecHcEuipPBr82a84ZLZa9ZnmDB469RAuMb4leQoD0WR1Fzc3PWGUtdduDgeh4 W/HIzFzIKohl9gzoPVrAn7rEZE3WgiSMqSUVnwNAwJlbhUbN909ilOQDHn9Olt2z/KCH YYqQ== 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=Vg63zrcjbGCLAFsMdy1h61YQU14RKm8WatSZhHeUE38=; b=E9X99lGJWJuuajUvsQH5FXyL35SZr3daIwsjKp8gHr+WmEOJeJqY1b5wOlfxgGeTVD hHE0IxNH+Xi8z4KJN7F7i6+dRTi7kfcOoaG4cbkcP9opmUVDj/wu6pZi3RsEwJbVG3ga yu2o6sUbXY2PsIAM39X2tu2wxuCUmyv1DUI8aLmcD0CDwrKhaDXI2t5H+xLUOH4/7FrV UsIPaDTssrQiVRyUi0oUiJWQYalRXYJKhqNHDry952cV6URUPSHO//rrYV10TUvnPNW+ bRVx1SXIH99PMbaDbgNK2M/pTwjPsrJnHYvvz9PxmyFaYNZAzf37r8BfBn+rKyjhSLlB rfow== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q19si972702edr.36.2020.07.15.02.43.45; Wed, 15 Jul 2020 02:44:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730293AbgGOJea (ORCPT + 99 others); Wed, 15 Jul 2020 05:34:30 -0400 Received: from [195.135.220.15] ([195.135.220.15]:41518 "EHLO mx2.suse.de" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1728043AbgGOJea (ORCPT ); Wed, 15 Jul 2020 05:34:30 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 99D8CAC2D; Wed, 15 Jul 2020 09:34:31 +0000 (UTC) Date: Wed, 15 Jul 2020 11:34:26 +0200 From: Joerg Roedel To: Peter Zijlstra Cc: Joerg Roedel , x86@kernel.org, hpa@zytor.com, Andy Lutomirski , Dave Hansen , Jiri Slaby , Dan Williams , Tom Lendacky , Juergen Gross , Kees Cook , David Rientjes , Cfir Cohen , Erdem Aktas , Masami Hiramatsu , Mike Stunes , Sean Christopherson , Martin Radev , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org Subject: Re: [PATCH v4 00/75] x86: SEV-ES Guest Support Message-ID: <20200715093426.GK16200@suse.de> References: <20200714120917.11253-1-joro@8bytes.org> <20200715092456.GE10769@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200715092456.GE10769@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 15, 2020 at 11:24:56AM +0200, Peter Zijlstra wrote: > Can we get some more words -- preferably in actual code comments, on > when exactly #VC happens? Sure, will add this as a comment before the actual runtime VC handler. > Because the only thing I remember is that #VC could happen on any memop, > but I also have vague memories of that being a later extention. Currently it is only raised when something happens that the hypervisor intercepts, for example on a couple of instructions like CPUID, RD/WRMSR, ..., or on MMIO/IOIO accesses. With Secure Nested Paging (SNP), which needs additional enablement, a #VC can happen on any memory access. I wrote the IST handling entry code for #VC with that in mind, but do not actually enable it. This is the reason why the #VC handler just panics the system when it ends up on the fall-back (VC2) stack, with SNP enabled it needs to handle the SNP exit-codes in that path. Regards, Joerg