Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1156397rwd; Thu, 1 Jun 2023 11:11:55 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4DvAEdn7hVbI6D4naiXKj1RWMhPA79VaGJysyRG2ATpXrneyhzey52qTS5pzD7UpE2XH5/ X-Received: by 2002:a05:6a00:148b:b0:636:f899:46a0 with SMTP id v11-20020a056a00148b00b00636f89946a0mr13154670pfu.15.1685643115503; Thu, 01 Jun 2023 11:11:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685643115; cv=none; d=google.com; s=arc-20160816; b=pzBiWp2oL2IocJ9rLtQrPQYtZ78PGJJiIMT6zRtwqDD2opxAT30t53A/wVdec7vCEc tLsKZXeq/+JxV2za9rUXczGrlDUNWO/1C1MT3Bqh9HMQPWUg8g1IEqYYYg+biLRIALpJ X6SBYQ6hq8YKVEfgv6CoTcz0Qi1hlQN5wG9F4s61t8KhiPOFujCL8d4QUY/C/qTHGJdN m8BTQQ/HZD1V2GmrscUn9waD/QlY83j7Yxaqf22U9GuxANoMRQgwGAKFklXpDnSi3PsV U4/4oNO8k8s/vNFWbIYm653MiTn4QXlgr7vQThNF5JuYzXhplsUcM7TsTIjZqQP92+MO ed8Q== 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 :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id; bh=igEO09McsnFhvzpQnOAaJjvzSDdVHvZ0eHj2d6bgGEE=; b=nMCXNqP/WR0ZxfRoVTfMg+gaz0nb+wyEDgwAsEUW/WeuCpnqHvCFFoqtcHc5/upPft J9liwfeY4sM7ijIxSb21vY9fokLOGdZiU1eLCuH71BorR218gYZkyRUyovpz9SeUD9b1 0eXqyVQX5pv65i8iSsFhzJlAPIlDjZpvpQm5RVnDKCha5ltoSjOSaZ5IapxDMFcTv0JP TLT6pPyrI1BVmnx5LO2lvcEevrUoNULpQ8qzfhwnxXhDWxPcUWkUQ/u5+g9EO+h9chvA BBQp5MD0nXLy5UpRNsdsIOon/1eiT+MIdhmZmd/hiGB2IdRbeo9qC5JmTzzOCnMGRg+E gRhw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a7-20020aa794a7000000b0064d5aab3ec5si5766494pfl.156.2023.06.01.11.11.42; Thu, 01 Jun 2023 11:11:55 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231728AbjFARyP (ORCPT + 99 others); Thu, 1 Jun 2023 13:54:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231488AbjFARyO (ORCPT ); Thu, 1 Jun 2023 13:54:14 -0400 Received: from vps-vb.mhejs.net (vps-vb.mhejs.net [37.28.154.113]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67A5A8E; Thu, 1 Jun 2023 10:54:12 -0700 (PDT) Received: from MUA by vps-vb.mhejs.net with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1q4mUt-0000an-CA; Thu, 01 Jun 2023 19:54:03 +0200 Message-ID: Date: Thu, 1 Jun 2023 19:53:57 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH] KVM: SVM: vNMI pending bit is V_NMI_PENDING_MASK not V_NMI_BLOCKING_MASK To: Sean Christopherson , Paolo Bonzini Cc: Maxim Levitsky , Santosh Shukla , vkuznets@redhat.com, jmattson@google.com, thomas.lendacky@amd.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org References: Content-Language: en-US, pl-PL From: "Maciej S. Szmigiero" In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 19.05.2023 17:51, Sean Christopherson wrote: > On Fri, May 19, 2023, Maciej S. Szmigiero wrote: >> From: "Maciej S. Szmigiero" >> >> While testing Hyper-V enabled Windows Server 2019 guests on Zen4 hardware >> I noticed that with vCPU count large enough (> 16) they sometimes froze at >> boot. >> With vCPU count of 64 they never booted successfully - suggesting some kind >> of a race condition. >> >> Since adding "vnmi=0" module parameter made these guests boot successfully >> it was clear that the problem is most likely (v)NMI-related. >> >> Running kvm-unit-tests quickly showed failing NMI-related tests cases, like >> "multiple nmi" and "pending nmi" from apic-split, x2apic and xapic tests >> and the NMI parts of eventinj test. >> >> The issue was that once one NMI was being serviced no other NMI was allowed >> to be set pending (NMI limit = 0), which was traced to >> svm_is_vnmi_pending() wrongly testing for the "NMI blocked" flag rather >> than for the "NMI pending" flag. >> >> Fix this by testing for the right flag in svm_is_vnmi_pending(). >> Once this is done, the NMI-related kvm-unit-tests pass successfully and >> the Windows guest no longer freezes at boot. >> >> Fixes: fa4c027a7956 ("KVM: x86: Add support for SVM's Virtual NMI") >> Signed-off-by: Maciej S. Szmigiero > > Reviewed-by: Sean Christopherson > I can't see this in kvm/kvm.git trees or the kvm-x86 ones on GitHub - is this patch planned to be picked up for -rc5 soon? Technically, just knowing the final commit id would be sufficit for my purposes. Thanks, Maciej