From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751970AbbKCKYn (ORCPT ); Tue, 3 Nov 2015 05:24:43 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55119 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751016AbbKCKYk (ORCPT ); Tue, 3 Nov 2015 05:24:40 -0500 Subject: Re: [PATCH v3 0/3] virtio DMA API core stuff To: "Michael S. Tsirkin" , Andy Lutomirski References: <56307BD1.6010806@de.ibm.com> <1446019787.3405.203.camel@infradead.org> <20151028132331-mutt-send-email-mst@redhat.com> <1446039327.3405.216.camel@infradead.org> <20151028155105-mutt-send-email-mst@redhat.com> <1446041609.3405.228.camel@infradead.org> <20151028161424-mutt-send-email-mst@redhat.com> <1446042754.3405.237.camel@infradead.org> <20151028175136-mutt-send-email-mst@redhat.com> <20151029104301-mutt-send-email-mst@redhat.com> Cc: David Woodhouse , Christian Borntraeger , Andy Lutomirski , "linux-kernel@vger.kernel.org" , Joerg Roedel , Cornelia Huck , Sebastian Ott , Christoph Hellwig , Benjamin Herrenschmidt , KVM , Martin Schwidefsky , linux-s390 , Linux Virtualization From: Paolo Bonzini Message-ID: <56388B5D.6020508@redhat.com> Date: Tue, 3 Nov 2015 11:24:29 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151029104301-mutt-send-email-mst@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29/10/2015 10:01, Michael S. Tsirkin wrote: > > Everyone seems to agree that x86's emulated Q35 thing > > is just buggy right now and should be taught to use the existing ACPI > > mechanism for enumerating passthrough devices. > > I'm not sure what ACPI has to do with it. > It's about a way for guest users to specify whether > they want to bypass an IOMMU for a given device. It's not configured in the guest, it's configured _when starting_ the guest (e.g. -device some-pci-device,iommu-bypass=on) and it is reflected in the DMAR table or the device tree. The default for virtio and VFIO is to bypass the IOMMU. Changing the default can be supported (virtio) or not (VFIO, vhost-user). Hotplug need to check whether the parent bridge is has the same setting that the user desires for the new device. > 1. virtio ignores the iommu > 2. vhost user ignores the iommu > 3. dataplane ignores the iommu > 4. vhost-net ignores the iommu > 5. VFIO ignores the iommu > > I think so far I only saw patches for 1 above. 1 and 3 are easy. For 2 and 5 you can simply forbid configurations with vhost-user/VFIO behind an IOMMU. For 4 QEMU can simply not activate vhost-net and use the userspace fallback. However, IOMMU support in QEMU is experimental. We can do things a step at a time. Paolo