From patchwork Thu Sep 28 17:32:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Donnefort X-Patchwork-Id: 13403354 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 33A39E732FD for ; Thu, 28 Sep 2023 17:32:50 +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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Message-ID: Mime-Version:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=RwVk3aiqArfc6Mx1yxtwHXhtf+EKxMcYyxZq/Jl64y0=; b=J+8 cwDb8S2mdQWc0pd3IlvHmYRBYL5pQUT5dy/72YRgQaCt2SfKppWlVSgEDNTMoxu2IvLFPkSX2Fnj2 eJTX6TSJ07Gv8BmKH9TUh4FJhRL7VF73w/Gwh5FsrPfDlHZ7w0dq5lws3S6TNMD7uPMlUNjUnTgpq WmHktv8btEhR7LZdk76NyqlPLi96WhjEGLb8+2JFPs5phBg+ioypYau3tUS4fRR+/Yg0aWaeVbYcD hlVhEimqvE+WjkEZgj+IOcHdiQKsoG+vL6GBb0SrGgF2fBHg/zSti+R8vq9H//qmtU+MtrKGzwdzv ozX+0BIzSVgs2pgoUXWK6r2XvLUQkuQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlus7-006QuB-2g; Thu, 28 Sep 2023 17:32:19 +0000 Received: from mail-yb1-xb4a.google.com ([2607:f8b0:4864:20::b4a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlus4-006QsS-35 for linux-arm-kernel@lists.infradead.org; Thu, 28 Sep 2023 17:32:18 +0000 Received: by mail-yb1-xb4a.google.com with SMTP id 3f1490d57ef6-d815354ea7fso19404873276.1 for ; Thu, 28 Sep 2023 10:32:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1695922333; x=1696527133; darn=lists.infradead.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=x/RP+maPZNCNmU4rPU/bGW3TvnAjHmTxUTEQuDee5QM=; b=gG7zwr0PJc326XnjkBw3CRvrqzTvWqEp9XMioOjc8UDDm7rZbyy0hQAiiDpMg08EmC f0Y8Qx78Cq0GimeL1va7ckhifh67UDJtNbEh31bNCyHz3mEIPqHTOomISk5y7zcx1LWL GBhccVuTXK1vNsSQmjOTlJ+anOdqnPilxqwPI0IlGN64S/N+5MFfu9uF2VK5U7Rz4K4y 0/4GV1aAK4P6SwYvcBH1zgHIBxf5THGTCZqlmmt72Qp5bU4SLLbiIBzPlb7tK0VN57E8 VQ4h8XhWlJ/n0dNna/zXzaGxxkCBQDXGSmkRomt47NC+tKCluoq66Cq4+bwYAqxq9pSS iSaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695922333; x=1696527133; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=x/RP+maPZNCNmU4rPU/bGW3TvnAjHmTxUTEQuDee5QM=; b=mzwRNsKwbgRQpoTU8j745v8dybcV+VmUTZDRVJV+eM/wMozK4PQLeV+LQHYM1iDOVW Ocbe0rA6lid56TfeARK1kxzOwGGwih2/Tj26kR6Ko02HvGv50zhPkBJJrgvIfImJ2Wzw pPjb7dFk3gChdgtPpYxThlBhk+7KFI+TKcO+/Kz2Je5DErNP/lCYho8UZVg92wRssqBK Dkro7tfz6+Y4guZvNbdTfgY5lHGKspQJNYjE+cz0C4S08HU/Dd/keM+ENyfY3Rj4BDPK acyldUPe1KOPqbpkMTxmH/aKhCVts0oKkk3bfwOpg5DZGjB2OBk3WuMPDA0xQfcLM08H CC6w== X-Gm-Message-State: AOJu0YxF88/VYcUEHBkP9jWfYeeJBDdatJJO+CdfqnIbUz8Ae2qKygSw luUtFbvhDrV2i18d4TNkKaDiEdUQVG11ySEG X-Google-Smtp-Source: AGHT+IF0+c3V9EwlV61yF9V60ltd2J0GAarY1FKV2E/7LLRKyOngzXE6cFwhjiWhK/TFxTEE/LhLm/8+GYFnkfCc X-Received: from vdonnefort.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:2eea]) (user=vdonnefort job=sendgmr) by 2002:a25:b293:0:b0:d81:fc08:29ea with SMTP id k19-20020a25b293000000b00d81fc0829eamr25721ybj.2.1695922332813; Thu, 28 Sep 2023 10:32:12 -0700 (PDT) Date: Thu, 28 Sep 2023 18:32:02 +0100 Mime-Version: 1.0 X-Mailer: git-send-email 2.42.0.515.g380fc7ccd1-goog Message-ID: <20230928173205.2826598-1-vdonnefort@google.com> Subject: [PATCH v2 0/2] KVM: arm64: Use folio for THP support From: Vincent Donnefort To: maz@kernel.org, oliver.upton@linux.dev Cc: kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, kernel-team@android.com, will@kernel.org, willy@infradead.org, Vincent Donnefort X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230928_103216_994165_EED5C10E X-CRM114-Status: UNSURE ( 9.58 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org With the introduction of folios for transparent huge pages [1], we can rely on this support to identify if a page is backed by a huge one, saving a page table walk. v1 -> v2: * Add git reference to [1] in the commit message * GUP always acted on the Head page under the hood. Update the commit message. [1] https://lkml.kernel.org/r/20220504182857.4013401-3-willy@infradead.org Vincent Donnefort (2): KVM: arm64: Do not transfer page refcount for THP adjustment KVM: arm64: Use folio for THP adjustment arch/arm64/kvm/mmu.c | 79 ++------------------------------------------ 1 file changed, 3 insertions(+), 76 deletions(-) base-commit: ce9ecca0238b140b88f43859b211c9fdfd8e5b70 Reviewed-by: Marc Zyngier