Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1033872rwi; Thu, 27 Oct 2022 10:17:48 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7X8+W4zzF5K4fcl0GZO5ypH2a3Zhdh1iX9pwgNDFve+2W8vFsBxxNN3v/BIYGiDyrCSaXD X-Received: by 2002:a50:9992:0:b0:461:6cde:ccdd with SMTP id m18-20020a509992000000b004616cdeccddmr27972071edb.402.1666891068712; Thu, 27 Oct 2022 10:17:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666891068; cv=none; d=google.com; s=arc-20160816; b=gftt5KqFHzwg2YyC7dshQrmWGrPHTh2gBAAwRSMYFXx589KJrARQP1eHhiksGCFwjy f3PEfOUIcQ9wc7sGNJU9kAB0U6cEsDePCPjdNI4KsHXr5xyLZO1ZAHHqnoz/RjByD+NT 5DclFaz2d9LdxIo2cdSPozH2grDKkeSh/cZD6Mi/6vgQm/GvGi9/YyNfSAlskBqYBBmo zq18YsarsefuvDKMLK2BssqEwL+1yHg0C/OquNwLOR0ZmcnIg81K2+oKxBgJUYV9d4JX eN/mrv/HzPlQjh2m/vg8i8Z0/MO740QCFsHAhwj+klnuWhf0NXCzszdJo6X4Q7wRshWf JiTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=MZaF2IWq2xKaalK2i77cU14KIzLY62J6A9qt1MT965A=; b=ccdd7Qr9bqt1wpnen2FTb4tQ3WXuoO8QSXvOOgplHyiGQXpQvW9SqHu6mSn5G8t/R5 4+7nxkhjAbZHVPnyeijm0HZV+GMNYp+2fwd9c4Za+VZXl6l+3lDmBAXi9VEIfaTUBalU Vh5aNcgtFCPBoQwfgDk+GGCipMA9BDPWPdb1ZTgZatQR1zpYIgrDydUqoCtYZcogb59c 95U/VPuDZFOTfPazFrQDxO+Kq4xTwJ1DgZ6bHWWXoNEUfjUGgddSgxVAo3OFl7a3TI+b COrc+huV5BtsPjDtu6UEsQutJ+5gRnmJSjYLGn4UNSxWiBuSTBb4T3om2ZomAX7tXVQA fXXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Z+0E8nPD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sa17-20020a1709076d1100b0078df90c40acsi2062738ejc.30.2022.10.27.10.17.22; Thu, 27 Oct 2022 10:17:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Z+0E8nPD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236979AbiJ0RGW (ORCPT + 99 others); Thu, 27 Oct 2022 13:06:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236968AbiJ0RGU (ORCPT ); Thu, 27 Oct 2022 13:06:20 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12EFD196EE9 for ; Thu, 27 Oct 2022 10:06:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666890379; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MZaF2IWq2xKaalK2i77cU14KIzLY62J6A9qt1MT965A=; b=Z+0E8nPDTQ5GzqkMwHkYaq1gQxxJHs/CIZs4RHfEBs6SpK7mUEH3SmFT73jIwn+Zbo7u2r htEwXaz930bNXuyXqGFSuS7lzK/V5QWrCb0KLjDbKM+s3RBXnXaKlAfgQ0gbqOHoXA3/qv qSx3ioPPOIPXnyqOENWyuC3iCw9GPys= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-589-q5rDa7aNPXegfgBHm32aHA-1; Thu, 27 Oct 2022 13:06:15 -0400 X-MC-Unique: q5rDa7aNPXegfgBHm32aHA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4C1C51C09B71; Thu, 27 Oct 2022 17:06:07 +0000 (UTC) Received: from starship (ovpn-192-51.brq.redhat.com [10.40.192.51]) by smtp.corp.redhat.com (Postfix) with ESMTP id CC6B440C206B; Thu, 27 Oct 2022 17:06:01 +0000 (UTC) Message-ID: Subject: Re: [PATCH RESEND v4 00/23] SMM emulation and interrupt shadow fixes From: Maxim Levitsky To: Paolo Bonzini , kvm@vger.kernel.org Cc: Thomas Gleixner , Yang Zhong , x86@kernel.org, Jim Mattson , Vitaly Kuznetsov , Sean Christopherson , Wanpeng Li , Shuah Khan , Guang Zeng , Joerg Roedel , linux-kernel@vger.kernel.org, Dave Hansen , Ingo Molnar , linux-kselftest@vger.kernel.org, Kees Cook , "H. Peter Anvin" , Wei Wang , Borislav Petkov Date: Thu, 27 Oct 2022 20:06:00 +0300 In-Reply-To: <0e3a0cab-1093-3e83-9e9c-f8639ebe5da0@redhat.com> References: <20221025124741.228045-1-mlevitsk@redhat.com> <0e3a0cab-1093-3e83-9e9c-f8639ebe5da0@redhat.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-2.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2022-10-27 at 18:49 +0200, Paolo Bonzini wrote: > On 10/25/22 14:47, Maxim Levitsky wrote: > > This patch series is a result of long debug work to find out why > > sometimes guests with win11 secure boot > > were failing during boot. > > > > During writing a unit test I found another bug, turns out > > that on rsm emulation, if the rsm instruction was done in real > > or 32 bit mode, KVM would truncate the restored RIP to 32 bit. > > > > I also refactored the way we write SMRAM so it is easier > > now to understand what is going on. > > > > The main bug in this series which I fixed is that we > > allowed #SMI to happen during the STI interrupt shadow, > > and we did nothing to both reset it on #SMI handler > > entry and restore it on RSM. > > I have now sent out the final/new version of the first 8 patches and > will review these tomorrow. Thanks for your patience. :) > > Paolo > Thank you very much!! Best regards, Maxim Levitsky