From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qv1-f47.google.com (mail-qv1-f47.google.com [209.85.219.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3B679134CF for ; Tue, 7 Apr 2026 14:15:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775571332; cv=none; b=hRL70TxOcndK1zc61oSZgLMdYsa0CDOUNcK76XXZqnyXTPEbLq+7lWFEfEFewOKqhgkZ8cI1y+ZedOvJZYMXUUKH3i0hBrnqjJgL7yJ/QoqAvUAmQYXccFw0bh/t1YKwAhtqJtqRXugOL369TYVQGG47S8PliXF8qvV71S9NFRk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775571332; c=relaxed/simple; bh=FnSsZuPnGyxPDhNZRLYQ6JCnZWuSSmTUwVpsXpmU4SY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HRxUk9IGwBhoQTRcZqe7/hhrRntgC+ipILt21+ZVx+NaKLDsb8cEg+6BjUEAfTuQmSXTkb1UVTd8ORDy3a7TUl0MT4edCqi/KtjnHvfEf5/5dbh4pnyAJud2wug8PP15+o0Tsn/FODW74RiWP1DKpaU70PNABk/mO7BuAxj/HMY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gourry.net; spf=pass smtp.mailfrom=gourry.net; dkim=pass (2048-bit key) header.d=gourry.net header.i=@gourry.net header.b=MtaqTtWC; arc=none smtp.client-ip=209.85.219.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gourry.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gourry.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gourry.net header.i=@gourry.net header.b="MtaqTtWC" Received: by mail-qv1-f47.google.com with SMTP id 6a1803df08f44-899a9f445cbso64905036d6.0 for ; Tue, 07 Apr 2026 07:15:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gourry.net; s=google; t=1775571330; x=1776176130; darn=vger.kernel.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=qrXvcr862UuyP9u64puUV6+vM1HuF+WgVzFiTHYkxJA=; b=MtaqTtWCayCARWnIfAPjHP9sgccrUonJRIK8Swc2gcl2f8lHjGClpqtv2R1df2NZJA A/ifVD2S55jf7AngdY6uUPhI5nGMeX3IDKA5mLsic7GDGQfBqGDiEYdH0Id7wupSketU L+t1ngjlUlmMA2O7DBM6sOkr5RN9K/U73cJnwu0bmcraxzr+QusBAmyxAEDPSNw/nsZD UmHVpz2jeyyLXRvEnFOgEQgslBrrkNbqzhWuYgzgT3jcHOdfPeM/CjgXFMvbr6PXuTrF 57hq7ZDVXjZTNxHPoTCBcNiEWHmYPBkvt9yGZNEe6tIy2Vgt1h/ZaSs1VYK/FUHdxpPq Qjdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775571330; x=1776176130; h=in-reply-to:content-disposition: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; bh=qrXvcr862UuyP9u64puUV6+vM1HuF+WgVzFiTHYkxJA=; b=fSb14wTGH/AVtYFfp7UBi9+TleyyM9f0JUgn24NIWlHh59I7mMUKrmAomEh/fhETvI MAAtqTEny5nwceZm7gfKP5JK+7n0aq8iLAPhePheCvCm7en+T0RqOom6L99JK1/rWtJL j+2lx0/G4HFxgpM0yH5Kcqk93JOftaN5h70/SF/lhNQTNuUWBEs1F9EvKFlH6l3X2rK7 iyMQ5nj8lU41B8xY+xWUub3KeeMR2V9EJcuxaWjgZgWnNhEIkV75+KLWsf4mQFUSXTm+ erraCasrPLkxtFtqrkudTgaC7F1JyNyXmG8DGpRFRsHfYZTt0OMXVoqJW4QCr5BFkyPk AHvQ== X-Forwarded-Encrypted: i=1; AJvYcCWfBVauOqzO31x5hMbn+yPj0aipoR6mbGkGMxw8iyb6ijqLnTbyR2FOxMFsXvCyVOBQjpWRhwtKEoGjH5w=@vger.kernel.org X-Gm-Message-State: AOJu0YxMYqJcGjcxc6kTyyOC64fs5ABReVdozwsNdsS6MMiXLRpNYbOx fHtJ+MgFOxuPByQjVfJjtZabJ1MIzruzBuxfyxwjse5eGw6wTJgnkvU9j2/GElWmYZA= X-Gm-Gg: AeBDieuPhzfZR9IulHNX8jFaAU4g2WGSkUr4yz+zekeogc8IIZay2wUptUeObHBXaMG 1URQ5anU3nVFpmDNoOmmRgI4qrBS1Z+2pkOtTYkCU5vcsM9FZBV3iVegw0R8OeQ4OM8vst5ImtS 8F/EkNqgAmu7quowvBq7jgGjkV3c9bHbpiDSPt6fKsVt25zGHcy24mfYawjk8kTecZPux9aDcHB 6jybOREWeTW+Bkgcka8XNXeSHu9xA6rJGZ9872lJ76AVhbyBkcO3xmuE3k0zo8iL4XsjB/lBWeU Ad33dZU8jIJe5jNQFV1OJnfVT7Y9d9CnKZvNILoxEAWAmeIz2ro4eZ4Z0H42YJ5c/DgQ3HDLAxx Tmo9dxgUbjarSQfSnhHqS3f8NBMTzV5mF8IZzyzBV7YVtb/wHuuaC2fHEx7wSGnzGnONvMaGK7X 5gIwHO1Z90YNrGMSUacySW7ZV2r9JJPlxlbRaCN+szs6uQRMp8NPSVd/e13I3I24NyoqxC6zzzI KHOIMJOb5Yx X-Received: by 2002:a05:6214:400a:b0:89a:f92:b09f with SMTP id 6a1803df08f44-8a7022bb7a7mr282281776d6.4.1775571329335; Tue, 07 Apr 2026 07:15:29 -0700 (PDT) Received: from gourry-fedora-PF4VCD3F (pool-71-191-243-150.washdc.fios.verizon.net. [71.191.243.150]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8a596ff619asm183100226d6.37.2026.04.07.07.15.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Apr 2026 07:15:28 -0700 (PDT) Date: Tue, 7 Apr 2026 10:15:26 -0400 From: Gregory Price To: Jason Gunthorpe Cc: Dan Williams , mhonap@nvidia.com, alwilliamson@nvidia.com, jonathan.cameron@huawei.com, dave.jiang@intel.com, alejandro.lucero-palau@amd.com, dave@stgolabs.net, alison.schofield@intel.com, vishal.l.verma@intel.com, ira.weiny@intel.com, dmatlack@google.com, shuah@kernel.org, yishaih@nvidia.com, skolothumtho@nvidia.com, kevin.tian@intel.com, ankita@nvidia.com, vsethi@nvidia.com, cjia@nvidia.com, targupta@nvidia.com, zhiw@nvidia.com, kjaju@nvidia.com, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, linux-cxl@vger.kernel.org, kvm@vger.kernel.org Subject: Re: [PATCH v2 16/20] vfio/cxl: Register regions with VFIO layer Message-ID: References: <20260401143917.108413-1-mhonap@nvidia.com> <20260401143917.108413-17-mhonap@nvidia.com> <69d0169115c06_1b0cc6100a5@dwillia2-mobl4.notmuch> <20260404185330.GD2551565@ziepe.ca> <69d1685538f45_556821002f@djbw-dev.notmuch> <20260406220521.GG2551565@ziepe.ca> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260406220521.GG2551565@ziepe.ca> On Mon, Apr 06, 2026 at 07:05:21PM -0300, Jason Gunthorpe wrote: > On Mon, Apr 06, 2026 at 05:22:06PM -0400, Gregory Price wrote: > > On Sat, Apr 04, 2026 at 12:36:53PM -0700, Dan Williams wrote: > > > Jason Gunthorpe wrote: > > I would expect this to happen via the request_resource mechanism, if > MM is using the CXL range it should be locked in the resource tree and > vfio should request it and then fail during the initial startup > phases. > > > I need to read up a little bit on this area, but i don't see the "needs > > to be mmap'able in a cache coherent way" to be an argument for one > > particular method or another (hotplug, private node, memremap, etc). > > It is speaking to what VFIO has to do. It is the exclusive owner of > the physical range, it does not have struct pages, it must be cachable > for VFIO and KVM to work - not alot of choices here. Turn the > phys_addr_t's into large cachable special PTEs inside a VMA. > Right - the observation here is essentially "if you need struct page and need to get fancy with them...". But if you just need to plonk a region into one set of page tables and move on - then this is fine and arguable preferable. ~Gregory