Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2609213rwd; Wed, 17 May 2023 11:56:12 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4fCUnrXa7m8vXoSA+RjVjVS6LGAfgAIpF0OSqLOpCtLRFHj1mrXr9ZNnAyvoD5gi/jiBxo X-Received: by 2002:a05:6a20:3d28:b0:103:9c25:99a3 with SMTP id y40-20020a056a203d2800b001039c2599a3mr33907691pzi.59.1684349772055; Wed, 17 May 2023 11:56:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684349772; cv=none; d=google.com; s=arc-20160816; b=EGtbUlOlgpzMS35U0mtJXdCdsKaZv0ZVX+cqq3EjEQGTQA8IpSuzEPZLT/wVXEcWh6 FWHjFLdHqnWhqDdhx6DVEuaoemHHFrKbeqTMBFGMnGMmV5OOuf6kU2szrTtEMMDQoH8h ay6GpRccfF6NidCjldN5EKLzQPbH2Kswz2He31fpl+7WAUaxnxI6N+2PUwYlK7x9iYAu lxMvSOIViONRTLfvLEN/gJi040R07Bdww6FJAf8qVCMnFG4mpH5PSiHEw5zbQuPJWBah CT7h04PjS742ea/okgP9nBdDGUeD62RUs7GF/lXyvdDSWKyjA1lx8nnBruNbEjfrZbct Ex+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=+nV7AD5yc8SFGB9+CLiAw9jnKXLbtK3VvYJuoM0ntT4=; b=w6EEGRxIkISuHELiex+22/aeWzlaBqcpls9oe6GgEdOyXrnEXkyOeDZw3/PSIamv5i LBWBxd7mFtmY2vIVbFmlmRf01WX9bwRsbEwdJkI1Cr0Zv8dsynGL1pVGQdCEghwAnIad jV2lH2TFksbHEogQQsUZOLzaQKD3Xbl6y+moTltJYMWDNPV8L8xNV9oj4gbs6q2SGtZP BmNZjRn4F+2HRj2SrZtBrxSDV+1KwtDJeVXraW7/P1f2Jr3dgmvJC1sT+lUEqYjJuR8m G0/5mwGPXSB/R0/JnGe+NVizWUcJ3zXoAxoHRV3efAoMJdUrLRPlDm4LLaFOhaWqAWSS lAjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="owLL/OdV"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i188-20020a626dc5000000b0063d6042d2adsi22096683pfc.296.2023.05.17.11.55.55; Wed, 17 May 2023 11:56:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="owLL/OdV"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229723AbjEQSyB (ORCPT + 99 others); Wed, 17 May 2023 14:54:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229502AbjEQSyA (ORCPT ); Wed, 17 May 2023 14:54:00 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64C89FE for ; Wed, 17 May 2023 11:53:59 -0700 (PDT) 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 00ED263B04 for ; Wed, 17 May 2023 18:53:59 +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-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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