From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 95ECD606A31A for ; Tue, 1 Dec 2026 18:20:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=QHk+NOmT; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=foss header.b=gAJG6ikB DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Unsubscribe-Post: List-Owner; bh=0jjNBLdFlYYs3wlt5ahg0c4VxMefT5Wljyw4qA+sPjI=; b=QHk+NOmT1LDDDJ g+FWlGTziJvLGafbIpY/OatzAOEFhrO2JxLtcu5ak9w6+EpydlCCJGnpNAsEltRvHUeQLJPa474dK dizBezNZXepNklWUDmcdRKE4zZFszW+oM8SpG/WozA1BA6C2Wdcj2Wzp5wDfOgbKl1hd2JSkpcXU6 8x92Fm5WDQ0/XbCNG1iMi7L17wKffLOJIzGtPGWEEhRCWSYbna2dY+uyG4JXogU7wX7YTQwS0RRTa HJUH64K9MtDdJUiBZpRriqP1QcIMJkLaBemGscVmUL+TWe/7JLw2R1lzurYn7ZHkvRbBBXnpVmbFc VmGR2ld/SOtk4BOoIJ8A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYSSI-000000093TU-0KDD; Tue, 01 Dec 2026 18:19:55 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYSSF-000000093Sz-26Io for linux-arm-kernel@lists.infradead.org; Tue, 01 Dec 2026 18:19:52 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id EC6361516; Tue, 1 Dec 2026 10:19:46 -0800 (PST) Received: from LeoBrasDK.cambridge.arm.com (LeoBrasDK.cambridge.arm.com [10.2.212.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 04E1F3F86F; Tue, 1 Dec 2026 10:19:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1796149189; bh=K1t2QR4crzM/njMEMmc7fR/9+XuXencrJ9HGqRnGgW0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gAJG6ikBWwWxrxlPkldlI8pjricCiCBirzNEuAsjWNV0zaFvL0FUXmsKxk4/3MgIw uF60w6ZABBPDAE/0R4Cu1cvvFXX7PoA1O4NsHstGgmzg+vjyvXwFZtRObeDXH6WGSV X1n7woJSwPczmeA/jX/juMlSlchLzd9PMnLaZWbQ= From: Leonardo Bras To: Usama Arif Cc: Leonardo Bras , ljs@kernel.org, maz@kernel.org, oupton@kernel.org, fuad.tabba@linux.dev, joey.gouly@arm.com, seiden@linux.ibm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, riel@surriel.com, shakeel.butt@linux.dev, kernel-team@meta.com, rkeilty@meta.com, atish.patra@linux.dev, dgreid@meta.com Subject: Re: [PATCH v2] KVM: arm64: Size the stage-2 memcache from kvm_mmu_cache_min_pages() Date: Tue, 1 Dec 2026 18:19:42 +0000 Message-ID: X-Mailer: git-send-email 2.56.1 In-Reply-To: References: <20261130143039.867874-1-usama.arif@linux.dev> <73b7f0a4-9cee-4fad-ae61-667dafd035f9@linux.dev> <25bc8bdf-53b4-40ad-ad56-db71aedd0d23@linux.dev> X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261201_101951_663294_9E977728 X-CRM114-Status: GOOD ( 19.55 ) X-Spam-Score: -4.4 (----) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-8.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Tue, Dec 01, 2026 at 12:46:22PM +0000, Leonardo Bras wrote: > On Mon, Nov 30, 2026 at 08:05:32PM +0000, Usama Arif wrote: [...] > > >> I tried your MULTIPLIER * min_pages version under QEMU with > > >> kvm-arm.mode=nested: 4K pages, an IPA limit of 52 bits, and a 40-bit > > >> IPA VM whose L1 runs an L2. In all six runs, across two tests, L2's > > >> first fault that needs a refill hits that WARN_ON_ONCE() and KVM_RUN > > >> fails with EIO. > > > > > > Out of curiosity, is it fully KVM, or are you using QEMU to emulate a > > > 4k-pagesize host? > > > > > > QEMU emulates the host. I don't have hardware with FEAT_NV2, so L0 is a > > 4K kernel booted with kvm-arm.mode=nested in qemu-system-aarch64 with > > TCG (-cpu max, virtualization=on). Only the NV tests ran that way, > > the numbers above are from the Grace host. > > > > Ah, I see your point. > The issue is that QEMU TCG is not really great for gathering performance > numbers :( > > I can try running the tests for you in a NV2-enabled machine, if that's ok > :) > Humm, but again, why do you need NV2? That path is tested on both user_mem_abort and gmem_abort, it could easily be tested by replacing the host kernel. Do you have any limitation replacing the host kernel? Thanks! Leo