From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57608) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TMJpQ-00028f-Ug for qemu-devel@nongnu.org; Thu, 11 Oct 2012 10:33:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TMJpO-0006wb-7e for qemu-devel@nongnu.org; Thu, 11 Oct 2012 10:33:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:27490) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TMJpN-0006wK-Ug for qemu-devel@nongnu.org; Thu, 11 Oct 2012 10:33:34 -0400 Date: Thu, 11 Oct 2012 16:35:19 +0200 From: "Michael S. Tsirkin" Message-ID: <20121011143519.GE8983@redhat.com> References: <1349962023-560-1-git-send-email-avi@redhat.com> <1349962023-560-8-git-send-email-avi@redhat.com> <20121011133155.GA8983@redhat.com> <5076CAFE.8060205@redhat.com> <20121011134428.GB8983@redhat.com> <5076CD2A.8000703@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5076CD2A.8000703@redhat.com> Subject: Re: [Qemu-devel] [RFC v1 7/7] vhost: abort if an emulated iommu is used List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: qemu-devel@nongnu.org, liu ping fan , Blue Swirl , Alex Williamson , Anthony Liguori , Paolo Bonzini On Thu, Oct 11, 2012 at 03:44:10PM +0200, Avi Kivity wrote: > On 10/11/2012 03:44 PM, Michael S. Tsirkin wrote: > > On Thu, Oct 11, 2012 at 03:34:54PM +0200, Avi Kivity wrote: > >> On 10/11/2012 03:31 PM, Michael S. Tsirkin wrote: > >> > On Thu, Oct 11, 2012 at 03:27:03PM +0200, Avi Kivity wrote: > >> >> vhost doesn't support guest iommus yet, indicate it to the user > >> >> by gently depositing a core on their disk. > >> >> > >> >> Signed-off-by: Avi Kivity > >> > > >> > Actually there is no problem. virtio bypasses an IOMMU, > >> > so vhost works fine by writing into guest memory directly. > >> > > >> > So I don't think we need this patch. > >> > >> The pci subsystem should set up the iommu so that it ignores virtio > >> devices. If it does, an emulated iommu will not reach vhost. If it > >> doesn't, then it will, and the assert() will alert us that we have a bug. > > > > You mean pci subsystem in the guest? I'm pretty sure that's not > > the case at the moment: iommu is on by default and applies > > to all devices unless you do something special. > > I see where you are coming from but it does > > not look right to break all existing guests. > > No, qemu should configure virtio devices to bypass the iommu, even if it > is on. Okay so there will be some API that virtio devices should call to achieve this? > > Also - I see no reason to single out vhost - I think same applies with > > any virtio device, since it doesn't use the DMA API. > > True. > > -- > error compiling committee.c: too many arguments to function