From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f73.google.com (mail-pj1-f73.google.com [209.85.216.73]) (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 E027836C0C6 for ; Wed, 25 Feb 2026 13:55:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772027725; cv=none; b=Ac18p8ceUvDLiYs6IjORXAkZsi+b2U6hFq8z3EqLsCmYCaA+lysKDYSBHEFK/9mKaN+0Tb7ltseOrpXVMPuycayzrFqJjHLM+j99HXiFdP0gDEgAYyZDF2E5RQzcVL4n1RT7zouxzn/hVOhlqlemLfWu2og5duQDcWuUTxl8/r4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772027725; c=relaxed/simple; bh=j8QD+YOKTudOlbEWjrHGAEdh2xgoRTUdHV6Nf6Pmn5U=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=NBkffFVIwFIKqNgAwRdwRzNQ3oIWphWDFGmgTCyGMZwLR3iBT2hm5GFZIpCeqPy7K4Xen0SQEI4ptoxXwMszKmsucCkJ2kGSL5UgOQ7v4E5ybavDUB/K3YOQeyGaarOl78HbwS9eHY/LKWtExdZLOVXhV5SBdkodKPSUGy/7lb8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=FTofPcRH; arc=none smtp.client-ip=209.85.216.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="FTofPcRH" Received: by mail-pj1-f73.google.com with SMTP id 98e67ed59e1d1-354490889b6so28518056a91.3 for ; Wed, 25 Feb 2026 05:55:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1772027724; x=1772632524; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=hj5kWs8x13Nc52H5YwkoGAX7bER0Qj5o5LwtSPL8HY8=; b=FTofPcRHGNC0n5AajSeMDVCPi+M7lme/LMHQ9qxJKDjkTeIVY54OdL8mAPjeOTuJ0u oinrIp04gmmeC7eS0NoOr0f7QY/GdTsgtkTCEMeiXs5TKbw9yfkDvRA172p/VLHDZJPM XFW7wrKtya+IHR2e5JWQ/HqOAPnFWEOh4sAjHFQDWio2NvL6MnCFCuEOS7KmCxs/LTdR X6djsO/xv0QCOhotJON13RfLgDtteqyYoW/OlMaTgQjnfPO8rJ4YGjo+2gOAOcSuBeK/ +r5z1jQvKfhGPuFkW9lX5SQ1V4L/HXdstoqE+Qam1J8ZwpdEit57ILmuit15lYDmV9hP LXFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772027724; x=1772632524; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=hj5kWs8x13Nc52H5YwkoGAX7bER0Qj5o5LwtSPL8HY8=; b=Bk3I0fs0Ibfod9jJHyyVA81SMYrv0BECp5KPlcbTS0/kKOwSj+4ozWukq5c/djZnji hkxY7CzliGXTAXioKsWi0DLHuS+OZUx9CQq+Z1Hp4UQhp4cLJyt0DoGa68c1luqL0lC6 A31wbviFWt1MHrvWWWaPQ4R+VXfmwSPWIP5QpVvicB6JxTRvGUOIQ1pHiG9qcAQoNzUI 2KcDMsQvgctywkMLmCCS7RYuEUmsrkSdhyBXMxj01eGL5ZO+iYFXTNBAtiqvWYGWWLQk jFk0Y1b33lQpCajbAWGjwohdjteEyPH36x/KzxnaUUTNsAIEznWQ/DF9HrDwz1MqIgIK adsg== X-Gm-Message-State: AOJu0Yzg99qC50FaVKBHge8zlxdeyvdwuhTmKv4gnKC/+pa6l8dY4uS3 25bRsQX1GPfkROOMW+I15jQn5I8NIpHiIvtMmUiFosrc9wjKjeZgcMCZvTjBBnvnCbJbaenjJSQ KoIJauQ== X-Received: from pjbee5.prod.google.com ([2002:a17:90a:fc45:b0:34f:96fa:45e]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:3147:b0:354:a065:ec3b with SMTP id 98e67ed59e1d1-358ae8d5edbmr14072256a91.27.1772027724097; Wed, 25 Feb 2026 05:55:24 -0800 (PST) Date: Wed, 25 Feb 2026 05:55:22 -0800 In-Reply-To: <20260225075211.3353194-1-aik@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260225075211.3353194-1-aik@amd.com> Message-ID: Subject: Re: [RFC PATCH kernel] iommufd: Allow mapping from KVM's guest_memfd From: Sean Christopherson To: Alexey Kardashevskiy Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Jason Gunthorpe , Kevin Tian , Joerg Roedel , Will Deacon , Robin Murphy , Paolo Bonzini , Steve Sistare , Nicolin Chen , iommu@lists.linux.dev, linux-coco@lists.linux.dev, Dan Williams , Santosh Shukla , "Pratik R . Sampat" , Ackerley Tng , Fuad Tabba , Xu Yilun , "Aneesh Kumar K . V" Content-Type: text/plain; charset="us-ascii" On Wed, Feb 25, 2026, Alexey Kardashevskiy wrote: > For the new guest_memfd type, no additional reference is taken as > pinning is guaranteed by the KVM guest_memfd library. > > There is no KVM-GMEMFD->IOMMUFD direct notification mechanism as > the assumption is that: > 1) page stage change events will be handled by VMM which is going > to call IOMMUFD to remap pages; > 2) shrinking GMEMFD equals to VM memory unplug and VMM is going to > handle it. The VMM is outside of the kernel's effective TCB. Assuming the VMM will always do the right thing is a non-starter.