[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 10:37:38 +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=BIy8WRbdIzTVSDwLpP3JOpzuq5EmeP3OTJl6RQ+VQI4=; b=W90/dbkaC1j4HAVCbuoIihixfLyCw2LiOPafieMe8ikPxiT5yeYmmes87AyFJ94wCuQnXMhDZWlfgwFrBwZFFaK1SAsPgyRxZqXxbLbJUwwH93NsgwzakhPGdqMZXa6EDLO0KRd09ewScFtVL+BfqTySWdZhCk/wpJHfx1W/M8n8w6bk6ArkZhyoe1GvrN41TL8SL8359SM/XcHKwWNz/sSDFqo/I1/ksKCRAjSjTPny4zqj4wcwS7w+ITr5dKRQRBiFQlh/yb0mytVnX3MetWDwiQNDSIpxxrXg4TzU807q8ND6cE3g9DpYlUijYYEQMGxjJqf3adHaRrqiK5kxDw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hQfO8/C3qR2Bw8bUqccit1GOmMQi+G/FacubVeDSZHzZ/3sl+Kvol5NJy++3O/otM6xOfN8sda4QRIQh+bhsKf5k0vcv5ptcJVhpk5KHAxmLaxJ5Cn1jGBSEIj3OquoLeG5qUehHtG7Dj4fDLbHIIUGN7Ba0E/T7alKhnXFMrD5vfR6jh4ZRnJyJJdUw1PXMVk4ps8TEsktogBnWQMvofuqoZO9Y1lGZo7mG5U8+HyoBCPjmqXIbPkwUH37H5/CFndzvjKYZLXeqr4RBI0U/VYOGFvJdmbQ5wYXLa/rXiBB73JAn3dOSolwXN4wGcd410sJeFWcXzPSNqCprtT1cPQ==
- 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 10:39:29 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHVO7+5rqBhdjdwYEadjO/an1ZP4qbNCoHvgAAC7oA=
- Thread-topic: [PATCH v3 3/4] iommu: introduce iommu_groups
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.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|