Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp6847792iob; Wed, 11 May 2022 06:41:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5C7m1MppyfFHBIlbTWDS9TMbt8R6wjTlUPxQRlaWGdJU3tZLxp+Jg54QtdTXdjjvP5MMI X-Received: by 2002:a17:902:ce82:b0:15e:982e:a815 with SMTP id f2-20020a170902ce8200b0015e982ea815mr24827725plg.167.1652276503715; Wed, 11 May 2022 06:41:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652276503; cv=none; d=google.com; s=arc-20160816; b=twokoy12jn2WEVRNdXxt2aLAA4/szPK5kVBNCNGftyIeoouu32/x9mPeeRjyGkpNoR /EWELS2ePOdUxrbNoJ16b21bxwquX8lVWtGeFG7nay8f9p5NguJVL8keiM5SZ/RYRbNK 0E9Piy6Lg1kRU602O0DKFK5cgsGCChdEP0JgcJ36mqOQBga5RKlRKWav25wz03FVG7pk +iSyHYnuhErKj9Lq6uj+odh6PtRSVEIxsJVBw4t55pgQ72seTo3Rjwkm99A4D775nDr2 LZjcf2Wl3LtXYIMVRFT5RsUHc3GlRmpQbRhQz2Rkimsnob0vTbOw0wfDsozfnHMdEpfI T/pQ== 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=Rl96LlwUayMVLB9Ox0K7EFk+HS7SAZNt7K1olPYN8Qo=; b=Ey4lAl3CVm7427z3ocLnCx9hobUO+sIHdLr7grQER94ETVtlgYf41Td5EkxH/aNRzI 12y9Bmu2HmW/IdoREUY9UqzYMQgtk9RWARJFBdFm3ChVa/99UAAYhrxruvfgVxCB1Ycc YB8bEgrG3x/QOgQb2Qop3444/7MlvWMdhrUPuubCMjx+ngPHewXZ3vhueVrfhW7r3hZU VqdXc0Dk9yZyqjoIhyji6KUE0vp7ZlR4A5aHsmUoq49VuAKVhpfGWT6waFF8Tow0YWRh FApYkKv2iX5qv6/1jN/s7y9u3434tefnTM0bNuB4m90hK5/e6OBFfAaCflfFF9+75yZm w0Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=Duquyg3r; 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=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v4-20020a626104000000b0050d96e21e3asi2230450pfb.171.2022.05.11.06.41.31; Wed, 11 May 2022 06:41:43 -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=@alien8.de header.s=dkim header.b=Duquyg3r; 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=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234696AbiEKJNK (ORCPT + 99 others); Wed, 11 May 2022 05:13:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232053AbiEKJNH (ORCPT ); Wed, 11 May 2022 05:13:07 -0400 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A900A81670; Wed, 11 May 2022 02:13:06 -0700 (PDT) Received: from zn.tnic (p5de8eeb4.dip0.t-ipconnect.de [93.232.238.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 408B51EC053F; Wed, 11 May 2022 11:13:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1652260381; 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:in-reply-to:in-reply-to: references:references; bh=Rl96LlwUayMVLB9Ox0K7EFk+HS7SAZNt7K1olPYN8Qo=; b=Duquyg3rKjp+y7ODQUAjIdw8MyLoXi0PtGqN9Uvp4Q6iFjDWDtrtKTTdeGNAvniLJ9Yglw 25CwXIBrlMwP35/M1L3iIu0onVeccf45hNzVh0tgHL+95xHX3ecuBTMkr6TQyNcv+z2bui rRAljZNtex98qUrJvHyAQ1/s7zMfbAk= Date: Wed, 11 May 2022 11:13:08 +0200 From: Borislav Petkov To: "Kirill A. Shutemov" Cc: "Kirill A. Shutemov" , Andy Lutomirski , Sean Christopherson , Andrew Morton , Joerg Roedel , Ard Biesheuvel , Andi Kleen , Kuppuswamy Sathyanarayanan , David Rientjes , Vlastimil Babka , Tom Lendacky , Thomas Gleixner , Peter Zijlstra , Paolo Bonzini , Ingo Molnar , Varad Gautam , Dario Faggioli , Dave Hansen , Brijesh Singh , Mike Rapoport , David Hildenbrand , x86@kernel.org, linux-mm@kvack.org, linux-coco@lists.linux.dev, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCHv5 10/12] x86/tdx: Unaccepted memory support Message-ID: References: <20220425033934.68551-1-kirill.shutemov@linux.intel.com> <20220425033934.68551-11-kirill.shutemov@linux.intel.com> <20220506204423.gu6jrb53kmuxze5r@box.shutemov.name> <20220511011906.el4m54fns7ilh7fr@box.shutemov.name> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220511011906.el4m54fns7ilh7fr@box.shutemov.name> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Wed, May 11, 2022 at 04:19:06AM +0300, Kirill A. Shutemov wrote: > JFYI, I've reworked it as > > accepted = try_accept_one(start, len, PG_LEVEL_1G); > if (!accepted) > accepted = try_accept_one(start, len, PG_LEVEL_2M); > if (!accepted) > accepted = try_accept_one(start, len, PG_LEVEL_4K); > if (!accepted) > return false; > start += accepted; s/accepted/accpt_size/ and then it is perfectly clear what that variable contains. But it seems you're preparing a new version so I'll continue looking at there. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette