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 6EE21D2A523 for ; Wed, 16 Oct 2024 14:45:52 +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=16LorRKjT33sx3KR4keGG7/49m3lTdc5lak60eDcl5U=; b=xl2TiXea00CbjfIhwEDhxs4sCO nWnevcyHj+gllQ8+V9/8ci5A4+D8W/ZYYT25zDhUDgs8/uNJBy2QBJ1n8XPJkSNPU10qk9P8qhu1J 3HNme4kFDHwR6/QdeXiP+aAW8o12MdNl4i4nNwdQaThTKeoIhClf6K/faYiBOOYRtmPHBFDEBaLs4 Q002Ab7380F0f7nfkypuQ+RtTorkUIOjrsRxD2j+PJTVa0a6I4ooo+ErfBfZKc1aSnfXd3muN2l7Z xmfZzYkvenbKM8r5x8VVZ9RbyF4rFpdB8f5vbtIXf6PyJlfUoTl/Hlfvun+Oo53a8Gtib9Gd5Zfkh SIerWUmw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t15HR-0000000C7yG-0OW6; Wed, 16 Oct 2024 14:45:41 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t15DU-0000000C6qD-1UYk for linux-arm-kernel@lists.infradead.org; Wed, 16 Oct 2024 14:41:37 +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 6BDB0FEC; Wed, 16 Oct 2024 07:42:05 -0700 (PDT) Received: from [10.1.28.177] (XHFQ2J9959.cambridge.arm.com [10.1.28.177]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 449BE3F71E; Wed, 16 Oct 2024 07:41:33 -0700 (PDT) Message-ID: <5621f716-1ab5-486f-ac8f-670cc68ee410@arm.com> Date: Wed, 16 Oct 2024 15:41:31 +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: 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 , Paolo Bonzini Cc: 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: <20241014105912.3207374-17-ryan.roberts@arm.com> 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-20241016_074136_487437_E7DB933D X-CRM114-Status: GOOD ( 16.64 ) 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 + Paolo Bonzini This was a rather tricky series to get the recipients correct for and my script did not realize that "supporter" was a pseudonym for "maintainer" so you were missed off the original post. Appologies! More context in cover letter: https://lore.kernel.org/all/20241014105514.3206191-1-ryan.roberts@arm.com/ On 14/10/2024 11:58, 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/ > > virt/kvm/kvm_main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c > index cb2b78e92910f..6c862bc41a672 100644 > --- a/virt/kvm/kvm_main.c > +++ b/virt/kvm/kvm_main.c > @@ -4244,7 +4244,7 @@ static int kvm_vm_ioctl_create_vcpu(struct kvm *kvm, unsigned long id) > goto vcpu_decrement; > } > > - BUILD_BUG_ON(sizeof(struct kvm_run) > PAGE_SIZE); > + BUILD_BUG_ON(sizeof(struct kvm_run) > PAGE_SIZE_MIN); > page = alloc_page(GFP_KERNEL_ACCOUNT | __GFP_ZERO); > if (!page) { > r = -ENOMEM;