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 ED7E0CFC288 for ; Tue, 15 Oct 2024 11:04:56 +0000 (UTC) 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: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=EMjIUx5Ou6YSzWO4OiC2Zvx7NxBqmQ61ZAXL0EJQzyA=; b=xOYn9HO8Sr/9Tdzuqj9p7hPQAX jkQyAy8YZVc/Btp+BTnl7gpy3mTg6khiAK9rAILAy1Ht50Y2zLgzIa7iJwsQEVif8BlYY1n7rbp6f +YixQ4bHNyHgNXFi+qYGtLPCS3Hj7XZ9kYUSE933Rc6ZKNTpevD/FlTWJ4WLJCBhSnyVK3PwdkMPy XSG3N8OUR6RoS1Brg4PloVEBV5M+q+NJV9lLawQ8m/zYUgsIA884zHNrqnIZh8DpiAxbXoIBXzc6P IH+ALa+VC8TxOvmWhgKISbmxea9q6NyaSjbo5kLQX0Or62w4RG7gpzdPQ5RWPeT4hJ2BsuWwsCW6d Rpr4NvZQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t0fM7-00000007x5b-3YvP; Tue, 15 Oct 2024 11:04:47 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t0fF2-00000007vg1-145D for linux-arm-kernel@lists.infradead.org; Tue, 15 Oct 2024 10:57:30 +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 CE54D1007; Tue, 15 Oct 2024 03:57:55 -0700 (PDT) Received: from [10.57.86.207] (unknown [10.57.86.207]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 020BA3F51B; Tue, 15 Oct 2024 03:57:22 -0700 (PDT) Message-ID: Date: Tue, 15 Oct 2024 11:57:21 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH v1 17/57] kvm: Remove PAGE_SIZE compile-time constant assumption Content-Language: en-GB To: Sean Christopherson Cc: Andrew Morton , Anshuman Khandual , Ard Biesheuvel , Catalin Marinas , David Hildenbrand , Greg Marsden , Ivan Ivanov , Kalesh Singh , Marc Zyngier , Mark Rutland , Matthias Brugger , Miroslav Benes , Will Deacon , kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org References: <20241014105514.3206191-1-ryan.roberts@arm.com> <20241014105912.3207374-1-ryan.roberts@arm.com> <20241014105912.3207374-17-ryan.roberts@arm.com> From: Ryan Roberts In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241015_035728_392922_F1B80054 X-CRM114-Status: GOOD ( 15.69 ) 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 On 14/10/2024 22:37, Sean Christopherson wrote: > Nit, "KVM:" for the scope. Thanks, will fix. > > On Mon, Oct 14, 2024, Ryan Roberts wrote: >> To prepare for supporting boot-time page size selection, refactor code >> to remove assumptions about PAGE_SIZE being compile-time constant. Code >> intended to be equivalent when compile-time page size is active. >> >> Modify BUILD_BUG_ON() to compare with page size limit. >> >> Signed-off-by: Ryan Roberts >> --- >> >> ***NOTE*** >> Any confused maintainers may want to read the cover note here for context: >> https://lore.kernel.org/all/20241014105514.3206191-1-ryan.roberts@arm.com/ > > The patch should still stand on its own. Most people can probably suss out what > PAGE_SIZE_MIN is, but at the same time, it's quite easy to provide a more verbose > changelog that's tailored to the actual patch. E.g. > > To prepare for supporting boot-time page size selection, refactor KVM's > check on the size of the kvm_run structure to assert that the size is less > than the smallest possible page size, i.e. that kvm_run won't overflow its > page regardless of what page size is chosen at boot time. > > With something like the above, > > Reviewed-by: Sean Christopherson Thanks! I'll update this for the next version.