From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3E0181A288; Sun, 1 Jun 2025 07:45:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748763936; cv=none; b=CgSsEWEKwr9YdKn6pLjzU4lKSsb78nbQgfSPoqEm+9Ei08cMUsEldduXQPFq4G/GePPyLXADDsCxWP723iuWpcsNl2SZj/KEShOKc2yOnKXoxklq+1HcVnktOsaixJ/lYP22bP+URpgvGIwiZi8H87mrjnsqJbu3lCducGIYukI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748763936; c=relaxed/simple; bh=FIf7snkOmowedQqN9kuaTh69x/rYM73sAbWL7crO7Uo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fau+RuLRDinH/jPO9EaRt0+TYwm/I7tVwr6TVCa012dfdU9KmNPHu9ni1UtAzJ+fWujviJHUUpEjg85CpMyi2xcmVyacVKZhDIbPEp039I0zTZLWcGag68WkZ8sBXtCyYY/piYSYHiO5WgiLCpIysyYC17keCsSLG0w6YPnwv48= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=a2UQep+/; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="a2UQep+/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 59A2BC4CEE7; Sun, 1 Jun 2025 07:45:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1748763935; bh=FIf7snkOmowedQqN9kuaTh69x/rYM73sAbWL7crO7Uo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=a2UQep+/GdItLkmdWJOJcn4gJuliMlcu8Cn9b/9C17JXsfa1J8IF/vu2khvYQ1euy +4dZvcHZE8RWBr15fSgFRAsKbQsHoQSj4vn/50zwoHK1UsIocBCFsBHWyATe/BJT0Q 8x5x/81o0P16n4EukMe42ovCDEbV7ZXjq67JF1xw= Date: Sun, 1 Jun 2025 09:45:33 +0200 From: Greg Kroah-Hartman To: Andy Shevchenko Cc: David Matlack , Alex Williamson , Shuah Khan , Paolo Bonzini , Vinod Koul , Fenghua Yu , "Masami Hiramatsu (Google)" , Adhemerval Zanella , Jiri Olsa , Andrii Nakryiko , Wei Yang , Bjorn Helgaas , Takashi Iwai , Pierre-Louis Bossart , FUJITA Tomonori , WangYuli , Sean Christopherson , Andrew Jones , Claudio Imbrenda , Eric Auger , Josh Hilke , linux-kselftest@vger.kernel.org, kvm@vger.kernel.org, Jason Gunthorpe , Kevin Tian , Vipin Sharma , Pasha Tatashin , Saeed Mahameed , Adithya Jayachandran , Parav Pandit , Leon Romanovsky , Vinicius Costa Gomes , Dave Jiang , Dan Williams Subject: Re: [RFC PATCH 08/33] vfio: selftests: Validate 2M/1G HugeTLB are mapped as 2M/1G in IOMMU Message-ID: <2025060148-sandpit-snore-a49c@gregkh> References: <20250523233018.1702151-1-dmatlack@google.com> <20250523233018.1702151-9-dmatlack@google.com> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Sat, May 31, 2025 at 10:09:34PM +0300, Andy Shevchenko wrote: > On Fri, May 30, 2025 at 02:12:36PM -0700, David Matlack wrote: > > On Fri, May 23, 2025 at 4:30 PM David Matlack wrote: > > ... > > > > + if (access("/sys/kernel/debug/iommu/intel", F_OK)) > > > + return intel_iommu_mapping_get(bdf, iova, mapping); > > > + > > > > Oops, this should be !access(...). > > Hmm... Generally speaking that code is a hack. Is there any guarantee that > debugfs mount point is fixed to /sys/kernel/debug ? No, userspace can mount it anywhere :) But the kernel does create the mount point at /sys/kernel/debug/ by default, so hopefully it does end up there if it is present in the system, so you should be able to rely on it for testing. thanks, greg k-h