From: "Jan Beulich" Subject: Re: [PATCH v3 18/24] xen/passthrough: iommu_deassign_device_dt: By default reassign device to nobody Date: Mon, 23 Feb 2015 16:47:35 +0000 Message-ID: <54EB67B70200007800062BA5@mail.emea.novell.com> References: <1421159133-31526-1-git-send-email-julien.grall@linaro.org> <1421159133-31526-19-git-send-email-julien.grall@linaro.org> <1424451889.30924.363.camel@citrix.com> <54EB039202000078000625F8@mail.emea.novell.com> <54EAFC7F.6030101@linaro.org> <54EB0CF60200007800062657@mail.emea.novell.com> <1424705982.27930.172.camel@citrix.com> <54EB5745.8090709@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YPwAk-00086C-Ab for xen-devel@lists.xenproject.org; Mon, 23 Feb 2015 16:47:54 +0000 In-Reply-To: <54EB5745.8090709@linaro.org> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: xen-devel@lists.xenproject.org, stefano.stabellini@citrix.com, Ian Campbell , tim@xen.org List-Id: xen-devel@lists.xenproject.org >>> On 23.02.15 at 17:37, wrote: > On 23/02/15 15:39, Ian Campbell wrote: >> On Mon, 2015-02-23 at 10:20 +0000, Jan Beulich wrote: >>>>>> On 23.02.15 at 11:10, wrote: >>>> Right now, there is no possibility to reset a platform device in the >>>> kernel. There is some discussion about it but nothing more. >> >> "there is no possibility to reset a platform device" isn't quite true, >> there is certainly a theoretical possibility (i.e. it is obviously the >> case that a dom0 could be written to do so for at least some devices). > >> So what happens if such a dom0 arises in the future? I suppose the >> intention is that the user would having deassigned from domU and >> determined that there kernel has the necessary feature would do some >> sort of xl command to assign to dom0? > > The list of things to do for resetting a device would be: > - Deassign device from DOMU (though it's done during destruction) > - Assign the device to DOM0 and map MMIO > - Reset the device > > But that not my concern right now. As we agreed, this feature (i.e reset > a device) is not in the scope of this series. > > So assigning the device to DOM0 is not safe at all. Kind of confusing - above you state "assign the device to DOM0 and map MMIO" as a prereq step for resetting the device, yet then you state assigning it back to Dom0 is not safe. Which of the two do you mean after all? Jan