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 77CB4C021AA for ; Tue, 18 Feb 2025 16:11:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EF25628014C; Tue, 18 Feb 2025 11:11:19 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id EA28128013C; Tue, 18 Feb 2025 11:11:19 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D6A5228014C; Tue, 18 Feb 2025 11:11:19 -0500 (EST) 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 B6D7B28013C for ; Tue, 18 Feb 2025 11:11:19 -0500 (EST) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 6AA19AEE5C for ; Tue, 18 Feb 2025 16:11:19 +0000 (UTC) X-FDA: 83133555078.29.C701ADE Received: from mail-qt1-f172.google.com (mail-qt1-f172.google.com [209.85.160.172]) by imf26.hostedemail.com (Postfix) with ESMTP id 23776140020 for ; Tue, 18 Feb 2025 16:11:16 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=gourry.net header.s=google header.b=C4UTuGGN; spf=pass (imf26.hostedemail.com: domain of gourry@gourry.net designates 209.85.160.172 as permitted sender) smtp.mailfrom=gourry@gourry.net; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1739895077; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=5cQGGMSgY8MGd0sxrw5WDxENgtEsj70+ROuTTP1PL5Y=; b=OtD11Y4Li4+dZSt/aGEB130nuHkDYE0j0OVmfU5HgM7yoWZviu+E/6jGsgylF91Duv35To JMgzg1KNIAAs72HTjDzcRdAg6AB8mQshTSu9HeEfirTvhjv1YA1bTTOalJpNaJLsfaTmIF 7URu7tkHhuh8excSbVjiiqDTAthHPLA= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=gourry.net header.s=google header.b=C4UTuGGN; spf=pass (imf26.hostedemail.com: domain of gourry@gourry.net designates 209.85.160.172 as permitted sender) smtp.mailfrom=gourry@gourry.net; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1739895077; a=rsa-sha256; cv=none; b=NB3sn71cQjABE4trHQ6LsmH5uJnnkiUIOhcIJkjmRQCPFSG2LzVMR3DYOKw/IDwGGrOWls KPBcgMUhOqQGHCYNRyCnuV6TmmCnvaSnVjxW03Uoj3gxaHwzDUdb9+gV/XDAL6sqMLQ2tG 1k4+tkM6tl3HDc+wa3Ya/YOw52hNu9o= Received: by mail-qt1-f172.google.com with SMTP id d75a77b69052e-471963ae31bso62520611cf.3 for ; Tue, 18 Feb 2025 08:11:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gourry.net; s=google; t=1739895076; x=1740499876; darn=kvack.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=5cQGGMSgY8MGd0sxrw5WDxENgtEsj70+ROuTTP1PL5Y=; b=C4UTuGGNISkvGg4sax6y1/18FKar9wDKX3CXj3AiqyE0Tszb1eFyGPFCYd+FpfwIoh dpezFGsRcL0Rf9gTLHD5KGC4j185RBvXgMvOqA3n/SEUIO/yOGyHR+27+X2nrV5D8kq2 C6gW3QpF6NX/DYn4ClZbtSoKfdREwJizIrxjWY7wPV7XHScoKMe1qCyYAuL3aHc1BKPj 7Zili2Bacef27F1W1etsNZS6lf2HgihRc2ucp1w2BqRNcVA3YP15brenmHAvNfJAaQ3c MTT/5UC1HBwbra0MANhMj+02+b0WUy84caS1f+AYy1RnMBQKqdPd3S4svOyC/R8gwLGg PlpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739895076; x=1740499876; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=5cQGGMSgY8MGd0sxrw5WDxENgtEsj70+ROuTTP1PL5Y=; b=wQWInzcr4gTnSFQOj0xxWnYYZVQCJ8hje0cZ6M6h6MlcjTGUkgO5lWUUmkBdfw2xfj OEAarKOII5IX5qMvkMicuIR9oO72oXzX44HdWFpFPV/U0z9QKnAEJCGUK/JtNuuhVRGX kXy/ZE1XJIRe2L2vKQsyqXvmW+G5ZusrRYI3Q//oKoAXLGHIrS4SqvCrvgDZ6HdFTle4 K0lMhg+vvBfgL4sPBu6v3wZmjbowZXy6PugcWk7BDl/Ea59n8TAnDiyevtUckNC7NjEM 3BhiOthps8ueYIFzf/A2t9vMNarzVXi7V18fypDGJccarkvzYRX7/In485EPOXtmxAFJ U/Xw== X-Forwarded-Encrypted: i=1; AJvYcCV/7J/JQtFfLMkDtLJqMzQtpJO1YSQZwjobP5h6mexDAsYkJn92A9uQIEMIRlkdMDfqseBHCqA5Aw==@kvack.org X-Gm-Message-State: AOJu0Yw1WQTzCYJcBDTPsTYg+eMMb/DHUIsWiAMTMgseDJIN3hXK0BT6 bMtFkJLP8Z1HfSKEvO4GrA1Il4i/s81urWj4q8HD5xvbslthD0U/676KgSTDuRw= X-Gm-Gg: ASbGncsWmcxKH4qv+1basCh54DTbhf/xccYcjeorGvR3lMenM7z1OGpHi/+oC2M05Cq HvjXQkUe4/74AU/GVDxKycujTxz5Ms1wrO+jd/OIOa9mfL9NQp7JkSXXnS7Fk4YRDzy5dJcHxef ZqdbCMkfRqWBdkIEKhir4v54RjDBAKIT+Led1tPOXWrrBgW12H16MQjVUdE4lY0bROFPg0odbMY Gto0yXc8Gp6SiU2FYcoy9h/WEDW1Ct94duVwSD8gSQMfW7T4wXO0XeVNW23fFifhtkzbtHy/+dK FzDWQ+DEcWlL7KGCw1RRKYPSyKylNh4Fhvd3DxQrU70MFMLeI26PZd57l7YaUDo25eBtDrTogA= = X-Google-Smtp-Source: AGHT+IHYr4BQwfAkYI4GpOjTNITJVFyEpNnF+z5lYLa4RM2UUxXYRmgvzKbGSZXT2OG53A5PVYI3XA== X-Received: by 2002:a05:622a:148c:b0:46c:728c:8862 with SMTP id d75a77b69052e-471dbd6fe65mr167655371cf.31.1739895075791; Tue, 18 Feb 2025 08:11:15 -0800 (PST) Received: from gourry-fedora-PF4VCD3F (pool-173-79-56-208.washdc.fios.verizon.net. [173.79.56.208]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-471fe6c81e4sm12279921cf.44.2025.02.18.08.11.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Feb 2025 08:11:14 -0800 (PST) Date: Tue, 18 Feb 2025 11:11:12 -0500 From: Gregory Price To: Yuquan Wang Cc: lsf-pc@lists.linux-foundation.org, linux-mm@kvack.org, linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [LSF/MM] CXL Boot to Bash - Section 1: BIOS, EFI, and Early Boot Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 23776140020 X-Stat-Signature: b9bnscrafkpbxjbhz4swsipzwnahz4um X-Rspam-User: X-Rspamd-Server: rspam01 X-HE-Tag: 1739895076-571212 X-HE-Meta: U2FsdGVkX19hqgTvfQgJitKX+EYbJ4OqVlyzUAyYFlFy5mQ5BGd94wTIaOOlxF1xF6o7b6R+eaYxrpDPp6S+mnWVCzz9wEeX9VlI07TU5Uwe3QfpEw7qWUwXrg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t0cZj1Y8QiGNrz0FwGwE3hJ1s9K61uI+VJk1ihq9Cbg1Mt5ynk+HDjp+ZeyGx2vecVQm9Ot9Vg220Tb1YpaR33R1i3DCLRmnBxzg= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000142, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Tue, Feb 18, 2025 at 06:12:47PM +0800, Yuquan Wang wrote: > On Tue, Feb 04, 2025 at 09:17:09PM -0500, Gregory Price wrote: > > > > 1) This memory may be placed in any zone (ZONE_NORMAL, typically) > > 2) The kernel may use this memory for arbitrary allocations > > 4) The driver still enumerates CXL devices and memory regions, but > > 3) The CXL driver CANNOT manage this memory (as of today) > > (Caveat: *some* RAS features may still work, possibly) > > > > Hi, Gregory > > Thanks for the in-depth introduction and analysis. > > Here I have some confusion: > > 1) In this scenario, does it mean users could not create a CXL region > dynamically after OS boot? > It helps to be a bit more precise here. "A CXL Region" is a device managed by the CXL driver: /sys/bus/cxl/devices/regionN In this setup, a "CXL region" is not required, because the memory has already been associated with memory blocks in ZONE_NORMAL by the kernel. The blocks themselves are not managed by the driver, they are created during early boot - and are not related to driver operation at all. The driver can still enumerate the fabric and the devices that back this memory, but presently it does not manage the memory blocks themselves. more explicitly: There is no link between a memdev and memory blocks, which would normally be created via a region+dax_region+dax device. > 2) A CXL region (interleave set) would influence the real used memory > in this memory range. Therefore, apart from devices, does platforms > have to configure CXL regions in this stage? > Again, you need to be more explicit about "CXL region". A "CXL region device" is a construct created by the driver. In this scenario, the platform configures the CXL memory for use as normal system RAM by marking it EFI_CONVENTIONAL_MEMORY without EFI_MEMORY_SP. Some platforms configure interleave in BIOS - how this is done is platform specific but ultimately constrained by the CXL specification on programming decoders throughout the fabric. > 3) How bios/EFI to describe a CXL region? > You would have to discuss this with the individual platform folks. The main mechanism to communicate CXL configuration from BIOS/EFI to kernel is the CEDT/CFMW and HMAT. ~Gregory.