From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54329) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cjJIE-0000k5-4k for qemu-devel@nongnu.org; Thu, 02 Mar 2017 00:28:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cjJIB-0008Jv-0K for qemu-devel@nongnu.org; Thu, 02 Mar 2017 00:28:46 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54298) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cjJIA-0008Iz-QJ for qemu-devel@nongnu.org; Thu, 02 Mar 2017 00:28:42 -0500 Date: Thu, 2 Mar 2017 07:28:39 +0200 From: "Michael S. Tsirkin" Message-ID: <20170302072807-mutt-send-email-mst@kernel.org> References: <1488425538-13785-1-git-send-email-peterx@redhat.com> <20170302071100-mutt-send-email-mst@kernel.org> <20170302052053.GN13926@pxdev.xzpeter.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170302052053.GN13926@pxdev.xzpeter.org> Subject: Re: [Qemu-devel] [PATCH v3] intel_iommu: check misordered init when realize List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Xu Cc: qemu-devel@nongnu.org, Paolo Bonzini , yi.l.liu@intel.com, Marcel Apfelbaum , Jintack Lim , Jason Wang , Alex Williamson On Thu, Mar 02, 2017 at 01:20:53PM +0800, Peter Xu wrote: > On Thu, Mar 02, 2017 at 07:13:08AM +0200, Michael S. Tsirkin wrote: > > On Thu, Mar 02, 2017 at 11:32:18AM +0800, Peter Xu wrote: > > > Intel vIOMMU devices are created with "-device" parameter, while here > > > actually we need to make sure the dmar device be created before other > > > PCI devices (like vfio-pci, virtio-pci ones) so that we know iommu_fn > > > will be setup correctly before realizations of those PCI devices (it is > > > legal that PCI device fetch these info during its realization). Now this > > > ordering yet cannot be achieved elsewhere, and devices will be created > > > in the order that user specified. We need to avoid that. > > > > > > This patch tries to detect this kind of misordering issue during init of > > > VT-d device, then report to guest if misordering happened. In the > > > future, we can provide something better to solve it, e.g., to support > > > device init ordering, then we can live without this patch. > > > > > > Signed-off-by: Peter Xu > > > > Unfortunately with virtio it's a regression, as it used to > > work with iommu. So I'm afraid we need to look into supporting > > arbitrary order right now :( > > No problem. > > But do you think that would be a possible material for 2.9? > > Thanks, > > -- peterx Looks like it's that or revert the virtio caching feature? -- MST