From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A783CC0650E for ; Mon, 1 Jul 2019 08:59:50 +0000 (UTC) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 78F6920B7C for ; Mon, 1 Jul 2019 08:59:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 78F6920B7C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 36012714A; Mon, 1 Jul 2019 08:59:50 +0000 (UTC) Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 2C6B07142 for ; Mon, 1 Jul 2019 08:59:49 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id C1725832 for ; Mon, 1 Jul 2019 08:59:48 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id E20E3AD2A; Mon, 1 Jul 2019 08:59:46 +0000 (UTC) Date: Mon, 1 Jul 2019 10:59:44 +0200 From: "jroedel@suse.de" To: "Prakhya, Sai Praneeth" Subject: Re: Device specific pass through in host systems - discuss user interface Message-ID: <20190701085944.GB3131@suse.de> References: <20190610135617.GA27166@araj-mobl1.jf.intel.com> <20190611045614.GB6469@araj-mobl1.jf.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Cc: "Shankar, Ravi V" , "Tian, Kevin" , "Raj, Ashok" , Will Deacon , "iommu@lists.linux-foundation.org" , "Pan, Jacob jun" , "robin.murphy@arm.com" , "hch@lst.de" , "Lu, Baolu" X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: iommu-bounces@lists.linux-foundation.org Errors-To: iommu-bounces@lists.linux-foundation.org On Tue, Jun 11, 2019 at 05:27:15PM +0000, Prakhya, Sai Praneeth wrote: > 1. Since we already have "type" file, which is "read-only", we could make it R/W. > > The present value shows the existing type of default domain. > If user wants to change it (Eg: from DMA to IDENTITY or vice versa), he attempts to write the new value. > Kernel performs checks to make sure that the driver in unbinded and it's safe to change the default domain type. > After successfully changing the default_domain type internally, kernel reflects the new value in the file. > Ay errors in the process will be reported in dmesg. I prefer this way. Writing to the file should fail with -EBUSY when it is not safe to change the default domain-type. Writing should only succeed when no device in the group is assigned to a device driver. Regards, Joerg _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu