From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (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 1BE2718C08 for ; Wed, 3 Jul 2024 14:35:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720017341; cv=none; b=gaWDJtCWuyIvVa3gjtiXd/6TwUVvZ4LZC+4jfe03AaCSH+VtjE5AFhX1N/UUi/U4p2RBfcOkKkLx/aSagff0YMW4SMTEG2Kv5VgBPLX2YH7QyjSJHqj0Ohxg+NVyIf0/9VAQLbonOVc6uaML2fwJsT+WFND0iQMgy4nYlVUuoMw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720017341; c=relaxed/simple; bh=fG/bQbz4zGDzjdtmGG4BM/JphqsFn64XCAczIMZFNZA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=f7pJAzfiHXauxnUYEp3aC6yzsWC3KDrkn5BI4z0Od9nWEX54PofHOIke/MtyZ4Wlld1BaTZ3iCCYgU3yjczVrm4FT9kWJ/BB+YMtsqrhs1Bx8fcqmsOLSbut4JxtLDKAaTf3vscYz7tj2YgiMD9tQ1h6O77dRq/fw8tyM77ud+Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id D1D0E68AFE; Wed, 3 Jul 2024 16:35:30 +0200 (CEST) Date: Wed, 3 Jul 2024 16:35:30 +0200 From: Christoph Hellwig To: Leon Romanovsky Cc: Christoph Hellwig , Jens Axboe , Jason Gunthorpe , Robin Murphy , Joerg Roedel , Will Deacon , Keith Busch , "Zeng, Oak" , Chaitanya Kulkarni , Sagi Grimberg , Bjorn Helgaas , Logan Gunthorpe , Yishai Hadas , Shameer Kolothum , Kevin Tian , Alex Williamson , Marek Szyprowski , =?iso-8859-1?B?Suly9G1l?= Glisse , Andrew Morton , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, iommu@lists.linux.dev, linux-nvme@lists.infradead.org, linux-pci@vger.kernel.org, kvm@vger.kernel.org, linux-mm@kvack.org Subject: Re: [RFC PATCH v1 00/18] Provide a new two step DMA API mapping API Message-ID: <20240703143530.GA30857@lst.de> References: <20240703054238.GA25366@lst.de> <20240703105253.GA95824@unreal> Precedence: bulk X-Mailing-List: iommu@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240703105253.GA95824@unreal> User-Agent: Mutt/1.5.17 (2007-11-01) On Wed, Jul 03, 2024 at 01:52:53PM +0300, Leon Romanovsky wrote: > On Wed, Jul 03, 2024 at 07:42:38AM +0200, Christoph Hellwig wrote: > > I just tried to boot this on my usual qemu test setup with emulated > > nvme devices, and it dead-loops with messages like this fairly late > > in the boot cycle: > > > > [ 43.826627] iommu: unaligned: iova 0xfff7e000 pa 0x000000010be33650 size 0x1000 min_pagesz 0x1000 > > [ 43.826982] dma_mapping_error -12 > > > > passing intel_iommu=off instead of intel_iommu=on (expectedly) makes > > it go away. > > Can you please share your kernel command line and qemu? > On my and Chaitanya setups it works fine. qemu-system-x86_64 \ -nographic \ -enable-kvm \ -m 6g \ -smp 4 \ -cpu host \ -M q35,kernel-irqchip=split \ -kernel arch/x86/boot/bzImage \ -append "root=/dev/vda console=ttyS0,115200n8 intel_iommu=on" \ -device intel-iommu,intremap=on \ -device ioh3420,multifunction=on,bus=pcie.0,id=port9-0,addr=9.0,chassis=0 \ -blockdev driver=file,cache.direct=on,node-name=root,filename=/home/hch/images/bookworm.img \ -blockdev driver=host_device,cache.direct=on,node-name=test,filename=/dev/nvme0n1p4 \ -device virtio-blk,drive=root \ -device nvme,drive=test,serial=1234