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 1CFE0C636D4 for ; Sat, 11 Feb 2023 01:03:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 763496B007D; Fri, 10 Feb 2023 20:03:25 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 73B036B007E; Fri, 10 Feb 2023 20:03:25 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 58D586B0080; Fri, 10 Feb 2023 20:03:25 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 4A07A6B007D for ; Fri, 10 Feb 2023 20:03:25 -0500 (EST) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 16571AAC11 for ; Sat, 11 Feb 2023 01:03:25 +0000 (UTC) X-FDA: 80453212770.13.2BC6BAA Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by imf14.hostedemail.com (Postfix) with ESMTP id D5481100011 for ; Sat, 11 Feb 2023 01:03:20 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=J7Wjsu8E; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); spf=pass (imf14.hostedemail.com: domain of dan.j.williams@intel.com designates 134.134.136.31 as permitted sender) smtp.mailfrom=dan.j.williams@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1676077401; 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=Npqm4mrscj6ns3+8vfgg+VeRcwKPPdZUsV+/votFwT0=; b=v4SmPUJ4v9Wn8ne344oMzOf24Q3lztCR7Mu6Lr4KjJ0p03z91RPLZb1vciQ7Wqw6hCOi4d nUNbZiFSZL7QXF9uKT0tLy4Qyy2/rBEDKD73kEMdzPkL+Y2/z1bYl3e4DOXFydZC4e2ZJ+ p6u6UbDfZjrhvjZ3OV65g/i9aoaVnpo= ARC-Authentication-Results: i=2; imf14.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=J7Wjsu8E; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); spf=pass (imf14.hostedemail.com: domain of dan.j.williams@intel.com designates 134.134.136.31 as permitted sender) smtp.mailfrom=dan.j.williams@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1676077401; a=rsa-sha256; cv=fail; b=ad2ZXms4FiFsnQZ4buPdAOHI101pMoh1nVosoG03hTIfQTiYIS3LMWmF/Ei1+afc0N/VIR EQwpBPxG9BYBGLLyG8oUXWzjlLQSbyNJoDqKGk54wUEks4qTxNlUftZ64hno7Snd+QoekF RXsq3xJPo2VDg+h/orz7Em7NWod7XPE= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676077400; x=1707613400; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=6gpOsIZ8MUGeiVRXXTaxmNPVnTOdpGuUiTCM0F6X5Jg=; b=J7Wjsu8Efx5NHKrlBBg8J6SoiH/DRZgtRE1NQjqBdlW4qYrapcfACmvh GQ8mc/qQ6VbaYXuKcPD36EYAw2pcEOIg4rQTDfLNiJxg+H+xx44f4HpN1 XD+OD7B8Mb9Jp4UppaLVkxommLhSwYsb6qIlTIPLC/BhQe4WlzQgbKu2s XBe84tLUK8SnA+xdcr9ZvIPJizG+zmdBnSttd7uzQyM7gpy2Oiml8C5gG wfqpyq8ZbjFDkDy3eTZ+cJDyMWcdRrrMj1mHwqn1vfR4arPVfS1yr8QSC i4ec/gvNXzlEQMeBoKoNse24EpM9Mm8/iVL0UgXIv5X8JVtuvJonP+nmG g==; X-IronPort-AV: E=McAfee;i="6500,9779,10617"; a="392969689" X-IronPort-AV: E=Sophos;i="5.97,287,1669104000"; d="scan'208";a="392969689" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2023 17:03:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10617"; a="668238205" X-IronPort-AV: E=Sophos;i="5.97,287,1669104000"; d="scan'208";a="668238205" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga002.jf.intel.com with ESMTP; 10 Feb 2023 17:03:18 -0800 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Fri, 10 Feb 2023 17:03:18 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Fri, 10 Feb 2023 17:03:17 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Fri, 10 Feb 2023 17:03:17 -0800 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.168) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Fri, 10 Feb 2023 17:03:17 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cOaoknl7fXNUqOmBwyRCHeVJDQr6gfjk4CNP+6dSH9QFhjDkvmH2sWH68WT08bkdOoYWOE6odPP+JQYF/t5X5LbeqthugYXoNI+KYdEWAtLsAJ9PW6sN7c5Rgd4JNdQ23OPHqHg40GSKr6er6Bi2prhdho37ZDahZ6tzgtIs6FX3o5U8UMf1rQbwBVddFsC24dJ5iRLAEqCoH64y/zl4j2MehCWvrYRcUiCKR/YuFXroVv5NULq6cQWc3DzEOiqBgqexjz9cZYykQHUFGEDGSTBSTX5JEK/iFNdvWlhNZyeOjb6RsFjsEzMUoBFco8HmK9F9G1+moyRYXWRLZ52myg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=pMA8MgXNlYnt3xS2yLciMOFcMPl95aJSsscFChYNgGI=; b=JH54qeUZGKYcl7ZhH/3BwFh0HWGQxmD4VNfJSjk1CrWauYzUUxjR0Qkc8tpSrD5GVTC/nDHkOYtK+P6zzjAt0yvargT+t7jbqC+ykxuvDgBpXfTyzwAISMf0tyLDD9W33ZEay86fc950SayeFVsbD6C9oDTN0DNb2LlQ/e3+Mn4IATv/V79qi7HDOpHZSq01tOq+hciE5KCH35ftKBrXc8uubuWTAcuOPglY47og0VvYzYcBwC7/Z4zgWPH1kfR5Ni7j3A8HVzt5x9srKBd2XlhGbkYCgNXhegdWdvuRiK4A+BeI985w9tkujYkc11kveRGeXljnKiKt6ZQ81rFQDQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from PH8PR11MB8107.namprd11.prod.outlook.com (2603:10b6:510:256::6) by CH3PR11MB8155.namprd11.prod.outlook.com (2603:10b6:610:164::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.21; Sat, 11 Feb 2023 01:03:15 +0000 Received: from PH8PR11MB8107.namprd11.prod.outlook.com ([fe80::421b:865b:f356:7dfc]) by PH8PR11MB8107.namprd11.prod.outlook.com ([fe80::421b:865b:f356:7dfc%5]) with mapi id 15.20.6086.020; Sat, 11 Feb 2023 01:03:15 +0000 Date: Fri, 10 Feb 2023 17:03:13 -0800 From: Dan Williams To: "Verma, Vishal L" , "Williams, Dan J" , "linux-cxl@vger.kernel.org" CC: "linux-mm@kvack.org" , "fan.ni@samsung.com" , "dave.hansen@linux.intel.com" , "linux-acpi@vger.kernel.org" Subject: Re: [PATCH v2 13/20] cxl/region: Add region autodiscovery Message-ID: <63e6e95152384_1e534829443@dwillia2-xfh.jf.intel.com.notmuch> References: <167601992097.1924368.18291887895351917895.stgit@dwillia2-xfh.jf.intel.com> <167601999958.1924368.9366954455835735048.stgit@dwillia2-xfh.jf.intel.com> <4f10837c5dcc405eac2441aa78a5f2f388fb601a.camel@intel.com> Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4f10837c5dcc405eac2441aa78a5f2f388fb601a.camel@intel.com> X-ClientProxiedBy: SJ0PR05CA0144.namprd05.prod.outlook.com (2603:10b6:a03:33d::29) To PH8PR11MB8107.namprd11.prod.outlook.com (2603:10b6:510:256::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH8PR11MB8107:EE_|CH3PR11MB8155:EE_ X-MS-Office365-Filtering-Correlation-Id: 18034563-d142-471a-bd68-08db0bcbc163 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: K/dhufrU5Awd3ICfgbFfPZ0LFxkIG87LjHHnBVYPgaQAh8CA8ozDYLxBV2qytmOWcosgQCBWWFOctu78Q6OXfn1OFYDVL5UoBj71WC53NkyCjG0tIb3SMclQqpG9jfZ1+4Y9chUYw/3QXe31yhc3hPwlz8cSTYfXiN/6kv75yP9GqvjcTHMqcGv/KQKtXUIQK5mfpcVLOppH+Q609jggzvwbrGbhuuEAxmsFtZSO2bfgt5aEHJdlOYm56TUbJ7jPHUPv226F62qrI8nCLXYNdCV5rSYh5pvM+db9Of9UTqSCQQbENaiLv0HMsmK/6eGdchBAvAZL1lZQ+pg7JEgzKbNn6XDOb632OzJdlCUlr9Uab48hDnXHan/IZ5bg9ZKt1ehT6B3WAP1YJNH9GFok7M+UcvpKy/cyPKKRARmnrYXxyN/SHKfTX4qDE98f07UqgTNGvgA+rlMv+c4686WmZbfAnu8E7aBG694MLVal9PzAviCS7xbt027V9k3gkXspG0QAXNPv0xc4o3hCKZBEwu3tv7dKj/1xloraMn2XmBxv0A0hjjHACsLHEzG33jA9teUL+UTV+v8aHYYxNqQqFsh61nGr/PXIjs4R7mjlkIx9rFqpX0IcQOKy1ldABrILktf5gIGkYv0TwIGUbqP9g2ImuGIk0xtTub+M53mVDG0= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH8PR11MB8107.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(396003)(346002)(39860400002)(376002)(366004)(136003)(451199018)(86362001)(66556008)(4326008)(66476007)(66946007)(8676002)(41300700001)(5660300002)(8936002)(2906002)(82960400001)(38100700002)(6506007)(6512007)(316002)(186003)(26005)(110136005)(966005)(54906003)(478600001)(6486002)(9686003)(83380400001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-1?Q?+OASBuUrkb0eLHCgEBO3jmpVmyZOM+6ipgyS7nP0vPyewr5nAEN6Jm6Kxp?= =?iso-8859-1?Q?ASuNhhRKLyMWQ49kPt1pJfFsn1wgBHEy5iiZlfHpJvGonYVlW9htZL7i0w?= =?iso-8859-1?Q?sR8VoVkc+yZLgjyEVh8Wl59SZkzdcTC9wso5e8RGPPEW66HrhB7a3Ofknn?= =?iso-8859-1?Q?a+1el8NdChQT3y4Y4JZy/Vy/qiQttP4Sslzlmv6stvjPOaFJ1HPc1ygOp9?= =?iso-8859-1?Q?dZqnjymuhir1jQFE4jiIecHKt1Gq4B0eeeZDWKm3bDe2m7pt7eUeKKSK6B?= =?iso-8859-1?Q?xk3PcHigMOxmPBpEWuldtVu7J4s0Cs3FYW8Y8LklnZapOnOLVEPdgSsz30?= =?iso-8859-1?Q?Rrctgk0bs3sLBq8kptXwSsqOfWDX0D6J0wfo01fkoolHjw9qSOx/avdrQz?= =?iso-8859-1?Q?Qgu3eHbH6QIck6/Z/CEs0D09aOnT2x2sDzuOEqAIDoceACpRteeipLTEwF?= =?iso-8859-1?Q?bKfAHa1jEfhVfNh9VKrjL5jX2Kk7QF0x/GXpxhxVWmdhowEPlxOzClvapM?= =?iso-8859-1?Q?5E0O+LAPknlDZZt1RO5uCjkAQOFVozWvHHBaePbxy8VTfrVu3x8y9RWRvz?= =?iso-8859-1?Q?qJ5t1J7QWZfF+RR2k4FA40i69smH3ynToO13aU42Tj/7ZvRH4Gb8NQEdiq?= =?iso-8859-1?Q?ToB02dT1I+NqTA2mN8G1NviGmzTTk54l993cnb8X4APZ3FYjMPQIsHPtoV?= =?iso-8859-1?Q?jagCp4+s32qjYU/g/ei5Ev8s6Dmy65RmuQXGEQeZk7TNz9ZSxbiVDojq1r?= =?iso-8859-1?Q?2m5hqYlTqeGBLyDiSZqzP3IN3rYw+5lISegg65K+5R/s+BS5pwwAafur0M?= =?iso-8859-1?Q?0Y/0ShBVj3NrXWkNH9v1qFg/pE+V3QK2i7zn6ltWumpIafT2ccp+h+Klje?= =?iso-8859-1?Q?d4OeByR7YOScMfdOzC0MmVOOZKmugPs61kdpCISGy1LKRQh3q1Sq2twFsC?= =?iso-8859-1?Q?DDR9OzTzSSBLFBjla5GNpckhHYEk9PqPNqPL+KL/8MVp5p3RUCQFpHY21w?= =?iso-8859-1?Q?Pt+faC9oWeSqlB6IW4Es2vy1+ll87m7T7LH6uOzZVC1aCyMuHOWC1+kq6a?= =?iso-8859-1?Q?Mh4n1ibnyuac/u3rI1/VL6kxJSmjzLwPCGC7fysJxHmAw+rMqhGnvuyMO1?= =?iso-8859-1?Q?2HwJklczpxatzusoGNh1B0fKRiZvKIcr37qsxLp2ol0QfoCqU5UPWiVRap?= =?iso-8859-1?Q?9md6Wly+qgLeZ6t/cMlb98iCl09GUVa/zOspQhQANrAOMSxV203r/guGeH?= =?iso-8859-1?Q?gplJNZ0FDvWKncV/1o5hVRUACtTuz8yM8SMQmbCQV3EOnZvN1PW7rtlYCr?= =?iso-8859-1?Q?m1lMgHxV2w456BYB6mMlST5RTKfKeOT18mbhfXlAHTCWitBb/IThDAMrIH?= =?iso-8859-1?Q?YJgmPKPOEuV03+P6oOIrP31pjGPfGnS+nfsoPfvyqEBbCcEwoij4NC2Yxy?= =?iso-8859-1?Q?XG7r52h7+pKojZebycssXSQjHnOT52KdBvpmHGEDGxwH0sUnXJSwTlTC7h?= =?iso-8859-1?Q?CQEaskybRAEWeijCwvxaV1evlUkKnWAtyIW71lvHRGCD5B/3M81AVcklSQ?= =?iso-8859-1?Q?KsaYEkbK8WqY9/AuDmGDg/o47zr++SDav16GkpJDFhavxHXcY9xPO+kFXU?= =?iso-8859-1?Q?m5VFeyAKhU1tbo2pVEE3m/WGjJO9pELCkrjmNmSG2C5cLOWCEagxopXw?= =?iso-8859-1?Q?=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 18034563-d142-471a-bd68-08db0bcbc163 X-MS-Exchange-CrossTenant-AuthSource: PH8PR11MB8107.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Feb 2023 01:03:15.5425 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 2U1H8ALrgsO4z2l1c2gSYx27RzfxlXvaXm/8S/B3eECfxxe6TfctT+zwEs2u1BzU0vt3MamRWnu5yUQ+6AVh0uceXzUTPHtXgzABLMe7Rao= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR11MB8155 X-OriginatorOrg: intel.com X-Rspam-User: X-Rspamd-Server: rspam03 X-Stat-Signature: gdyqxsq58tasokpew7wt79egsyyt1f9r X-Rspamd-Queue-Id: D5481100011 X-HE-Tag: 1676077400-538023 X-HE-Meta: U2FsdGVkX1+yKxVy8zwIzXjAw/NyxrSPG7fXVac+HYnlTo7ABQsJVGh+Bq9kMo0p6t09QT7kp1FZCLe9wVXHDvhErfPqSUH/8G61GIeqgrO63l0ZmoBLqZXlec5R4ocp+eNkEvo66cLJckZt03nhf0DJIrmZC2oNQ24qCcUoRjDk3KevCi6Cu1f5eWZIwi5/4ayzJIf/NvrKYgjEauPheUUyU+WcflmC5HHAFhUrKUoMaNAe4Rj5SnGeth+6V+KSs1r7X/dz7UEaMNINTqFdMJZ7uPpUMg9o4gaxLIjwGhPs1k8uAtlxHI/uQnU4J6bLMTK+7oFp8VRLOyn/f8YUZl7xvF48Wk1WtehOCzf1wgloSIpT21T3psalGKd8WZjSI3G+w5muStySvGbWUpyl+dO4z3c0VgvhwUXW4Urwu5Y+KXTesMgM6Xf+PxnS37f0bejWgJedGJ55Bjl6uQUQGCZLAe1mNPDsLehoQlh+oYnVhjrygJG9l78RWUwD5DnemCtYlWm8A4Tmhb+hajbs7mtEM4sbkx6vHwVUp9LdeCVDyrD5GJ87ZzikT9pk0TqF9Wy9q6nCS/HBWgWmBBnq6V8HoPiPNGFHPrzXq10X+rE9ZkvBzF5hHHgWSyhvFJppS5eDZTOkE2RCbqWDPU9xvF7Q8Xc/CQu//3VZfB28PfDyb2DFOR1THvXoaNLzdSLBHAUzhrwJuGlck/tRz8MKjqJiueIpC3m1UGU3HjEZKgP+8Ox7lF5s81GIGU9sRfXjkPqagARBDeveX/P3NhOP7x+SIwW32v34460M7d7Jx2tOW67EO8z5BUAi5rwpoClhXDE1ducCCFeSw5SRIFqcQxXY8SGs1Shw8zq+dlTfxixYVaGSSm0BW/DdXeVVF057UHcuTPqjSlCfjt1rkCBEzS2B1UtSEs7zeiWSYvSZmmdAThVdCBpmH5AfVMEYikQH86BQ0g0tAOfqMlXWcSh DOYuXSTf HB99+nwY8Rzcd6HB0bfISUQ8PPSqM8wJ34FjRqqtUkY9OfrJ3NNeIAY+NkkulWqNtsW/jArQch+Jn7ATj3aLxFV/Xf5KuJSMI54DTNLQ1txskgHNe2ln0ORNWaMFdvkzt82q7PpBLtLCi8/6AoMzNvpiEAhwTrxNi+j4kM1c65YRD7iE3j1h3YrYy+eZxxvnnMmG1QH5VTrRWf20H1mWn0fI/5oWGlo5jzrjaJ+Bo6WqVv529H7QOGFlj7PFjx7dmoI76CEPQcX8YgGOwpmeKdAhQc+ys6sAnmmq6TGBqYNZl9uBirQLiNw/WveQjSLsXjBYpVkvnT7EZInLXyhQJScqY+2sd1NaSkDEs+QrBGGgD1h8BrzWcWCRLUJjy2HDZullygIcbM2DTp2m2PAJGb30h4Q== 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: Verma, Vishal L wrote: > On Fri, 2023-02-10 at 01:06 -0800, Dan Williams wrote: > > Region autodiscovery is an asynchronous state machine advanced by > > cxl_port_probe(). After the decoders on an endpoint port are enumerated > > they are scanned for actively enabled instances. Each active decoder is > > flagged for auto-assembly CXL_DECODER_F_AUTO and attached to a region. > > If a region does not already exist for the address range setting of the > > decoder one is created. That creation process may race with other > > decoders of the same region being discovered since cxl_port_probe() is > > asynchronous. A new 'struct cxl_root_decoder' lock, @range_lock, is > > introduced to mitigate that race. > > > > Once all decoders have arrived, "p->nr_targets == p->interleave_ways", > > they are sorted by their relative decode position. The sort algorithm > > involves finding the point in the cxl_port topology where one leg of the > > decode leads to deviceA and the other deviceB. At that point in the > > topology the target order in the 'struct cxl_switch_decoder' indicates > > the relative position of those endpoint decoders in the region. > > > > > From that point the region goes through the same setup and validation > > steps as user-created regions, but instead of programming the decoders > > it validates that driver would have written the same values to the > > decoders as were already present. > > > > Tested-by: Fan Ni > > Link: https://lore.kernel.org/r/167564540972.847146.17096178433176097831.stgit@dwillia2-xfh.jf.intel.com > > Signed-off-by: Dan Williams > > --- > >  drivers/cxl/core/hdm.c    |   11 + > >  drivers/cxl/core/port.c   |    2 > >  drivers/cxl/core/region.c |  497 ++++++++++++++++++++++++++++++++++++++++++++- > >  drivers/cxl/cxl.h         |   29 +++ > >  drivers/cxl/port.c        |   48 ++++ > >  5 files changed, 576 insertions(+), 11 deletions(-) > > > > > One question below, but otherwise looks good, > > Reviewed-by: Vishal Verma > > <..> > > >   > > +static int cxl_region_attach_auto(struct cxl_region *cxlr, > > +                                 struct cxl_endpoint_decoder *cxled, int pos) > > +{ > > +       struct cxl_region_params *p = &cxlr->params; > > + > > +       if (cxled->state != CXL_DECODER_STATE_AUTO) { > > +               dev_err(&cxlr->dev, > > +                       "%s: unable to add decoder to autodetected region\n", > > +                       dev_name(&cxled->cxld.dev)); > > +               return -EINVAL; > > +       } > > + > > +       if (pos >= 0) { > > +               dev_dbg(&cxlr->dev, "%s: expected auto position, not %d\n", > > +                       dev_name(&cxled->cxld.dev), pos); > > +               return -EINVAL; > > +       } > > + > > +       if (p->nr_targets >= p->interleave_ways) { > > +               dev_err(&cxlr->dev, "%s: no more target slots available\n", > > +                       dev_name(&cxled->cxld.dev)); > > +               return -ENXIO; > > +       } > > + > > +       /* > > +        * Temporarily record the endpoint decoder into the target array. Yes, > > +        * this means that userspace can view devices in the wrong position > > +        * before the region activates, and must be careful to understand when > > +        * it might be racing region autodiscovery. > > +        */ > > Would it be worthwhile adding an attribute around this - either to > distinguish an auto-assembled region from a user-created one, or > perhaps better - something to mark the assembly complete? cxl-list > doesn't have to display this attribute as is, but maybe it can make a > decision to mark it as idle while assembly is pending, or maybe even > refuse to add_cxl_region() for it entirely? > > This can be a follow-on too. "Assembly complete" is determined by "commit" going active. What about all of the "targetX" attributes printing the decoder-name out with a prefix like: "auto:decoderX.Y" ...that way userspace can both see what candidate decoders the kernel is considering, and the fact that assembly is still in progress (or stalled). The concern thought is breaking legacy that only ever expects to read decoder names there... guess it depends on how bad the failure mode is. Instead, maybe a new attribute like "origin" that returns "manual" vs "auto"?