From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A47FFE7734B for ; Fri, 29 Sep 2023 23:53:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=eo2UHEZvQEkQOffvtDuD5OEcqgAjXbykVcUM5hONk3g=; b=f+uOx9eUqv5x7m 4s4amf4a7UHK+ZNQ0zdTYtFrpmuqj9UkTVcUbCRNO4OOxykDk0UtaMvuUPv6cT2eJIfyqDCab9ZSh Z5cXkgI4+C1U53eEcOR+o9ehXwrBRRzBKY57VVHL+L6Fn/m3YBF/dS3W4AHMJnTwECofOY/C1W4dx bRM/VOI86mn+u1UQqVGVxXX5Z3MGuljVCyaCqlic/mr8Iij22Km1nmn6JiayeabMG7fmXYwDLF/jo 1zyJ8o6lzqEx3A/1bPsdcsHcWknOeHAaK/u115F2enF4YENaPqQz7NTPY3ps6BnSba5iesNTvaV0r eHiNq4WuRrU0YcwRtTOg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qmNHe-008iYn-35; Fri, 29 Sep 2023 23:52:34 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qmNHb-008iY9-0F for linux-arm-kernel@lists.infradead.org; Fri, 29 Sep 2023 23:52:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696031549; 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=wbCRLqs67uOHonUW6wA0vdzT3otLZZXvFL4oPjvAtuM=; b=P4QFuMHNAyOvRqx6jp9N/GHAyHyf+zymok+J310z9eZDJmC0ERCD4QCLm0pXrRlUQqw59u t47YVRQ9DvG1hNjM75w74LLlpmvgI+ENlfLqbgLgSOHswQlykMf3mbND4kcA2XlubI03QJ b+yvEHK5rPWvCHQdhU2Eg/c96ZaVOF4= Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-627-5lS0AJHYO-uAs3OJYN9pZQ-1; Fri, 29 Sep 2023 19:52:28 -0400 X-MC-Unique: 5lS0AJHYO-uAs3OJYN9pZQ-1 Received: by mail-pl1-f200.google.com with SMTP id d9443c01a7336-1c735563177so28011335ad.3 for ; Fri, 29 Sep 2023 16:52:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696031547; x=1696636347; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wbCRLqs67uOHonUW6wA0vdzT3otLZZXvFL4oPjvAtuM=; b=MzGDRjvHsFbnI7KqiHRKLcmbo8SSekIJHN8D4lSLjWkDVicxEjtRnoLL9cd9LAPAZf j0ZfUbwizR6B7qGal4+S3JOEaNpJql1bgVUG4y/XPi5gVxNur/4UN5Saa/rI8DQpea4G rQUsr3EDVXgpwaIJxHC2pd/6rhLQ5BK1oKESdzM0NZAJCbyJMHgopAf6LM3c4Z53H+Kh jmEdco3CuY3kQJJ2qG9dDqcp/zmv7mrDDflYhxzTyR7Bl39FtyGxoKGQRzlePkL4E+i9 PyLEDZ0Ey5/Id7au113XTiL3T/STlpJJpMlfGgX8vzuJ4XneBNivYEGwf70YfoedgiBc S1Dw== X-Gm-Message-State: AOJu0Yy1hAJU8AJj1SU57oSXaPczU0oTkHPG67F14JtplPSc9KVkTp/A bVNbgzZm+0cEmFgJ3eyMmK74hiQWyzfjm5UZJpitxnHybqfyu36C3Zt4sOsS4lobIkId9/w+ExA aYlEG39osI4Wx7RPiyXFYDVURaKJz5zJKCBq55ylIJDg= X-Received: by 2002:a17:903:1ca:b0:1c3:e5bf:a9f8 with SMTP id e10-20020a17090301ca00b001c3e5bfa9f8mr7130071plh.19.1696031546963; Fri, 29 Sep 2023 16:52:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHX2bX/x5DjYhQHQmkVbrIHvYA2ci45ExMx9DEYdHnhMM3Xv7vAE4btBHGyfHKFMwDj/drBbg== X-Received: by 2002:a17:903:1ca:b0:1c3:e5bf:a9f8 with SMTP id e10-20020a17090301ca00b001c3e5bfa9f8mr7130049plh.19.1696031546567; Fri, 29 Sep 2023 16:52:26 -0700 (PDT) Received: from ?IPV6:2001:8003:e5b0:9f00:dbbc:1945:6e65:ec5? ([2001:8003:e5b0:9f00:dbbc:1945:6e65:ec5]) by smtp.gmail.com with ESMTPSA id g22-20020a1709029f9600b001b5656b0bf9sm11819664plq.286.2023.09.29.16.52.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 29 Sep 2023 16:52:26 -0700 (PDT) Message-ID: Date: Sat, 30 Sep 2023 09:52:21 +1000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH v2 2/2] KVM: arm64: Use folio for THP adjustment To: Matthew Wilcox Cc: Vincent Donnefort , maz@kernel.org, oliver.upton@linux.dev, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, kernel-team@android.com, will@kernel.org References: <20230928173205.2826598-1-vdonnefort@google.com> <20230928173205.2826598-3-vdonnefort@google.com> From: Gavin Shan In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230929_165231_210512_60545591 X-CRM114-Status: GOOD ( 12.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Matthew, On 9/29/23 23:07, Matthew Wilcox wrote: > On Fri, Sep 29, 2023 at 05:24:00PM +1000, Gavin Shan wrote: >>> + size_t sz = folio_size(pfn_folio(pfn)); >> >> Is it possible that a tail page is returned from __gfn_to_pfn_memslot()? folio_size() >> doesn't work for a tail page because order 0 is returned for tail pages. It seems it's > > pfn_folio() can't return a tail page. That's the point of folios; they > aren't tail pages. They're either a head page or an order-0 page. > Indeed, page_folio() already returned the head page properly. Thanks a lot for your confirm. Thanks, Gavin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel