From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751860AbbKJTho (ORCPT ); Tue, 10 Nov 2015 14:37:44 -0500 Received: from gate.crashing.org ([63.228.1.57]:40274 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750893AbbKJThm (ORCPT ); Tue, 10 Nov 2015 14:37:42 -0500 Message-ID: <1447184187.31884.89.camel@kernel.crashing.org> Subject: Re: [PATCH v4 0/6] virtio core DMA API conversion From: Benjamin Herrenschmidt To: Joerg Roedel Cc: Andy Lutomirski , Andy Lutomirski , David Woodhouse , "linux-kernel@vger.kernel.org" , "David S. Miller" , sparclinux@vger.kernel.org, Christian Borntraeger , Cornelia Huck , Sebastian Ott , Paolo Bonzini , Christoph Hellwig , KVM , Martin Schwidefsky , linux-s390 , Linux Virtualization , "Michael S. Tsirkin" Date: Wed, 11 Nov 2015 06:36:27 +1100 In-Reply-To: <20151110102733.GJ2255@suse.de> References: <20151109133624-mutt-send-email-mst@redhat.com> <1447109937.31884.42.camel@kernel.crashing.org> <1447121076.31884.61.camel@kernel.crashing.org> <20151110102733.GJ2255@suse.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.1 (3.18.1-1.fc23) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2015-11-10 at 11:27 +0100, Joerg Roedel wrote: > > You have the same problem when real PCIe devices appear that speak > virtio. I think the only real (still not very nice) solution is to add a > quirk to powerpc platform code that sets noop dma-ops for the existing > virtio vendor/device-ids and add a DT property to opt-out of that quirk. > > New vendor/device-ids (as for real devices) would just not be covered by > the quirk and existing emulated devices continue to work. Why woud real devices use new vendor/device IDs ? Also there are other cases such as using virtio between 2 partitions, which we could do under PowerVM ... that would require proper iommu usage with existing IDs. > The absence of the property just means that the quirk is in place and > the system assumes no translation for virtio devices. The only way that works forward for me (and possibly sparc & others, what about ARM ?) is if we *change* something in virtio qemu at the same time as we add some kind of property. For example the ProgIf field or revision ID field. That way I can key on that change. It's still tricky because I would have to somewhat tell my various firmwares (SLOF, OpenBIOS, OPAL, ...) so they can create the appropriate property, it's still hacky, but it would be workable. Ben. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Herrenschmidt Subject: Re: [PATCH v4 0/6] virtio core DMA API conversion Date: Wed, 11 Nov 2015 06:36:27 +1100 Message-ID: <1447184187.31884.89.camel@kernel.crashing.org> References: <20151109133624-mutt-send-email-mst@redhat.com> <1447109937.31884.42.camel@kernel.crashing.org> <1447121076.31884.61.camel@kernel.crashing.org> <20151110102733.GJ2255@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20151110102733.GJ2255@suse.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org List-Archive: List-Post: To: Joerg Roedel Cc: linux-s390 , KVM , "Michael S. Tsirkin" , Sebastian Ott , "linux-kernel@vger.kernel.org" , Andy Lutomirski , Christian Borntraeger , Christoph Hellwig , Andy Lutomirski , sparclinux@vger.kernel.org, Paolo Bonzini , Linux Virtualization , David Woodhouse , "David S. Miller" , Martin Schwidefsky List-ID: On Tue, 2015-11-10 at 11:27 +0100, Joerg Roedel wrote: > > You have the same problem when real PCIe devices appear that speak > virtio. I think the only real (still not very nice) solution is to add a > quirk to powerpc platform code that sets noop dma-ops for the existing > virtio vendor/device-ids and add a DT property to opt-out of that quirk. > > New vendor/device-ids (as for real devices) would just not be covered by > the quirk and existing emulated devices continue to work. Why woud real devices use new vendor/device IDs ? Also there are other cases such as using virtio between 2 partitions, which we could do under PowerVM ... that would require proper iommu usage with existing IDs. > The absence of the property just means that the quirk is in place and > the system assumes no translation for virtio devices. The only way that works forward for me (and possibly sparc & others, what about ARM ?) is if we *change* something in virtio qemu at the same time as we add some kind of property. For example the ProgIf field or revision ID field. That way I can key on that change. It's still tricky because I would have to somewhat tell my various firmwares (SLOF, OpenBIOS, OPAL, ...) so they can create the appropriate property, it's still hacky, but it would be workable. Ben. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Herrenschmidt Date: Tue, 10 Nov 2015 19:36:27 +0000 Subject: Re: [PATCH v4 0/6] virtio core DMA API conversion Message-Id: <1447184187.31884.89.camel@kernel.crashing.org> List-Id: References: <20151109133624-mutt-send-email-mst@redhat.com> <1447109937.31884.42.camel@kernel.crashing.org> <1447121076.31884.61.camel@kernel.crashing.org> <20151110102733.GJ2255@suse.de> In-Reply-To: <20151110102733.GJ2255@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Joerg Roedel Cc: linux-s390 , KVM , "Michael S. Tsirkin" , Sebastian Ott , "linux-kernel@vger.kernel.org" , Andy Lutomirski , Christian Borntraeger , Christoph Hellwig , Andy Lutomirski , sparclinux@vger.kernel.org, Paolo Bonzini , Linux Virtualization , David Woodhouse , "David S. Miller" , Martin Schwidefsky On Tue, 2015-11-10 at 11:27 +0100, Joerg Roedel wrote: > > You have the same problem when real PCIe devices appear that speak > virtio. I think the only real (still not very nice) solution is to add a > quirk to powerpc platform code that sets noop dma-ops for the existing > virtio vendor/device-ids and add a DT property to opt-out of that quirk. > > New vendor/device-ids (as for real devices) would just not be covered by > the quirk and existing emulated devices continue to work. Why woud real devices use new vendor/device IDs ? Also there are other cases such as using virtio between 2 partitions, which we could do under PowerVM ... that would require proper iommu usage with existing IDs. > The absence of the property just means that the quirk is in place and > the system assumes no translation for virtio devices. The only way that works forward for me (and possibly sparc & others, what about ARM ?) is if we *change* something in virtio qemu at the same time as we add some kind of property. For example the ProgIf field or revision ID field. That way I can key on that change. It's still tricky because I would have to somewhat tell my various firmwares (SLOF, OpenBIOS, OPAL, ...) so they can create the appropriate property, it's still hacky, but it would be workable. Ben.