From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.178]) (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 187713C661A for ; Mon, 17 Aug 2026 12:18:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786969096; cv=none; b=Ctre/umts9YiO98LUvw/8qqBzyNSyH41AX3arnPDiwl0rt+z97EA5EjjeFiolGYdy4HFr8v8PFpaCwpCiig6sV1YPflzfFh9HHEG6r+xY95FD8H+8Qvo9yJW1pfPTiOwzgtB0VO6dsIBSfK4Rl0RS3a7XJgzx5+y26HTz/YfEEU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786969096; c=relaxed/simple; bh=RG1WQKYzwFHfo9x/GFB8G0epwHF+rFnfAREYEUuqHv8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=AdmBcqA2EvfnQ+Ea9vsIY5kJ2piikTVeDH1MzcOpPumC15ImtjaFg5wSD97nso0Okza0+iywx5I6XM3dOhkGPgSSKeimyJgpv1aUJ0SB0uwOKd6yglBCp4Al8BrJZno6NFCylLgR6vScUmj1WSFdTiWCmL/CDGSR0KpcVaoF8CE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca; spf=pass smtp.mailfrom=ziepe.ca; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b=FlpoiiRT; arc=none smtp.client-ip=209.85.222.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="FlpoiiRT" Received: by mail-qk1-f178.google.com with SMTP id af79cd13be357-9309d4ea213so260419285a.1 for ; Mon, 17 Aug 2026 05:18:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1786969094; x=1787573894; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=ssGSkvbB7xNlIkXjL7DRTJtJS9sZVm2NXMnYSqtWYgk=; b=FlpoiiRTdQA5bsaPw4RFj6uqEJdFDrfnXvUx3MC4WTB91SCMIAm+Tfm8U4AvHJK+Oq ClySINGGqjpEcbmJCITSDRLsCUtPD0pWgakkufi0iFLhKrpdFFwLUAqr27AhhdK86n1p nbng47gHBK9BffTnCEliXonDUBF2i++Okn4uVaGKXVVENH24447k0M0+vKUS/7osljeR bdSddS34v5mLFrVY7A/7u2HXPIsCrF54X14EbXRtxkcLQKYDvdvcobRNZ5iyTFUX+YLM QMDea8fxSzaj/g99KbXRtlDn2zOGrturounpLNVjCS0fyvU0a1qLROqofg+Dsc2ZxjPN SY8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786969094; x=1787573894; h=in-reply-to:content-disposition:content-type: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 :content-type; bh=ssGSkvbB7xNlIkXjL7DRTJtJS9sZVm2NXMnYSqtWYgk=; b=UAWnarbI7GGAX+L55E+jmRoHhFEL6gBNlKUErdAw4yAZ/ivMhhQi/YT706P+1hrNHa UPWLxdmPdNFpZ6jKY33tLWTbCfJEGmr2/ePs2lQ1LwQQtRkjNLnLKFb4dowz/QhFxX+j CgjVzGnICvRc5rZfKH0IP08UwPpu52PE5i9ity4vyQtWdmEN8f2w0Sql3r4gH8BFRR33 YvsU/ut+YsxAiWibUWL66L38QV6e3bistqdn6YQYFWqUPKdUXElvpieH5bPE1wSdZv5g SViWFDfl+BOyda01s4kVfCefhCPlQPm6IPxD4om0Yc0OlhPNSN+frHcWGXW42chiyAfk 13Hw== X-Forwarded-Encrypted: i=1; AHgh+Rrm7B5niqvB7tDnzXZuR51YXin9eRL+ZizwISaxwfmtZXbISUtfAWC/t8O1NoN7RAlqqZf0eqsTT19HIzs=@vger.kernel.org X-Gm-Message-State: AOJu0YwI0PVYc/Hvw8C/orDs0Qvuk6FzMANQH+556ccpSFHlEwvhbLEC TtlLcnDqOrgURj3aJ3Jb+j7PPSuj2DGpKsKeLYLCWrrSIA2yfqAWdCZ2aFXX7XPN1vc= X-Gm-Gg: AR+sD12vYTY1wu1/A00HR6KukWvpBZyAViQXoK7uchZD5BRVE2J9OKXVQKJGfuaKeOK uLP47rFnSfmj5dVLOHDW9+VFIRSr9/oJXdQl6JLkYlfTSeJUiJWUIcC+FokCk9T51S5vVMgctMJ MjhjOmth4InXColjeNuZQJC7bb+vi171zaT1iW0ejeAAVKS8tkLWncXrn8fpeS9wYBlLf8OIx62 G3Cg8TtUT3el/tFX/qHI3a/zCj8K2ajJYSOQt1uDvGBzjZalXBox8Byf0sts/2rhTGMkOw7UnDc QQw1dlq5J86uC2AkwPqN/yX61G2Kj1awtzkl9YS1dqBy7NJL3bi9zIaZhEjLMLYxfnez7A+ncCf IpxwKkvfWiEJGmwHOcNElK3NtueSz+AQzeWoHB6qSZzFgBuHZXWaQnXqV8pcYmYkNIPN80Oq4FN E+8oNLUvGtOpo6XjydAmT9M1jo5Be36Nx5TjWHPg== X-Received: by 2002:a05:620a:2904:b0:915:de68:1802 with SMTP id af79cd13be357-936d231eb4amr2766839485a.41.1786969093885; Mon, 17 Aug 2026 05:18:13 -0700 (PDT) Received: from ziepe.ca ([142.166.156.215]) by smtp.gmail.com with ESMTPSA id af79cd13be357-937033fae8esm30006185a.39.2026.08.17.05.18.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2026 05:18:12 -0700 (PDT) Received: from jgg by wakko with local (Exim 4.97) (envelope-from ) id 1wvwI6-00000005tDu-3DCL; Mon, 17 Aug 2026 09:18:10 -0300 Date: Mon, 17 Aug 2026 09:18:10 -0300 From: Jason Gunthorpe To: Alex Williamson Cc: Samiullah Khawaja , kvm , Alex Williamson , Bjorn Helgaas , Kevin Tian , linux-kernel , linux-pci Subject: Re: [RFC PATCH 1/5] PCI: Refuse function reset of an SR-IOV PF with enabled VFs Message-ID: <20260817121810.GC933791@ziepe.ca> References: <20260812045325.2733631-1-alex.williamson@nvidia.com> <20260812045325.2733631-2-alex.williamson@nvidia.com> <20260814083737.66bb83fb@nvidia.com> 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: <20260814083737.66bb83fb@nvidia.com> On Fri, Aug 14, 2026 at 08:37:37AM -0600, Alex Williamson wrote: > Devices are only ever opened into a user owned domain, the IOMMU > context switch happens before this and regardless of the reset. Close > also disables bus-master regardless of reset, so there's no risk of > ongoing DMA if the device is placed into an identity domain between > close and re-open. I've been told by HW people that bus-master isn't actually a strong fence for stopping DMA on most real HW. More of a 'dma will eventually stop' kind of thing. It does reliably prevent DMA during the post-FLR phase only. If the device hasn't been reset it should be kept on a blocking domain. > PF, I think there are arguments both that the user implicitly opted in > to the best-effort reset, as well as a use case that allows the PF > driver to fail and re-open the PF demands this behavior. I really think we cannot alow a device to be returned back to the kernel without a reset. VFIO should be keeping things attached to a blocking domain as long as the driver is bound. It should force a reset during unbinding as well if the device FD was ever closed without a reset.. Jason