From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 08456C4332E for ; Fri, 20 Mar 2020 19:48:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D2EE320767 for ; Fri, 20 Mar 2020 19:48:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726912AbgCTTsx (ORCPT ); Fri, 20 Mar 2020 15:48:53 -0400 Received: from 8bytes.org ([81.169.241.247]:54648 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726666AbgCTTsw (ORCPT ); Fri, 20 Mar 2020 15:48:52 -0400 Received: by theia.8bytes.org (Postfix, from userid 1000) id 4F2324CA; Fri, 20 Mar 2020 20:48:51 +0100 (CET) Date: Fri, 20 Mar 2020 20:48:49 +0100 From: Joerg Roedel To: Andy Lutomirski Cc: Joerg Roedel , X86 ML , "H. Peter Anvin" , Dave Hansen , Peter Zijlstra , Thomas Hellstrom , Jiri Slaby , Dan Williams , Tom Lendacky , Juergen Gross , Kees Cook , LKML , kvm list , Linux Virtualization Subject: Re: [PATCH 70/70] x86/sev-es: Add NMI state tracking Message-ID: <20200320194849.GJ5122@8bytes.org> References: <20200319091407.1481-1-joro@8bytes.org> <20200319091407.1481-71-joro@8bytes.org> <20200319160749.GC5122@8bytes.org> <20200319192654.GD611@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Thu, Mar 19, 2020 at 02:27:49PM -0700, Andy Lutomirski wrote: > AIUI the shift-ist stuff is because we aren't very good about the way > that we handle tracing right now, and that can cause a limited degree > of recursion. #DB uses IST for historical reasons that don't > necessarily make sense. Right now, we need it for only one reason: > the MOV SS issue. IIRC this isn't actually triggerable without > debugging enabled -- MOV SS with no breakpoint but TF on doesn't seem > to malfunction quite as badly. I had a look at the shift_ist stuff today and it looks like a good solution to the #VC nesting problem when it is turned into a #VC handler. The devil is in the details, of course, as 3 or 4 stacks for the #VC handler (per cpu) should only be allocated when actually running in an SEV-ES guest. Let's see how this works out in practice. Regards, Joerg