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

Re: [PATCH v4] xen/iommu: cleanup iommu related domctl handling


  • To: Juergen Gross <jgross@xxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 20 Apr 2022 08:27:07 +0200
  • 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=mF+8wfBV4l29vYWlrfh5o9Jb8pNiIIu7yo85Nbqj+QE=; b=crC0cZB/gW+G3S+U1N1yK9MdfknKnKGH5LUy1IryF1/ON0d4oDQk0KyKqBrl9uSrGgEIT8h2HYPKm6xlYHgGYtcIYwOKAf3zxmQ1qT8GL7rjUn3YkVQ97rWrhH5PoKPmD/Qf5bNYML8sJZJ+YdTlpitmyz7pnFhImtcoT/lMI/gr3uB+R72MX2LMbJJNalFMkhuF4JDiBt01sfFWA/CxCrnE9Z6TJntvU1Bhd8T8pDP8RlQdifjR+++Mqdb5lELTEEaFzsd28QN6mfBMyoOtrr27JI9FG7DiqVBsVocPcBDLp3H6Fs6N8Vr4MOP5e09kiDje2E/8AMlluIEQ40Fz/g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QHzoub5ypQZYnvrUlT6jRMReyLp2ckiPL+cdUup9rSKg9O7rnl0dveVu6ZjGd3feSIoEZx+D2ZM9C7O0UxgUb0p7ZfDVGbUGQ8YCkJrgtupTAstMESG9svCaYVqX+tSEzgB9sBfj4fVcBO3GQu5sLbIDDJfpNd2XAzjnbpnGvOrsWysxtRyG31hkP2W6TbSnFUfOSjqYDrSYDNrluzMf3YWE/HoTaZ9fjVXZ1sIx6qy44i69lIKbE86IWRYvGkqXxpUFbp1B0qX4rE8QVNdS84t6wKQ8ocqp8r6miUXCq4tghG6IM9Qq1wY0FvNpqvk0qfyjfUfEtKxuHUkRdDx3OQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 20 Apr 2022 06:27:22 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 20.04.2022 08:22, Juergen Gross wrote:
> On 20.04.22 08:11, Jan Beulich wrote:
>> On 20.04.2022 07:57, Juergen Gross wrote:
>>> --- a/xen/include/xen/iommu.h
>>> +++ b/xen/include/xen/iommu.h
>>> @@ -341,8 +341,17 @@ struct domain_iommu {
>>>   /* Does the IOMMU pagetable need to be kept synchronized with the P2M */
>>>   #ifdef CONFIG_HAS_PASSTHROUGH
>>>   #define need_iommu_pt_sync(d)     (dom_iommu(d)->need_sync)
>>> +
>>> +int iommu_do_domctl(struct xen_domctl *domctl, struct domain *d,
>>> +                    XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl);
>>>   #else
>>>   #define need_iommu_pt_sync(d)     ({ (void)(d); false; })
>>> +
>>> +static inline int iommu_do_domctl(struct xen_domctl *domctl, struct domain 
>>> *d,
>>> +                                  XEN_GUEST_HANDLE_PARAM(xen_domctl_t) 
>>> u_domctl)
>>> +{
>>> +    return -ENOSYS;
>>> +}
>>
>> As said in reply to Andrew as well as in a number or earlier occasions,
>> I firmly think that this wants to be -EOPNOTSUPP, not -ENOSYS. Views
> 
> In libxl there is an explicit check for ENOSYS being returned for
> assigning/deassigning a device, same in the xc python bindings.

Urgh.

Jan




 


Rackspace

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