Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.222.179 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796138730; b=3zhEO9wiNODG9rox1drmgsJRcfMZXH0NsI/0sG/5qHV4p4/6TJkA5kK1d1rbD2rVM8RE uVx+McmLAmxUH2+iqv1EX01YP2fc30ymkVGVH5Y+7a0XYnbIGXDfF73ZueuzwDJwP5zHP Po3oXGdbwJ8zXmVH2eju1uzZgauo5eZCKnnBLdoh/DALYoqVwQR99CJtUDrr3N2aCJyrB JNUy52C0jFgP/uTq+AQmy5kuSBjDcW6GHO/IRxvp2rZRxkCt8cwgyq5zb8e3apTld09jB CwPtEQw0KaLTd2V56woIZxlrSvxHWFR90R3te+dHEapd4o7zPrSVG3u/G/SjG3Vh+tg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796138730; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Received:Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; bh=5qOwTnbi3p5z+1W0QlFPO69v4Q8Gq+doCqi3hPHyhK4=; b=d23CoVeQuwtiIYFpqSw+0nioJGoot16GUOXGHAoTz9UiNSbmVr914kMvi3JH644vGhUE VKFeCgbgtfi6w4Ppnp0wwEOIdZJ3CqRKD4Tkr8nwKhefJO4zHLSZsPPwTdTZSubxS9Hzy TJDMS2maz1CJJgAKsyalmOKQcVkol/T48FTZDRwm1rTcOvQXCwfvEnt3bdTBfTkBcthed 0iifkJibHmeKZ3V1qr14ocWNdLlRuqgLMSyX07ihci6vYV/BI7CyOHPA56TQ/MNHbqJtb gyh/k7o4m61Ajygcs7HAPmzgca8cwq6JnCzZTcHZA3Cjn1C7BsNiwmvnulFcNZMReUA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=ziepe.ca; spf=pass smtp.mailfrom=ziepe.ca; dkim=pass header.d=ziepe.ca header.i=@ziepe.ca header.a=rsa-sha256 header.s=google header.b=d+vpJxcd; arc=none smtp.remote-ip=209.85.222.179 Received: from mail-qk1-f179.google.com (mail-qk1-f179.google.com [209.85.222.179]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EC314606A31A for ; Tue, 1 Dec 2026 15:25:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org EC314606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.a=rsa-sha256 header.s=google header.b=d+vpJxcd Received: by mail-qk1-f179.google.com with SMTP id af79cd13be357-94960131b30so1077884085a.0 for ; Tue, 01 Dec 2026 07:25:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1796138729; x=1796743529; darn=lists.linux.dev; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=5qOwTnbi3p5z+1W0QlFPO69v4Q8Gq+doCqi3hPHyhK4=; b=d+vpJxcd/FPji+9wD71vSvtjzIjqTwj4foH5l8wn8PydlnVZNfGul7IMrwcyhL0A7i 5DD+Zu2A6Ug4eyExZ2IaclMvoZXtJHkh9OqSbWCipirAIiWb342o0OyzkOMKoH1t815/ qQc34jKzUMtUQhrQ2ueh9c+ohJTJViorMwfqc+zQ92XX7TsVu72F0KGDZrNdTBpgCZhQ VqG1W5FFy5JY6WPTjb+m+exe/B8fLDr21UzzaTUFL+HV0kCh3gZ5Q39zeJs1113uTpnw g4vlZl7AIT2svRf73ypHZvXtavpBAxEyMTK7viIqEBmLnmElSAqi9Za6BV7+BQ6M7Jui UOCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796138729; x=1796743529; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=5qOwTnbi3p5z+1W0QlFPO69v4Q8Gq+doCqi3hPHyhK4=; b=brDzaYSNq8xSqDYfv8LbvIaEY0bwcE42fgsCvObHCfbVSD2kUY4DLUo4t2isEUGP0F hKeU/yqeN3oOnBmG8/LcYx7gOeDLKndJet/HchKs8m++l8c5zvs1tU2AHNNa4FpDjW4Z Cp3xI2QyTkC2VQRCGKq/4/47QtI2pQu4d7iI0Z5qCx+QoLxGxx61+sJnqLOHO4A4+giM D3QRpPOSwgebgk+QwRKeley0tqfBDDkl7pLO4YTrGb4fUP2QGj1y1G5cImBeorSC+Vc0 B/hK77Nk/Oo7BOuB4Yt3/XY2hcVriJKHnL03UcpUl0BC4+COXhf5SBCzxOr8yw4g/htR dxvA== X-Forwarded-Encrypted: i=1; AL+hErGK5ifbVQIY+eWbGEPzRslFV/iuJ8CU4kSH77OEZH89W2ba0ZLbCq7YKVtgNdIXnzK2w6Y/CSM=@lists.linux.dev X-Gm-Message-State: APuU4Z8UcaFUcU/H03Vo0xDo5IvggdeIrtmbS/mOwLGi4oXy8BOUvZfn hJ0QikjKnweQoANAlNGgVr6zo4K+gZnhl/dqD1CILrfZLXBG+39GHYkI8vt3u8HwfgY= X-Gm-Gg: AZFdTZdadhDvhrobv8COGKoUTu4T0CBHP5Wu637sopU2AIOMvLhYmi4MeAoMIyluKc7 VnQuhbEeOTsd6gCp2IPErewA3kkdb/V5cO5oXDcDlY/EQ71Tu3ejxdyDDINs7KRJhyfjQBr8xkY Ujo4vIKrHLKRSttPX/uBCqmHUIvwrj0bJ3AzPluywTkQhhGKKwePoFkCxAUr5QWZjnHH29Ah7Vo 6SOmq8xWGyg3yHp//fecbED6309X36j9lnLhZndOUP0lCl/N6kWmoyKUnKKwzgIDeA2ZVwI9HuH 6zmK2JhMT0tgO+UdcIOQaDtmum3AhpUO/OxPKTXiAmUXnaALjj+0vI1YeyJJdIDwRAiRVsU6PgP +zJYDCuoZbjlgALAmyi1gUEnZNz7/tbXUBntthr+Cr8B2bsoI0EIeguVRcmqhD4attOjYYSqUBg 5KeAciWnwBnabV/I9f4VErwPiEDHGXl5qx6h0Nqb+gf48JI1V7w6yMfhj20E7vw1bmCEVOAS7vh Wh+PtaPRVfDwA5p32TBV+S4AopN2PBnpxv+SNfdI01cihJ1jGhXb9lyqeUKMgl4PrAkxiPlXx6x 4coO X-Received: by 2002:a05:620a:1312:b0:949:7acd:3c47 with SMTP id af79cd13be357-949ba69d1bbmr6634159385a.0.1796138728868; Tue, 01 Dec 2026 07:25:28 -0800 (PST) Received: from ziepe.ca ([142.177.118.84]) by smtp.gmail.com with ESMTPSA id af79cd13be357-949bb35005dsm2847982985a.11.2026.12.01.07.25.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2026 07:25:28 -0800 (PST) Received: from jgg by wakko with local (Exim 4.97) (envelope-from ) id 1xYPjT-000000012kI-2U8T; Tue, 01 Dec 2026 11:25:27 -0400 Date: Tue, 1 Dec 2026 11:25:27 -0400 From: Jason Gunthorpe To: "Aneesh Kumar K.V" Cc: Catalin Marinas , linux-coco@lists.linux.dev, Andrew Morton , Baoquan He , Mike Rapoport , Pasha Tatashin , Pratyush Yadav , Christian K?nig , Joerg Roedel , Marc Zyngier , Marek Szyprowski , Robin Murphy , Steven Price , Sumit Semwal , Suzuki K Poulose , Thomas Gleixner , Will Deacon , Russell King , Benjamin Gaignard , Brian Starkey , John Stultz , Mark Rutland , Radu Rendec , "T.J. Mercier" , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Ritesh Harjani , Shrikanth Hegde , Alexander Gordeev , Gerald Schaefer , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Sven Schnelle , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H . Peter Anvin" , Kiryl Shutsemau , Rick Edgecombe , "K . Y . Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Long Li , Paolo Bonzini , Vitaly Kuznetsov , Andy Lutomirski , Peter Zijlstra , dri-devel@lists.freedesktop.org, iommu@lists.linux.dev, linaro-mm-sig@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-mm@kvack.org, kvmarm@lists.linux.dev, patches@lists.linux.dev Subject: Re: [PATCH v10 04/13] irqchip/gic-v3-its: Allocate shared tables using CoCo shared memory allocator Message-ID: <20261201152527.GI1856591@ziepe.ca> References: <20261116091137.94252-1-aneesh.kumar@kernel.org> <20261116091137.94252-5-aneesh.kumar@kernel.org> <20261124134621.GI9566@ziepe.ca> <20261201132156.GC1856591@ziepe.ca> X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Dec 01, 2026 at 08:08:21PM +0530, Aneesh Kumar K.V wrote: > Yes, the allocation size is a power-of-two multiple of the sharing > granule, since the sharing granule is itself a power-of-two multiple of > PAGE_SIZE. However, is that the clearest way to document it? The code > does: > > cc_shared_round_size(len, &size); > order = get_order(size); > page = alloc_pages(gfp, order); > > Would it be clearer to describe the returned alignment in terms of > PAGE_SIZE and the resulting order? The API is "The alocation is aligned to the request size". You can mention it is over allocated to fit the platform's shared/private granule so is very ineffecitient for small allocations. > The ITS code already sizes its requests assuming that the allocator > returns memory aligned to the allocation size. Since the new allocator > preserves that guarantee, I thought those requests would continue to > meet the ITS alignment requirements. Sounds great Jason