[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3 3/4] iommu: introduce iommu_groups


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Paul Durrant <paul.durrant@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <JBeulich@xxxxxxxx>
  • Date: Tue, 16 Jul 2019 11:20:18 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=suse.com;dmarc=pass action=none header.from=suse.com;dkim=pass header.d=suse.com;arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NHRHitF2jSx5xx56peBgHOaR3nf4wKK2GZ9g7tBjMMw=; b=X1lGSehv8xs4irktH1vl4VjLCgF/nmV4JH/iUzPJZTpukS6YhhjWZ87sS5uSiXxLM44puin6QjKQWIH4kf/DntR9qedbz1H2fEHf1nLxJLcTvN6HZkrGWk/TkatwyrRpcILalAifDcJMsUyuxVe+s2gUPOWI95DfSfSbmGkbMAmaAKYUO1WxaGyWYaDH21sHzeQLEtVcy3nY77aGIk7cQHld1ApE7OhNC5Y+5p2aKZKkqtwhXKBDneAmB/Jsi97dGoJ+asuIonTfkLJiLu96ROJlk/JiMb31adrh7Ota07rbt4iC4P4/+Z2J9Hzy6vl+/MwaWdQpmG6gJpA2tpE3QA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lQaAgG4E2/B9u1Ad4SpjKTahhyunFbnBIEeFODsRT4SmzWAx839FDE8hXVvQDT3oGXoqa33sdLiXm9OKdUgfftIcij6JjknV9vkzcchLi0eR4+zMT2kB1PsOsUcwB+VeqTPv9/IHMpIT8m+D25vxs7EPl4BYWi3ctWe/kSYTsqh6hkntgQzmsRWIRoXHk+eVU1Ant6t7iGa/0Vxj/FmndBDqhe00W8A4je6jaEZbukMYUJzx1SBsATt/IKJPW/ny5dLJ7FVVEkj0SlzaJhFtPxYo/F6s3S+C4cB8tnFyOyt1nKm+305KpOu7gSeecjypSM5rRD7GeYi1XFJHu/xjfA==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=JBeulich@xxxxxxxx;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, Ian Jackson <ian.jackson@xxxxxxxxxxxxx>, TimDeegan <tim@xxxxxxx>, Julien Grall <julien.grall@xxxxxxx>
  • Delivery-date: Tue, 16 Jul 2019 11:20:45 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVO7+5rqBhdjdwYEadjO/an1ZP4qbNCoHvgAAC7oCAAAFPc4AACp+A
  • Thread-topic: [PATCH v3 3/4] iommu: introduce iommu_groups

On 16.07.2019 12:41, Andrew Cooper wrote:
> On 16/07/2019 11:37, Jan Beulich wrote:
>> On 16.07.2019 12:26, Andrew Cooper wrote:
>>> On 16/07/2019 11:16, Paul Durrant wrote:
>>>> +int iommu_group_assign(struct pci_dev *pdev, void *arg)
>>>> +{
>>>> +    const struct iommu_ops *ops = iommu_get_ops();
>>>> +    int id;
>>>> +    struct iommu_group *grp;
>>>> +
>>>> +    if ( !ops->get_device_group_id )
>>>> +        return 0;
>>>> +
>>>> +    id = ops->get_device_group_id(pdev->seg, pdev->bus, pdev->devfn);
>>>> +    if ( id < 0 )
>>>> +        return -ENODATA;
>>>> +
>>>> +    grp = get_iommu_group(id);
>>>> +    if ( !grp )
>>>> +        return -ENOMEM;
>>>> +
>>>> +    if ( iommu_verbose )
>>>> +        printk(XENLOG_INFO "Assign %04x:%02x:%02x.%u -> IOMMU group %x\n",
>>> No unadorned hex numbers please.  This is a recipe for confusion during
>>> debugging.
>>>
>>> Either %#x, or %u, and needs to be fixed on commit if we go with that route.
>> I assume (hope) that you mean this for the right most number only; it's not
>> entirely unambiguous from your reply.
> 
> Oops yes - I only meant the IOMMU group formatter.
> 
> The PCI coordinates should get subsumed by %pp in fairly short order.

%op I (still) hope ;-)

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.