From: Ian Campbell Subject: Re: [RFC 14/19] xen/passthrough: dt: Add new domctl XEN_DOMCTL_assign_dt_device Date: Thu, 3 Jul 2014 12:54:41 +0100 Message-ID: <1404388481.17859.29.camel@kazak.uk.xensource.com> References: <1402935486-29136-1-git-send-email-julien.grall@linaro.org> <1402935486-29136-15-git-send-email-julien.grall@linaro.org> <53A019C5020000780001AE2D@mail.emea.novell.com> <53A04134.8040909@linaro.org> <53A05F1B020000780001B13C@mail.emea.novell.com> <53A0473A.7090902@linaro.org> <53A064DD020000780001B1A4@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1X2fbC-0003De-Qe for xen-devel@lists.xenproject.org; Thu, 03 Jul 2014 11:54:46 +0000 In-Reply-To: <53A064DD020000780001B1A4@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: Stefano Stabellini , tim@xen.org, Julien Grall , Ian Jackson , stefano.stabellini@citrix.com, xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On Tue, 2014-06-17 at 14:55 +0100, Jan Beulich wrote: > >>> On 17.06.14 at 15:48, wrote: > > I'm not sure why we function is used but from the DT pass-through POV, > > we only need to ask the hypervisor to assign this specific device to the > > guest. The hypercall will return "ok" if it has succeeded or an error if > > the device is not protected (i.e not behind an IOMMU). I don't see why > > we should have a test-assign hypercall in this case... > > The reason for its existence isn't entirely clear to me either - you may > want to ping whoever added this. Yes, I was about to suggest trawling through git log a bit. This may be an old xend-ism perhaps. I can sort of imagine an early sanity check early the availability of the devices before building the domain (despite the TOCTOU race perhaps that's useful?) The other use case might be to be able to list all assignable devices. Those are all wild guesses on my part though. Ian. > > > Anyway, I'm fine to introduce the hypercall for consistency but I don't > > plan to use it in the toolstack because it's pointless. > > It's the tools maintainers' call in the end, but my advice would be to not > have it used in the PCI case, but not in the DT one. Either rip it out on > the PCI side too, or have it be called even if not strictly needed. > > Jan >