From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.222.178 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796138730; b=rP41X66uWBOzEMmdtt8xEJKVaScTEq7UUSzu4agsJkyXakmFuoqDD8b1a7s9yQixQq05 fgC0ok88G5sXo4MdUgSMhxCI7CeBRyCYcBPla+9RsjN++n3Cn5qzCnSS2fV2C5EaD7miq NGZ2IxPiWuaIQfS9/Ry6nryBtha0y1YkmWP5T24/VvE8e3G8vZOALaZfWehSOgOu6Rlg1 gdxTx6Iqvh07zB+Mrn9YdOZAN4FQ7sXM93L0zIlZttAU+uM5132rFFPmjBh2M0eIfO/NF /SXzcPzRBKm0g6I0SHuLKE1EEAfF9/B8X4EbqsWPRwaRBTmCzsI7wcQuHDmd6tzo9Qg== 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=X/iX9TBmQHSIsk9FVfr3jWSuAqEaiS5vzcwub0dtjdD5w95LbFQqwazYVAN0J8ovjGQ4 aA0vTJHrvJr3VkX1sISocnApg7yJiBAyF0xVKH4zNIjzwje00XAT1LjHXPhD/9klQuRhX tYWmapgZW08AQBjdlqPVrk0+/XQ8h9mqmab8DtI6rea/9QU4a3JMzR6fNFgMW2l9Ii5O3 XqO3qcF6kqgWBJ4E24q6XuiPS/9x9fMAuuTFDIthHE5r/lR7NlIgn6d+rRc7ocY/Jbl/+ L9hBpPrz87Si7xohU9SqY/5OKevTtg2n/F4BqAeewTdZRzC1yIL4/7ou1nB0y/4e4TQ== 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.178 Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.178]) (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 EDD32606A322 for ; Tue, 1 Dec 2026 15:25:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org EDD32606A322 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-f178.google.com with SMTP id af79cd13be357-949657a20d7so1063685685a.1 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=zjooAsUE08RU9jhI/ELX2NoXD/tF1iGZ7O+D4SQpGKzOL7Bm2Z+pDnw2DyUEvNmV8i 4eopP4QeJIJ3KTIINmnYcOWbI658VUk6K/gBHzNzNetUODhqpt10W8Y8dxGmxeenLD7W 1ElgvINXalCi9fF+t7+CpV5a8NgfpQesC1+0Ie9MQGGe2pKHQRNplGaUkHHpbm2wvqz0 hV53nTCzSHhEtqOwr+HOyl/0YKxwPrLLqwzwa1lz0XUu8QvYGbAR5cTYSitBy5ThSN7e pyQ2FEiwhxqScd1LgC6RLvcvQ31LOQs9u3GvIohFvpoqkCRQPKXLHlNQnkDYY2kLUniu tGqg== X-Forwarded-Encrypted: i=1; AL+hErEh3Au/KFfl4L1sVnwHSGFMUBFrgGlzibJPXitGzvvrhOU5kZhvEw/J1/5BhCWwQakxyejh9TYKyAtm@lists.linux.dev X-Gm-Message-State: APuU4Z+JbgSjiKmOmS1lzFy3cXSCKWWvwI/H22Fgs0j9iGI5POfeYi0h IZLKjPsK3ppIO3t85r8V4SdDW1hWiyh/CZ+K19cYwLXgYLtOE2Hh3/FE5665Bei+fe0= X-Gm-Gg: AZFdTZff8qIlIQEqrWJVvC5cVm/mVeHm6ggkpuPg5PnMXSs/rcitigfinvrTpLasmjb FXd8B/VR/e6ss0k7pXedNCSLRkrSpTiP7cmCiWUZ/gZpc8CSDvq9BHrPmNrv6Lsxzkj1cmi01Yo SS+0u4r8+qNNVm86/y+KMP9290MBGYxORSMkExD5T/yqZNfgaAjK/Zmo88/TENNkkl6heEswijn LC7Zyf2TjuF1CnrbxxqqHEzZ9SaqfWuN6k2zbTIvkPS6nFCwGYpgGEf6kNCGdZtusm3bsO2zWpm fy2EV4aSjQ3nzK6O4GkwJD29+aRfR3JZNAFp/QMjCYjI9ebMbWsW8kjepjG8UZOZOmClHPSLGXW zBN4kAeGKFbAquK1iUQdFWWGzfamZpCH6pQT8XRmUwZcl4nhc2Hyr1kDG4oFzymDDXQ03mKm3Yn G9qMMplWnu0nj+lBi+aNMpc/mV0+5uoD9o7Tk2Kmb7YUNKa0Hk38nDhpQ59ZmHVPYFzrhFKG9SR pMBZiliAMoMCS+7RQgQh7qwexE1GjMiZYSV4+m1q8IlnOX1ZLO6pazN+WrXgSs81ra0ZDeUx1hn zUv4 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: linux-coco@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