[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:11:55 +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=b6nTPjwHlcOinJr9lFEiEJx8Z1LsrJ2xWRznUplycrs=; b=lw6BUj1TxyhsYS60o0Sh6BHtsqjjbT3U8Yb7uEUEJ3JHRJQd6GCD30E/awJPXQb+iHJiflmQ3fSvhkvyUPP49WdEPWg5wzgbx8IhHSRL23G7bQOyDDJKc+pRKjfmWBaQPm/L5fHOU+IpZXl9+JjckQeN37zBM4cMCyOFDyw5gzI0WmpAZJC0iOr29DniDaCPKTivkxN6j55zImqUUF/Zb/LOllGVqzw23THytPRK7WhyURhlu5ijRa72wTGKic3NWhI3AiOA0VrcHf6k4YJFFvd6vJF+tF0WnZe+aXvOU/xEpxT8SqBwM7CjO7Z4d+/F0A/lCV4t2fY0+h37FprAKg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DT/XaOV6qTlV0fRD/4ycZGR5AQ+r8cUwB+q+aba1FGVWKUXQO/lslqgP1XvTL7ZkWW4zYQhLEnwkAFLlGZ7u9EhtLokLP9DNHiVx8E3lT119cznGc6fm+Y/Ui9of+Opsx6+Yon3sZbf1isGrKrmESVMvxZRMWSvGDSTD7Vqyu1mou3/jkd7Y/oTs3XwrLup6YV5bKuZ50ZelXw9UsaQ4umfzGoiaeJqcRaRzB8susKUkWaRSEIaZTuAVo9QsUHuZ2oe5Of4k3tcIydKPRY4HlX5uOP1fV5Zx85f5uMdMflpMEB1DOTMqCt9rNKoB0yie0I4bBTPUUp51SHy04u+15Q==
- 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:12:13 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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
here may differ of course, but in the absence of objections I consider
this easy enough to adjust while committing. If, of course, the
approach finds a majority in the first place - as indicated before I
don't view it as very desirable to enumerate all the IOMMU related
domctl-s in the common handler.
FTAOD I can accept x86'es arch_do_domctl() returning -ENOSYS, but only
for the purpose of not altering the pre-existing error code which would
be returned if making it there.
Jan
|