From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751675AbbKIM2N (ORCPT ); Mon, 9 Nov 2015 07:28:13 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58517 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751582AbbKIM2K (ORCPT ); Mon, 9 Nov 2015 07:28:10 -0500 Subject: Re: [PATCH v4 0/6] virtio core DMA API conversion To: "Michael S. Tsirkin" , Andy Lutomirski References: <20151109133624-mutt-send-email-mst@redhat.com> Cc: linux-kernel@vger.kernel.org, "David S. Miller" , sparclinux@vger.kernel.org, Joerg Roedel , Christian Borntraeger , Cornelia Huck , Sebastian Ott , Christoph Hellwig , benh@kernel.crashing.org, KVM , dwmw2@infradead.org, Martin Schwidefsky , linux-s390 , virtualization@lists.linux-foundation.org From: Paolo Bonzini Message-ID: <5640914D.6070401@redhat.com> Date: Mon, 9 Nov 2015 13:27:57 +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: <20151109133624-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 09/11/2015 13:15, Michael S. Tsirkin wrote: > Well that's not exactly true. I think we would like to make > it possible to put virtio devices behind an IOMMU on x86, > but if this means existing guests break, then many people won't be able > to use this option: having to find out which kernel version your guest > is running is a significant burden. > > So on the host side, we need to detect guests that > don't program the IOMMU and make QEMU ignore it. > I think we need to figure out a way to do this > before we commit to the guest change. What is the usecase for putting virtio devices behind an IOMMU, apart from: 1) "because you can" 2) using VFIO within the guest ? Case 1 can be ignored, and in case 2 the guest will do the right thing. > Additionally, IOMMU overhead is very high when running within the VM. > So for uses such as VFIO, we'd like a way to make something like > iommu-pt the default. That's not something that the kernel cares about. It's just a configuration issue. Paolo