Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2224873rwi; Fri, 28 Oct 2022 04:43:39 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5xPmgWro2/g4E5cewvIKv5id2FHRj38oFjNByIB36kAp0XoIXZ3Ae8mMx15m6yfmY/BQel X-Received: by 2002:aa7:8e03:0:b0:56b:f5af:1d1 with SMTP id c3-20020aa78e03000000b0056bf5af01d1mr23251187pfr.16.1666957419339; Fri, 28 Oct 2022 04:43:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666957419; cv=none; d=google.com; s=arc-20160816; b=LfjvLZ2pUWQRpOB3Fd445kOtnBbNQHwU840vKbxUZOiqF5iugMTfZFLUuaLSeVNUq7 n1UdBp7u9YTxYRPkNXrDHd+qlMgiiGJj/gc0dG9+60FLtGFfCgE+pNUSez2POZIAnelN OLe+/IYInjWzhXw90I3AKM5qW3oAO35Kl0c0E4WIe7rvE9iuvep65Gg1gww4A02NbDGd n6AMc06amt/QclTwLYsm/3LO+dHznW9hjI3C3xva7dzXGNsDJhEm+2ptkPuTyzP5bevq 8Wk0jv8IRobTJ0b6OJNLa1UaTCQG97uzFvnJ/jCPXowt2e42OaLvx9xpDvlPh/NijdBO cJgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=9QDN7b8C40P5nLRSFdo+jNsPCZ6unv6lfSYzzSd/j0g=; b=sDKhClBl+zCzpg3wr3tymy0mQvblAggIE6u9e1wEO8siuebwf+1hELuW1dbQI7C4eS xvgW84RqXmLX3MxHH+ciZ3rFDvXDZa5uAY7IqVw3Oc9J/dRlMEwPLiNTbBKUplb4xPoI 2Loi4K8GTsHZ8ExJ1VMCBNuDiVZfREgqs4cxh5hqKMYUVpcfF0CzxxlPDFgXmq8xIvz5 btcPyTiQJO4W50mRXk9qJjY11JN0ZTMRrO2gHGnYe9ZWM6GXDDh/2iZTZ6cHZWXi92OD n1ko7tBzFBb2rcRWuVmafng09NooHVUNKLVJfmBcXqltMnmbGKQ358DS4NcU3q9bV/5+ WVjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hnJOooSu; 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 196-20020a6302cd000000b0046f5ffcfc1dsi4169539pgc.324.2022.10.28.04.43.27; Fri, 28 Oct 2022 04:43:39 -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=hnJOooSu; 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 S230512AbiJ1Kil (ORCPT + 99 others); Fri, 28 Oct 2022 06:38:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230463AbiJ1KiG (ORCPT ); Fri, 28 Oct 2022 06:38:06 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75ECE1C6BE3 for ; Fri, 28 Oct 2022 03:37:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666953419; 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=9QDN7b8C40P5nLRSFdo+jNsPCZ6unv6lfSYzzSd/j0g=; b=hnJOooSu4F2akXS4sNZMg3ysUbbfya4TOrwJm+0Fzh9kcCvs9pmwnDVIoe9wb//4AmUkMK gTQpB5l4gui64OnMx2HPHqPPXPlznV/VT9sKCqoCqqeRmxWGf14QVnLrEDShowxXkG/M0M khjguj377vzoG/U8gtkW60J5HRxUGdU= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-452-eA0FhJ84NsKAIs_wzVGnIA-1; Fri, 28 Oct 2022 06:36:53 -0400 X-MC-Unique: eA0FhJ84NsKAIs_wzVGnIA-1 Received: by mail-wm1-f70.google.com with SMTP id k34-20020a05600c1ca200b003c706e17799so2094055wms.9 for ; Fri, 28 Oct 2022 03:36:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=9QDN7b8C40P5nLRSFdo+jNsPCZ6unv6lfSYzzSd/j0g=; b=uqTwsjlTNHRQvHFaz98DJghuQPVyF3MBiPQ1fk1ksXls/4Yit5KwPVd0w315/tKXhw 4LghUEw7016l793zoYm6twpfTpPA9SfqhNHt5RIYibVEDM15tERRYEl5+2R6zcK1C2uO LSvXx426/dzrP013va86pB0jKb+sKKk/lXw68BtGpojnfAtzecvX6fbfZFh6ieq/k5lD XXgydXQMK5aTcL+/CeqwRKxDMpp/af6miSinLfi4mnjapJWKoCJk4QJ0hgAJvxOTJTWO ylV7Nwmw2kxkuTl/gAEranhIC7rLe0L1WRdGqgHTJOOVTnG317Z32aSrUC9kISMqwREQ zX+w== X-Gm-Message-State: ACrzQf1V6Oh27VMP3cv6A2AgDykxSJmXqlJPrTiOI3xn4B5bJqLJL/wC 2PnG3oItULSxgS7cezSBI1qI003bnMAk3SV/dE55z6RUAt8oVn59Veg68dJymPjpOOmh3VRS4sW ukwvNi+04kYTIlCTByyQW1UzE X-Received: by 2002:a7b:c404:0:b0:3b4:faca:cf50 with SMTP id k4-20020a7bc404000000b003b4facacf50mr8948962wmi.67.1666953411323; Fri, 28 Oct 2022 03:36:51 -0700 (PDT) X-Received: by 2002:a7b:c404:0:b0:3b4:faca:cf50 with SMTP id k4-20020a7bc404000000b003b4facacf50mr8948941wmi.67.1666953411035; Fri, 28 Oct 2022 03:36:51 -0700 (PDT) Received: from ?IPV6:2001:b07:6468:f312:1c09:f536:3de6:228c? ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.googlemail.com with ESMTPSA id bq13-20020a5d5a0d000000b002366dd0e030sm3440555wrb.68.2022.10.28.03.36.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 28 Oct 2022 03:36:50 -0700 (PDT) Message-ID: <4ce3d40e-9b2a-5f81-fc62-839f788fed16@redhat.com> Date: Fri, 28 Oct 2022 12:36:49 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 Subject: Re: [PATCH RESEND v4 00/23] SMM emulation and interrupt shadow fixes Content-Language: en-US To: Maxim Levitsky , 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 References: <20221025124741.228045-1-mlevitsk@redhat.com> <0e3a0cab-1093-3e83-9e9c-f8639ebe5da0@redhat.com> From: Paolo Bonzini In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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,NICE_REPLY_A, 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 10/27/22 19:06, Maxim Levitsky wrote: > 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!! Queued, thanks. Note that some emulator patches should go in stable releases so I have reordered them in front. Paolo