From patchwork Tue Sep 26 18:19:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Donnefort X-Patchwork-Id: 13399518 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 91CDBE7E62B for ; Tue, 26 Sep 2023 18:20:28 +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=etxQOVa3Hzv8ZZzAtvC/MkZAMQEocD/4LtT3i8ZA8QQ=; b=MzX fy+k1boqW9nF9xbc77JuuKeEYr4yiisrWOBXmsZi9RZqWLtB6DiWARC+whM2lh2QpYdt4uJwtJ8V1 Qn2OIRYf3vORPFNulWN9jPaY1aVJoaobf7PvE/ZHQKQeSwMC+YIXu25cSUPjUPiAjtIqkUSSkdYfR u2abHCXZzhMTDg8ZiNAhhOotmzeuYXSF03/WQXzI3VTTgXrMkAwrS6NpEcjQhXF28bXlA2kOCgC5u W6lk5IccPnNaqLNQqvVvpcHOwWfaUZesDr9AicvX0aHWXfXfECrWiyF+H7zdL4C0V7oS4PS2tPo7K H2+pgINNMqDciTIXXmegU2OzOQXWNMw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qlCf9-00GpiG-1j; Tue, 26 Sep 2023 18:19:59 +0000 Received: from mail-yw1-x1149.google.com ([2607:f8b0:4864:20::1149]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qlCez-00GpfR-1b for linux-arm-kernel@lists.infradead.org; Tue, 26 Sep 2023 18:19:51 +0000 Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-59f4c72c66fso142282167b3.2 for ; Tue, 26 Sep 2023 11:19:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1695752383; x=1696357183; darn=lists.infradead.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=YW0WUIw1E3cvbWwV232u/IH+Aixvc0zUf199VogM9Ws=; b=jwpyUaY30CrrrGYcB/gf3JlFMgllKCeiw2cF0k6lXwY1+aLG9HrZT+WD70VSitUcpo E0lKYF6Liu+hNwT+VpI7jqBWKul9/Pqrb3yVeGTfYDaeljpHwDg4q+ibpABt5VZXC7uk n2vaXyu/7enbQCTGMIljUsub3kFeymeRwAn2b0IdowzrE+p7CZ6r1fyLqTE6katiDH8c 18TAMBKOpTsm2hj4uHFgxKZ+y7toIZM3kz92QrE0ppSaIFUELvUiN8fkOr2wmIZC88DM 6VDS1DzskfMjfjn79MAw4VZRB88jQE/nBBCnToATEsBV66/i/qTlAUcXZU9G9bQCN0ib NEQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695752383; x=1696357183; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=YW0WUIw1E3cvbWwV232u/IH+Aixvc0zUf199VogM9Ws=; b=hUszfUNkT/7XUa0YV9zmCCp62cfIeYLcI5B/QLaUfZnXka6MpgXmBOwf1cZVcN2s49 YM1XpgjX5/+cKhzjSymB4ahnpHF57wMntF9AmJ6QcGlNf1FO3uRnBcZFm5jnKQi1lS/+ 6jeZykDB/O0OT4hfqLLgqN8f2xgaN8We7xxjv5TWhO68GTFKxkOnTpjgpz9txiP+dVWM 7pNAfviaqCcGafoXq3dtM6tL/3dwJ7p6vP64o/pVVl9KrkpoBUOa193MjS6EKHg7UEp7 BPh4Q6Silkc57cgJY9JQn6hqzQjjktNe3OSgQsSCuzSns1PswM//FIbaFdaQ5oPd6tpi b0gg== X-Gm-Message-State: AOJu0YxTMDqzCc8vK92cif0X7f0E7eTzNUnAiMvetx8g5UrtrYj/gWwG nhAhWxvF5GikZIPutVtAKPRa1EIquj5zK+Xr X-Google-Smtp-Source: AGHT+IEqqNH7N1Eu2i1+4mhsYn51y/vBcs1ex7uhBxjOydv7OeJn056085iZEk4qCeKXW1RxODFO0USXQl8Jp4ws X-Received: from vdonnefort.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:2eea]) (user=vdonnefort job=sendgmr) by 2002:a25:b11f:0:b0:d78:245a:aac4 with SMTP id g31-20020a25b11f000000b00d78245aaac4mr103847ybj.1.1695752383116; Tue, 26 Sep 2023 11:19:43 -0700 (PDT) Date: Tue, 26 Sep 2023 19:19:30 +0100 Mime-Version: 1.0 X-Mailer: git-send-email 2.42.0.515.g380fc7ccd1-goog Message-ID: <20230926181932.1650692-1-vdonnefort@google.com> Subject: [PATCH v1 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-20230926_111949_551415_AF225BF5 X-CRM114-Status: UNSURE ( 7.70 ) 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. [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