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

Re: [PATCH v3 04/17] xen/arm: xc_domain_ioport_permission(..) not supported on ARM.


  • To: Rahul Singh <Rahul.Singh@xxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Wed, 29 Sep 2021 07:30:24 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.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; bh=dOejfLP7LhKJrTKaI5uSV9u/URoVTJbE7lE88j5sq7U=; b=NV4+4kQx5uSKUY7MFTmbv1nTJb2/gppXCiaim63n0EBIdY/OaNXTwWiHATV2XwoFPImSgixObQKcavgJiGwu3qImbJmj7TLUZzVdVBMtB1i0NyDfdUDjQTUdpok6ZDoEcPQQ1k88TwHU5oB0YEEpHkHd6JEXjxcstQDrfFPL5rikcfEjZti7ZGanoZURPFpqXgMfdDVxRs+ZlICCxHMqgXaV0Q36KwQuUsDH2qZGxx0Du+YK5dFMbW/mIyBOdPYnJVxLYkeZoiS5J6YwKb/fAdWGMMpbXsQHtJR1EXJ7AIZgrXdsPc9IM9D/cD+QWY/+kfWqnboKXgV6LD17L5azYw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fh8wxvp2Cpq4qwrS/Q24udg4/f5eEKVeDpbQTPINsTMq/iwpLE65aZpnZUBHVgXiG34/qwRmiZSsVAjJ/20jmpbkmFudY3zMnAdgCw91MDrjR7zdhiWJINVe0yLpdQ1hK/PRFNa9QVfuVQoA6MIlb2FvTV7deqPgkQjQNAziJXq78kTk/neJg1UzT6dF69FetCTwzkcdwl84EBvxD2IFcphAfd9DvjG/GYmw7Kzt0i83Nfzy0lgms8BmfeAQqj+QWIG/SuIscjN6wYIB6A/k8CG9kF4rVLWGTEVxjqWI476Y1ax5HdjcLpJaOpyMGbX0XwoEjKjeBHYApBJmoUauIw==
  • Authentication-results-original: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andre Przywara <Andre.Przywara@xxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>
  • Delivery-date: Wed, 29 Sep 2021 07:30:47 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHXtJWDr/ZkVrSogUyoFTUx7ZyQTKu6no+A
  • Thread-topic: [PATCH v3 04/17] xen/arm: xc_domain_ioport_permission(..) not supported on ARM.

Hi Rahul,

> On 28 Sep 2021, at 19:18, Rahul Singh <rahul.singh@xxxxxxx> wrote:
> 
> ARM architecture does not implement I/O ports. Ignore this call on ARM
> to avoid the overhead of making a hypercall just for Xen to return
> -ENOSYS.
> 
> Signed-off-by: Rahul Singh <rahul.singh@xxxxxxx>
> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
Reviewed-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>

Cheers
Bertrand

> ---
> Change in v3: Added Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
> Change in v2:
> - Instead of returning success in XEN, ignored the call in xl.
> ---
> tools/libs/ctrl/xc_domain.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
> 
> diff --git a/tools/libs/ctrl/xc_domain.c b/tools/libs/ctrl/xc_domain.c
> index 23322b70b5..25c95f6596 100644
> --- a/tools/libs/ctrl/xc_domain.c
> +++ b/tools/libs/ctrl/xc_domain.c
> @@ -1348,6 +1348,14 @@ int xc_domain_ioport_permission(xc_interface *xch,
>                                 uint32_t nr_ports,
>                                 uint32_t allow_access)
> {
> +#if defined(__arm__) || defined(__aarch64__)
> +    /*
> +     * The ARM architecture does not implement I/O ports.
> +     * Avoid the overhead of making a hypercall just for Xen to return 
> -ENOSYS.
> +     * It is safe to ignore this call on ARM so we just return 0.
> +     */
> +    return 0;
> +#else
>     DECLARE_DOMCTL;
> 
>     domctl.cmd = XEN_DOMCTL_ioport_permission;
> @@ -1357,6 +1365,7 @@ int xc_domain_ioport_permission(xc_interface *xch,
>     domctl.u.ioport_permission.allow_access = allow_access;
> 
>     return do_domctl(xch, &domctl);
> +#endif
> }
> 
> int xc_availheap(xc_interface *xch,
> -- 
> 2.17.1
> 




 


Rackspace

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