From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8B6B23CF218; Thu, 24 Sep 2026 08:28:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790238495; cv=none; b=M1oUGs8mSfldJwQC12q2GlPjv5yGgQHKtAKdndtoJeNj91uIml5q/EGN2gmKTI1SIg+H4pc1abWeZSZL7iaXLXGYooVfQbEUNeJtFQA+0+1DKJ8haeKWYSNZrMQgrgV0vyx/VVYqhnWi24fP5xRwu1TvKO9kRk/2l+r8KT5fpog= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790238495; c=relaxed/simple; bh=WQD6DJ9hn20A4LJfFdIJHvCjUt0Ry1c58LGa64z0pak=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZWuG6EdPmctEa0yVxyk1B+smU/4gRqMva9AgpfQubp7OVDqqUregZ4y7NlNPwMVxG+kq0mpHdphfFRswa34lGIkUkgrvcsk29tWVriQjeRueK8tBl/f5h9KdFibQrPRCcCVEI1c08i3nrYqVy02oxxF8CLfgoZczCMhelvCQfho= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=AkMJC5JA; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="AkMJC5JA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 922081F000FF; Thu, 24 Sep 2026 08:28:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1790238494; bh=GsmgnhaFqTMEMgV8Zn0uR04tPAkg7R3E1Z3BnGPBPGU=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=AkMJC5JAXk/pX/+kR1K2A+X2qR9dHg/cylkIMUSRwxnRpKTJ8o90TZd6MY9zQFCgt OqAf46Hj4z8Mm/IgP1xpEh9SMBAnhYIqehxrr1GWRYnLDX5YCkgJDQLpAhF7xz8y+p WB6yMcowxeNwJSKaCYZk2KnXTLf6vcUYIc8o/MXvCU/4SHrXx7guEr5MWwkscKgopx WwInTzGX2U50sJSoJ/pD7y/ZcejotJCWowo8ra/iIr7o6GyeHHr3t9tt2la+h/6Hu6 YzO1iqOvVMXiO5kuKSXZ5sITsGtan+25tRvkmvx82GrE3OpJFbPXDsN2aQojmTeehj KpCOSPkuwbljg== Date: Thu, 24 Sep 2026 09:28:02 +0100 From: "Lorenzo Stoakes (ARM)" To: Fuad Tabba Cc: Catalin Marinas , Will Deacon , Marc Zyngier , Oliver Upton , Joey Gouly , Steffen Eiden , Suzuki K Poulose , Zenghui Yu , Paolo Bonzini , Jonathan Corbet , Mark Rutland , Randy Dunlap , Christian Borntraeger , Janosch Frank , David Hildenbrand , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Sven Schnelle , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Shuah Khan , Shuah Khan , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, Jack Thomson , Jack Thomson , Alexandru Elisei , Vincent Donnefort , "Aneesh Kumar K.V" , Sean Christopherson , Claudio Imbrenda , Leo Soares Passos , Wei-Lin Chang , linux-s390@vger.kernel.org Subject: Re: [PATCH v4 13/14] KVM: selftests: Add option for different backing in pre-fault tests Message-ID: References: <20260923-kvm-arm-prefault-v4-0-d4b0b4dfa8c3@kernel.org> <20260923-kvm-arm-prefault-v4-13-d4b0b4dfa8c3@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Sep 24, 2026 at 07:08:52AM +0100, Fuad Tabba wrote: > Hi Lorenzo, > > On Wed, 23 Sep 2026 16:15:56 +0100, "Lorenzo Stoakes (ARM)" > wrote: > [...] > > diff --git a/tools/testing/selftests/kvm/pre_fault_memory_test.c b/tools/testing/selftests/kvm/pre_fault_memory_test.c > [...] > > @@ -189,24 +195,28 @@ static void __test_pre_fault_memory(enum vm_guest_mode guest_mode, void *arg) > [...] > > test_config.test_size = align_up(TEST_BASE_SIZE + test_config.page_size, > > - host_page_size); > > + mem_page_size); > > test_config.test_num_pages = vm_calc_num_guest_pages(vm->mode, test_config.test_size); > > With -s anonymous_hugetlb_1gb, test_size becomes 1G and setup aborts > on 4K guest modes, as memslot 0 has no room for the page tables that > map it: > > No guest physical page available, min_gpa: 0x180000 page_size: > 0x1000 memslot: 0 > > As a followup, could you compute test_num_pages before creating the VM > and pass it as extra_mem_pages, as arm64/sea_to_user.c does? Ack, can look into that and send a follow up patch after! > > Reviewed-by: Fuad Tabba Thanks! > > Cheers, > /fuad -- Cheers, Lorenzo