Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1710816rwb; Thu, 15 Dec 2022 13:25:44 -0800 (PST) X-Google-Smtp-Source: AA0mqf6pqTzAIRDynNNv9Hkm0aWzS4rLV5Ze/Ym02KDXlV2KJAjwT7v9o0w6YLS0kqr6QoTFbral X-Received: by 2002:a05:6402:12d6:b0:46b:444b:ec40 with SMTP id k22-20020a05640212d600b0046b444bec40mr25660785edx.15.1671139543998; Thu, 15 Dec 2022 13:25:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671139543; cv=none; d=google.com; s=arc-20160816; b=GSnYNSC2EvWHM64CktW+EVZbY70M1X3b2b2pCmVDJpTVs0giXhhGHmJU+eooIxCgG4 8s9xK5ZMh/oZl36tTUnyBLSCblaiXE9Jwu+cgn2S2a3mEGmPwOgQS2RbnEE/d85XgGAS iS6wq7pp6W5O7ZgyvrLd4XuTzl8gKOTLVH0u7VTwvS6OGiEjVxelyKFl2X5+qG2itUVc Voof53gsiH/fEmkammpCrpwPXeucZQb5WwyhBFNLj7dRFkKw5jviyWEWXzPDolk5Hn5w gb+36DRgRE+sHzoaJg3d8r8rDPPxk7Hro/IoUpR2mTTYKafDH84ho3mEy/KfpqoHC0uN 7CVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=xJBNVirIxjRTnviyLQ3VvNqsXr9KTaq6mCTY4+eqgXk=; b=ErTXQnSDvmknDbpfqmS8pwRzcCABE3ymBMcwLacSghCtqJGgBaEJFVipe8dE1Ewg8u cwe1Rmbv66meUYlhqTrZW83Kc+LdASE21NpNWqjMZJ5I7VGVNIEskhIlz3DATb95TpMd 1i/AOciwUxN/n+5pAKfsElQrWvvXkWflz9uHHRvFPetJpT83iE5NQlMB4aZbsGI3at25 +UexQzvqYnSltnIMGy67CR4Mjv0/AAXLtfnsdxVZc+zCmmXyFUeumsl8W2nk+i1uy/3W Jlgz/RzQjQ900FShkkQct5c87cw7TgfKXehmKl42A+U+W6N2xqZHk6MY+wEPJt3C84b8 6BvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=QSJYi0LX; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c88-20020a509fe1000000b0046aa4908162si421818edf.46.2022.12.15.13.25.27; Thu, 15 Dec 2022 13:25:43 -0800 (PST) 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=@gmail.com header.s=20210112 header.b=QSJYi0LX; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229675AbiLOU7n (ORCPT + 68 others); Thu, 15 Dec 2022 15:59:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229660AbiLOU7k (ORCPT ); Thu, 15 Dec 2022 15:59:40 -0500 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C35954343; Thu, 15 Dec 2022 12:59:40 -0800 (PST) Received: by mail-pj1-x102d.google.com with SMTP id gt4so433052pjb.1; Thu, 15 Dec 2022 12:59:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=xJBNVirIxjRTnviyLQ3VvNqsXr9KTaq6mCTY4+eqgXk=; b=QSJYi0LX3T2XajNmp04PqUS/ym18CnV7ysHk8CCn7goYsLo/Barc400KJWRTWEQVj0 Z3tcGNcz7LggzZLgeUL5TWtjFRp/fK9o9qgD4iTFDQ6+i61JpswrZn8Du3Oa6gJ3n78y qw6AB0ygqnFF69JyjAVleZQ1I+1kbRZ05qJv6NsC4aOPkSWF4Ii9ABtMJtNVRS0De6mR BT6XamFPgcPUPB+7LQkNfQZV0yL7MDLqLgB+CX6aaiKm1okC2QuYXfTkQbDzaMTgoJG3 a4+64AwU4jcqiOlzuKcUPAlnsoG6nTC9bvyuIwxVID9w1KoLXTdRMOYbENYUuoSloRQI QQBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=xJBNVirIxjRTnviyLQ3VvNqsXr9KTaq6mCTY4+eqgXk=; b=2Xxley2lQZDDgQpaNGoIJEqX0EBEe4JBEA2g9FaFmuT6GI+8PbFgUtuoZg4eYVjw// FtU6wxmJaM175QoYFF6Q9ahDQvto/YrTJrKPxOlMdCxji0BL0J5AaZO1dBB9/EX1RnAs WOD2Mq4OhVCM3jLs8BXTlNhLROzUwrjqoeXm1GSmUbv4CPCkWRMbMe/LT1UKqYExiX5T OVo892BY5LMuRMak5vPSQwvUNvnnVL7Es/YtyXAbQwYorTfjEEju+USZZn8BdnHa4UMX 75V8zKQJyUC4HPJoL38Ie5MYWTZ+kjt/xTk5RjaCKUx4n7Cz7WyiDEU8mHCYNhoQo25/ bgwg== X-Gm-Message-State: ANoB5pmPCXcwoxhv1tIXT6qhfHxTf2qqWoVwgwZCOFDpP1jQ8geNzphv VxU6l6jchmLvs03IEQuxfU0= X-Received: by 2002:a17:90a:7e93:b0:219:6626:3b63 with SMTP id j19-20020a17090a7e9300b0021966263b63mr31328420pjl.25.1671137979344; Thu, 15 Dec 2022 12:59:39 -0800 (PST) Received: from localhost ([192.55.54.55]) by smtp.gmail.com with ESMTPSA id gw14-20020a17090b0a4e00b00218a7808ec9sm86046pjb.8.2022.12.15.12.59.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Dec 2022 12:59:38 -0800 (PST) Date: Thu, 15 Dec 2022 12:59:37 -0800 From: Isaku Yamahata To: Ackerley Tng Cc: isaku.yamahata@intel.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, isaku.yamahata@gmail.com, pbonzini@redhat.com, erdemaktas@google.com, seanjc@google.com, sagis@google.com, dmatlack@google.com, sean.j.christopherson@intel.com, kai.huang@intel.com Subject: Re: [PATCH v10 016/108] KVM: TDX: create/destroy VM structure Message-ID: <20221215205937.GF3632095@ls.amr.corp.intel.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 Fri, Dec 09, 2022 at 11:15:35AM -0800, Ackerley Tng wrote: > > In tdx_vm_init, it is possible to have a double-reclaim, which > eventually causes a host crash. I have a selftest that reliably > reproduces this, and I believe the problem is that withiin > tdx_vm_free(), we don't reset kvm->tdcs = NULL and kvm->tdr.added to > false. Thanks for the fix. Did you use error injection to trigger the error path? Thanks, -- Isaku Yamahata