From nobody Thu Dec 18 09:47:17 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass header.i=thierry.escande@vates.tech; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=quarantine dis=none) header.from=vates.tech ARC-Seal: i=1; a=rsa-sha256; t=1733332478; cv=none; d=zohomail.com; s=zohoarc; b=kjgY/5uz/qfZoNvqXGuaS2g3wir4gfHQeTK4sBeX8NDWVFqqDp3c2fWpdehZeJYvJQ8GLJPrpatzh73sxwD4HxW+dpx7tJwV7Tz4ws83HPhUrSy+EO59mgcWiku2oSf+qE51NhEy4aSi2WpajRCqmuwD3+oDqbv+obSmUTlzy04= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1733332478; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ha+PFFcK2rZoX5f3m0+6W/HqdkROKWb4ZcN5LYyjSAE=; b=Apl5e5Sq5zM+n8IWOcR3uDfM35rtj63tbwU6+qvvCnNblmCbT4hmEpS//FCTUgOOK0XSDs6UFGRDyE+v7bQEXds2nOcsRvn924GV2re0Tp9GVvsEGxxhd6iuaTJryG32zcBtPSZi/OWfgWbcIQXIE4/ojFaUJuMGFBVELYWIWV8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=thierry.escande@vates.tech; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 173333247840748.13451243879615; Wed, 4 Dec 2024 09:14:38 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.848672.1263502 (Exim 4.92) (envelope-from ) id 1tIswz-0003Xm-V6; Wed, 04 Dec 2024 17:14:09 +0000 Received: by outflank-mailman (output) from mailman id 848672.1263502; Wed, 04 Dec 2024 17:14:09 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tIswz-0003Xf-SQ; Wed, 04 Dec 2024 17:14:09 +0000 Received: by outflank-mailman (input) for mailman id 848672; Wed, 04 Dec 2024 17:14:08 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tIswx-0003XZ-QZ for xen-devel@lists.xenproject.org; Wed, 04 Dec 2024 17:14:07 +0000 Received: from mail180-27.suw31.mandrillapp.com (mail180-27.suw31.mandrillapp.com [198.2.180.27]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 2a359ec9-b263-11ef-a0d4-8be0dac302b0; Wed, 04 Dec 2024 18:14:06 +0100 (CET) Received: from pmta11.mandrill.prod.suw01.rsglab.com (localhost [127.0.0.1]) by mail180-27.suw31.mandrillapp.com (Mailchimp) with ESMTP id 4Y3PJD3NKXz6CQQJV for ; Wed, 4 Dec 2024 17:14:04 +0000 (GMT) Received: from [37.26.189.201] by mandrillapp.com id f99d86d7f05b44549852944f2c0e5649; Wed, 04 Dec 2024 17:14:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 2a359ec9-b263-11ef-a0d4-8be0dac302b0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandrillapp.com; s=mte1; t=1733332444; x=1733592944; bh=ha+PFFcK2rZoX5f3m0+6W/HqdkROKWb4ZcN5LYyjSAE=; h=From:Subject:To:Cc:Message-Id:Feedback-ID:Date:MIME-Version: Content-Type:Content-Transfer-Encoding:CC:Date:Subject:From; b=R99wySBm+4RO0EOvjoCRfxVj2jcHQOQs/aYkNBsDLWT8lsfnybnepq8uzZgnZ0tU9 UwzlNeH4zcVYXYHo+Tj5r5ZRuh/h9Kbk92PbG7pyK5vfIhl2XLaY/Z0kIpfNURrXNL 8+z022bReZHqeEF1q7YN1qtD5nLbVubsA2zdDbRQUnX2UP+1PNrB7Y70FKPGuiQNmf p8FFxVv2J8FX0D00oqSFe952IrBdayt5HvpgFq+jx1cpH8SrFHQHwJHz1dF9wFbaBP /UoAh4hfQ95CM30O05t8Qno6c7Msjm/JWULG/SKlZPHn92dYWMKNXXTG67EDUHivnY PFtq0HMxhy1nA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vates.tech; s=mte1; t=1733332444; x=1733592944; i=thierry.escande@vates.tech; bh=ha+PFFcK2rZoX5f3m0+6W/HqdkROKWb4ZcN5LYyjSAE=; h=From:Subject:To:Cc:Message-Id:Feedback-ID:Date:MIME-Version: Content-Type:Content-Transfer-Encoding:CC:Date:Subject:From; b=zMV4Pef6dRp3DaRKEVvp1RLzzsIu+mefmcRZTMwIMjOWSgCo102KjytMSX2QBjhuM 84L8xmcEGVfNzlykQWiT4HHtIiqX4xQ5CYIPM8YJlyeqgJZeiYQ7N3x6rR0SSVZnG8 CceijJ/QQY8pcXocdFbifu4nWyu5IyJwA9FJEwfRoosvtGdJ7jri0yCjY53BhOii/z spYMg64rMKFkiLwYoMI/a+8Shb/0OxpH5StwJEMcrl7sLN5QNT9XRLjyqOupdF/eRo G6Ic6qbQovuiA2H3YL22fmZT7qzcGbVGjcfbut2V3Niv/a8ZoxcHUEp4Pp/zottoFT dv8BwwmhjHzVw== From: "Thierry Escande" Subject: =?utf-8?Q?[PATCH]=20x86/xen/mmu:=20Increase=20MAX=5FCONTIG=5FORDER?= X-Mailer: git-send-email 2.45.2 X-Bm-Milter-Handled: 4ffbd6c1-ee69-4e1b-aabd-f977039bd3e2 X-Bm-Transport-Timestamp: 1733332443466 To: "Juergen Gross" , linux-kernel@vger.kernel.org Cc: sstabellini@kernel.org, oleksandr_tyshchenko@epam.com, jbeulich@suse.com, xen-devel@lists.xenproject.org Message-Id: <20241204171346.458105-1-thierry.escande@vates.tech> X-Native-Encoded: 1 X-Report-Abuse: =?UTF-8?Q?Please=20forward=20a=20copy=20of=20this=20message,=20including=20all=20headers,=20to=20abuse@mandrill.com.=20You=20can=20also=20report=20abuse=20here:=20https://mandrillapp.com/contact/abuse=3Fid=3D30504962.f99d86d7f05b44549852944f2c0e5649?= X-Mandrill-User: md_30504962 Feedback-ID: 30504962:30504962.20241204:md Date: Wed, 04 Dec 2024 17:14:04 +0000 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity thierry.escande@vates.tech) (identity @mandrillapp.com) X-ZM-MESSAGEID: 1733332479582116600 Content-Type: text/plain; charset="utf-8" With change 9f40ec84a797 (xen/swiotlb: add alignment check for dma buffers), the driver mpt3sas fails to load because it cannot allocate its DMA pool for an allocation size of ~2,3 MBytes. This is because the alignement check added by 9f40ec84a797 fails and xen_swiotlb_alloc_coherent() ends up calling xen_create_contiguous_region() with a size order of 10 which is too high for the current max value. This patch increases the MAX_CONTIG_ORDER from 9 to 10 (4MB) to allow such allocations. Signed-off-by: Thierry Escande --- arch/x86/xen/mmu_pv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/xen/mmu_pv.c b/arch/x86/xen/mmu_pv.c index 55a4996d0c04..7f110740e1a2 100644 --- a/arch/x86/xen/mmu_pv.c +++ b/arch/x86/xen/mmu_pv.c @@ -2200,7 +2200,7 @@ void __init xen_init_mmu_ops(void) } =20 /* Protected by xen_reservation_lock. */ -#define MAX_CONTIG_ORDER 9 /* 2MB */ +#define MAX_CONTIG_ORDER 10 /* 4MB */ static unsigned long discontig_frames[1<