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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3B2FC77B7D for ; Wed, 17 May 2023 18:54:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8CBBA900005; Wed, 17 May 2023 14:54:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 87C2C900003; Wed, 17 May 2023 14:54:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 74491900005; Wed, 17 May 2023 14:54:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 5D644900003 for ; Wed, 17 May 2023 14:54:03 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 2644D1206F1 for ; Wed, 17 May 2023 18:54:03 +0000 (UTC) X-FDA: 80800646766.13.38BCFF3 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf06.hostedemail.com (Postfix) with ESMTP id 2A1C0180002 for ; Wed, 17 May 2023 18:53:59 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="owLL/OdV"; spf=pass (imf06.hostedemail.com: domain of bjorn@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=bjorn@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1684349640; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=+nV7AD5yc8SFGB9+CLiAw9jnKXLbtK3VvYJuoM0ntT4=; b=AwrkZmJTvsokMu3GD3eFAwenWBfRWKq7mF/Z2JlYAO0vVtyn5P76q+LRZhm3l5CMwhAa/5 6iBTpVnS1I0oF617D14xKYCd934ZYajYsRk44tlHGBErlhhpBCbqSlwOlkbsvPn76l4KOz CnZ59fX54uHK89BiVz8JU+MAhhpHxds= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1684349640; a=rsa-sha256; cv=none; b=XRTLqx+137E38THGwLUbdHc0tDVwgVbt8tGp1sSnn5LlpLx8d5ByZfyJH5dQ//yg/FncOc c9wqMVhbrRPysXgH1otGKIxGxHnTKkTwtCHx/bbZGoIk/wH4Zc7D+iE11wOwYNgAW3Ts3S 1XK0PndjEKHONTw7nPVlk9of8hOAzBQ= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="owLL/OdV"; spf=pass (imf06.hostedemail.com: domain of bjorn@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=bjorn@kernel.org; dmarc=pass (policy=none) header.from=kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id F0AAE63ADA; Wed, 17 May 2023 18:53:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 15961C433EF; Wed, 17 May 2023 18:53:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684349638; bh=+nV7AD5yc8SFGB9+CLiAw9jnKXLbtK3VvYJuoM0ntT4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=owLL/OdV0KnOPxZoc0Qe/3k9OnRB6FRqrL1ix1teN0zMIYOZfySgsqTPoLvc1q99Q yqDiv6kX7lxgUVNPvcrKU4RKbjixC20Pg4Rh09+shn780q5ee6t7x4LwSGXRMwBJju 8RtsYYmaiCxEHeBNDHm8hKYzCIK5iEBj3Qbt7m3roQOr9PYOrhhK7UQYj76R+p6sUx 5+c3+X/3o6jK66l+5ez5zLqB83L467JcKFN3u7RR0P5EtLKXYLekqJgWEiIZ6D4R0/ jeJybZ+ocEe6/jOxkztBBSA1WaNXyZLe/+qHBTWFyGW3quZIfGEFu1Q6avMKhS7PCR LonE96kFPhCXw== From: =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= To: David Hildenbrand , Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-riscv@lists.infradead.org Cc: =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Oscar Salvador , virtualization@lists.linux-foundation.org, linux@rivosinc.com, Alexandre Ghiti Subject: Re: [PATCH 0/7] riscv: Memory Hot(Un)Plug support In-Reply-To: <9aa7d030-19b5-01df-70c0-86d8d6ab86a6@redhat.com> References: <20230512145737.985671-1-bjorn@kernel.org> <9aa7d030-19b5-01df-70c0-86d8d6ab86a6@redhat.com> Date: Wed, 17 May 2023 20:53:55 +0200 Message-ID: <87zg62eqm4.fsf@all.your.base.are.belong.to.us> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 2A1C0180002 X-Rspam-User: X-Rspamd-Server: rspam06 X-Stat-Signature: opq17rpt7um57afpy187saeep1z7ynsc X-HE-Tag: 1684349639-750463 X-HE-Meta: U2FsdGVkX1889opDnE1+w/udRTib3Cu+JPeT0b+Gkp21O5DFVUcx5zSOURivIXfbfKtdPikQ6v5nIEVoHj+QnzntKVmMKT2pe3qiTRoLS60JNG1SMcuZrGS8GOZ0VlxN0rg1Jtyc2KDDUOdfXXxzeLiqIqoI7M68WahZX0jj8JrwnsJ62KxUFVyl7S1/Kh9xuUDj6cHs0m3K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o/6HjL/fA1tsA+NY6HU5gQkSHusGa52ks/zR5U4mxFNqmGwdcK4hIyKXk58QB602LVm/YQ8j2ctdr4dvV/mkzQj4Kbgs9zsQn0p0HdC0IgH6zLvh94ZCG3IOvUSw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: David Hildenbrand writes: > On 12.05.23 16:57, Bj=C3=B6rn T=C3=B6pel wrote: >> From: Bj=C3=B6rn T=C3=B6pel >>=20 >> Memory Hot(Un)Plug support for the RISC-V port >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D [...] > > Cool stuff! I'm fairly busy right now, so some high-level questions upfro= nt: No worries, and no rush! I'd say the v1 series was mainly for the RISC-V folks, and I've got tons of (offline) comments from Alex -- and with your comments below some more details to figure out. > What is the memory section size (which implies the memory block size=20 > and)? This implies the minimum DIMM granularity and the high-level=20 > granularity in which virtio-mem adds memory. It's 128M (27 bits) -- (like arm64 and x86-64?). > What is the pageblock size, implying the minimum granularity that=20 > virtio-mem can operate on? Nothing special AFAIU; MAX_ORDER is 10, so PAGE_SIZE (4K) * 1024. Hmm, I realize that I need to look into some more details of virtio-mem! :-) > On x86-64 and arm64 we currently use the ACPI SRAT to expose the maximum= =20 > physical address where we can see memory getting hotplugged. [1] From=20 > that, we can derive the "max_possible_pfn" and prepare the kernel=20 > virtual memory layourt (especially, direct map). > > Is something similar required on RISC-V? Yes! RISC-V is in the progress of getting proper ACPI support. Thanks for pointing me in the these directions; Food for thought that I'll digest for the next version. Cheers, Bj=C3=B6rn