From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751962AbbJGIBI (ORCPT ); Wed, 7 Oct 2015 04:01:08 -0400 Received: from mail-wi0-f173.google.com ([209.85.212.173]:34315 "EHLO mail-wi0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751196AbbJGIBG (ORCPT ); Wed, 7 Oct 2015 04:01:06 -0400 Subject: Re: [PATCH v3 2/3] uio_pci_generic: add MSI/MSI-X support To: Avi Kivity , Stephen Hemminger , Alex Williamson References: <1443991398-23761-1-git-send-email-vladz@cloudius-systems.com> <1443991398-23761-3-git-send-email-vladz@cloudius-systems.com> <20151005031159.GB27303@kroah.com> <56123493.9000602@scylladb.com> <20151005094932.GA5236@kroah.com> <56124EDB.3070701@scylladb.com> <20151006143821.GA11541@redhat.com> <5613DE26.1090202@cloudius-systems.com> <20151006174648-mutt-send-email-mst@redhat.com> <5613E75E.1040002@scylladb.com> <1444157480.4059.67.camel@redhat.com> <20151006223202.66ab0b87@samsung9> <1444167707.4059.88.camel@redhat.com> <5614C160.6000203@scylladb.com> <5614D110.5020308@cloudius-systems.com> Cc: "Michael S. Tsirkin" , Greg KH , Linux Kernel , hjk@hansjkoch.de, Jonathan Corbet , "Bruce.Richardson@intel.com" , avi@cloudius-systems.com, gleb@cloudius-systems.com, Alexander Duyck From: Vlad Zolotarov Message-ID: <5614D13F.7020008@cloudius-systems.com> Date: Wed, 7 Oct 2015 11:01:03 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <5614D110.5020308@cloudius-systems.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/07/15 11:00, Vlad Zolotarov wrote: > > > On 10/07/15 09:53, Avi Kivity wrote: >> On 10/07/2015 12:58 AM, Stephen Hemminger wrote: >>> Go ahead and submit a seperate taint bit for UIO as a patch. >>> >> >> Taint should only be applied if bus mastering is enabled (to avoid >> annoying the users of the original uio use case) > > Pls., note that this series would enable the legacy INT#X mode if > possible By default I meant. > and this, of course, without enabling bus mastering and without > tainting the kernel. > This means that the current users of uio_pci_generic won't feel/get > any difference after/if these patches are applied since before these > patches it could only be used with the devices that do have INT#X > capability. > >> >>> >>> On Tue, Oct 6, 2015 at 10:41 PM, Alex Williamson >>> > wrote: >>> >>> On Tue, 2015-10-06 at 22:32 +0100, Stephen Hemminger wrote: >>> > On Tue, 06 Oct 2015 12:51:20 -0600 >>> > Alex Williamson >> > wrote: >>> > >>> > > Of course this is entirely unsafe and this no-iommu driver >>> should taint >>> > > the kernel, but it at least standardizes on one userspace API >>> and you're >>> > > already doing completely unsafe things with uio. vfio >>> should be >>> > > enlightened at least to the point that it allows only >>> privileged users >>> > > access to devices under such a (lack of) iommu >>> > >>> > I agree with the design, but not with the taint argument. >>> > (Unless you want to taint any and all use of UIO drivers which >>> can >>> > already do this). >>> >>> Yes, actually, if the bus master bit gets enabled all bets are >>> off. I >>> don't see how that leaves a supportable kernel, so we might as well >>> taint it. Isn't this exactly why we taint for proprietary >>> drivers, we >>> have no idea what it has mucked with in kernel space. This just >>> moves >>> the proprietary driver out to userspace without an iommu to >>> protect the >>> host. Thanks, >>> >>> Alex >>> >>> >> >