Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp451796pxb; Wed, 25 Aug 2021 07:07:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUQGWmJZvwvzmbdVlz+xvU06Sej8oDiTrKCPDB63ahQoDmPAMsSzWoIf3Xxf74RbkggYhO X-Received: by 2002:a50:8e51:: with SMTP id 17mr6395914edx.308.1629900442333; Wed, 25 Aug 2021 07:07:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629900442; cv=none; d=google.com; s=arc-20160816; b=g/LPXeYDUZfM3nUgKMvQ2FCzPz6JJsHermMYBOk1EcObugtJttAEAS13YG/dNujMbx Np5GSoGGT0Id80juVz+vCvD0vlprVbKThk+/q9XKBEahU39v2MyXaRP2GiKUPCLcBziA SJSyf3fKsnKAplIS6A+FG2ApLH8PN+emp8OtWtdPevgigoiDJ5rDOfe2viu6ax4SAniL joHyZywg7eBSlp5oMbmL8buSufpKDg7u/WCqlZHS1tgzP68acdeP6qrtweSXN51ojZEv 21Wrok8IcedLZTNh2vFCwwBBaMvUgg7Xumi9WeQxHb4wN7M2qstJz/+xNURy9ZxHwkJa kwgA== 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=GhDtxzj1b1Wtn66QMK0bVDeTSbHy2I2GjFJNQ4tOTcs=; b=pC+NwtqtQvbJWVpeJjFCM11qGFlk97Dq4qtQedb8Uh3zAl0keT+SReEOaDBO+/HgC9 KhytG3wnsjxXm9rRqLRUHGymffluh/3pdCUvuivz07hYJVGUQKt/+AJZoPsEnAFUmIhK enf1UbwjJPx36ydXmtyEaV9EVdhHVGGru6go7KNFe9EqxsczaPqO+hWFKLxM87raaf6T V3NuNl0OqeAUnovSjj3AWHxC2OpYQZpIDRw2nmzx7hKJVi9GfZ4MDRV1y5uOS18afzhB 1Tz3ypGNPMmITov5DhcWvF2TFMgrq4O/mkJ1U6eV/9WxRtW4D6+oXgimpL2tdbF/B5hU sitA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=JQObVsKH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h15si111979edv.59.2021.08.25.07.06.58; Wed, 25 Aug 2021 07:07:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=JQObVsKH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S240742AbhHYOBL (ORCPT + 99 others); Wed, 25 Aug 2021 10:01:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232058AbhHYOBJ (ORCPT ); Wed, 25 Aug 2021 10:01:09 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FCB8C061757; Wed, 25 Aug 2021 07:00:22 -0700 (PDT) Received: from zn.tnic (p200300ec2f0ea7006bb4dcd1613a8626.dip0.t-ipconnect.de [IPv6:2003:ec:2f0e:a700:6bb4:dcd1:613a:8626]) (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 B24E11EC032C; Wed, 25 Aug 2021 16:00:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1629900016; 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=GhDtxzj1b1Wtn66QMK0bVDeTSbHy2I2GjFJNQ4tOTcs=; b=JQObVsKHzQ5hVxJmdcfCZsiUJqP6TAGsSfHvyV5ovpRf1//1rYhVadL4J3Ko/0A7WDsfK7 y4YdG/2kZ/sK83Zf5Vqdnk+tj7ONnW6kzW+NfRw9Har380rpXiFNVu36+niS1bHXecPVX0 hXw4d1tEXpF6nii57mSh7iNh9CYPWTc= Date: Wed, 25 Aug 2021 16:00:48 +0200 From: Borislav Petkov To: Brijesh Singh Cc: x86@kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-efi@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-coco@lists.linux.dev, linux-mm@kvack.org, Thomas Gleixner , Ingo Molnar , Joerg Roedel , Tom Lendacky , "H. Peter Anvin" , Ard Biesheuvel , Paolo Bonzini , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Andy Lutomirski , Dave Hansen , Sergio Lopez , Peter Gonda , Peter Zijlstra , Srinivas Pandruvada , David Rientjes , Dov Murik , Tobin Feldman-Fitzthum , Michael Roth , Vlastimil Babka , "Kirill A . Shutemov" , Andi Kleen , tony.luck@intel.com, marcorr@google.com, sathyanarayanan.kuppuswamy@linux.intel.com Subject: Re: [PATCH Part1 v5 17/38] x86/mm: Add support to validate memory when changing C-bit Message-ID: References: <20210820151933.22401-1-brijesh.singh@amd.com> <20210820151933.22401-18-brijesh.singh@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 25, 2021 at 08:54:31AM -0500, Brijesh Singh wrote: > I replied to your previous comment. Depending on the npages value, the > __set_page_state() will be called multiple times and on each call it > needs to clear desc before populate it. Ah, now I missed it, sorry. > So, I do not see strong reason to use kzalloc() during the desc > allocation. Yeah, then you don't need it. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette